thegrizzlylabs / geniusscan-sdk-demo

Demo apps for Genius Scan SDK
30 stars 38 forks source link

Xcode 'Archive' produces a corrupt archive #44

Closed Victorien-T closed 3 years ago

Victorien-T commented 3 years ago

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

To Reproduce

Versions

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

guillaume-tgl commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

You downgraded the version to 4.0.4? https://github.com/thegrizzlylabs/geniusscan-sdk-demo/blob/3ede97235847e57511919b696ae61dde9662a9f5/react-native-genius-scan-demo/package.json#L13

Victorien-T commented 3 years ago

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:

The archive succeeds but when I try to open the archive:

Capture d’écran 2021-07-05 à 15 52 59
Victorien-T commented 3 years ago

🤯 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 commented 3 years ago

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

guillaume-tgl commented 3 years ago

It seems like this is due to this Cocoapods issue: https://github.com/CocoaPods/CocoaPods/issues/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 commented 3 years ago

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 commented 3 years ago

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

guillaume-tgl commented 3 years ago

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: https://github.com/CocoaPods/CocoaPods/issues/10385

Victorien-T commented 3 years ago

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.

epandy-ahc commented 3 years ago

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

Daboe commented 3 years ago

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 https://github.com/bitrise-steplib/steps-xcode-archive/issues/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).

epandy-ahc commented 3 years ago

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!

epandy-ahc commented 3 years ago

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 commented 3 years ago

You could try: https://github.com/thegrizzlylabs/geniusscan-sdk-demo/issues/44#issuecomment-874552223 ...

epandy-ahc commented 3 years ago

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.

epandy-ahc commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

v4.0.11 is published and addresses this problem.

epandy-ahc commented 3 years ago

v4.0.11 is published and addresses this problem.

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