Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 'Archive' produces a corrupt archive #44

Closed
Victorien-T opened this issue Jun 30, 2021 · 22 comments
Closed

Xcode 'Archive' produces a corrupt archive #44

Victorien-T opened this issue Jun 30, 2021 · 22 comments

Comments

@Victorien-T
Copy link

Victorien-T commented Jun 30, 2021

I have the exact same problem than in this issue: https://github.com/react-native-mapbox-gl/maps/issues/1097

To Reproduce

  • npx react-native init RNGeniusScanTest
  • cd RNGeniusScanTest
  • yarn add @thegrizzlylabs/react-native-genius-scan
  • edit Podfile to set platform :ios, '11.0'
  • cd ios && pod install
  • Open ios/RNGeniusScanTest.xcworkspace in Xcode
  • Set build to 'Any iOS Device' and set signing
  • Build with Product > Archive. Wait.
  • Build completes without errors, but it doesn't show up in Organizer
  • When trying to open the build from /Library/Developer/Xcode/Archives, get error 'The archive may be corrupt or unreadable.'

Versions

@thegrizzlylabs/react-native-genius-scan 4.0.9
Xcode: 12.5.1
React Native 0.63.4
Cocoapods 1.10.1

@guillaume-tgl
Copy link
Contributor

Sorry for the late reply.
I've just try with our demo app and I don't have any issue creating an archive of the project.

Could you have a look at it and let me know if you this problem with our demo app too?

@Victorien-T
Copy link
Author

Victorien-T commented Jul 5, 2021

Sorry for the late reply.
I've just try with our demo app and I don't have any issue creating an archive of the project.

Could you have a look at it and let me know if you this problem with our demo app too?

Hi, thanks for the answer, I see that you updated the demo, I'll give a try and I'll let you know, thx.

@Victorien-T
Copy link
Author

I don't have any issue creating an archive of the project.

Just to be sure, did you try to open it? I don't have problem do create an archive neither, It is just impossible to open.

@Victorien-T
Copy link
Author

You downgraded the version to 4.0.4?

"@thegrizzlylabs/react-native-genius-scan": "^4.0.4",

@Victorien-T
Copy link
Author

Sorry for the late reply.
I've just try with our demo app and I don't have any issue creating an archive of the project.
Could you have a look at it and let me know if you this problem with our demo app too?

Hi, thanks for the answer, I see that you updated the demo, I'll give a try and I'll let you know, thx.

Well this is not working for me. What I did:

  • download the demo folder
  • run npm install
  • run pod install in ios folder
  • open the demo.xcworkspace in Xcode
  • set signing
  • product > archive

The archive succeeds but when I try to open the archive:
Capture d’écran 2021-07-05 à 15 52 59

@Victorien-T
Copy link
Author

🤯 Actually I was not completely honest with you, I did not npm install, I did yarn... and that seems to be why it didn't work! I just retried with npm and it worked and then with yarn again and it didn't. I also tried npx pod-install with no success.

The problem is we do use yarn for our app :/

@guillaume-tgl
Copy link
Contributor

guillaume-tgl commented Jul 6, 2021

Ok, I can reproduce with yarn install now. I'll try to understand what causes this issue.

@guillaume-tgl
Copy link
Contributor

It seems like this is due to this Cocoapods issue: CocoaPods/CocoaPods#10385. Removing the BCSymbolMaps from our SDK iOS xcframeworks (in node_modules/@thegrizzlylabs/react-native-genius-scan/ios/GSSDK) should solve the issue until we provide a better fix. Can you try that?

@Victorien-T
Copy link
Author

It seems like this is due to this Cocoapods issue: CocoaPods/CocoaPods#10385. Removing the BCSymbolMaps from our SDK iOS xcframeworks (in node_modules/@thegrizzlylabs/react-native-genius-scan/ios/GSSDK) should solve the issue until we provide a better fix. Can you try that?

It worked! Not a long term solution but at least I'm not blocked anymore. Thanks!

@Victorien-T
Copy link
Author

Hello @guillaume-tgl, have you found a more sustainable solution?

@guillaume-tgl
Copy link
Contributor

