I have added the QR code reader code for the ios application Now I want to use the same code which can be used as Today extension in ios. I have used the following code for the application as well as for extension. The application works fine but it doesn't work with the extension.
I have used the code of http://www.appcoda.com/qr-code-ios-programming-tutorial/. But it does not start the _captureSession in the case of extension.
As per apple documentation accessing the camera from extension is restricted.
So it is not possible to use QR reader from extension because it uses iPhone camera.
If you want to open the QR reader from the today extension launch your app by calling its url scheme
NSURL *appURL = [NSURL URLWithString:@"YOURAPP_URLSCHEME://openReader"];
[self.extensionContext openURL:appURL completionHandler:nil];
In containing app, open the QR reader in AppDelegate's openURL:
method.