Appcelerator App Conversion iOS to Android. - appcelerator

One of our developer developed an app in appcelerator using alloy framework for iOS which works fine. Now we want to run the same app in Android, since the appcelerator is a cross platform tool, we wish to make the Android version of the App. I tried searching about it and explored the applcelerator ide for options but couldn't find it. Can some one please guide me into the right direction?

First of all have a look at this link : http://docs.appcelerator.com/platform/latest/#!/guide/Supporting_Multiple_Platforms_in_a_Single_Codebase this will guide you to update the application for multiple platforms.
Their are basically two different ways to port any application from android to iOS or vise-versa, but before that just let me clear one more thing to you about tiapp.xml.
In the tiapp.xml of your project you need to updated the Development Target by checking for which platform you are developing the application for (iPhone, iPad, android, Mobile Web).
Option 1 :
Cross Platform is build to make code re-usable (i.e. re-use same code for all the platforms), but we have exceptions with many things. Their are lot of components that work fine in iOS but when you use them in android then you will face errors. So in that case you just need to apply conditions for android and iOS like below :
if(OS_ANDROID)
// do something
else if(OS_IOS)
// do something
What you need to do is that you need run the application in android simulator and test the application for these changes and then apply the changes accordingly.
Basically a developer has to target the UI for both the platforms, as their will not be any logical differences between the two. Also their will be UI changes between the same components, like for example a picker in iOS will not look the same as it will when you look it in an android application.
Option 2 :
Now in the project you have assets folder with the platform that you have selected in the tiapp.xml (i.e. iPhone, android etc).
You can create similar structure in the style and view folder, create two folders iOS and android in both the directory (i.e. style and view).
First, move .tss of style folder (except app.tss and index.tss) in the iOS folder, then copy the files in the android folder also.
Repeat the similar process with the View folder also.
Now you have two different structures (i.e. view and styles) according to their platform. Now you can run the application in android simulators and resolve the error that you face.
Hope this small information helps the cause, you can also have look at the documentation of all the components from below link :
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView

Related

How to display images in Muti-Platform Xamarin.Forms Project on iOS

I've got a Xamarin.Forms Project containing an Android and an iOS Platform Project.
I've got my whole application working on Android and I am now struggling on the iOS part. I can't get my images to display on iOS.
I've followed the Microsoft guide on how to work with images on Xamarin.iOS, but it's simply not working.
I have created a minimum example from a new project and uploaded it to GitHub, it can be found here.
Output: On Android, the image is being displayed fine, on iOS, the screen stays empty. In addition to that, the logs I've added to AppDelegate.cs show, that the images cannot be found by using UIImage.FromBundle()
I've also checked the CSProject file of the iOS project, but it already contains the <ImageAsset> item groups.
I am on Visual Studio Professional 2022 (Windows) Version 17.4.1
Can someone please have a look into this? I am going crazy...
I have test your project with the Visual Studio 2022 for mac. And I had the same results in the Android platform and ios platform. The small car icon will show at the top of the screen.
But for the iphone 14 pro simulator, which has a notch screen. The car icon almost be covered. So you can try to run it on the ipad or a device without notch screen to check the car icon will show or not.
In addition, I have checked your Assets.xcassets folder and the official sample on the github. There is no a such xxx_vector folder in it.
Background information:
What's deprecated (but still works) is individual resource files (aaa.png, aaa#x2.png), with no xcasset.
An xcasset containing those files is not deprecated. Nor is it likely to become deprecated in the future.
If you still want to test with .pdf containing vectors:
What is problematic about your setup is that you have TWO representations of car_settings. One with .pngs, one with vector pdf.
What happens if you remove the xcasset with .pngs, and rename the one with pdf to match the filename in it? (car_settings xcasset, with car_settings.pdf).
Close VS, and delete all .bin and .obj folders after making this change, to ensure VS correctly rebuilds with the vector version.
If this still fails, then you likely have encountered a bug. Add as an issue at github xamarin forms issues. Be sure to mention the versions of VS and Xamarin.Forms that has the problem.

Xamarin forms white-labeled app (multi branded)