guillaume-tgl commented Jul 22, 2021

No, not yet, since the problem seems to come from Cocoapods. On your side however, you could try to apply the Workaround suggested in the issue: CocoaPods/CocoaPods#10385

@Victorien-T
Copy link
Author

No, not yet, since the problem since to come from Cocoapods. On your side however, you could try to apply the Workaround applied in the issue: CocoaPods/CocoaPods#10385

It doesn't seem to work unfortunately.

@7100SW
Copy link

7100SW commented Aug 4, 2021

We are using the same versions mentioned above and blocked with the same Corrupted Archive error.

@Daboe
Copy link

Daboe commented Aug 11, 2021

We experience the same problem. However, downgrading the cocoapods install to version 1.9.3 (from the most recent one, at this time 10.2) also "solves" the problem. Upgrading to a beta of cocoapods (v1.11) makes the problem worse, as the project then fails to compile.

We came across this post bitrise-steplib/steps-xcode-archive#219 , unrelated (it's not about GeniusScan) but with the same symptoms. The xcarchive is produced, but malformed (among other issues with the archive, a plist file at root level is missing).

@7100SW
Copy link

7100SW commented Aug 13, 2021

We experience the same problem. However, downgrading the cocoapods install to version 1.9.3 (from the most recent one, at this time 10.2) also "solves" the problem. Upgrading to a beta of cocoapods (v1.11) makes the problem worse, as the project then fails to compile.

We came across this post bitrise-steplib/steps-xcode-archive#219 , unrelated (it's not about GeniusScan) but with the same symptoms. The xcarchive is produced, but malformed (among other issues with the archive, a plist file at root level is missing).

I shall try it then with Pod version 1.9.3 and will report back. Thanks!

@7100SW
Copy link

7100SW commented Aug 13, 2021

We experience the same problem. However, downgrading the cocoapods install to version 1.9.3 (from the most recent one, at this time 10.2) also "solves" the problem. Upgrading to a beta of cocoapods (v1.11) makes the problem worse, as the project then fails to compile.
We came across this post bitrise-steplib/steps-xcode-archive#219 , unrelated (it's not about GeniusScan) but with the same symptoms. The xcarchive is produced, but malformed (among other issues with the archive, a plist file at root level is missing).

I shall try it then with Pod version 1.9.3 and will report back. Thanks!

Well, I had no luck. I downgraded CocoaPods to 1.9.3. I am not able to create the archive file. Error is: "Building for iOS but linking in object file ... built for iOS Simulator." I tried the solutions mentioned here (https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios) but I still could not make it go past that error.

@Daboe
Copy link

Daboe commented Aug 17, 2021

You could try: #44 (comment) ...

@7100SW
Copy link

7100SW commented Aug 17, 2021

You could try: #44 (comment) ...

Thank you. Yup, I tried it. I deleted the symbol file and it allowed XCode to build the archive. I uploaded the archive to TestFlight and then installed it on my iPhone. It just crashes on launch.

@7100SW
Copy link

7100SW commented Aug 18, 2021

You could try: #44 (comment) ...

Thank you. Yup, I tried it. I deleted the symbol file and it allowed XCode to build the archive. I uploaded the archive to TestFlight and then installed it on my iPhone. It just crashes on launch.

My latest:

  1. Tried using the latest CocoaPods beta but it was worst. It would not build at all.
  2. Tried the work around of adding a post install script. It did not work - the archive does not show up in the Organizer Window.
  3. Deleted the symbol file manually. Archive file is successfully created. I was able to upload it to TestFlight and install in the iPhone.

For me, deleting the symbol file is the only workaround that works.

@bvirlet
Copy link
Contributor

bvirlet commented Aug 18, 2021

Hi all.

We're going to publish a new version of the SDK with removed BCSymbolMaps and we'll re-add them when the CocoaPods issue is solved.

@bvirlet
Copy link
Contributor

bvirlet commented Aug 18, 2021

v4.0.11 is published and addresses this problem.

@7100SW
Copy link

7100SW commented Aug 20, 2021

v4.0.11 is published and addresses this problem.

I downloaded and verified that it fixes the build Archive issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants