xamarin / GoogleApisForiOSComponents

MIT License
225 stars 161 forks source link

Native linking failed #158

Closed felipecds closed 5 years ago

felipecds commented 6 years ago

I'm getting this log during build:

Undefined symbols for architecture arm64: "_FIRLogBasic", referenced from: -[FIRInstanceIDLogger logFuncDebug:messageCode:msg:] in FirebaseInstanceID(FIRInstanceIDLogger_0c879e312576b1b79740d2f19907597f.o) -[FIRInstanceIDLogger logFuncInfo:messageCode:msg:] in FirebaseInstanceID(FIRInstanceIDLogger_0c879e312576b1b79740d2f19907597f.o) -[FIRInstanceIDLogger logFuncNotice:messageCode:msg:] in FirebaseInstanceID(FIRInstanceIDLogger_0c879e312576b1b79740d2f19907597f.o) -[FIRInstanceIDLogger logFuncWarning:messageCode:msg:] in FirebaseInstanceID(FIRInstanceIDLogger_0c879e312576b1b79740d2f19907597f.o) -[FIRInstanceIDLogger logFuncError:messageCode:msg:] in FirebaseInstanceID(FIRInstanceIDLogger_0c879e312576b1b79740d2f19907597f.o) ld: symbol(s) not found for architecture arm64 clang : error : linker command failed with exit code 1 (use -v to see invocation)

MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRLogBasic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -L../../Dll -lrealm-wrappers -L/Users/dsv/cds/phideliscast/V3.0-Apps/PhidelisCast.Droid/packages/Realm.3.0.0/build/../native/ios/universal -lrealm-wrappers -lz -framework Security MTOUCH : error MT5202: Native linking failed. Please review the build log.

I'm using the latest version of XCode, NuGet packages (2.0.8.1) and Visual Studio for Mac

Edit:--------------

With this packages, there are no issues:

InstanceID 2.0.0 Analytics 4.0.2 Core 4.0.8 CloudMessaging 2.0.4

VS bug #732438

alexrainman commented 6 years ago

I solved this adding --registrar:static as Additional mtouch argument.

newky2k commented 6 years ago

@felipecds did using --registrar:static work?

felipecds commented 6 years ago

@newky2k nope, didn't work. When I revert back to old packages (about 4 versions), did work as expected. The working packages are:

InstanceID 2.0.0 Analytics 4.0.2 Core 4.0.8 CloudMessaging 2.0.4

santoshg31 commented 6 years ago

Hi I am getting exactly same error .But none of the solutions here and in issue 169 worked for me. However I can't have InstanceID 2.0.0 with Messaging 2.0.4 . So had to downgrade Messaging to 2.0.0 to match up other three in the solution.

However I am not using Xamarin Forms but I have created a project in mvvmcross with .NetStandard 2.0 as my core.Connecting to mac having Xcode 9 and have pushnotifications enabled in my provisioning profile.Also have enabled push notifications in Entitlements.plist. Is there something I need to do with linkerpleaseinclude file ?

I guess the setup would be the same for Firebase irrespective if it is a XamarinForms ios project or an independent ios project but please correct me if I am wrong.

Will it be possible to share some sample code/project as well please where firebase is implemented in ios. Found at below two places though http://blog.xamarians.com/Blog/2017/9/18/firebase-cloud-messaging https://qiita.com/yamachu/items/cee6104ac579ea657deb

Thanks, Santosh

jonathanantoine commented 6 years ago

same error here.

henningms commented 6 years ago

Adding the latest Xamarin.Firebase.iOS.AdMob package results in save native linking error. It seems the underlying Framework libraries are somehow missing(?).

Examples: warning MSB3341: Could not resolve reference "C:\Users\henni\AppData\Local\XamarinBuildDownloadCache\FAdM-7.31.0\Frameworks\frameworks\GoogleMobileAds.framework". If this reference is required by your code, you may get compilation errors. warning MSB3341: Could not resolve reference "C:\Users\henni\AppData\Local\XamarinBuildDownloadCache\FInstncID-3.1.1\Frameworks\FirebaseInstanceID.framework". If this reference is required by your code, you may get compilation errors. etc

