Xamarin.ios using DLL library - xamarin.ios

I have xamarin binding project (represents kind of bridge to native iOS static library) which works fine if added to a solution.
What I'm trying to do is to use /bin/libary.dll instead of binding project.
I created new xamarin.ios simple view project, added reference to library.dll.
Project compiles fine using API from that library but when run i'm getting fatal error:
so there is no even entry point to application
sorry probably for posting obvioues answer, but I need to get it working fast.

Related

Wikitude InjectLocation() in Xamarin Component 5.3.0 for iOS is not working

I am trying to create a simple Wikitude AR Xamarin application with POI functionality. I am using Wikitude component 5.3.0 with iOS 10.2 on iPhone 5S, with Xamarin Studio 6.1.1 and Xamarin iOS 10.0.1.8. I am using MvvmCross to create the PCL library with shared code and trying to create my UIViewController with WTArchitectView. I've created a custom binding for getting location update from myviewmodel. The code for the project is accessible here https://bitbucket.org/ershovd/xamarin-augmented/src.
The problem is that I couldn't get location update and onLocationChanged JS function don't get called. I've setup LocationAlwaysUsageDescription settings and I enable using location information in the app when prompted. I even get location information (latitude, longitude) when debugging. However, when I tried to use InjectLocation() method with specific coordinate info the onLocationChanged handler in JS doesn't get called. Moreover, the IsUsingInjectedLocation on WTArchitectView instance always set to false and doesn't changed to true even when I specify UseInjectedLocation = true;
The similar setup for the Android project works fine, I've attached it as well.
I tried to used official Xamarin example https://github.com/Wikitude/wikitude-xamarin/ but they are outdated. After I upgrade to the latest version and fix some compilation bugs (there is some change in API compare with latest version) it still produce the same results (e.g. onLocationChanged event don't get called and InjectLocation method do nothing.
Did I miss something I need to setup in iOS application for receiving update location update? Why is IsUsingInjectedLocation property always set to false and how can I set it to enabled?
Also, if anybody can provide a working sample of POI at location example for latest Xamarin component version (5.3.0) for iOS this will be very helpful.
Thanks,
The problem was that I pass the wrong enum Wikitude.Architect.WTFeatures value into the method LoadArchitectWorldFromURL. The value which works for me is Wikitude.Architect.WTFeatures.Geo. Here is more detailed answer from wikitude support

Decompiled method of Xamarin.iOS application is empty

I tryed to decompile iOS application developed by Xamarin.iOS(Xamarin.Forms), But ILSpy and NET Reflector couldn't decompile all methods correctly. Decompiled method body is prefectly empty.
What can i do for this problem?
The only thing you will find in a Xamarin Dll inside the app bundle is some metadata required by the runtime. All methods logic won't be there because it has been AOT'ed and now the logic lives inside the native binary itself. This is mainly because iOS does not allow dynamic code generation.
You can read more info about how Xamarin works here
Hope this helps.

How to create crashlytics binding for Xamarin.iOS?

I've downloaded Crashlytics app that integrates Crashlytics.framework into XCode project, and it works great for XCode. But as far as I know, to build Xamarin.iOS binding I need static library, and I can't find it neither in framework nor in Crashlytics.app contents. There is only "run" executable and header. I don't know how to use it under Xamarin.iOS. Btw, AndrewReed on Xamarin forum managed to build dll somehow, so it's possible.
So, how to create crashlytics binding for Xamarin?
AndrewReed answered this question on Xamarin forum:
As with quite a few sdk's, sometimes they bundle a folder instead of the static lib,which essentially is the static library. There will be a sizeable file that maybe doesnt have an extension(this is your .a file) so you can rename that to be .a and then include that in a xamarin bindings project. Run the sharpie marker on the header file in the folder which will generate your necessary files. Watch out for one gotcha, delegate is a reserved word in c#, so you may need to go around and change this by adding an # symbol(to the name) to allow you to use the reserved word.
So what I actually did was, created a project in xcode and ran the crashlytics programme, this then added the crashlytics framework to the project. In finder locate that and you will have a structure like so: - run - /Versions --/A ---Crashlytics ---/Headers ----Crashlytics.h
So the /A folder is essentially your static lib, use this and create your binding from that, or in this particular case, just download it from the mono bindings || my repo.
If you're looking for an officially supported crash reporting plugin, Crittercism just released one (Full disclosure: I'm one of the co-founders). You can download the bindings from the Xamarin store here: http://components.xamarin.com/view/crittercism
The latest version of Xamarin seems to have it build in.
Here are the steps that I followed
1.) In the Xamarin Studio , go to the main app, and add the Crashlytics API key in the Build -> Crash reporting section. Build and run that app. The evidence suggests that is enough to get data sent to Crashlytics. I saw that it knew about older versions of the app I had built and ran weeks ago with the API key already in.
2.) Go to Xcode and create a new project with the same name as the Xamarin project, com.{company}.{appname}. (You probably need to have that profile downloaded.) I did it in Swift by the way with no issues.
3.) Go to crashlytics.com com and go to settings -> Apps (or https://www.crashlytics.com/onboard)
4.) You will get an app to download and run. The app walks through the steps of adding
A.) A build phase run script
B.) Code to the application main Crashlytics.startWithAPIKey(“nnnn”)
5.) Run your Xcode version of the app
The Crashlytics web page popped up immediately.

Sharing projects with MonoTouch

I have a class library project (developed in VS) which I want to share with a MonoTouch project I'm working on. The problem is that when I try to add a reference to the library project in MonoDevelop an error is displayed saying 'Incompatible target framework: v.NETFramework,Version=v3.5)'.
From what I've read on the web I have to create another class library project in MonoDevelop and then link all the project files from the original into it...I'll do this if I have to but i'd rather have a cleaner solution to this, if not a simple project file fix then maybe a script I can run...
Regards
Lee
A Portable Class Library would be the way to go, but unfortunately not yet properly supported in the current version of MonoDevelop with MonoTouch. Work seems to be in progress though.
You do have to create a class library project in MonoDevelop. The library has to be compiled with the MonoTouch version of the framework.
The reason for this is MonoTouch framework is based on the Silverlight lightweight version of the .NET framework.
See here http://docs.xamarin.com/ios/about/assemblies for more info.

How to convert existing iOS native application into iOS titanium module

I have followed http://wiki.appcelerator.org/display/guides/iOS+Module+Development+Guide and created a ios module and integrated it to titanium application. Now kindly help me how to convert an existing iOS4 (iPhone) application into iOS module for titanium.
My question might be very sily, kindly help me :)
Titanium mobile uses its native javascript to develop modules. At compile time it translates the source code into native code.
And as per your situation you have a native application in iOS 4, so in order to convert it to titanium you got to create the application from scratch in titanium using its native javascript.
I don't think there is any trick or application that converts a native iOS application to titanium.
One suggestion would be by creating an empty module and putting your existing code inside it. The tricky part is getting rid of your own Appdelegate and attching the Modules delegate to your source.
You can show any of your view controllers as follows
[[TiApp app] showModalController:myViewController animated:YES];

Resources