Thursday 27 April 2017

Upload an app with share extension to App store in iOS

I discussed in Sharing data between app and a share extension blog. In this you will find what is app extension and how to share data between an app and a share extension .

After adding a new target in our app for a share extension and running it on device , the next question comes in mind is that which app id we will use for uploading an app to iTunes connect. An app extension is bundled with the app when we create a binary of the app and installed when we install the app on the device.

Because each target have separate app id, so we need to create a separate app id for the target in developer site and have to create separate provisioning profile for each target.

So follow these steps to create a share extension and upload it on iTunesConnect:

After adding a new target for the share extension in the project, set the bundle identifier for this new target in target setting in Xcode and then visit the developer site to create a new app id for this new target.

1) In developer site, create a new app id  for your share extension and enter valid details for it like     bundle identifier which you added in target setting of the share extension in Xcode.

2) After creating app id for the share extension , create the provisioning profile for the new app id. Here you should create development , adhoc and app store provisioning profile.
     Download all necessary provisioning profile and switch back to Xcode.

3) In Xcode , set the downloaded provisioning profile for the share extension by selecting the share extension target and set developer and app store provisioning profile here.
     Also make sure you have also set the correct provisioning profile for your main app targets.

4)Now it's time to create an app on iTunes in order to upload it for reviewing by Apple. So visit     iTunesConnect and login with valid credentials.

5) This is the main answer to the question,"Which app id will be used for creating an app on iTunes , which has a target for share extension". As we discussed earlier, your share extension is bundled with main app so , we create an app with the app id of your main app not with the app id of share extension.
 So create an app with  app id of your main iOS app and fill all necessary information here to create an app and save it.

6) Now in Xcode , if you have setup all the things correctly, it's time to create an archive of the     project and upload it to iTunesConnect. So select project from project navigator window in Xcode      and create an archive from Product-> Archive menu.
  Here as you follow the steps, you will see your share extension is bundled with the main app. and that's it.

Reference:developer.apple.com

3 comments:

  1. Hai Good information shared about IOS. Keep sharing updated ios tutorials. This blog post is really helpful.

    ReplyDelete
  2. The information you’ve shared in this blog is very interesting to read. Thanks for sharing such quality information.
    app development Nashville
    app developers Nashville

    ReplyDelete