Monday, December 8, 2014

Extensions Do they require a separate provisioning profile?

Yes, this is because extension is also considered as a separate app in the iOS runtime. There are two ways to do it. Extensions are separate targets from host app. They are actually having different bundle identifier suffixed with the bundle identifier of the containing app. 

1. Create a wildcard provisioning profile. 
2. create a separate bundle identifier and profile for it. 

The first one is not really recommended because some of the capabilities are enabled for the extension. For e.g. the AppGroups so that the host app and the extension can access the same container. 
Decided to choose the option #2, and for this, created a separate bundle identifier and created a provisioning profile which actually solved the problem of Xcode build step giving the error something like below. 

No matching provisioning profile Found. 

The provisioning profile specified in the build settings ("AppExtensionName") has an AppID of 'net.companyname.appName' which doesn't not match the bundle identifier net.companyname.AppName.extensionName.
Xcode can resolve this issue by downloading new provisioning profile. 

References: 

No comments:

Post a Comment