Home > Back-end >  React native ios xcode producing corrupt archives
React native ios xcode producing corrupt archives

Time:04-19

I have an app being built with React Native. When I go to archive it, the organizer doesn't open, but I can see it in finder at "/Users/user182072/Library/Developer/Xcode/archives". When I double click, it shows the following error: "The archive could not be installed. The archive may be corrupt or unreadable."

When running the app on a simulator (iPhone or iPad), it runs correctly, with no errors produced.

I suspect that it might have something to do with the build phases. The Compile Sources includes "AppDelegate.m", "File.swift", and "main.m". Copy Bundle Resources includes "GoogleService-info.plist", "main.jsbundle", "Images.xcassets" and "LaunchScreen.storyboard".

I got this error last week, somehow got it fixed, and when I went to archive again yesterday, the error came back. Not sure anymore where to look or what to fix. I don't know if I've given enough info for help, please let me know if not.

CodePudding user response:

Finally got the archives to be successfully built, and this is what I believe fixed it.

Under the "Products" folder, my [AppName].app was highlighted in red. After going to the Product -> Build, it ran and successfully finished and the [AppName].app was no longer red. Without cleaning the build folder, I just ran Product -> Archive and it successfully Archived. When opening the archive in Finder, "Products", "dSYMs", "BCSymbolMaps", "SCMBlueprint" and the Info.plist were all there.

Before doing that, I also ran 'pod deintegrate' and then 'pod install', but not sure if that was part of the solution.

Hopefully this helps someone else that might be experiencing the same issues.

Happy Building!

  • Related