Issue with nuget package Xamarin.Firebase.iOS.CloudMessaging 3.1.2 - c#

I get many error messages if I install the Xamarin.Firebase.iOS.CloudMessaging 3.1.2 nuget package.
Error: linker command failed with exit code 1 (use -v to see invocation)
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.
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.
Error MT5211: Native linking failed, undefined Objective-C class:
GULAppEnvironmentUtil. The symbol
'_OBJC_CLASS_$_GULAppEnvironmentUtil' could not be found in any of the
libraries or frameworks linked with your application.
Error MT5201: Native linking failed. Please review the build log and
the user flags provided to gcc: -ObjC
Error MT5202: Native linking failed. Please review the build log.
I tried uninstalling and reinstalling the nuget package but I still get the same errors.
I use Visual Studio Community for Mac 8.1.5 (build 9).
I need Xamarin.Firebase.iOS.CloudMessaging because I follow this tutorial: https://www.robbiecode.com/setup-push-notifications-with-firebase-in-xamarin-forms-for-ios/
What is wrong with my project? What can I do?
The following two projects are in my solution:
InapppurchaseTest.iOS, MonoGame.Framework.iOS (develop)

Well, this is a well-known issue with Firebase and Xamarin, what basically happens here is the old bin and obj files while interacting with the new data override some existing files that are needed by iOS to synthesize the IPA while deployment and hence ends up throwing linking RELATED errors, follow the below steps and it will clear this mess.
Clean bin and obj
Delete the builds in the following path of your MAC machine - ~/Library/Caches/Xamarin/mtbs/builds/ProjNAME where 'ProjName' is the name of the project you are currently working on
Once you are done with both the above steps add the Xamarin.Firebase.iOS.CloudMessaging package and change linker setting to Don't Link (this is for the time being)
After installing these packages see to it that you build your project dependency wise which means PCL'S and .Net standards first then the native iOS project.
Clean bin and obj again if it does not work for the first build...
This should solve your issues in case it does not repeat the above procedure.
EDIT
If you check the GitHub comment by SotoiGhost here, it says adding the below line anywhere in your project should solve this issue...
var foo = Firebase.Core.Configuration.SharedInstance;
Feel free to get back in case of issues
Good luck!

Related

while VSbuild task getting error error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project.,

Working on wpf application, with Wix to create .msi. why am i getting error
D:\a\1\s\wpfsetup\wpfsetup.wixproj : error MSB4057: The target
"_IsProjectRestoreSupported" does not exist in the project
using msbuild version '17.2.1.25201
NuGet Version: 4.4.1.4656
Please check if the below steps help to fix the issue:
As per my research, it seems to be many bug fixes in every alternate version of the MS Build like 15.8.1, 16.11, etc.
There are some breaking changes and behavior changes mentioned in the MSFT official documentation of MSBuild 17.0. Please check this documentation to know more information if these changes with their resolutions helps to fix the issue.
And it might be the folder path in the build was wrong. Target Name must include the name of the solution folder. Refer this.
Try Restoring the MSBuild Nuget Package Version using this command:
nuget restore MySolution.sln -MSBuildVersion 16.11

Error while installing (entity component) package in unity

Steps Which I followed :
Download latest version of unity 2018.2.0f2
After installing unity I changed Scripting runtime version 4.x
then I tried to install entity package from package manager but I am getting following error:
An error occurred while resolving packages:
One or more packages could not be added to the local file system:
com.unity.burst: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:797:
com.unity.incrementalcompiler: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:797:
com.unity.package-manager-ui: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:797:
com.unity.textmeshpro: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:797:
A re-import of the project may be required to fix the issue or a manual modification of E:/New Unity Project (3)/Packages/manifest.json file.
Assembly has reference to non-existent assembly 'Unity.Burst' (Packages/com.unity.entities/Unity.Transforms/Unity.Transforms.asmdef)
Can somebody help me to resolve this problem? thanks in advance.
Unity's Entity Component System is still in experimental mode and requires Unity beta version to use it. The Unity 2018.2.0f2 version you are currently using is not a beta version.
Change your instruction for step #1 and download Unity 2018.1.0b12 from here. Follow the rest of the instruction as they are.
It's also worth noting that the Entity Component System will only work in the Editor at this time. Don't expect it to work in a build for now.

Azure Function referencing mixed-mode assembly