and

error MT5210: Native linking failed, undefined symbol: _FIRIsLoggableLevel. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. etc

dbsntw commented 6 years ago

Got the exact same error after upgrading all packages of my xamarin.ios project automatically. Not sure which exact package update caused it but reverting Xamarin.Build.Download to 0.4.6 as suggested in #169 solved it for me.

After reverting to 0.4.6, I believe other packages are also downgraded FYI, this now works: xamarin form project with Xamarin.Build.Download(0.4.6) Xamarin.Firebase.iOS.AdMob(7.27.03) Xamarin.Firebase.iOS.Analytics(4.0.5.1) Xamarin.Firebase.iOS.Core(4.0.13.1) Xamarin.Firebase.iOS.InstanceID(2.0.8) Xamarin.Google.iOS.MobileAds(7.27.0.3)

SotoiGhost commented 6 years ago

Hi guys! A very apology for the late response. I'm jumping into this.

One question, is this happening only on Windows side?

jonathanantoine commented 6 years ago

It's happening on my Mac too.

SotoiGhost commented 6 years ago

@jonathanantoine I'm not able to reproduce this on Mac but, on Windows, I can. If someone can share a test case on Mac, I would be appreciated. Thanks in advance!

SotoiGhost commented 6 years ago

@jonathanantoine After updating Visual Studio for Mac to most recent version, an new error appeared saying that System.Memory.dll could not be resolved on Mac side. After following this workaround, I could build and cannot longer reproduce the issue on Windows side. Please, make sure that Visual Studio 2017 and VS4M is up to date and try again. Also, erase bin, obj folders and the XBD cache located by default at C:\Users\username\AppData\Local\XamarinBuildDownloadCache folder and try again.

Best, Israel Soto.

jonathanantoine commented 6 years ago

Hello,

I am still having the same exact issue. C:\Users\username\AppData\Local\XamarinBuildDownloadCache does not exists on MAC :)

I am on "Debug Simulator" configuration and I have these errors 👍

-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_418014fbcaf09024bdaab2e8210da204.o)
-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_418014fbcaf09024bdaab2e8210da204.o)
-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_418014fbcaf09024bdaab2e8210da204.o)
-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_418014fbcaf09024bdaab2e8210da204.o)
clang : error : linker command failed with exit code 1 (use -v to see invocation)
MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRIsLoggableLevel. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRLogBasic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRLogError. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRLogInfo. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRLogWarning. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRSetAnalyticsDebugMode. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRApp. The symbol '_OBJC_CLASS_$_FIRApp' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRAppEnvironmentUtil. The symbol '_OBJC_CLASS_$_FIRAppEnvironmentUtil' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRMutableDictionary. The symbol '_OBJC_CLASS_$_FIRMutableDictionary' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRNetwork. The symbol '_OBJC_CLASS_$_FIRNetwork' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIROptions. The symbol '_OBJC_CLASS_$_FIROptions' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRAppDiagnosticsConfigurationTypeKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRAppDiagnosticsErrorKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRAppDiagnosticsFIRAppKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRAppDiagnosticsNotification. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRAppDiagnosticsSDKNameKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRAppDiagnosticsSDKVersionKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRDisableDebugModeApplicationArgument. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIREnableDebugModeApplicationArgument. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRLoggerAnalytics. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRLoggerCore. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeCannotAcceptTraffic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeNotFound. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeNotModified. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeUnavailable. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusNoContent. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusOK. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceAdMob. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceAuth. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceAuthUI. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceCrash. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceDatabase. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceDynamicLinks. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceFirestore. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceInvites. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceMeasurement. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceMessaging. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServicePerformance. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceRemoteConfig. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRServiceStorage. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kGGLServiceAnalytics. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kGGLServiceSignIn. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_decode. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_decode_varint. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_encode. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_encode_string. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_encode_submessage. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_encode_tag_for_field. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_encode_varint. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_istream_from_buffer. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_ostream_from_buffer. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _pb_read. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -ObjC -ObjC -lc++ -lsqlite3 -lz -ObjC -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/jonathanantoine/WKS/CrossTVST/TVST.Android.UI/TVST.iOS.UI/obj/iPhoneSimulator/Debug/device-builds/iphone10.3-11.4/Entitlements.xcent
MTOUCH : error MT5202: Native linking failed. Please review the build log.
SotoiGhost commented 6 years ago