I am building an Xamarin Forms IOS, Android and UWP app that can be custom branded for different clients (e.g. white-labeled). Their apps are exactly the same except for Info.plist, bundle identifier, name, app icons, assets and a few other minor things.
Personally, I thought of a project with multiple build configurations. (pre-build event scripts)
Does anyone know how I can realize this step by step(try it out)?
As i see it, You could have a main set of projects (shared, platfrom-dependent, controls etc) with a skin system implemented - this is your app with all the functionality, let's call it "A".
Then You would have different VS solutions for each brand with projects "A" + "B - the launcher shared project for a specific brand, with appropriate bundle id etc".

AR vuforia integration with xcode

I have two projects. One is native iOS app (UIKIT) and the other is AR Vuforia project which was made by Unity3D.
I can export AR project into XCODE project, but I am wondering how to link them together.
For example, I have a button on native iOS app. I want to trigger AR project when button is pressed and it can go back to native iOS app as well.
Are you saying that you want to have one app launch another (and vice-versa)?
If that is the case, then you just need to learn about Apple's URL scheme, which is described here:
https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html
It is really quite easy to use. You'll need to edit the PList for each app to give them a custom URL, which you can then invoke via the openURL method:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/openURL:

How to debug Unity project with iOS simulator?

As somebody said, the Unity project must be run on devices, but that is a lot of trouble. Is there any way to run a project in iOS's simulator?
Prerequisites:
Mac
XCode
Unity3D for Mac
Guide:
Go to Edit > Player settings > Inspector > iOS tab. Change the Target SDK to Simulator SDK then build the project again.
Open Build Settings and switch platform to iOS.
In the same window set Run XCode as Debug, check Development Build and Script Debugging.
Click Build and Run, choose a directory for iOS builds (for example, create a new directory named Build.iOS)
Build's a long process, take a break.
Unity3D documentation - Building your Unity game to an iOS device for testing.
It was supported until Unity3D 3.3. and iOS 4.??? But the current release 3.4 crashes. See this posting in Unity3D forum.
Anyway I find it easier to run the project in in editor player for debugging and do real testing on the device. Deploying to iPhone via XCode is always annoyingly slow. So I designed my code to distinguish at startup between device and player like
if (Application.platform == RuntimePlatform.IPhonePlayer) {
// do what ever you need
} else ...
Working with the abstract factory design pattern or singletons makes it pretty easy.

How to limit iTunes App Store "Requirements" listing?

The iTunes AppStore auto generates some listings on its published pages. One of them is "Requirements:" and shows the devices that this app is compatible with. iPod, iPhone or iPad etc.
QUESTION: Where is this REQUIREMENTS listing set during the build process?
I have submitted an app that I 'thought' was properly configured because the Xcode settings for iPhone and NOT iPhone/iPad. But apparently this is either broken or I am totally confused as to where this is set and how its created on the AppStore.
Can someone enlighten me?
If you create an app that is iPod/iPhone only, it will still run on an iPad, just not as an iPad native app. That is to say, an iPhone/iPod-only app will run in an iPhone-sized window on an iPad. I do not think that you can say you want your iPhone app NOT to run on iPad.
When you select iPhone/iPad for your app type in Xcode, that is telling Apple and iTunes that your app binary is a universal app -- built for both platforms.
may be it's done by apple reviewers according to this guidelines limitation
App Store Review Guidelines:
2.10
iPhone apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution
... or else it will be rejected.
What's the problem? When you start a project you get to choose whether its for iPhone or iPad or both. When you submit it to apple this is also checked against your iOS build version and other things (normally though if there's a conflict it'll let you know before submission - eg: if you haven't included the iPad icons and your app says that its for iPad too).
In XCode4 theres a nice handy interface now that you can use. If you select your project in the left hand pane and click on your main target in the main window you can select the iOS application targets that your app is for.
In your Project settings Version, Device and Deployment Target are where the iTunes Requirements come from. If you choose only iPhone, then your requirements will inlcude iPod touch.
I believe this is the answer you are looking for:
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html

Resources