The Limitations of Wildcard App IDs
As convenient as wild-card App IDs are, they cannot be used to test Push Notifications or In-App Purchase functionality on your device. Those two major features can be tested only with application-specific App IDs. What does that mean? Essentially, a wildcard App ID is assigned an asterisk (*) as its bundle identifier, which is what allows it be used with any Xcode project. If you navigate to the App IDs section of the online iPhone Developer Program Portal in your web browser, you'll notice that the wildcard App ID created by the Development Provisioning Assistant includes an asterisk as the bundle identifier that's attached to the unique ten-character bundle seed ID (see Figure 7-24).
- Figure 7-24. Push Notifications and In-App Purchase functionality cannot be tested with wildcard App IDs.
As you can see from Figure 7-24, the configuration options for Push Notifications and In-App Purchase are grayed out since they cannot be tested with wildcard App IDs. If you need to test one of those features in your application, then create a new App ID, specifying your Xcode project's reverse-domain name bundle ID as the bundle identifier. For example, I have an Xcode project called IAPTestApp that utilizes In-App Purchase, so I'll set com.ebutterfly.IAPTestApp as the App ID's bundle identifier (see Figure 7-25).
- Figure 7-25. To test Push Notifications or In-App Purchase, you'll need to create a new App ID with an app-specific bundle identifier.
With the new application-specific App ID saved in the Program Portal, you'll notice that its Push Notifications and In-App Purchase options are configurable (see Figure 7-26). For my example lAPTestApp App ID, I'll need to configure it for use with my In-App Purchase settings. This requires that I've already created an In-App Purchase Test User account online, as well as In-App Purchase items assigned to this application. For details on setting up these elements in iTunes Connect, please see the In-App Purchase section in Chapter 6.
- Figure 7-26. An application-specific App ID can be configured for testing Push Notifications and In-App Purchase.
But wait, you're not done! Xcode does not yet know about your new App ID. Your provisioning profile in Xcode Organizer still refers to the original wildcard App ID that was previously created by the Development Provisioning Assistant. To resolve this, you'll need to modify your existing provisioning profile settings in the online iPhone Developer Program Portal. In the Provisioning section's Development tab, choose to Edit > Modify your existing profile. The only property you'll want to change is the App ID setting. In my example, I'll select the new IAPTestApp from the App ID dropdown menu (see Figure 7-27).
- Figure 7-27. To use the new App ID, you'll need to modify and regenerate your provisioning profile, then download and reinstall it in Xcode Organizer.
After updating the provisioning profile settings online, regenerate the provisioning profile, and download it to your Mac desktop. Since you'll be replacing your original provisioning profile with a new updated one with the same name, you should first delete the old one from your test device's Summary tab in Xcode Organizer. Just to be safe, you might also want to delete the provisioning profile from the test device itself, which can be located in the Settings app at General > Provisioning.
With your test device still connected to your Mac, drag the new .mobileprovision file from the desktop onto the Xcode icon in your Dock. Xcode will automatically install that provisioning profile and will list it in the Organizer on your test device's Summary tab.
Continue reading here: App Store Identity Badge
Was this article helpful?
Readers' Questions
-
temesgen1 year ago
- Reply