Objc-class-ref error in couchbase lite in iOS cocoapods xcode 9 - xcode9

Integrating CouchbaseLite in iOS application causing error through cocoapods . Here is error i am getting :
Undefined symbols for architecture x86_64: “OBJC_CLASS$_CBLManager”,
referenced from: objc-class-ref 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)
I also raised issue on couchbase-lite forum :
https://forums.couchbase.com/t/bjc-class-ref-error-in-couchbase-lite-in-ios-cocoapods-xcode-9/14744?u=st.shubh.tiwari

The “Other Linker” flags was set to “-ObjC”. Change that to $(inherited). That will ensure that Cocoapods is able to include the appropriate flags. Otherwise your cocoa pods install won’t go through fine.
This really helps me to resolve my issue . Big Thanks to CouchBase community.

Related

Undefined symbols for architecture arm64: previous solution doesn't work in Xcode 12.5.1

I am working on a flutter project. My project includes tflite and amplify packages. it works fine with android but whenever I try to build it in Xcode I am getting this following errors:
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FlutterStandardTypedData", referenced from:
objc-class-ref in tflite(TflitePlugin.o)
enter code here
"_FlutterMethodNotImplemented", referenced from:
-[TflitePlugin handleMethodCall:result:] in tflite(TflitePlugin.o)
"OBJC_CLASS$_FlutterMethodChannel", referenced from:
objc-class-ref in tflite(TflitePlugin.o)
"OBJC_METACLASS$_FlutterAppDelegate", referenced from:
OBJC_METACLASS$_AppDelegate in AppDelegate.o
"OBJC_CLASS$_FlutterAppDelegate", referenced from:
OBJC_CLASS$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help me with this. I have been stuck with this issue for more than a week now. Thank you.
I have added a snippet from Xcode which shows the current settings for Architectures. There are past suggestions to add arm64 as a Valid architectures. However, as you see there is no option for that. I added arm64 in excluded architectures as shown in the picture. It didn't work for me.

Can not build DJI sample application due to missing required architecture armv7

I am trying to update the DJI SDK of my app to the latest version (i.e. v4.10 for DJISDK/UXSDK and v1.5 for DJIWidget) in order for it to be compatible with Matrice 200 V2 series. I have come across an error which I was able to reproduce as well with the sample application from the DJI Mobile-UXSDK-iOS repo.
Basically when I try to archive the app it have this error showing up:
ld: warning: directory not found for option '-F/Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Frameworks'
ld: warning: directory not found for option '-F/Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/../DJIWidget'
ld: warning: ignoring file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-UXSDK-iOS/iOS_UXSDK/DJIUXSDK.framework/DJIUXSDK, missing required architecture armv7 in file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-UXSDK-iOS/iOS_UXSDK/DJIUXSDK.framework/DJIUXSDK (2 slices)
ld: warning: ignoring file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-SDK-iOS/iOS_Mobile_SDK/DJISDK.framework/DJISDK, missing required architecture armv7 in file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-SDK-iOS/iOS_Mobile_SDK/DJISDK.framework/DJISDK (2 slices)
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_DUXBatteryWidget", referenced from:
_OBJC_CLASS_$_MyBatteryWidget in MyBatteryWidget.o
objc-class-ref in PanelsCollectionsViewController.o
"_OBJC_METACLASS_$_DUXDefaultLayoutViewController", referenced from:
_OBJC_METACLASS_$_DefaultLayoutViewController in DefaultLayoutViewController.o
"_OBJC_METACLASS_$_DUXBatteryWidget", referenced from:
_OBJC_METACLASS_$_MyBatteryWidget in MyBatteryWidget.o
"_OBJC_CLASS_$_DUXStatusBarViewController", referenced from:
objc-class-ref in PanelsCollectionsViewController.o
"_OBJC_CLASS_$_DUXDefaultLayoutViewController", referenced from:
_OBJC_CLASS_$_DefaultLayoutViewController in DefaultLayoutViewController.o
"_OBJC_CLASS_$_DJISDKManager", referenced from:
objc-class-ref in MainViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Before this version everything worked fine, so I guess it is a problem with the newest DJI SDK version.
I am using the ObjectiveC sample code, and the app works fine in debug mode running it on an iPad Pro.
In case anyone is running into this problem, it seems that the new DJI SDK is not compatible with armv7 architectures, so the solution here is to go to the XCode Build Settings tab of your project and remove armv7 under Valid Architectures as it was done by this commit on the DJI Mobile-SDK-iOS repo.

Failed to add Firebase Database.framework without Cocoapods

I'm trying to add firebase's Database.framework without Cocoapods, but have compilation error
Undefined symbols for architecture arm64:
"_kFIRDefaultAppName", referenced from:
+[FIRDatabase databaseForApp:] in FirebaseDatabase(FIRDatabase.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error
Does anyone know which framework I should add too? Thanks
So from this question Use of unresolved identifier 'FIRDatabase' when using Firebase , I can see that FirebaseDatabase depends on FirebaseAnalytics. After add all FirebaseAnalytics framework into the project, everthing works as expected. Hope this helps others too

xCode - Undefined symbols for architecture x86_64: MWPhotoBrowser

I'm trying to use the MWPhotoBrowser project in my project. I followed the whole installation process and was able to import the MWPhotoBrowser.h file. When I tried to build, I run into this error...
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MWPhotoBrowser", referenced from:
objc-class-ref in PhotoBrowserViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know how to resolve this?
Thanks
For anyone getting this issue...Please check if you correctly linked your project to the libMWPhotoBrowser.a file under Build Phases in your target settings !

Plugin issue (game centre and storekit)?

I was trying to deploy a game to an iOS device,these error shows up. Now is this because the plugins need to be upgraded?
Undefined symbols for architecture armv7:
"UnityGetGLViewController()", referenced from:
+[GameCenterManager showViewControllerModallyInWrapper:] in libGameCenterPlugin.a(GameCenterManager.o)
+[GameCenterManager dismissWrappedController:] in libGameCenterPlugin.a(GameCenterManager.o)
+[GameCenterManager unityViewController] in libGameCenterPlugin.a(GameCenterManager.o)
-[StoreKitManager displayStoreWithProductId:] in libStoreKit.a(StoreKitManager.o)
___45-[StoreKitManager displayStoreWithProductId:]_block_invoke in libStoreKit.a(StoreKitManager.o)
-[StoreKitManager productViewControllerDidFinish:] in libStoreKit.a(StoreKitManager.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
We need solve this problem your unity version , xcode version. update please.
Now, just tell you symbol(s) not found for architecture armv7 issue is generation in old plugin

Resources