Error: "library not found for -lStripe" when building flutter app for ios
1,344
I opened an issue on GitHub for this problem.
The solution I found is:
- Changed deployment target to iOS 11.0 or later
- Close Xcode
- Install (or update to) the latest version of cocoapods
gem install cocoapods
- Go to your project root directory and run
flutter clean
andflutter build ios
- Reopen Xcode and try to run your app
Author by
Tommimon
Updated on December 25, 2022Comments
-
Tommimon over 1 year
I'm trying to build a Flutter app for ios (android app works)
In this app I'm using the package stripe_payment to interact with the stripe APIs but when I build the app from Xcode I get this error
library not found for -lStripe
How can I solve it?
Here is the full error log:
Ld /Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Products/Release-iphoneos/Runner.app/Runner normal (in target 'Runner' from project 'Runner') cd /Users/catalina/StudioProjects/my_project/ios /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios11.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk -L/Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Products/Release-iphoneos -L/Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Products/Release-iphoneos/Stripe -L/Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Products/Release-iphoneos/flutter_secure_storage -L/Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Products/Release-iphoneos/stripe_payment -L/Users/catalina/StudioProjects/my_project/ios/Flutter -F/Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Products/Release-iphoneos -F/Users/catalina/StudioProjects/my_project/ios/Pods/../Flutter -F/Users/catalina/StudioProjects/my_project/ios/Pods/Stripe/InternalFrameworks/static -F/Users/catalina/StudioProjects/my_project/ios/Pods/Stripe/InternalFrameworks/static/Stripe3DS2.xcframework/ios-arm64 -F/Users/catalina/StudioProjects/my_project/ios/Pods/Stripe/InternalFrameworks/static/Stripe3DS2.xcframework/ios-arm64_x86_64-simulator -F/Users/catalina/StudioProjects/my_project/ios/Pods/Stripe/InternalFrameworks/static/Stripe3DS2.xcframework/ios-x86_64-maccatalyst -F/Users/catalina/StudioProjects/my_project/ios/Flutter -filelist /Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner_lto.o -fobjc-arc -fobjc-link-runtime -ObjC -lStripe -lflutter_secure_storage -lstripe_payment -framework Contacts -framework CoreLocation -framework Flutter -framework Foundation -framework PassKit -framework Security -framework Stripe3DS2 -framework WebKit -framework Flutter -lStripe3DS2 -lPods-Runner -Xlinker -dependency_info -Xlinker /Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Intermediates.noindex/Runner.build/Release-iphoneos/Runner.build/Objects-normal/arm64/Runner_dependency_info.dat -o /Users/catalina/Library/Developer/Xcode/DerivedData/Runner-hgvbbahjovcxxohahkimphhvkars/Build/Products/Release-iphoneos/Runner.app/Runner ld: library not found for -lStripe clang: error: linker command failed with exit code 1 (use -v to see invocation)
I read that this may be the solution so here is what I have in the "Link Binary With Libraries" section
And this is what I see if click add and I search for stripe
Unfortunatly adding any of those doesn't solve the error
EDIT:
I changed target to my iPhone end now I'm getting "Framework not found Stripe3DS2"
-
Paul Asjes over 3 yearsThis looks like the type of thing you probably want to create an issue for on the project's Github page, if you haven't already: github.com/jonasbark/flutter_stripe_payment/issues
-