question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build failed on iOS with Error

See original GitHub issue

the library worked fine on another project and also on another system where Xcode version is 12.5 but it failed with error on Xcode 13 with the following Error

CompileSwift normal x86_64 /Users/Aftab/repos/winchit/customer/ios/Pods/Stripe/Stripe/STPAPIClient+Payments.swift (in target 'Stripe' from project 'Pods')
	CompileSwift normal x86_64 /Users/Aftab/repos/winchit/customer/ios/Pods/Stripe/Stripe/STPAPIClient+PushProvisioning.swift (in target 'Stripe' from project 'Pods')
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'Stripe' from project 'Pods')

no issue on another project on Xcode 13.0. tried all solutions that are given in the double shooting but nothing improved. its day two now.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:8

github_iconTop GitHub Comments

1reaction
charliecruzan-stripecommented, Mar 15, 2022

Although the paths are pointing to the stripe-ios pod here, I don’t think the error is caused by Stripe in this case. It’s more likely a local env issue (like the issue linked above and https://github.com/facebook/react-native/issues/28777)

I would try the fixes in those issues, and also just some general tips when running into Swift-related error messages when building for iOS:

  • add a new File.swift to your iOS project via Xcode (this will automatically create a bridging header and configure your pbproj file)
  • remove all usr/lib/swift from LIBRARY_SEARCH_PATHS, i.e.:
 				LIBRARY_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(SDKROOT)/usr/lib/swift",
+					"$(inherited)"
 				);
...
 				LIBRARY_SEARCH_PATHS = (
-					"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
-					"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
 					"\"$(inherited)\"",
 				);
0reactions
charliecruzan-stripecommented, Mar 4, 2022

What version of React Native are your projects on? I’m on Xcode 13.2.1 and RN 0.66.4 and not seeing this error.

If you’re on RN 0.67, please follow the link that @dhavalMindinventory shared and lmk if that resolves it for you as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build Failed — but no reason! | Apple Developer Forums
Hi, I'm experiencing weird Xcode behavior. I'm getting "build failed" after some alterations to the code, but Xcode will NOT give me the...
Read more >
Xcode 4: Build Failed, No Issues - ios - Stack Overflow
I've been getting 'Build Failed' with no errors in the Issue navigator(only warnings). Report navigator, though, displayed errors correctly.
Read more >
Steps to resolve failed to build iOS app error - YouTube
Steps to resolve failed to build iOS app error :1. rm ios /Podfile2. flutter pub upgrade3. flutter pub run4. flutter clean && flutter ......
Read more >
iOS build fail - KonyLogger.Framework error
Hi Team. We are facing issue building in iOS for our project. Attached is the error we see. We tried adding Binary and...
Read more >
Oh dear! Build errors? - LoopDocs - GitHub Pages
Solution: This error message is caused by having the Loop download folder in an iCloud mapped drive when doing the zip download. Move...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found