user1641876
user1641876

Reputation: 79

Xcode builds successfully a corrupted archive, not showing in organizer, as soon as cocoapods installs react-native-mapbox-gl from Podfile

The problem seems not new, as here, but the solutions proposed didn't work. I tried also several other approaches to understand what's going on (see here). To replicate, this is the process:

If I remove the pod file of mapbox and I Archive the project after hitting pod install --repo-update, the archive works and shows up in the organizer. Here the same description.

The project runs both as debug and release on a real iPhone 8. Mapbox works well. However, it doesn't work on simulator, nor archive. I can leave with the former, but I can't push on App store because of the latter.

I would not give up as Mapbox is very nice and provides lots of features. What could it be?

Upvotes: 6

Views: 2370

Answers (3)

Denis
Denis

Reputation: 383

It looks like mapbox issue. I had the same issue and instead of downgrading the cocoapods I used this solution:

  1. Edit your package.json, set:

"@react-native-mapbox-gl/maps": "^8.2.0-beta1", 2. Run yarn install or npm install. 3. Put the code into your ios/Podfile between pre_install do |installer| and end: $RNMBGL.pre_install(installer)

And between post_install do |installer| and end:

$RNMBGL.post_install(installer)
  1. Run cd ios && pod install

After these steps I was able to generate to archive.

Upvotes: 0

Aurélien Caraty
Aurélien Caraty

Reputation: 359

I got the exact same problem with :

  • @react-native-mapbox-gl/maps": "8.1.0"
  • COCOAPODS: 1.10.1
  • Xcode 12.4

The archive was corrupted (missing parts like the plist)

The trick for me was to remove the copy dsym build phase of the @react-native-mapbox-gl-mapbox-static pod

This phase was causing build failure with some config and malformed archive with others, I don't really get the crux of the problem but may be it can help some of you...

Upvotes: 3

John Smith
John Smith

Reputation: 329

SOLUTION :

sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.9.3
rm Podfile.lock
rm -rf Pods
pod install

LAST MESSAGES :

Same here. Impossible to find any solution.

Xcode is building a incomplete archive file. (By incomplete, I mean that in the archive package, some files are missing, like info.plist)

If this can help, I'm using MapboxGL too.

Edit : Found this https://github.com/react-native-mapbox-gl/maps/issues/1097#issuecomment-725689831

Edit 2: This link was the solution !

Upvotes: 3

Related Questions