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

[BUG] Build error in iOS - The following build commands failed: SwiftCompile normal arm64 Compiling #2793

Open
josedomingos919 opened this issue Jul 1, 2024 · 2 comments
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS

Comments

@josedomingos919
Copy link

Hello, when upgrading the react-native-iap library to version ^12.15.0 the build on iOS is failing!

Description

When i run: yarn ios --simulator="iPhone 15 Pro"

** BUILD FAILED **

The following build commands failed:
SwiftCompile normal arm64 Compiling\ LatestPromiseKeeper.swift /Users/user/Documents/goldies-app-client/node_modules/react-native-iap/ios/LatestPromiseKeeper.swift (in target 'RNIap' from project 'Pods')
SwiftCompile normal arm64 /Users/user/Documents/goldies-app-client/node_modules/react-native-iap/ios/LatestPromiseKeeper.swift (in target 'RNIap' from project 'Pods')
(2 failures)

Screenshots

image

Environment:

  • react-native-iap: "^12.15.0"
  • react-native: "0.63.5"
  • Platforms (iOS, Android, emulator, simulator, device): iOS, Simulator (iPhone 15)
  • MacBook M1 Pro
  • pod version 1.15.2
  • gem version 3.0.3.1
  • node version v14.21.3
  • yarn version 1.22.22

To Reproduce
Steps to reproduce the behavior:

  1. Open project
  2. Install yarn add react-native-iap last version or ^12.15.0
  3. cd ios and pod install
  4. cd.., yarn ios --simulator="iPhone 15 Pro"

Attention

I found a solution on stack overflow which is to add EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64 x86_64;
to the pod that is breaking ios/Pods/Target Support Files/RNIap/RNIap.debug.xcconfig and the build passed, so the CTO asked to request to open this issue to see what is the most efficient solution to this problem so that we don't have to create a fork of the library and fix the problem or create a patch of the pod.

Thanks!!

@hyochan
Copy link
Member

hyochan commented Jul 6, 2024

Could you please test the example project in the repo and compare it with your setup? I suspect the issue is not related to our library, but more likely due to react-native dependencies. 🤔

cc @arthurgeron, the contributor for LatestPromiseKeeper, just in case.

@hyochan hyochan added 🙏 help wanted Extra attention is needed 📱 iOS Related to iOS labels Jul 6, 2024
@zentus
Copy link

zentus commented Sep 19, 2024

When I run npx -y eas-cli build --platform ios --local --profile development on my local machine (Apple M1), I get the following error:

[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE] 	SwiftCompile normal arm64 Compiling\ LatestPromiseKeeper.swift /var/folders/2q/rxlt_3q965s8jrck6jhr3fbh0000gn/T/eas-build-local-nodejs/0c1b1855-768b-4e8a-8d0b-c246c27612a5/build/node_modules/react-native-iap/ios/LatestPromiseKeeper.swift (in target 'RNIap' from project 'Pods')

This command was working before upgrading react-native-iap from 12.13.2 to 12.15.1. It also still seems to work on non-M1 machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS
Projects
None yet
Development

No branches or pull requests

3 participants