React Native app code signing issue

Hello,

I am building a React Native application and it has both the Facebook SDK and OneSignal SDK included. When I try to distribute the app, there are multiple "Asset validation failed" errors.

Signing is set to "Automatically manage signing", there are no build errors.

I have searched around the internet and forums, tried some possible solutions, but ran into the same issue.

This is what I added to the Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
      target.build_configurations.each do |config|
        config.build_settings["CODE_SIGN_IDENTITY[sdk=macosx*]"] = "-"
      end
    end
  end
end

But it didn't work, so I removed this block.

Do you have any ideas how to resolve this issue?

After countless hours of trial and error, I managed to solve the issue by creating provisioning profiles manually:

  1. Go to https://developer.apple.com/account/resources/profiles/list
  2. Create a new Distribution / App Store profile
  3. Select the App ID
  4. Generate and download the profile

Repeat the above steps for all targets.

When distributing the app in Xcode, select "Manually manage signing".
On the next screen, configure the profiles for the corresponding targets.

The upload should now proceed without a signature error.

Not sure why the automatically managed signing is not working.
The only drawback I see to the manual signing is keeping track of the expiration date for the profiles.

React Native app code signing issue
 
 
Q