TL;DR: Is it possible to use mixed-mode assemblies in Azure Functions?
Details: I have an in-house mixed-mode assembly that I'm trying to use in an Azure Function. When I try to build, I get the following error:
------ Build started: Project: AzureDemo, Configuration: Debug x64 ------
AzureDemo -> C:\src\local\2017\AzureDemo\bin\x64\Debug\net462\bin\AzureDemo.dll
C:\Users\hugh\.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(31,5): error : Could not load file or assembly 'file:///C:\src\local\2017\AzureDemo\bin\x64\Debug\net462\bin\AzureDemo.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Done building project "AzureDemo.csproj" -- FAILED.
For clarity, the in-house library is x64 and my demo project is also x64, so it's not an x86/x64 problem.
Also, when I take the code out of the Azure Function project and put it in a plain old .NET Core 2.0 project, it builds just fine. edit: it builds fine, but it still doesn't run (System.EntryPointNotFoundException: A library name must be specified in a DllImport attribute applied to non-IJW methods.). So I may be in deeper water than I thought.
I'm kind of afraid Azure Functions won't work with mixed-mode assemblies... but I haven't found any definitive statement to that effect.
I'm also a little concerned that the fact that it's using netstandard1.0 might have something to do with it.
The error is happening at build time when the SDK launches the build task to generate the build artifacts/function metadata.
I've opened this issue with the details to track the bug: https://github.com/Azure/azure-functions-vs-build-sdk/issues/131
Actual x64 CLI releases would also be required for successful local testing, and this is tracked here: https://github.com/Azure/azure-functions-cli/issues/117

Xamarin App builds and runs on simulator, but on real phone I get Assembly Failure

I am working on a Xamarin based mobile app. It has previously deployed to an iPhone, and is currently working on the simulator. However, when I try to Debug on my iPhone, I get:
Error MT2002: Failed to resolve assembly: 'PCLStorage.Abstractions, Version=1.0.2.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64' (MT2002) (My_App.iOS)
PCLStorage is installed and up to date in my iOS and Core projects, although neither have any references to the package. It was installed when I added the AWS Core SDK. How do I resolve this error, I assume that is what is stopping the debug on iPhone?
Edit: (based on Answer below)
If I disable the linker in my build settings, I get the error:
My_App/iOS/MTOUCH: Error MT3001: Could not AOT the assembly 'My_App/iOS/obj/iPhone/Debug/build-iphone4.1-9.2.1/mtouch-cache/Build/AWSSDK.Core.dll' (MT3001) (My_App.iOS)
I would really appreciate some suggestions as I haven't made much headroom with this...
Try disabling "Linker" in the build options for Device builds. It's possible that if you are not directly referencing the library, the linker is stripping it out, causing it to fail at runtime.
I just had the same problem after switching from the simulator to an actual device
Fortunately, I've gotten the error only in 3 pages...
Fix was to remove the assembly attribute from the XAML:
From
xmlns:viewModels="clr-namespace:XXX.ViewModels;assembly=XXX"
To
xmlns:viewModels="clr-namespace:XXX.ViewModels"

AOT issue with mvvmcross

I'm unable to build Xamarin projects that reference MvvmCross as I receive the error:
Error MT3001: Could not AOT the assembly '/Users/chriskoiak/Documents/Initial/Mobile Clients/xxxx/obj/iPhone/Debug/mtouch-cache/Build/Cirrious.CrossCore.dll' (MT3001)
Error MT3001: Could not AOT the assembly '/Users/chriskoiak/Documents/Initial/Mobile Clients/xxxx/obj/iPhone/Debug/mtouch-cache/Build/Cirrious.MvvmCross.dll' (MT3001)
This error occurred after I upgraded to xcode5, mvvmcross 3.0.12 Xamarin.iOS 7.0.0.11
Has anyone else experienced this problem or can suggest a fix?
Thanks
This is a little bug that has appeared in the initial Xamarin.iOS 7 release, caused by the transition to "real" PCL reference assemblies on OS X. The developers are working to get this fixed right away, but in the meantime there is a work-around. Specifically, you can add -linkskip=System.Net -linkskip=System.Windows to the "Additional mtouch arguments" under Project Options -> Build -> iOS Build. This will tell the linker not to try to link System.Net or System.Windows.
Update:
A corrected version of Xamarin.iOS (7.0.1) has now been released to the alpha channel. When using this latest version, the linksip work-around should no longer be needed.

Categories