Add Objective C SDK into Xamarin - c#

I'm working in a xamarin.forms app and I really like it! Just a problem, now I'm trying to add a sdk of ad partners called IronSource (SupersonicAds), but I don't know how to, because is code in objective C.
There is any possibility to integrate it in xamarin.forms?
My objective is integrate an Offerwall, if anyone made it would be really helpful to know how to.
Thank you!

You need to create a Xamarin binding library. This will create a C# wrapper around a native iOS Obj-C library.
https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/

Related

How to use CoreNFC in xamarin.forms?

I'm totally new in xamarin.
I'm trying to use CoreNFC in my xamarin.forms multiplatform app.
But I don't know how to do it because i can only import CoreNfc in myapp.ios and not in myapp.
There is someone that know how to do it ?
Thanks in advance!
Core NFC belongs to the iOS Framework, so you can import and use it only in our iOS Project.
You could implement the NFC feature on each platform you want to support and use a interface and the Xamarin Dependency Service, to have access to these platform specific implementations in your shared code.
Or you look around for a plugin which did this work for you. A starting point could be NFCForms from poz1. But if I remember well it has so far only support for Android and Windows Phone.

Create a Qt View within Xamarin.iOS

I'm trying to use a Qt-based library within a Xamarin.iOS project. As a first step, I'd like to
initialize a simple Qt View and
place it in an empty ViewController.
I already managed to link the iOS project with QtCore and QtGui. Now I'm struggling with binding Qt's C++ methods with corresponding C# calls.
Has anyone experience with the combination of Xamarin and Qt?
Is this the way to go at all?
(All I can find on the web is about Xamarin vs. Qt...)

Why are sometimes iOS sample apps written in C#?

First, I am completely beginner when it comes to iOS development. I was asking myself, why some sample apps for iOS are written in C# bundled within a visual studio project?
Here's an example of a simple loading view.
What is the idea behind this? Is it only fake? How can I migrate this to XCode?
iOS apps can be written in C# by using some Xamarin stuff. This seems to be a new feature of VS 2015. Some people just do this because they like C# more. They make sample iOS apps in C# because they want to demonstrate whatever stuff in the iOS OS. Some C# iOS developers just don't want or don't understand the sample in swift or objective C. So that's why people write iOs samples in C#.
For your second question, I don't think you can migrate this to XCode though.

Writing cross-platform Unity3D plugins using Xamarin

Is it possible to write cross-platform Unity3D plugins (specifically for android and ios) using the Xamarin APIs?
If yes, what would be the procedure to go about doing it? Are you aware of any documentation or reference that might be useful?
Unity still doesn't provide a lot of native functionality as Xamarin does. I'm asking this because it just makes sense minimizing the learning curve for developing unity plugins. After a lot of experimentation, I've just begun understanding the intricacies of C#. If I have to learn two other languages (Java and Objective-C) that would greatly impede my progress.
Thanks.
Microsoft is opensourcing the Xamarin SDK, so combined with Mono for Android (that Unity most probably uses), you could soon be closer to your goal
BTW, they're also changing Mono's licensing model to the more permissive "MIT License" and hosting it under the .NET Foundation
Xamarin and Unity MonoDevelop are separate project. Xamarin doesnt support Unity. If you want a crossplatform plugin you could use C++ read:
http://docs.unity3d.com/Manual/Plugins.html

Build portable SignalR component with Xamarin

I have a Windows Phone 8 app that makes use of real time server push via SignalR.
I started to create a Native Android and iOS version of my app, but got stuck at implementing my SignalR component in native Android Java and iOS obj-C.
I have conceptually thought of a way to achieve this by making ONLY JUST the SignalR component portable via Xamarin.
Is it possible to create a Hybrid app in this way ?
And are there any resources online where people have done such.
Thanks for your help.
Xamarin would be kind of an all in sort of thing. So all of your Objective-C and JAVA would need to be ported to Xamarin's framework. That might not be a bad idea though ;).
Alternatively, if you are looking for a more cross platform way to implement a SignalR client, you maybe could wrap the logic up in a UIWebView (iOS) or WebView (Android) and use the JavaScript components. Here is an example from Microsoft on implementing a SignalR client via JavaScript. I don't know how integrated the SignalR functionality is in your app, but this may be an easy way to use it for simple display purposes.

Categories

Resources