MSAL iOS build with Carthage - linker error - ios

I'm following the instructions here (https://github.com/AzureAD/microsoft-authentication-library-for-objc) to add the MSAL library to my (new) project. I'm using Xcode 10.1. I have a Cartfile with just one entry for MSAL. When running Carthage update --platform iOS I get a linker error (lots of them actually):
Undefined symbols for architecture armv7s:
"_MSID_DEFAULT_FAMILY_ID", referenced from:
-[MSALAccountsProvider accountForHomeAccountId:error:] in MSALAccountsProvider.o
-[MSALAccountsProvider accountForUsername:error:] in MSALAccountsProvider.o
-[MSALAccountsProvider allAccountsForAuthority:error:] in MSALAccountsProvider.o
"_OBJC_CLASS_$_MSIDConfiguration", referenced from:
objc-class-ref in MSALAccountsProvider.o
"_OBJC_CLASS_$_MSIDTelemetryBaseEvent", referenced from:
_OBJC_CLASS_$_MSALTelemetryDefaultEvent in MSALTelemetryDefaultEvent.o
"_OBJC_CLASS_$_MSIDAADV2IdTokenClaims", referenced from:
objc-class-ref in MSALResult.o
And so on - many such symbols.
Interesting the macOS one builds for me, even though on Github MSAL says macOS is not supported :)
Any help is greatly appreciated!

Related

Symbols not found for Armv7 and Arm64 in MicroBlink framework

I'm getting the following error when building my project in Xcode 10.1 (I have to use this old version at work).
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MBDocumentOverlayViewController", referenced from:
objc-class-ref in BlinkIdPlugin.o
"_OBJC_CLASS_$_MBMrtdRecognizer", referenced from:
objc-class-ref in BlinkIdPlugin.o
"_OBJC_CLASS_$_MBViewControllerFactory", referenced from:
objc-class-ref in BlinkIdPlugin.o
"_OBJC_CLASS_$_MBRecognizerCollection", referenced from:
objc-class-ref in BlinkIdPlugin.o
"_OBJC_CLASS_$_MBDocumentOverlaySettings", referenced from:
objc-class-ref in BlinkIdPlugin.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm getting the .framework and .bundle from the blinkid-ios sample in MicroBlink's github repository. I tried git-lfs pullbut nothing happened which leads me to believe that all lfs files were pulled(?). I'm also using cordova 7.1.0 (I also have to use this old version at work).
Any help appreciated.
For anyone encountering a similar issue in the future - this specific issue was caused by the change in the case in the name - MicroBlink was renamed to Microblink. Even though git-lfs pulled the files, Cordova couldn't see the actual framework.
Disclaimer: I work for the Microblink team that's behind the BlinkID library in question.

Installing the segment-iOS analytics-iOS in xcode manually

I am trying to add analytics-iOS manually by directly adding the Analytics folder to the project making it as a group, after adding when I try to build the project I get error as "Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in SEGStoreKitTracker.o
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in SEGStoreKitTracker.o "
and other 6 errors
I was able to solve this. There was a dependency on StoreKit framework which i had to add in Link Binaries with Libraries in Build Phase.

GTMSessionFetcherService linker error when trying to build my xcode project

