Search code examples
objective-cimessageios-extensions

How to oppen base application from extension in iOs


I'm trying to open base application from iMessage app, which is an extension in my xcode project(added as target app). Im using[self.extensionContext openURL:url completionHandler::^(BOOL success) {}];

but it doesn't work. here is info.plist in base app

here is info.plist in imessages extension

Am i doing something wrong ?


Solution

  • Actually i found the right answer. I was opening base app from another viewController using the extensionContext property of MSMessagesAppViewController, but that viewController was presenting on top of the rootVC. It happens that rootVC opens urls very well, but any other doesn't. So i simply request my rootVC to open url using extensionContext.