Libgit2sharp in Xamarin iOS - xamarin

I'm trying to run Libgit2Sharp in a Xamarin.iOS project (I'm currently running it on Xamarin.Droid).
For doing so, I was trying to follow the same approach than for Android (generating a custom native binaries package) but I have faced some doubts/problems.
First, iOS doesn't allow the use of dynamic libraries at least if you want to upload the app to the market.
Is there any "easy" way no rebuild libgit2sharp to make it run static libraries?
Probably the App will not go to the official App Store, but it would be nice to know if it is possible.
Another thing I have realized while checking the libgit2sharp source code is that iOS is not in the list of possible Operating Systems, so should I make any other modification to make it run on iOS?
Thanks in advance

So in the end I found a way to run libgit2 in Xamarin.iOS.
Basically what I did was to generate the iOS libgit2 static libraries (you can use the Objective-git repository for doing so, as it is part of the process) and then modify LibGit2Sharp project to look for "__Internal" instead of the .dll/.so dynamic libraries.
The you just need to add the libgit2 static library to your Xamarin.iOS project, and that's all.
Hope someone finds this info helpful.

Related

Is the AgoraRTMWrapper in XCode necessary?

I have been dealing with the same issue for a few days now. I'm unable to upload any app store connect files due to the libAgoraRTMWrapper file. To be clear, this entire app has been built through Unity using agora SDK. The reason for failure, according to XCode, is that the wrapper "doesn't have the correct file type for this location". Invalid Swift support.
This leads me to wonder if the libagoraRTMWrapper is even necessary. Yes, I would like to keep using RTM but not at the expense of several build failures.
As a sidenote, XCode does mention that the build is being made for iOS but the wrapper was built for iOS + iOS simulator. I don't remember ever specifying that but it could just be the way the SDK was initially imported.
this library is necessary for RTM to work. Do you have a custom build setting for the project? It is verified that the included SDK Demo works on iOS builds. Perhaps you can build that and compare the build setting to yours to find out what went wrong?

Cannot add Judopay to Xamarin forms project

I am trying to include Judopay in my project, and I was able to add it to Android and iOS, but not to the Xamarin forms project. There is no NuGet to be included and I can't seem to add the component reference. Any idea on how can I add it? I cannot use any of these:
using JudoDotNetXamarin;
using JudoPayDotNet.Enums;
using JudoPayDotNet.Models;
Again, they only work on iOS or Android, but not Xam forms.
That is because they only provide platform implementations. You will need to tell your Forms app which implementation to use at what time.
The correct way to go about this is with some form of IoC, using dependency injection or service location. Luckily Xamarin Forms has this integrated:
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/dependency-service/introduction/
Using the references from the Android or iOS projects in your shared code will likely not work completely or break things. Maybe not immediately but surely later on. (Except when there really is no platform-specific functionality, then you might get away with this.)

Using the Nativescript platform-specific project

To my understanding, Nativescript takes the javascript (or typescript) + nativescript code and creates project files for both android and ios in order to be able to run them as native apps. I also know that these files all seem to be located in the Resources directory. However when I try to run a simulator from the xcode project that is created, it fails.
I don't want to know how to fix the simulator failure, I just want to know if it's possible for a swift developer to take the xcode project created by Nativescript and continue developing as a regular native app.
If so, is this possible with the android project as well?
Please check this out
https://www.nativescript.org/blog/using-nativescript-in-an-existing-native-ios-android-applications
The two articles explain in detail how you can embed the NativeScript runtimes in native Objective-C and Android applications.

How to use FreeTDS with Xcode?

I'm a newbie on Mac development, I need to access sql server from cocoa app via FreeTDS but I don't know how to do that. Please help me.
Generally, I find that sort of work easiest if you just take the source code of the project and include it in the Xcode project and compile it all.
Later, you can build it as a framework or library in a separate target, but no need to that from the beginning.

How do I build frameworks in Xcode?

I'm trying to use the GData framework, so I downloaded it and it came as an Xcode project so I assumed I needed to build it. So I opened it up and and clicked run and it compiled fine, but where do I go to access the .framework it created? I'm new to frameworks and have only been using xcode for a month or two so you'll have to excuse my lack of knowledge about it.
The documentation will help you
Anyway, by default the target is GDataUnitTest, just change it to GDataFramework. Once you compile it you will find the framework in the folder of the XCode Project called target.

Resources