@jonathanantoine Sorry, I kept the idea that the problem was only on Windows side. Sorry about that.

Jonathan, one question, In which kind of projects are you implementing FIrebase?

jonathanantoine commented 6 years ago

@SotoiGhost no problem. It's a Xamarin platform iOS project.

SotoiGhost commented 6 years ago

Ok, I need to clarify this here because we received a similar report to this where someone was implementing Firebase on a Class Library. Firebase client SDKs (for Android, iOS, and Web) are meant to be used in end-user applications and Firebase' .targets files within NuGets packages have a conditional that prevents downloading the Firebase bits if it's not an application project. You can always change this behavior by modifying the .targets file or by adding your own MSBuild task that downloads the Firebase stuff.

SotoiGhost commented 6 years ago

@jonathanantoine Can you delete the Xamarin.Build.Download cache folder, located at ~/Library/Caches/XamarinBuildDownload by default, build again your project and see if XBD is downloading the Firebase stuff, please? If it is downloading the bits, can you provide me a test case? Because I'm not able to reproduce this issue anymore on my side.

Thanks a lot in advance!

jonathanantoine commented 6 years ago

@SotoiGhost exacts same thing after deleting the cache folder. I'll try to create a reprod project to help you fix this :)

jonathanantoine commented 5 years ago

@SotoiGhost In trying to create a repro project, I noticed that for some reason my project was referencing some Firebase nugets which were causing this issue :

Xamarin.Firebase.iOS.AdMob
Xamarin.Firebase.iOS.Analytics
Xamarin.Firebase.iOS.Core
Xamarin.Firebase.iOS.InstanceID

I removed them to keep only Xamarin.Google.iOS.MobileAds and it seems to be ok now.

Thanks for your help resolving this issue.

MorneZaayman commented 5 years ago

Hi

I managed to resolve the issue on Windows and MacOS by downgrading Xamarin.Firebase.iOS.AdMobfrom 7.31.0.2 to 7.27.0.3. The issue only started occurring when I upgraded XCode to version 10, and the latest Visual Studio 2017 (15.8.7) and Visual Studio for Mac (7.6.8)

newky2k commented 5 years ago

@MorneZaayman could you try with the latest release 7.32.0

raymondjstone commented 5 years ago

I get the same issue building an xamarin forms app for IOS when everything on PC and Mac are up to date with versions as at today. Been getting it for a while now, downgrading them all by changing the build version did work but not sure if it still will with Forms 3,3.

I am using FCM btw

image

Downgrading Xamarin.Firebase.ios.core to 5.0.5 and letting it downgrade the other firebase components to compatible versions HAS allowed the build to work

Xamarin.Firebase.iOS.Analytics 5.0.1 Xamarin.Firebase.iOS.CloudMessaging 3.0.3 Xamarin.Firebase.iOS.InstanceID 3.1.1

daniellamolony commented 5 years ago

On visual studio for mac 2017 my project works with:

"Xamarin.Build.Download" version="0.4.11" "Xamarin.Firebase.iOS.AdMob" version="7.27.0.3" "Xamarin.Firebase.iOS.Analytics" version="5.1.4" "Xamarin.Firebase.iOS.Core" version="5.1.3" "Xamarin.Firebase.iOS.InstanceID" version="3.2.1" "Xamarin.Google.iOS.MobileAds" version="7.27.0.3"

upgrading Xamarin.Firebase.iOS.AdMob and Xamarin.Google.iOS.MobileAds to anything above 7.27.0.3 fails even with the latest version 7.32.0

PackageInspectionFailed: Failed to load Info.plist from bundle at path /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/…./Frameworks/PersonalizedAdConsent.framework error MT1006: Could not install the application … on the device ‘XXXX’s iPhone': Package Inspection Failed Error (error: 0xe8000051).

