acmeyer9 acmeyer9 - 11 days ago 5
iOS Question

How to add a parent app to existing standalone iMessage application

I recently built a new iOS 10 iMessage application. Originally, I thought I was only going to need to build a standalone iMessage application so I used the XCode template for doing that. Problem now is that I've realized you cannot open external urls from within an iMessage application but only from within it's parent app. So now I want to add a parent application but I can't figure out what's the best way to go about it.

The iMessage application template comes with a parent target but it doesn't seem to be set up the same way a normal iOS application is (i.e. theres no scheme set up for it, build phases are missing, etc.). I've tried adding an application to the XCode project but I just can't get it to work with the already created extension.

Anyone know the best way to create a parent application after you've already started a standalone iMessage app? Any help to point me in the right direction would be appreciated.

Answer

I wanted to do this for my app as well. Your best bet is to create a new iOS app target in your project, and create an iMessage app target for that. Then you can set up this new target to use your existing code.

But an important caveat if you've already published your standalone iMessage app to the App Store: the word I've gotten is that you can't change it later to have a parent application in that case.

If that's the case for you, you'll need to make a new app entry in iTunes Connect, and possibly update your current iMessage-only app to use a shared App Group Container for any data you need to migrate to the new app.

Comments