The deployment on android simulator is very slow - xamarin.android

when deploying an app built with xamarin on any stock android simulator from visual studio 2013, first deployment takes more than 4 minutes. These boxes are checked: use shared runtime, use fast deployment.
On a real device, the same 1st deployment take seconds.
I've checked PC resources, and CPU is at 20%, all other monitors are at 1% (SSD, 16Go ram, ...). I disabled antivirus and firewalls.
Are there any way to speed up deployment on android simulator ?

I'm using genymotion, it seems faster than normal emulator. Give it a try if you can.

Related

How do mobile apps developed on Desktops work?

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.

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.

Slow app performance under iOS 8 simulator with Xcode 6

After upgraded to xcode 6 I found that when I run my app under iOS 8 in iOS simulator, it ran very slowly, no matter when I choose iPhone or iPad. But if I choose it to run under iOS 7 it ran normally.
I was thinking that it was an app/coding related problem so then I tried to deploy it on my ipad with iOS8 and strangely the app run normally, not as slow as simulator does
Does anybody on SO experience this issue?
Make sure 'slow animations' is not selected under the Debug tab in the iOS Simulator. That fixed the issue for me. It might have been turned on by accident.
If you hit ⌘T while your simulator is selected it will turn on 'slow animations' which puts everything in slow motion. ⌘T is often used to open up a new browser tab, so just be sure your browser is selected and not your simulator.
Performance in the iOS Simulator is not expected to match performance on device. The iOS Simulator is meant as a tool for rapid prototyping and fast iteration. Performance tuning needs to be done on real devices.
Processes running in the iOS Simulator are basically OS X processes running in a specially crafted runtime within a special bootstrap to behave like iOS rather than OS X. Over the past 4 years, this has evolved from basically UIKit and similar iOS Frameworks built on top of OS X Frameworks to now having our own bootstrap server (as of iOS 7), our own dyld (as of iOS 8), and only sharing the host kernel and very low level system libraries (libSystem as of iOS 7, and just the pthreads, syscalls, and platform children of libSystem as of iOS 8).
When you test an app on a device that is not currently booted, we shutdown the device and boot the new one, and that process can take 10s to a minute or 2 to complete based primarily on your disk's I/O bandwidth and what other tasks on your system are demanding of it.
If you see major performance issues with a sim device that has been booted for a while and don't have any obvious background tasks running (compilation, rsync, whatever), take a sysdiagnose and take a look at the simulator processes in the spin dump and fs_usage to see what's likely going on.
Performance simulation and device different things. I think you should not pay attention to it. This error can optimize apple

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.)

iOS app compiling and MacInCloud/similar

I am contemplating developing iOS apps use Delphi XE4 with iOS. In my research I saw MacInCloud, http://www.macincloud.com/features/tools/tools
Does anyone have practical experience with this? Can I hook up my Windows/Delphi/similar development tool to MacInCloud/xCode for cross compiling (to obey licensing terms) and have the app debugged on my iPhone?
Maybe over time it would be beneficial to buy an iMac, but if I could start creating apps without it would be great.
I recently tried exactly that with MacInCloud. XCode and Delphi XE4's PAServer is now automatically installed by MacInCloud so I had few issues hooking up my Windows and Delphi environment.
What I found was that running and debugging in the iOS simulator on the Mac in the cloud worked fine. However as my upload speed was quite slow a compilation took some considerable time. Each compilation seemed to require an upload of about 17MB for the app and another 50MB for the debug symbols.
There is no way of plugging in your iPhone into the mac in the cloud and MacInCloud therefore recommend that you use a further cloud provider (TestFlightApp.com) to deploy the app to your device. I couldn't test using the TestFlightApp service as I have not signed up for the required developer account with Apple and so cannot deploy to physical devices at all.
All in all, if I was doing serious work I would either buy a Mac or pay for faster upload speeds but despite that I found it an very educational experience.
Good luck with TestFlightApp. That is one of those great services we use to have but not anymore. It use to work at one time but has fallen in great disrepair and been neglected.
Even if that did work, you would go out of you mind if you was working on something that can only run on the device. Not all iOS features work on simulator, like in app purchase for instance.
Where with a real machine at hand it deploys right to device almost as fast as simulator. Just a few seconds longer. Doing it this other way would take 15 minutes or more and require many steps of your interaction. You will forget where you left off in your code by that time.

Resources