Search code examples
iosxcodeqr-code

how to open my ios Application by scanning QR Code from ios market app?


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.


Solution

  • Before doing this you should Custom URL Scheme register for your app

    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

    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];