Android and iOS Mobile Application Development (Part 4): Testing and deploying our Mobile Application onto an actual Android or iOS device
Welcome to the fourth and final part of our series on Android and iOS Mobile Application Development. Previously, we have seen how to debug our mobile application within the Google Android Emulator. Now, we are ready to deploy our app onto an Android and iOS physical device. Let's take a look at how to deploy our application on an Android device first.
Android deployment
If you are using Windows, first, we will have to download the necessary hardware device drivers. After this is done, we will need to install Google USB driver. This will allow us to use the Android Debugging Bridge or adb for debugging on a physical device later.
To install Google USB driver, in Visual Studio 2015, select Tools > Android > Android SDK Manager.
Scroll down to Extras and you will be able to see the Google USB driver. Go ahead and install it.
After installation is done, we will now be able to start deploying to, and debugging from an Android device. Go ahead and plugin your device. Once it is plugged in, we can check if the device is detected. To do this, in Visual Studio 2015, select Tools > Android > Android Adb command prompt. Type in adb devices. You should see a device listed like so.
Now we can start debugging. In Visual Studio 2015, select Device to run.
Command line deployment via adb
Alternatively, if you encounter some unknown issues with using Visual Studio to deploy, we can use an adb command to deploy.
In your project path, look for bin\Android\Debug\android-debug.apk. This is the file we use to deploy to our android device with. We can simply issue the install command if this is the first time we are installing the mobile application.
adb install "C:\path to apk file"
If you wish to uninstall your mobile app, you may also do so with the uninstall command.
adb uninstall YOUR_PACKAGE_NAME
Finally, if you wish to update your mobile application, use the install command with the r option.
adb install -r "C:\path to apk file"
iOS deployment
There are some prerequisites we have to install on your Mac before we are ready to start debugging.
- Install XCode (the latest version, 7.1 and up).
- Download and install node.js
- Apple iTunes
Creating your Developer's profile
In order for us to install on a iOS device, we need to have a provisioning profile. It used to be that we need to have a Apple Developer's account to do that. Now, we can do it with the latest version of XCode - XCode 7.1.
Launch XCode and select XCode > Preferences from the menu. Now click on the + icon to add a new profile if we have not done so.

You will need your Apple ID to sign up for a profile.
Once your profile has been created, you can click on View Details... on the bottom. Click Create next to iOS Development to create your signing identity.
Now, we can create a new project that will help us create your free iOS development provisioning profile for your mobile application. Let's choose Single View Application and click Next.
Update Product Name and organization Id such that the bundle identifier correspond with your package name in Apache Cordova
Next, click Create to create the XCode project.
The last step is to click on fix on your project page to create the provisioning profile for your mobile application.
Once this is done, your provisioning profile should have been created. To verify, you can go back to the Preferences screen > Your Account > View Details.

Now, we are ready to perform the next steps to install RemoteBuild and setup Visual Studio 2015.
RemoteBuild Setup
Once node.js has been installed, we can use it to install RemoteBuild. Launch Terminal and type in the following command line:
sudo npm install -g remotebuild
You may be asked to install other components during installation. For more information, you can also refer to http://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/
Once we have installed RemoteBuild, we can kick it off for the first time in Terminals by typing the following command.
remotebuild
In Visual Studio 2015, there is a location for you to enter the displayed information. But first, let's take a look at the details.
For the first time, and only once, remotebuild will display a Security PIN. It is important to note this Security PIN down because the next time you start remotebuild, this information will not display anymore. Also take note of the port number. The machine name did not really work for me, but you may try. If you need to use the IP address to connect to your MAC, open Terminals, and use the following commend to display your MAC's IP address.
ifconfig
In Visual Studio 2015, select Tools > Options > Tools For Apache Cordova and select Remote Agent Configuration. Let's enter the information we have gather here.
Once we are done, we can can start debugging. On your Mac, plugin your iOS device. Select iOS, Remote Device, and click Run.
Note that it is quite possible that even if the mobile app is deployed to your iOS device, it may timeout and you wouldn't be able to debug. However, you should still be able to test on your physical iOS device. If you are not ready to deploy yet, you may also choose from the different simulators available.
That's it! We have successfully deployed to an Android and iOS Device. I hope you have enjoyed this 4 part series and that you now have a good starting point on your path to Android and iOS Mobile Application Development.
Nice article,useful to me.
ReplyDeleteAndroid programming Mobile Application Development
All your hard about curating this informative post is much appreciated. We are iPhone APP Development Company Dublin CA
ReplyDeleteI would like to thank for sharing the great information for Mobile Application development..Here am learned lots of information..Keep Sharing.
ReplyDeletetop mobile apps development company bangalore | top mobile apps development company in bangalore
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis is really helpful and informative, as this gave me more insight to create more
ReplyDeleteideas and solutions for my plan.keep update with your blog post.
Website Design Company in Bangalore
Website Development Company in Bangalore
Thanks for posting this info., its is very helpful for all of us.keep update with your blogs.
ReplyDeleteEcommerce Website Design Company in Bangalore
SEO Company in Bangalore
ERP Software Companies in Bangalore
CRM Software in Bangalore
Great Article.Softflame solutions are the top iPhone/iOS App Development Company in Pune, Bangalore, Delhi. To know more please visit our website.
ReplyDeleteNice information.
ReplyDeleteMobile App Development Dublin
Wonderful article. I’m satisfied that you simply shared this helpful information with us. Thank you so much.
ReplyDeletemobile app development services
Xcrino is the Mobile App Development Company in Delhi and NCR. With the help of our team passion and hard work we have come a long way and many milestones are still to be achieved in the coming days. We serve clients ranging from startups, SMEs to large enterprises. We build the Best applications as per the clients’ requirements but we give them a different touch by using the trendy designs, latest technologies and agile methodologies. Visit Here Best Info:- Mobile App Development
ReplyDeleteVery good this content, thanks for sharing
ReplyDeleteios applications developer
Great knowledge, do anyone mind merely reference back to it Android Development services
ReplyDeleteWebsite Development experts Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.
ReplyDeleteMobile app development companies in Kolkata
ReplyDeleteWe are the best Mobile app development companies in Kolkata. We Develop best android, iOS, windows application with Great looking Ui/Ux. Find best packages for android app, iOS app, windows app development
Your blog has wonderful information , I also have some valuable information regarding the ios Application Development company in Chennai
ReplyDeletehopefully, this will be very helpful for you.
These tips can help a lot of people make Shopify app that can assist Shopify store owners.
ReplyDeleteNo doubt this is an excellent post I got a lot of knowledge after reading good luck. Theme of blog is excellent there is almost everything to read, Brilliant post. Stationery Design
ReplyDelete