I'm using Cocoapods to install the latest GPG and used the latest XCode 7.3 and iOS SDK 9.3 but I couldn't manage to make the build of my project and stuck with these 5 linker error which I couldn't solve :
"_OBJC_CLASS_$_GSDK_GTMSessionFetcherService", referenced from:
objc-class-ref in gpg(GIPNetworkImage.o)
objc-class-ref in libSignIn_external.a(GIDSignIn.o)
"_GSDK_kGTMSessionFetcherStatusDomain", referenced from:
-[GSDK_GTMOAuth2SignIn authCodeObtained] in libGTMOAuth2_external_external.a(GTMOAuth2SignIn.o)
"_GSDK_GTMSessionFetcherAssertValidSelector", referenced from:
-[GSDK_GTMOAuth2Authentication authorizeRequest:delegate:didFinishSelector:] in libGTMOAuth2_external_external.a(GTMOAuth2Authentication.o)
-[GSDK_GTMOAuth2SignIn initWithAuthentication:authorizationURL:delegate:webRequestSelector:finishedSelector:] in libGTMOAuth2_external_external.a(GTMOAuth2SignIn.o)
"_OBJC_CLASS_$_GSDK_GTMSessionFetcher", referenced from:
objc-class-ref in libGTMOAuth2_internal_external.a(GTMOAuth2SignInInternal.o)
objc-class-ref in libGTMOAuth2_external_external.a(GTMOAuth2Authentication.o)
objc-class-ref in libGTMOAuth2_external_external.a(GTMOAuth2SignIn.o)
objc-class-ref in gpg(GPGClearcutLogger.o)
objc-class-ref in libSignIn_external.a(GIDSignIn.o)
objc-class-ref in libSignIn_external.a(GIDRuntimeConfigFetcher.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've even tried to add GTMSessionFetcherService source in my project but can't seem to fix this. Any idea?
Thanks
I ran into a very similar build issue while trying to integrate Google Sign-In. The non-Cocoapods instructions mention adding GoogleSignIn.framework to your project, but they don't tell you that you need to link the rest of the frameworks in the sign-in SDK as well:
GoogleAppUtilities.framework
GoogleAuthUtilities.framework
GoogleNetworkingUtilities.framework
GoogleSignIn.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
All you have to do is add GoogleOpenSource.framework from the Google+ iOS SDK to libs
then
add GoogleOpenSource to your robovm.xml
Finally make sure the GoogleSignIn robopod is present
Add libsqlite3.dylib, libz.tbd, and AddressBook.framework to "Linked Frameworks and Libraries". This solved my issue.Also I copied these frameworks too.
GoogleAppUtilities.framework
GoogleAuthUtilities.framework
GoogleNetworkingUtilities.framework
GoogleSignIn.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
I had this same issue for Xamarin.iOS.
To solve, I simply updated my Xamarin.Google.iOS.SignIn package to the latest version (4.0.1.1) and updated Xamarin.Build.Download to latests (0.4.2).
Updating these two packages caused extra packages to be added to my project. I believe it's these extra packages that fixed the native linker errors I was getting (same exact errors as Yanuar Tanil).

Undefined symbols for architecture i386: "_OBJC_CLASS_$_FBSBJSON", referenced from: objc-class-ref in FacebookController.o

I just download new facebook ios sdk.
It reports error when build,
ld: warning: directory not found for option '-F"/Users/myname/cd-standard/apple/apple_ios/Projects/fotoshow_ios/my app/../../../../../../Documents/FacebookSDK"'
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_FBSBJSON", referenced from:
objc-class-ref in FacebookController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
the prohect with former facebook ios sdk works well, I only install the new ios sdk using downloaded installer.
I also check and find out all frameworks needed are there, but it still reports error
your comment welcome
FBSBJSON was removed in v3.5 of the Facebook SDK (released April 18, 2013), but your FacebookController class is still referencing it. You should remove the reference in your FacebookController class, or if you're using some other SDK which wraps the Facebook SDK, you'll probably need to update that as well.

Error While Integrating iAd Adapter in Admob Mediation SDk

I am trying to integrate iAds in Admob mediation SDK for that purpose, I downloaded iAdListAdapter from Mediation website Download Link and added it into my xcode project but now when I try to compile the project it is giving following error:
Undefined symbols for architecture i386:
"_ADBannerContentSizeIdentifierLandscape", referenced from:
-[GADMAdapterIAd getBannerWithSize:] in libAdapterIAd.a(GADMAdapterIAd.o)
-[GADMAdapterIAd adjustADBannerToAdSize] in libAdapterIAd.a(GADMAdapterIAd.o)
"_ADBannerContentSizeIdentifierPortrait", referenced from:
-[GADMAdapterIAd getBannerWithSize:] in libAdapterIAd.a(GADMAdapterIAd.o)
-[GADMAdapterIAd adjustADBannerToAdSize] in libAdapterIAd.a(GADMAdapterIAd.o)
"_OBJC_CLASS_$_ADBannerView", referenced from:
objc-class-ref in libAdapterIAd.a(GADMAdapterIAd.o)
"_OBJC_CLASS_$_ADInterstitialAd", referenced from:
objc-class-ref in libAdapterIAd.a(GADMAdapterIAd.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please guide what am I doing wrong or what is the correct way of adding iAds to Mediation SDk by the way: I am using XCode 4.6 with min sdk 5.0
Any help is really appreciated!
Turned out that i needed to add iAd.Framework and remove -all_load Flag in the project, which solved the Problem.
For People who use auto linking please include "#import < iAd/iAd.h >" in any of your source files/

Resources