[components-devel] Xamarin.iOS automatic translation from cocoapod to nupkg - help needed with mtouch
Bill Holmes
biholm at microsoft.com
Tue Nov 8 18:50:53 UTC 2016
Alex,
The build process will throw out dlls if a C# 'link' can not be make giving it a reason to remain. Since there is no public API on GoogleSymbolUtilities there are no API types for FIRApp to reference.
We work around this by creating some empty code to reference. See the loader class that we use.
https://github.com/xamarin/GoogleApisForiOSComponents/blob/master/Google.Core/source/Google.Core/Loader.cs
We add a static constructor to the messaging class and inside we make calls to empty load methods in Firebase Analytics.
Thanks
-Bill
________________________________
From: components-devel <components-devel-bounces at lists.dot.net> on behalf of Alex Sorokoletov <alex at sorokoletov.com>
Sent: Monday, November 7, 2016 6:57:32 PM
To: components-devel at lists.dot.net
Subject: [components-devel] Xamarin.iOS automatic translation from cocoapod to nupkg - help needed with mtouch
Hi guys!
I'm working on a tool that generates a set of nuget packages from cocoapods with same structure and dependency graph, as in cocoapods. Let me
For example, from pod Firebase/Database it will generate a set of nuget packages:
["GoogleToolboxForMac/Defines"; "GoogleSymbolUtilities"; "FirebaseInstanceID";
"GoogleToolboxForMac/NSData+zlib"; "GoogleInterchangeUtilities"; "FirebaseCore";
"FirebaseAnalytics"; "FirebaseDatabase"; "Firebase/Core"; "Firebase/Database"]
So as an end result there will be a set of .csproj with bindings and a set of nuget packages.
The question:
I have a binding project "FirebaseCore" with lib FirebaseCore.a and API definition (exposing FIRApp class, for example) that has reference to "GoogleSymbolUtilities" project.
GoogleSymbolUtilities project has a GoogleSymbolUtilities.a library and no API exposed (this cocoapod has only binary and is used during iOS linking process).
Now, I have a test application FirebaseTestApp with following code in C#:
```
FIRApp.bla.blabla //calling some code from FirebaseCore package
```
and references both to the FirebaseCore and GoogleSymbolUtilities packages.
When I compile the app, I get linker errors because the build doesn't see any dependency on the GoogleSymbolUtilities.a native lib from the FirebaseTestApp project.
Though, the FirebaseCore.dll is referencing GoogleSymbolUtilities.dll.
How do I make Xamarin.iOS consider all binding libraries for linking?
Any help or advice appreciated.
Alex.
_______________________________________________
components-devel mailing list
components-devel at lists.dot.net
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.dot.net%2Fmailman%2Flistinfo%2Fcomponents-devel&data=02%7C01%7Cbiholm%40microsoft.com%7Cfaf6e37fef2e4fce3db008d40769da32%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636141598636574776&sdata=cshoT1dScj%2FqdWFzorIbUS7MER1YAgIhfEJNd2xZfzw%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/components-devel/attachments/20161108/86592639/attachment.html>
More information about the components-devel
mailing list