Flutter Xcode 12 archive build fails with Undefined symbol: _OBJC_CLASS_$_STPAPIClient - swift

Flutter version 1.22.2
Xcode 12.1
the app builds fine in the simulator but trying to generate an archive for App Store fails with: building for iOS-armv7 but attempting to link with file built for iOS-arm64
Undefined symbols for architecture armv7:
"OBJC_CLASS$_STPAPIClient", referenced from:
objc-class-ref in TPSStripeManager.o

I have deployment target to 11.0.
XCode->Pods->stripe_payment->Build Setting. Change the iOS Deployment Target to 11.0. Without knowing exact reason for the problem however this worked for me.
I have attached the xcode ss.

Xcode Pods:Adding armv7 to excluded architectures solved the issue.
This works for me.

Related

Xcode error: building for iOS Simulator, but linking in object file built for iOS

Never had a lot of problems until the time to buy Macbook Air M1. Just yesterday my app was build without any error in Xcode 12.4. I did not make any special changes and today build failed:
/Users/userName/Projects/MyApp/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/userName/Projects/MyApp/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please can you help me, how to solve it?
Looks like a missing Arm64 simulator slice in the OpenSSL-Universal CocoaPods distribution.
Make sure that you're using the latest version with pod update and contact the OpenSSL-Universal if there's still an issue.

facebook ios sdk build fails on device, works on simulator

I am trying to build an app (with ARC) that uses the facebook_ios_sdk (the latest version on github).
As recommended by Facebook, I used the build script to create a static library and then added it to the project.
Now when I build the project for an iPhone 5.1 Simulator, it works fine. However, on running it for an actual device (which is running 5.1), it gives the following build error -
ld: in ../facebook-ios-sdk/libfacebook_ios_sdk.a, file is universal but does not contain a(n) armv7 slice for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any suggestions on how to resolve this?
You could modify the build script for static library (which was too complicated for me), or just skip the library approach:
add the Facebook sources from SDK to your project
if using ARC, go to "target->build phases->compile sources" and mark all the Facbook source files with the--fno-objc-arc flag
That's it, works for me.
One work around that worked was to change the Valid Architectures from"armv6 armv7" to just armv6

__dyld_dyld_fatal_error upon app startup

I get a __dyld_dyld_fatal_error when trying to run my app on an iOS3 device:
dyld: Symbol not found: _OBJC_CLASS_$_NSBlockOperation Referenced from: /var/mobile/Application/.......
Expected in: /System/Library/Frameworks/Foundation.framework/Foundation
My guess is that this is due to the fact that blocks aren't supported in iOS3. However, I'm having trouble tracking down which library is referencing NSBlockOperation. Is there a tool similar to dependency walker, that I can use to figure out which module it is?
You need to set your deployment target to iOS 3.x.

problem while installing app on iphone

H everyone
i have up graded my xcode to xcode 4 & i am trying to install a app through this xcode on to a iphone but i am getting following error & i am unable to launch the app
warning: Unable to read symbols for /var/mobile/Applications/7A08B9EA-DD46-47B4-8E0C-BF081BDB1F4B/QIA All.app/QIA All (file not found).
dyld: Library not loaded: /System/Library/Frameworks/QuickLook.framework/QuickLook
Referenced from: /var/mobile/Applications/7A08B9EA-DD46-47B4-8E0C-BF081BDB1F4B/QIA All.app/QIA All
Reason: image not found
i have following warning in my app
ld: warning: directory not found for option '-F/Developer/new xcode/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/PrivateFrameworks'
is from this warning
how can i fix this?,,,thanx in advance
you have to check that all images and framework are included friend. may b any image is missing that is deleted from project folder .check if you get any image in red then add that image
Looks like your app is still trying to link to the 3.1.2 SDK. You need to change the SDK in the project settings to Base SDK: Latest (iOS 4.3). Also make sure to clear out any settings in the target for this value so that it inherits it properly.

Symbol not found error after upgrading to iPhone SDK 4.0, running on 3.1.3

I just upgraded to iPhone SDK 4.0, and recompiled my static libraries and app, and when I run it on a device with iOS 3.1.3 (using deployment target 3.0), it says:
dyld: lazy symbol binding failed: Symbol not found: ___sync_fetch_and_add_4
Referenced from: /var/mobile/Applications/7CA42202-DA9D-4A10-918D-593362E18000/renderer.app/renderer
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___sync_fetch_and_add_4
Referenced from: /var/mobile/Applications/7CA42202-DA9D-4A10-918D-593362E18000/renderer.app/renderer
Expected in: /usr/lib/libSystem.B.dylib
I found this blog post, but it doesn't seem to give any advice other than
try to use gcc 4.0 instead of 4.2, and
it should have been fixed in the SDK 4.0.
It appears that the code he points to was fixed in SDK 4.0 (and his example of a minimal app that exhibits this behavior works fine for me), but I'm still getting this error.
It turns out that I had only compiled the app with deployment target of 3.0; once I also compiled the libraries with deployment target of 3.0, it worked correctly.