magiclabs / magic-ios

MagicSDK library for IOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find module 'BigInt' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator

EktaAlphait opened this issue · comments

  • Frame Work react-native

i cloned demo application for magic-ios. https://github.com/magiclabs/magic-ios-demo.

Build failed in xcode 13 with the following Error:
Could not find module 'BigInt' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator.

Here is the screen shot:

Screenshot 2022-01-25 at 3 37 55 PM

Hey @EktaAlphait. Which package manager did you try? SPM or Cocoapods?
If you use RN with the iOS library, SPM shall work just fine or even you could clone the repo as it's open-source now. 😄

We tried with SPM. We followed all the steps given on the below links :
https://magic.link/docs/login-methods/email/integration/ios
https://github.com/magiclabs/magic-ios-ext

We also added the package dependencies as mentioned but still we are getting the same error

Screenshot 2022-01-31 at 11 07 27 AM

Screenshot 2022-01-31 at 11 17 01 AM
Screenshot 2022-01-31 at 11 25 36 AM
Screenshot 2022-01-25 at 3 37 55 PM

Another possible cause is that you're using M1 chip Mac. If that's the case, try to open the Xcode in Rosetta and rebuild the project.

If the error still persists, please lmk.

Reference: https://stackoverflow.com/questions/66659449/could-not-find-module-xxxx-for-target-x86-64-apple-ios-simulator-found-arm

  • Open using Rosetta

We tried the above solution, opened Xcode using Rosetta. This solved the BigInt issue. But we are getting another error
"Pods/RCT-Folly/folly/container/detail/F14Table.cpp:41:10: Thread-local storage is not supported for the current target".

ScreenShot:

Screenshot 2022-02-01 at 10 51 56 AM

What we tried :

  1. Tried to change ios deployment target.
  2. Tried to set Build Active Arch = yes.

We are able to solve above issue and build app successfully. But we are getting another error when we calling the below given function:

m.auth.loginWithMagicLink({ email: loginData.email });

"Error: Magic SDK Error: [MODAL_NOT_READY] Modal is not ready".

Screenshot 2022-02-01 at 4 16 55 PM

Screenshot 2022-02-01 at 4 20 56 PM

Same issue here

@franzwarning Hi, could you elaborate on which error you're having and in what procedure?

Adding the following line in the Podfile may help to mitigate this issue

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SKIP_INSTALL'] = 'NO'
      config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
    end
  end
end