0

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

Vineeta
  • 85
  • 1
  • 11

1 Answers1

1

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.

Arhaiziya
  • 118
  • 7
  • Removing that push notification capability gives ""sampleApp" requires a provisioning profile.Select a provisioning profile in the Signing & Capabilities editor." error and we are not able to run the app. We have also tried adding post install script, config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' – Vineeta Jul 23 '23 at 07:17
  • @Vineeta Sorry, was, a little hasty and actually answered how to fix the next problem to appear after adding provision profile) Updated my answer – Arhaiziya Jul 24 '23 at 12:31