4

I just created an application with bundle identifier com.example.xyz

and also generated provisioning and certificates for the same. Now , I needed to use Push Notification Service Extension to use Rich notification So I created new target with name AppNameNotificationService and tried to run the app on device, but it didn't work bcoz the extension target I created have bundle ID com.example.xyzNotificationServie which mismatch with the provisionaning I created for my application.

So, what I did is I created new APP ID on developer account with the bundle ID com.example.xyzNotificationServie and generated provisioning for the same.

Now everything is working fine. i used extension and everything works great. But Rich push notification only works if I run the extension target not with the actual App target. It's ok as I know every extensions works like this.

But now, I am confused that If I will upload my app on iTC then what should be my app bundle identifier?

What should I archieve from Xcode, either App target or extension target?

can anyone help ??

1 Answers1

0

An app extension is installed with your main app on the device. An app extension is a target we add in our main project. An extension is bundled with the main project. So your main app id will be used to upload the app with extension to app store.

  • I think so, but if I am running my app with the main target then its not wrking with extension. And I have created new bundle ID for extension too. So, I am yet not clear what to do .... – Krishna Datt Shukla Apr 10 '17 at 07:30
  • To test it , set the adhoc providing profile for both your app and app extension and achieve your project. In process of creating an adhoc ipa , you will see, both your app and app extension are bundled in it.Then create an link and install your app on the device. It should work. – Jitendra Solanki Apr 10 '17 at 07:48
  • The extension is not able to even build with the adHoc provisioning of App bcoz both have different app itentifier. – Krishna Datt Shukla Apr 10 '17 at 07:52
  • Each target have different bundle identifier so you must have to have separate provisioning profile for each. You can't use the adhoc provisioning profile of the app . For extension you have to create another one with designated bundle identifier. – Jitendra Solanki Apr 10 '17 at 08:19
  • Yes @Jitendra, I have done it. my question is not about this. Please read complete question carefully. – Krishna Datt Shukla Apr 10 '17 at 09:00
  • As I mentioned in answer, Your main app id will be used to upload the app with extension to app store, so your main app's bundle identifier will be used and as I told , as you archive an adhoc build , you will create an App store build by creating separate provisioning profile for both main app and extension with designated app id and you have to archieve with main project as you did with adhoc build. – Jitendra Solanki Apr 10 '17 at 09:09
  • 1
    @KrishnaDattShukla, yes it is. Your project's app id will be used in iTunes to create an app with a share extension. I get one of my app with share extension approved using this approach. – Jitendra Solanki May 01 '17 at 09:58