daniellamolony commented 5 years ago

This is working now after the visual studio upgrade that came through today to Xamarin.iOS 12.2.1.10

id="Microsoft.NETCore.Platforms" version="2.1.2" id="Xamarin.Build.Download" version="0.4.11" id="Xamarin.Firebase.iOS.AdMob" version="7.32.0" id="Xamarin.Firebase.iOS.Analytics" version="5.1.4" id="Xamarin.Firebase.iOS.Core" version="5.1.3" id="Xamarin.Firebase.iOS.InstanceID" version="3.2.1" id="Xamarin.Google.iOS.MobileAds" version="7.32.0"

Thank you :)

MorneZaayman commented 5 years ago

@newky2k It didn't work for me, but I haven't updated my Visual Studio and Xamarin.iOS to the latest.

SotoiGhost commented 5 years ago

Hi guys, is this still an issue?

raymondjstone commented 5 years ago

I updated everything in my app and VS and on the mac to the latest versions as of today (release only versions not beta) and linking still fails image

Paul-N commented 5 years ago

I'm experiencing native linking errors too. I've created a simple project for the demo (https://github.com/Paul-N/FirebaseNativeLinkingBug). This project is default Xamarin.iOS project with the set of Firebase nuget packages (see README.md of that project). Errors are similar to @raymondjstone 's comment (see file Erorrs.md of my sample repo). MacOS, XCode and all the Microsoft IDE/Tools are the latest versions.

SotoiGhost commented 5 years ago

@Paul-N Thanks for the test case! I'll investigate this.

raymondjstone commented 5 years ago

It's probably not much help but I have tried the same configuration entirely on a mac and get the same issue, so not related to windows VS, but that was probably obvious anyway

SotoiGhost commented 5 years ago

@raymondjstone No, that actually helps. I was still thinking that this was a Windows error only. I'll give a try on mac side first then.

asdiomar1 commented 5 years ago

This is still an issue, I have two projects with almost same configuration but one do works with Xamarin.Firebase.iOS.CloudMessaging version 3.0.3 and the other it's only working with 2.0.4.

Any ideas? I'm working with Windows VS

warpedgeoid commented 5 years ago

I'm seeing this issue on VS Mac (Version 7.7.1; Xamarin.iOS 12.2.1.12) with any 3.x version of Xamarin.Firebase.iOS.CloudMessaging. A total showstopper for one of our projects and a bug that may make me regret pushing Xamarin so hard.

I've reverted to Xamarin.Build.Download 0.4.6 and the resultant downgrade of other packages seems to have resolved the issue. If the downgraded CloudFirestore doesn't have all of the feature we need, I'll have to ditch Xamarin.Firebase.iOS.CloudMessaging and remove dependent features from the our app while we await a resolution to this issue.

SotoiGhost commented 5 years ago

Guys, when you are facing this kind of error:

MTOUCH : error MT5210: Native linking failed, undefined symbol: _FIRLogBasic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.

Are you using Firebase Core somehow? If yes, can you share the line or code that uses it? Thanks in advance!

SotoiGhost commented 5 years ago

If you are not using Firebase Core, but you have the NuGet referenced, please, add this line anywhere in your app and let me know if this "fixes" the build errors.

var foo = Firebase.Core.Configuration.SharedInstance;
raymondjstone commented 5 years ago

still the same issue on a mac

Paul-N commented 5 years ago

@SotoiGhost Yes it helps, now I'm able to run repro project that I've mentioned above.

Paul-N commented 5 years ago

But I still can not build the project I'm working on, errors are: clang : error : linker command failed with exit code 1 (use -v to see invocation) error MT5209 : Native linking error : warning: directory not found for option '-FFInstncID-3.2.1/Frameworks' error MT5209 : Native linking error : warning: directory not found for option '-FFAnlytcs-5.1.4/Frameworks' error MT5209 : Native linking error : warning: directory not found for option '-FFAnlytcs-5.1.4/Frameworks' error MT5209 : Native linking error : warning: directory not found for option '-FGAppM-5.1.4/Frameworks' error MT5209 : Native linking error : warning: directory not found for option '-FFCrshlytcs-3.10.9/iOS' error MT5209 : Native linking error : warning: directory not found for option '-FFbrc-1.7.13/iOS' error MT5209 : Native linking error : framework not found FirebaseInstanceID MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -ObjC -ObjC -lc++ -lsqlite3 -lz -ObjC -lc++ -lsqlite3 -lz -ObjC -lc++ -lz -ObjC -Xlinker -sectcreate -Xlinker TEXT -Xlinker entitlements -Xlinker /Users/admin/Projects/MyProjName/src/iOS/obj/iPhoneSimulator/Debug/device-builds/iphone11.4-12.1/Entitlements.xcent MTOUCH : error MT5202: Native linking failed. Please review the build log.

SotoiGhost commented 5 years ago

@Paul-N Can you double check that Xamarin.Build.Download NuGet has been successfully restored? If yes, delete the Xamarin Build Download cache folder located at ~/Library/Caches/XamarinBuildDownload and try again

SotoiGhost commented 5 years ago

@raymondjstone Can you share to me the errors that you are still facing, please? Thanks in advance!

raymondjstone commented 5 years ago

Sure, this is from a build with everything current as of today (there was a VS Mac update, I tried before and after installing that). This is entirely the mac to remove the windows VS versions being a component.

Release build.

Target _CopyAppConfigFile:
  Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
Target CopyFilesToOutputDirectory:
    MyAberdeenshire.iOS -> /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/bin/iPhone/Release/MyAberdeenshire.iOS.exe
Target _DetectSigningIdentity:
    Detected signing identity:
      Code Signing Key: "iPhone Distribution: Aberdeenshire Council (33JD7FBSVC)" 
      Provisioning Profile: "myAberdeenshire PROD prov profile" 
      Bundle Id: uk.gov.aberdeenshire.myaberdeenshire.ios
      App Id: 33JD7FBSVC.uk.gov.aberdeenshire.myaberdeenshire.ios
Target _CopyResourcesToBundle:
  Skipping target "_CopyResourcesToBundle" because all output files are up-to-date with respect to the input files.
Target _DetectDebugNetworkConfiguration:
      DebugIPAddresses: 
Target _CompileAppManifest:
  Skipping target "_CompileAppManifest" because all output files are up-to-date with respect to the input files.
Target _ParseExtraMtouchArgs:
      NoSymbolStrip Output: true
      NoDSymUtil Output: false
Target _CompileToNative:
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch @/Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/response-file.rsp -v --registrar:static "--gcc_flags=-ObjC -ObjC -lc++ -lsqlite3 -lz -ObjC -lc++ -lsqlite3 -lz" 
    Process exited with code 1, command:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -F /Users/raymondstone/Library/Caches/XamarinBuildDownload/FInstncID-3.2.1/Frameworks -framework FirebaseInstanceID -framework Security -F /Users/raymondstone/Library/Caches/XamarinBuildDownload/FAnlytcs-5.1.4/Frameworks -framework FirebaseAnalytics -framework AddressBook -framework AdSupport -framework CoreGraphics -framework StoreKit -framework SystemConfiguration -F /Users/raymondstone/Library/Caches/XamarinBuildDownload/FAnlytcs-5.1.4/Frameworks -framework FirebaseCoreDiagnostics -F /Users/raymondstone/Library/Caches/XamarinBuildDownload/GAppM-5.1.4/Frameworks -framework GoogleAppMeasurement -framework UIKit -framework CoreVideo -framework OpenGLES -framework MapKit -framework ImageIO -framework GLKit -framework CoreLocation -framework QuartzCore -framework AddressBookUI -framework WebKit -framework Foundation -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework FirebaseMessaging -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework FirebaseCore -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework GoogleToolboxForMac -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework GTMSessionFetcher -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework leveldb -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework nanopb -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework Protobuf -F /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache -framework GoogleUtilities -weak_framework UserNotifications -weak_framework CoreSpotlight -weak_framework CoreFoundation -weak_framework CFNetwork -Xlinker -rpath -Xlinker @executable_path/Frameworks /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/registrar.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/main.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/MyAberdeenshire.iOS.exe.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/mscorlib.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.Forms.Core.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Core.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Mono.Security.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Xml.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Data.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Numerics.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/OpenTK-1.0.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.iOS.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Net.Http.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Runtime.Serialization.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.ServiceModel.Internals.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Web.Services.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/System.Xml.Linq.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.Forms.Platform.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.Forms.Platform.iOS.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/MyAberdeenshire.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.Forms.Xaml.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.Essentials.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/PCLCrypto.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/PInvoke.BCrypt.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/PInvoke.Windows.Core.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/PInvoke.Kernel32.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Validation.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/FFImageLoading.Forms.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/FFImageLoading.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/FFImageLoading.Forms.Platform.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/FFImageLoading.Platform.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/WebP.Touch.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.FirebasePushNotification.Abstractions.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.DeviceInfo.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.Settings.Abstractions.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.Forms.Maps.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/DLToolkit.Forms.Controls.FlowListView.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Newtonsoft.Json.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Refractored.XamForms.PullToRefresh.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/SQLite-net.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/SQLitePCLRaw.core.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/SQLitePCLRaw.batteries_v2.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/SQLitePCLRaw.provider.sqlite3.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.FirebasePushNotification.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Firebase.CloudMessaging.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Firebase.Core.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Firebase.InstanceID.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.Connectivity.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.Connectivity.Abstractions.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.Settings.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/ModernHttpClient.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Xamarin.Forms.Maps.iOS.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/Refractored.XamForms.PullToRefresh.iOS.dll.o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/arm64/GetiOSModel.dll.o /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.12/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmonosgen-2.0.a /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.12/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libxamarin.a -force_load /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/WebP.a -force_load /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/libWebPWrapper.a -force_load /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.12/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libapp.a -lsqlite3 -lz -ObjC -lz -Wl,-pie -arch arm64 -miphoneos-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -liconv -o /Users/raymondstone/Documents/MA-MyAberdeenshire/MAP/MAP.iOS/obj/iPhone/Release/mtouch-cache/64/Output/MyAberdeenshire.iOS -ObjC -ObjC -lc++ -lsqlite3 -lz -ObjC -lc++ -lsqlite3 -lz -u _xamarin_find_protocol_wrapper_type -u _xamarin_release_block_on_main_thread -u _xamarin_get_block_descriptor -u _xamarin_IntPtr_objc_msgSend_IntPtr -u _xamarin_IntPtr_objc_msgSendSuper_IntPtr -u _UIApplicationMain -u _FIRMessagingConnectionStateChangedNotification -u _FIRMessagingMessagesDeletedNotification -u _FIRMessagingRegistrationTokenRefreshedNotification -u _FIRMessagingSendErrorNotification -u _FIRMessagingSendSuccessNotification -u _kFIRInstanceIDScopeFirebaseMessaging -u _kFIRInstanceIDTokenRefreshNotification
    Undefined symbols for architecture arm64:
      "_OBJC_CLASS_$_FIRAppEnvironmentUtil", referenced from:
          objc-class-ref in FirebaseCoreDiagnostics(FIRDiagnostics_5fae2e67e4a7b4383df55126bc52c2ef.o)
      "_OBJC_CLASS_$_FIRMutableDictionary", referenced from:
          objc-class-ref in FirebaseAnalytics(FIRAAppDelegateProxy_35aba4039eba42413a46fea3097ce088.o)
          objc-class-ref in FirebaseAnalytics(FIRARemoteConfig_837edd22ee2d481454f086c83e2ac372.o)
      "_OBJC_CLASS_$_FIRNetwork", referenced from:
          objc-class-ref in FirebaseAnalytics(FIRAAppDelegateProxy_35aba4039eba42413a46fea3097ce088.o)
          objc-class-ref in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
          objc-class-ref in FirebaseAnalytics(FIRAnalytics_20f381a67e6d70f1b973db7e9586fcd2.o)
          objc-class-ref in FirebaseCoreDiagnostics(FIRClearcutLogger_234b44acbebc395d644c77a3c7bb29ea.o)
      "_kFIRNetworkHTTPStatusCodeCannotAcceptTraffic", referenced from:
    -[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
          -[FIRAMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
      "_kFIRNetworkHTTPStatusCodeNotFound", referenced from:
          -[FIRAMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
      "_kFIRNetworkHTTPStatusCodeNotModified", referenced from:
          -[FIRAMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
      "_kFIRNetworkHTTPStatusCodeUnavailable", referenced from:
    -[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
          -[FIRAMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
      "_kFIRNetworkHTTPStatusNoContent", referenced from:
    -[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
          -[FIRAMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
      "_kFIRNetworkHTTPStatusOK", referenced from:
    -[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
          -[FIRAMeasurement networkRemoteConfigFetchCompletionHandler:data:error:] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
    ld: symbol(s) not found for architecture arm64
    clang : error : linker command failed with exit code 1 (use -v to see invocation)

    MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRAppEnvironmentUtil. The symbol '_OBJC_CLASS_$_FIRAppEnvironmentUtil' could not be found in any of the libraries or frameworks linked with your application.
    MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRMutableDictionary. The symbol '_OBJC_CLASS_$_FIRMutableDictionary' could not be found in any of the libraries or frameworks linked with your application.
    MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRNetwork. The symbol '_OBJC_CLASS_$_FIRNetwork' could not be found in any of the libraries or frameworks linked with your application.
    MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeCannotAcceptTraffic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeNotFound. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeNotModified. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeUnavailable. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusNoContent. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusOK. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
    MTOUCH : warning MT5215: References to 'BCrypt' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-file-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-localization-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-processthreads-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-io-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-synch-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-handle-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-libraryloader-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-sysinfo-l1-2-1' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-sysinfo-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : warning MT5215: References to 'api-ms-win-core-errorhandling-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
    MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -ObjC -ObjC -lc++ -lsqlite3 -lz -ObjC -lc++ -lsqlite3 -lz
    MTOUCH : error MT5202: Native linking failed. Please review the build log.
Done building target "_CompileToNative" in project "MyAberdeenshire.iOS.csproj" -- FAILED.

Done building project "MyAberdeenshire.iOS.csproj" -- FAILED.

Build FAILED.

/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2130,5): warning MSB3277: Found conflicts between different versions of "System.Net.Http" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
/Users/raymondstone/Documents/MA-MyAberdeenshire/packages/Microsoft.Bcl.Build.1.0.21/build/Microsoft.Bcl.Build.targets(243,5): warning : Project must install nuget package Microsoft.Bcl.Async, version=1.0.168. For more information, see http://go.microsoft.com/fwlink/?LinkID=317570.
/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2130,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.
/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2244,5): warning MSB3836: The explicit binding redirect on "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" conflicts with an autogenerated binding redirect. Consider removing it from the application configuration file or disabling autogenerated binding redirects. The build will replace it with: "<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" xmlns="urn:schemas-microsoft-com:asm.v1" />".
/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2244,5): warning MSB3836: The explicit binding redirect on "SQLitePCLRaw.core, Culture=neutral, PublicKeyToken=1488e028ca7ab535" conflicts with an autogenerated binding redirect. Consider removing it from the application configuration file or disabling autogenerated binding redirects. The build will replace it with: "<bindingRedirect oldVersion="0.0.0.0-1.1.12.351" newVersion="1.1.12.351" xmlns="urn:schemas-microsoft-com:asm.v1" />".
/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2244,5): warning MSB3836: The explicit binding redirect on "SQLitePCLRaw.batteries_v2, Culture=neutral, PublicKeyToken=8226ea5df37bcae9" conflicts with an autogenerated binding redirect. Consider removing it from the application configuration file or disabling autogenerated binding redirects. The build will replace it with: "<bindingRedirect oldVersion="0.0.0.0-1.1.12.351" newVersion="1.1.12.351" xmlns="urn:schemas-microsoft-com:asm.v1" />".
MTOUCH : warning MT5215: References to 'BCrypt' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-file-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-localization-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-processthreads-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-io-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-synch-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-handle-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-libraryloader-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-sysinfo-l1-2-1' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-sysinfo-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'api-ms-win-core-errorhandling-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
-[FIRAMeasurement networkUploadCompletionHandlerWithResponse : error : ] in FirebaseAnalytics(FIRAMeasurement_78431add5886f7a64f080bb6c3f99898.o)
clang : error : linker command failed with exit code 1 (use -v to see invocation)
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRAppEnvironmentUtil. The symbol '_OBJC_CLASS_$_FIRAppEnvironmentUtil' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRMutableDictionary. The symbol '_OBJC_CLASS_$_FIRMutableDictionary' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5211: Native linking failed, undefined Objective-C class: FIRNetwork. The symbol '_OBJC_CLASS_$_FIRNetwork' could not be found in any of the libraries or frameworks linked with your application.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeCannotAcceptTraffic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeNotFound. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeNotModified. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusCodeUnavailable. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusNoContent. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _kFIRNetworkHTTPStatusOK. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -ObjC -ObjC -lc++ -lsqlite3 -lz -ObjC -lc++ -lsqlite3 -lz
MTOUCH : error MT5202: Native linking failed. Please review the build log.
    17 Warning(s)
    16 Error(s)

Time Elapsed 00:03:05.95

========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Build: 16 errors, 17 warnings
Paul-N commented 5 years ago

@SotoiGhost Yes, I've reinstall Xamarin.Build.Download and it builds even without hack with var foo = Firebase.Core.Configuration.SharedInstance;

Recently I've moved my project to another Mac host and I have no idea why this particular Nuget package have not restored properly.

Thank you.

SotoiGhost commented 5 years ago

@raymondjstone This seems to be a cache problem on bin and/or obj folders, because those symbols that it's trying to find, were removed from F.Core some versions ago. Can you delete the bin and obj folders, Xamarin Build Download folder cache at ~/Library/Caches/XamarinBuildDownload and try again, please?

SotoiGhost commented 5 years ago

@Paul-N good to know that. The hack/line prevents that the linker strips F.Core, so F.Analytics can use it behind the scenes. So, every time you have F.Analytics referenced, you must use F.Core somehow to achieve the building of your app.

raymondjstone commented 5 years ago

I have deleted bin and obj previously but still get the issue, I don't have a ~/Library/Caches/XamarinBuildDownload on my mac

raymondjstone commented 5 years ago

I do now have a clean build in release and debug modes I think (will try tomorrow if this works from the PC but it seems to work on the mac alone).

This time as well as bin and obj directories I wiped the packages directories in all projects and this may have done the trick. Certainly it showing core 5.1.3 installed with no linking errors. Will update this thread tomorrow when I test VS on the PC, but cheers

raymondjstone commented 5 years ago

I found the dir on my mac after all, I was looking under the disk root not the user root.

However, building from a pc onto the mac still gives the same errors

Cleared out caches files and a few other things relating to the build on the mac cleared out obj, bin and package directories on the pc for the solution cleaned all parts of the solution

Same errors as before when building, i'm sure youor right that it's a cache issue but no idea where the pc->mac build is caching it

raymondjstone commented 5 years ago

Found the cache on the windows PC - C:\Users\rstone\AppData\Local\XamarinBuildDownloadCache in my case, where rstone is my AD user. Clearing this as well as the files on the mac means that the build now works on both platforms.

SotoiGhost commented 5 years ago

@raymondjstone Glad to know that it is working now. I'm closing the issue.

If anyone faces something related to this, please, open a new issue. Thanks in advance!

Happy coding! Israel Soto.

pablogupi commented 5 years ago

In my case, the problem was a conflict with versions in Firebase.Core. My project contains https://github.com/CrossGeeks/FirebasePushNotificationPlugin and this use Xamarin.Firebase.iOS.CloudMessaging 2.0.8.1. The package dependencies contains Xamarin.Firebase.iOS.Core 4.0.13.1. When I downgrade GoogleAPis packages with Firebase.Core dependencies is equal to 4.0.13.1, native linking errors is disappear.

MorneZaayman commented 5 years ago

I'm still getting this issue on Windows using Visual Studio 2017 with version 7.32.0. I've picked up in happens when adding ARMv7 or ARMv7s to the supported architectures.