Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

  • I have a working iOS App written in Swift.

  • I follow the description to integrate this app with Native React this procedure

  • I add to the package.json the following dependencies, and run yarn install: "@react-native-mapbox-gl/maps":"^8.1.0-rc.9", "prop-types": "^15.6.2",

  • I run pod install --repo-update and Archive on Xcode. OUTPUT: At this point the organizer displays my Archive.

  • I implement a basic view on mapbox following this procedure

  • I add to the Podfile requiring use_framework!, as described here or after use_framework!, no difference in the result after I hit pod install --repo-update.

  • I hit Archive on Xcode. OUTPUT: the archive is generated successfully, but doesn't show up on the organizer. If I try to open it, the archive is corrupted.

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?

like image 538
user1641876 Avatar asked Nov 20 '20 16:11

user1641876


2 Answers

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 !

like image 198
John Smith Avatar answered Oct 08 '22 00:10

John Smith


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...

like image 33
Aurélien Caraty Avatar answered Oct 08 '22 01:10

Aurélien Caraty