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];
Related
I am new to Xamarin development. And, currently I want to integrate the zendesk chat.
As per my RnD and after contacting Zendesk support center they are not supporting the xamarin yet.
Currently they have sdk for native android and ios respectively.
I need you expertize people's guidelines for the development regarding what scenario i should follow to achieve the same using xamarin.forms :
Integrate the both platforms native sdk's for xamarin in each platform and later call it from Xamarin.Forms by adding platform dependency using Device.OnPlatforms . ( I am not sure about this scenario, please suggest)
Create a jar/aar of Zendesk SDK and use it using binding library concept.( I am not sure it will be accessible into ios platform)
Kindly, suggest me the best approach for this.
Any sample reference for suggestions will be grateful.
Thanks in advance.
I think it's a mix of number 1 and number 2 (and a little extra).
You will need to create the Binding libraries for both iOS and Android. Xamarin has a good documentation of how to do this: Android/Java and IOS/Objective-C
Then you can go either with Xamarin Native (Xamarin.iOS and Xamarin.Android projects) adding the binding to each project. Or you can go with Xamarin.Forms but this will require a little more work as you will need to create an interface of the methods you want to use from the SDKs (most likely all off them) and create the implementations for each platform.
Let's say your interface is called: ISendeskSdkService you will need at least two implementations: ISendeskSdkServiceiOS and ISendeskSdkServiceDroid. These implementations will be on the Platform project and they will be calling the binding libraries you just created and added to each of these projects.
You will be developing your app on top of your interface and which implementation to use will be set on the application load when you are configuring your IoC.
Hope this gives you an idea.
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.
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.
I'm building an app in Titanium in node.js. For my targets I have Android and iOS but I want my iOS target to output native iOS in Swift and not in objective-c.
How can I do this? Is this possible at all?
Thanks a lot.
Titanium used Node.js for the compiler, you wouldn't use much node in your actual app. Also Titanium compiles to a native format but it doesn't literally convert your code in to objective-c / Java and then compile that, at least not directly. The best explanation I've seen is How Does Appcelerator Titanium Mobile Work?
So no, there is no way for this to convert to Swift and if you're looking for a Javascript->Swift converter I cannot imagine it exists. Maybe if you let me know what you are actually trying to achieve, I may be able to help further.
I have existing iOS and Android native apps. Is it possible to extend the apps with Xamarin coded part ?
Both Xamarin.iOS and Xamarin.Android are currently setup to take control of your application, so you need to make your main program be written in C# and then call into the existing code.
The way that you would do this is to bind your existing Objective-C or Java code as C# libraries, and then consume those libraries from C#. The binding technology is precisely what drives both the Xamarin.iOS and Xamarin.Android tools, so you would effectively be doing the same.
Once you have bindings, the interoperability works both ways: you can call native code, and native code can call C#.
The bad news is that instead of starting to enjoy writing code with both tools from day zero, the first thing you have to do the bindings, which is in general, not as fun as watching colored squared move on your screen.
Ok I find an answer here : http://www.whitneyland.com/2013/05/why-i-dont-recommend-xamarin-for-mobile-development.html
For example, code written in Xamarin cannot be used in native or HTML5
apps.