xcode 如何通过从 ios 市场应用程序扫描二维码来打开我的 ios 应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25032530/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to open my ios Application by scanning QR Code from ios market app?
提问by Anand3777
My task is want to open my application when the QR code is start scanning on ios device, like android apps, in android apps if qr scanning is detected, after the result it is opening some of the application.
我的任务是当二维码开始在 ios 设备上扫描时打开我的应用程序,如 android 应用程序,如果检测到 qr 扫描,则在 android 应用程序中打开一些应用程序。
回答by Jogendra.Com
Before doing this you should Custom URL Scheme register for your app
在执行此操作之前,您应该为您的应用注册自定义 URL 方案
Registering a Custom URL Scheme
After these steps you need to make QR code for your app and store in local DB of that app you're using. When scan QR code then get your app custom url and using this url you can open your app easily. Try this may be help full
完成这些步骤后,您需要为您的应用制作二维码并将其存储在您正在使用的该应用的本地数据库中。当扫描 QR 码然后获取您的应用程序自定义 url 并使用此 url 时,您可以轻松打开您的应用程序。试试这可能有帮助
after get Your custom url of your app try this for open application..
获取您的应用程序的自定义网址后,请尝试使用此打开应用程序..
UIApplication *ourApplication = [UIApplication sharedApplication];
NSString *ourPath = @"your app Custom URL"; //For Example Like this @"com.myCompany.myapp"
NSURL *ourURL = [NSURL URLWithString:ourPath];
[ourApplication openURL:ourURL];