Cannot create a build archive in Flutter - xcode

When creating a build archive in Xcode, get these error messages. But I can run the app in my iOS device.
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_FlutterAppDelegate", referenced from:
_OBJC_CLASS_$_AppDelegate in AppDelegate.o
"_FlutterMethodNotImplemented", referenced from:
-[FLTFirebaseAdMobPlugin handleMethodCall:result:] in libfirebase_admob.a(FirebaseAdMobPlugin.o)
-[LocationPlugin handleMethodCall:result:] in liblocation.a(LocationPlugin.o)
___52+[FLTSharedPreferencesPlugin registerWithRegistrar:]_block_invoke in libshared_preferences.a(SharedPreferencesPlugin.o)
"_OBJC_CLASS_$_FlutterError", referenced from:
objc-class-ref in libfirebase_admob.a(FirebaseAdMobPlugin.o)
"_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
objc-class-ref in libfirebase_admob.a(FirebaseAdMobPlugin.o)
objc-class-ref in liblocation.a(LocationPlugin.o)
objc-class-ref in libshared_preferences.a(SharedPreferencesPlugin.o)
"_OBJC_CLASS_$_FlutterEventChannel", referenced from:
objc-class-ref in liblocation.a(LocationPlugin.o)
"_OBJC_METACLASS_$_FlutterAppDelegate", referenced from:
_OBJC_METACLASS_$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems that you are missing armv7 support in your Flutter.framework.That's why you could run on your arm64 device but failed to archive for generic devices. Follow these instructions to produce a Flutter.framework that supports armv7. Armv7 build instructions. And take a look at this issue might help.

Related

Red folders coming in Cordova project in Xcode 12.5.1

I am getting red folder in XCode. Folders name are Classes, plugins, Other sources and Resources. I have tried Giving path of the folders under Identity and Type section in the right side. On doing this i get
"No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64 arm64e)".
For this, I tried Build active architecture only to yes and no(tried both). And added VALID_ARCHS = arm64 arm64e armv7 armv7s x86_64. And doing this further gives the below error
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_OCFMenuHandler", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$__TtC11OCFramework17GlobalMenuManager", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$__TtC11OCFramework15DeepLinkManager", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_OCKMFLoginHandler", referenced from:
objc-class-ref in LoginViewController.o
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using XCode Version 12.5.1

Unity XCode project GooglePlayService build issue

I already added UIKit.framework,
but I will get build error in XCode below,
Anyone know how to fix that?
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_UIPresentationController", referenced from:
objc-class-ref in gpg(GPGToastView.o)
"_OBJC_CLASS_$_UIUserNotificationSettings", referenced from:
objc-class-ref in gpg(GPGManager.o)
"_OBJC_CLASS_$_UIMutableUserNotificationCategory", referenced from:
objc-class-ref in gpg(GPGManager.o)
"_OBJC_CLASS_$_UIMutableUserNotificationAction", referenced from:
objc-class-ref in gpg(GPGManager.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
XCode version:5.1.1
You want to check the Other Linker Flags and make sure you added -ObjC.
When you build the XCode project out from Unity, the Google Play Games plugin shows a dialog with instructions on how to build the project in XCode.
These instructions are noted in the documentation too at https://github.com/playgameservices/play-games-plugin-for-unity#building-for-ios.

Speechkit not working on iphone 6 (64 bit)

ld: warning: ignoring file /Users/Apple/Desktop/spechToTxt/SpeechKit.framework/SpeechKit, missing required architecture x86_64 in file /Users/Apple/Desktop/spechToTxt/SpeechKit.framework/SpeechKit (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SKRecognizer", referenced from:
objc-class-ref in ViewController.o
"_OBJC_CLASS_$_SpeechKit", referenced from:
objc-class-ref in ViewController.o
"_SKSearchRecognizerType", referenced from:
-[ViewController saySomthingTap:] in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
To support Speech kit you need OS 10.0 and above then and then only you can able to run speechkit on iPhone.
You need the latest version of SpeechKit framework to support 64bit architecture.

How to resolve the ONLY_ACTIVE_ARCH=YES error in Xcode 6?

I am running a project in Xcode 6 ,I am facing this error can any one help to resolve the issue . I has changed valid architecture to armv7 armv7s arm64 then the issue not shown again , but i was getting other error for file while is not support for 64 bit. I am getting below errors
"_OBJC_CLASS_$_OAAsynchronousDataFetcher", referenced from:
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_OAConsumer", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_OADataFetcher", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
"_OBJC_CLASS_$_OAMutableURLRequest", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_OARequestParameter", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_OAToken", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).
Waiting for response.
I was facing same issue, I just Replace the Twitter Library with new Library that support arm64.
Please download the updated library from https://github.com/bengottlieb/Twitter-OAuth-iPhone/tree/master/Twitter%2BOAuth
and one more thing update library path on Buid Settings -> Library Search Path very carefully
Remember me in your prayers :)
Go to Build Settings --->Architectures--->Build Active Architectures only--->Release -->NO

Meaning of XCode clang error "not found in architecture i386"

I'm not sure what these errors mean or what to do about them. I moved a folder and some files around in Finder, and then added them back to my project.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_IASKSettingsReader", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
"_OBJC_CLASS_$_IASKSettingsStoreUserDefaults", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
"_OBJC_CLASS_$_IASKSpecifierValuesViewController", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
"_OBJC_CLASS_$_IASKPSTitleValueSpecifierViewCell", referenced from:
objc-class-ref in IASKAppSettingsViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is followed by these error messages (which I can't copy as text)
I had just compiled successfully before the files were moved and added.
The class IASKSettingsReader/IASKSettingsStoreUserDefaults/... is not being linked. Please check that you have it included on your Xcode project and in the Build Phases of your project under Compile Sources, if not add them.

Resources