How do mobile apps developed on Desktops work? - ios

Most if not all smart phones uses an ARM processor. However, I believe that mobile apps are developed on Desktops, laptops which all run x86. So for example, how does an ios app or an Android App, which run on ARM based processor, work when it written on x86 based Mac work?

On iOS, the simulator runs x86/x86-64 builds of the code to be tested (exclusively 64-bit builds these days).
It's worth pointing out some significant architectural differences in approach between Android and iOS when it comes to simulators. The iOS Darwin kernel is ABI and API compatible with that in MacOS, and the simulator app simply runs the iOS 'shell' including springboard, and a full set of user-space libraries on top of the host operating system.
Android simulators are run in virtual machines, optionally with instruction set emulation.
There are types of development where neither approach is idea. Any code relying on low-level optimisations needs to be tested on a device.

Emulators.
And/or x86 Android in a VM, because most Android programs are portable at a source level between x86 Android and ARM / AArch64 Android. (But that's still just a more-efficient emulation, not running Android applications directly under the x86 Linux kernel on your desktop).
I assume it's also pretty easy to compile on a desktop and run on a real phone if you set up your networking correctly, possibly after jailbreaking the phone to let it run apps without having to reinstall through the app store. IDK the details.

Related

Possible to Run iOS Apps on PC

Is it possible to run iOS Apps DIRECTLY on Mac OS? What about Windows? Or do you always have to use a virtual machine? I searched around and all I found was people saying you need to use a virtual machine. Reason for this: I want to automate behavior on an app on my iphone, and I think that will be much faster on my PC.
The iOS SDK accesses the hardware of the iPhone/iPad. It's very specific hardware which is not available on any other device.
The CPU is different, the display, device buttons, sensors and phone specific stuff...
The simulator simulates all this hardware, still it needs a different compile and can not execute the iOS bundle as it does not simulate the Arm CPU architecture.
That said, it does not make much sense to do automated test on another platform than the target platform, as the app might have slightly different errors and behavior.

Developing in Qt for iOS on a Linux computer

I'm planning to develop an app for Android using Qt Quick Controls and an Android Emulator. The same set of components is said to work on iOS. Thus I'd like to build the app for iOS as well.
Unfortunately, Qt for iOS is only available for Mac.
I don't own any Apple or Android device. I'm using a computer running Linux.
What would then be the best way to be able to build the app for iOS (and test whether everything works as expected; most testing will take place in the Android emulator)?
If any more information is needed, feel free to ask in the comments.

Reg. iOs mobile app developement hardware requirements using Delphi XE7

I'm using Delphi XE7 for developing mobile application. And some how, I have learnt how to create and test the Android mobile application using Delphi XE7 and for developing and testing Android application, just one Android mobile is enough. And I need to know the hardware requirements for developing and testing iOs mobile applications. And currently I'm having Windows 64 bit Os. Is it possible to develop and test, if I'm having Mac Os which is Virtual Os and iPhone device in my hand. And in the Virtual OS, I need to install Xcode and the required packages. Please confirm me once should I need compulsory MAC book for developing iOs mobile application using Delphi XE7.?
Please provide me the solution.
In addition to your development PC, you need the following to develop multi-device applications for iOS:
A Mac running OS X
An iOS device, connected to your Mac by USB cable
http://docwiki.embarcadero.com/RADStudio/XE7/en/IOS_Mobile_Application_Development
The Mac OS X is bound to the Apple hardware. The only way to make OS X run in a virtual machine is to hack it. There are several solutions available e.g. here and here.
I am however sure that you will end up being frustrated about spending too much time on tweaking Delphi and the hacked OS X - even with Apple hardware there can be plenty of frustrations! For example there are updates to Xcode all the time and some of them breaks things. If you also have to tweak OS X every time you need to update, you would wish you bought the hardware.
I can recommend buying a Mac Mini ($499), it is the cheapest way to get a Mac. To minimize cost, you can simply connect it to the same monitor as your windows computer and just switch input on the monitor when you are working on the Mac. I have done that and it works very well.

Virtualization of iOS

I am interested in analyzing the network traffic utilized by an app I found on the app store. I could just use wireshark to analyze the traffic on the network, but that would be too easy.
Instead, I would rather run the app on a virtualized instance of iOS.
Is it possible to run iOS in a virtual machine on OS X?
My initial search shows that this may be difficult because a lot of virtualization software is designed for the x86 architecture, and iOS runs on ARM architecture.
Has anybody gotten this to work before?
As you said, you cannot run regular Appstore apps on Simulator.
Instead, use jailbroken iDevice, install from Cydia tools like tcpdump, sslKillSwitch to monitor phone device traffic.
Other tricks you can find on IOS app analysis website
Good luck!
It is not possible to install iOS on VirtualBox because iOS is only for ARM-based processors, and VirtualBox does not support hardware emulation of the ARM architecture. Unlike Android, iOS isn't open source so you can't recompile it for x86 processors. Plus, you'd need to write a custom boot loader for iOS somehow.
A company called Corellium is claiming to be the first business to offer a virtualized iOS device experience to developers and testers. The company is defining this as the "future of mobile development" which will give developers instant access to run their creations on virtualized iPhones and iPads on a Mac or PC which are running actual real versions of iOS.

Cordova development on Windows for iOS

I'm a longtime Windows desktop developer (25+ years) who has been doing native Blackberry 10 mobile development for 18 months. For my next app I have to hit as many mobile platforms as possible and have decided on Cordova (NOT PhoneGap) for the job.
I have successfully built and deployed a test app on Blackberry 10 and Android with the Cordova CLI. Now I need to get the workflow for iOS figured out before I start actually coding the real app so I can test on all platforms as I go along. I have OSX Mavericks running in a VMware VM from Windows 8.1 and have Xcode installed on OSX. I'm only slightly knowledgeable in OSX, but I know that I must use it to build for iOS. What I'm trying to figure out is how much duplication of effort I have to expend within OSX to build for iOS. I suspect the challenges would be the same if I was using a physical Mac to package and test for iOS so hopefully there are others out there who have figured out the cleanest way to do this.
Can I use Cordova on Windows to create the iOS project and source or do I have to create a duplicate project platform using Cordova on the Mac and keep duplicate source code there too? If I can do all that from Windows, do I just copy it over to Mavericks after every Cordova build and use Xcode to package and run it in an emulator? If anyone out there is running OSX in a VM for this like I am, is it possible to map a host path into OSX so I don't have to recreate the platform source at all after I build it from Windows? I'm assuming there is not way to automate the whole thing from Windows Cordova like there is for the Android and Blackberry platforms, am I wrong?
My desire is to do ALL coding in Windows and only use Maverick for the final bundling for iOS. After 25 years of pro development I'm not used to being a complete newbie and I'm not crazy about it. LOL
Learn Mac OS X. I know you feel out of sorts in this environment, but honestly -- it's not that difficult. In fact, I made the transition from Windows 7 rather than upgrading to Windows 8, and I was comfortable very quickly. (Far more comfortable than I am with a Windows 8 laptop others in my family use.)
Remember that Mac OS X is a Unix underneath (BSD). This means that if you are in any way familiar with Linux or Unix but are put off by working with the Mac GUI, you can almost always fall back to the terminal. (In my not-so-humble opinion, Mac OS X makes for a very nice *nix machine!)
Your VM should be able to share drives across the network, just like it would if it were a real machine (Apple supports SMB reasonably well). This way both environments could point to the same Cordova project without having to worry about copies. (You can copy the projects around, but it would be easier, in my opinion, just to share across the network. Less risk of accidentally doing something stupid.)
The only things that require a Mac are:
Creation of certificates / provisioning profiles (and there are ways around this on Windows, but it is not supported)
Submission to the app store
Remote debugging using Safari (You can use Weinre to come close, but it doesn't support breakpoints and such)
Local compilation of your code (and there are other toolchains available that do this on other OSes, but again, not supported by Cordova).
Running the app in a simulator
The above means that you can develop your app on Windows and only run to the VM for compilation / submission. With the advent of the Phonegap Developer app (http://app.phonegap.com), you can skip the (re)build step during development and testing as well (as long as you use only core plugins).
Note: I know you indicate you are using Cordova and NOT PhoneGap. What's nice is that, ATM, the Phonegap Developer App works just fine with Cordova projects (whereas PG Build often requires config.xml to be moved and plugins to be handled differently). It does require the PhoneGap CLI to be installed. As long as you are using core plugins, it definitely saves time by eliminating the rebuild steps.
The Cordova project can be created on any platform -- but I know there was a time when adding the iOS platform to your project (cordova platform add ios) would check that all pre-reqs were met, but I'm not sure if that is still the case. It can't hurt to try. But if it is required, use a network share and add the platform on the VM. Keep in mind that the platforms should be thought of as build artifacts -- your app code should live in the root www, which doesn't depend on the added platforms.
Do not rely on the iOS Simulator to tell you anything about how the app works or performs on a real device. The simulator has all the power of your desktop (processor speed, memory, etc.) and lacks many on-device features as well. I suspect the visual performance of the iOS Simulator will be horrid, since it will rely on the GPU as routed through the VM. (Frankly, it's not always great on a real Mac.) You really, really, really must have a real device to test on. (Again, the PhoneGap Developer App can ease the pain of repeat deployments for testing.)

Resources