iosxcodereact-nativexcode14

How to add default provisioning profile for ios build in react native?


How to add default provisioning profile in xcode for running react native app in debug mode? Currently app fails to build due to missing provisioning profile.

Error message in Signing and capabilities: "sampleApp"requires a provisioning profile with the Push Notifications feature. Select a provisioning profile in the Signing & Capabilities editor.

Xcode version :- Version 14.3.1 (14E300c)

React native version:- "react": "16.13.1", "react-native": "0.63.3",

PS: push notifications has already been added to signing-capabilities section of xcode

enter image description here


Solution

  • The Provision Profile should be generated by Xcode automatically, even for Free Apple Developer Program. Check that "Automatically manage signing" is enabled and in Team field your personal account is selected. It should look like this:

    enter image description here

    After provision profile generation you will see next error "Provisioning profile "iOS Team Provisioning Profile: com.x.TestApp" doesn't support the Push Notifications capability". This is now related to your Push Notifications capability.

    If your want to run the app "here and now" and you actually do not care much about remote push notifications, you should probably remove this capability from Xcode. It should build now.

    Another story if you want to test remote push notifications. Without membership in Apple Developer Program it's impossible. If you are in Developer Program, please refer to How do I make my debug app version receive production push notifications on iOS? for more details.