in ios, mobile

Distributing iOS application for testing and debugging

During development and  testing of mobile application, we need to regularly send application build for tester or client for verification or work.  So it very important to get familiar with number of ways to distribute your iOS application. In this article I will list out 4 such method.

  1. Distributing simulator build for other mac user with Xcode 6.0 or above.
  2. Wireless Distribution  via  www.diawi.com.
  3. Wireless Distribution  via self hosted site.
  4. ipa Distribution.

Distributing simulator build for other mac user with xcode 6.0 or above


From Xcode 8.2 and above

You can simply drag and drop yourappname.app into the simulator.  Simulator will automatically install the app for you.
For Xcode 6.0 and above

I was wondering why facebook request to provide  yourappname.app  when we submit for facebook enabled app for iOS during review.  I knew they are using this build to test and verify the facebook api implementation in our iOS application.   So here’s the answer, which we can use it to distribute  simulator build iOS application to other mac user having Xcode 6.0 or higher.  Now the other user can use this app to install into his simulator and run it as usual. This way iOS developers with  no developer account can share his work with his client.  So no need of developer account,  no need to create provisioning profile, no need to archive project and upload to third party  to get link for wireless installation link.  Seems exciting right . Let’s get into work now.

Apple has introduced an interesting tool with Xcode 6!

simctl

simclt allows you to control the simulators running

run xcrun simctl to get the list of available subcommands. Lots of new options to play around.

 

Here’s the step to follow.

  1. Open your project in Xcode and build and run your project for iOS simulator of your choice.
  2. Zip .app version of your app and send it to other user  via email or other way.
  3. Unzip the file you received from email. and run following command.To install you app

    xcrun simctl install booted <app path>

    To launch the app

    xcrun simctl launch booted <app identifier> or click on the app icon in simulator as usual 

Some time it is possible that the app crash once you open application.  It’s probably because the architecture issues, since we used the device build instead of simulator build. The basic architecture difference between the iphone simulator and iphone device is iPhone simulator uses the architecture i386 or x86_x64 whereas, iPhone device uses the architecture arm64 or armv7 or armv7s. So make sure that you buid your app for iOS simulator.

 

Few simctl commands

  • List all available sum commands
    xcrun simctl
  • List available devices, device types, runtimes, or device pairs.
    xcrun simctl listyou will see some like this.== Devices ==
    — iOS 9.2 –iPhone 4s (F6FE46CF-E096-4527-A7F8-1ECCB01547D1) (Shutdown)
    iPhone 5 (149E9859-5327-4DC0-BE68-52F88511EF00) (Shutdown)
    iPhone 5s (9CDE2E0C-905B-49B4-8768-A0493EDA29F7) (Shutdown)
    iPhone 6 (6DD015EE-7444-479C-B6A5-7F780F63C04D) (Booted)
  • Launch specific simulator
    xcrun instruments -w “iPhone 5 (8.0 Simulator)
  • Lunch specific application in specific simulator.  Copy the UUID of the simulator you want. and run following command
    simctl launch 6DD015EE-7444-479C-B6A5-7F780F63C04D bundle identifier.
  • Open url in specific simulator . you can use booted parameter to specify the currently running simulator or UUID to specify the simulator of your choice.
    xcrun simctl openurl booted http://google.com
  • Add a photo to the photo library on the device
    xcrun simctl addphoto booted ~/Desktop/test.png
  • Reset iOS simulator
    xcrun simctl erase booted

 

Other commands.

create        Create a new device.

delete        Delete a device

erase         Erase a device’s contents and settings.

boot          Boot a device.

shutdown      Shutdown a device.

rename        Rename a device.

getenv        Print an environment variable from a running device.

openurl       Open a URL in a device.

addphoto      Add a photo to the photo library of a device.

install       Install an app on a device.

uninstall     Uninstall an app from a device.

launch        Launch an application by identifier on a device.

spawn         Spawn a process on a device.

list          List available devices, device types, or runtimes.

notify_post   Post a darwin notification on a device.

icloud_sync   Trigger iCloud sync on a device.

help          Prints the usage for a given subcommand.

 

Wireless Distribution  via  www.diawi.com


 

This one is one of the most popular and easy way to distribute your ipa and one of my favourite option.  To distribute your ipa via diawi.com follow below instruction.

  1. Generate ipa using your distribution certificate.
  2. Open  www.diawi.com in your browser.
  3. Just drag your ipa to diawi.com in Upload your app section or click on add files to upload your ipa to diawi.com by clicking submit.
  4. Once completed it will generate a link for you.
  5. Share this link to other users whose device is registered with the used distribution certificate.

Wireless Distribution  via  self hosted site


 

So this option is very similar to the way diawi.com works but in private server.  Previous method work for independent developers but it is not appropriate for company to use. For company this option will give great impression to customers.

We need following 4 setup to make this option works

  1. Website with ssl security (https website)
  2. FTP server and FTP username and password
  3. index.html
  4. AdhocDistribution.plist
  5. demo.ipa

Website with ssl security (https website)

For distribution ipa using apple wireless distribution technology your website needs to use SSL certificate. Meaning you need to access your site https other wise this option won’t works.

FTP server and FTP username and password

Well every website have a FTP server installed, now create ftp user to upload files to your site.

index.html

Update the index.html with

<a href="itms-services://?action=download-manifest&amp;
    url=http://www.bitart.com/WirelessAdHocDemo/AdhocDistribution.plist">
    click this link to install
</a>

 

AdhocDistribution.plist

You’ll notice how the above link references a file named WirelessAdHocDemo.plist. This is a manifest in property list format. It can be generated by Xcode or by some custom script and looks like this,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>https://yourdomain.com/demo.ipa</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.yourdomain.demo</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>Wireless AdHoc Demo</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

demo.ipa

Finally upload your ipa to server.

That’s it. Now open index.html via https://yourdomain.com/index.html. You will now see the link to install iOS application to your device.

 

ipa Distribution.


This option requires you to zip your ipa and send via email to the recipient. At the other end user need to use itunes and sync device to install.

 

Write a Comment

Comment

Webmentions

  • ufabet777

    … [Trackback]

    […] Here you can find 26095 additional Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • DeepBLOK ระบบสมาชิก

    … [Trackback]

    […] There you will find 34151 more Info on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ปั้มไลค์

    … [Trackback]

    […] Here you will find 69033 more Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ทัวร์ยุโรป

    … [Trackback]

    […] Read More to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • สล็อตออนไลน์ JBO Thailand

    … [Trackback]

    […] Find More on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • highbay

    … [Trackback]

    […] There you can find 58273 additional Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ทำความรู้จัก เว็บพนัน faw99 ให้มากขึ้น

    … [Trackback]

    […] Read More Info here on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ของพรีเมี่ยม

    … [Trackback]

    […] Here you can find 21043 additional Info to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • Work from home

    … [Trackback]

    […] Find More on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • Massage

    … [Trackback]

    […] Find More here to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • Albino Penis Envy Mushroom Psilocybin

    … [Trackback]

    […] Read More on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • link

    … [Trackback]

    […] Here you will find 59020 more Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • SHOPEE สล็อต

    … [Trackback]

    […] Find More on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • เช่ารถตู้พร้อมคนขับ

    … [Trackback]

    […] Info to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ลดข้าวดีด ข้าวเด้ง

    … [Trackback]

    […] Find More on to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ป้ายแท็กสินค้า

    … [Trackback]

    […] Information to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ซื้อหวย กับ เว็บหวยออนไลน์ ถูกกฎหมาย ดีที่สุด

    … [Trackback]

    […] Read More on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • Dental

    … [Trackback]

    […] Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ทางเข้า lucabet

    … [Trackback]

    […] Info on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • สินเชื่อรถบรรทุก

    … [Trackback]

    […] Find More here to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • marbo 9k

    … [Trackback]

    […] Find More to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • car detailing

    … [Trackback]

    […] Find More here to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • Volnewmer

    … [Trackback]

    […] Find More here on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • บุญมี สล็อต

    … [Trackback]

    […] Read More on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • jilislot777

    … [Trackback]

    […] Find More Information here on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • เค้กดึงเงิน

    … [Trackback]

    […] Read More on to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • wa dultogel

    … [Trackback]

    […] Info to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • บริษัทรับสร้างบ้านเชียงใหม่

    … [Trackback]

    […] Information to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • Sofwave รีวิว

    … [Trackback]

    […] Find More Info here on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • One day Phi Phi islands Trip from Phuket

    … [Trackback]

    […] Read More Info here to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • โคมไฟ

    … [Trackback]

    […] Read More on on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • พิมพ์สติกเกอร์ฉลากสินค้าแบบม้วน

    … [Trackback]

    […] Info on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • YouTubeチャンネル運用

    … [Trackback]

    […] Find More Info here to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • รับตกแต่งร้าน

    … [Trackback]

    […] Information to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • big 666 สล็อต

    … [Trackback]

    […] Read More on to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • หาฤกษ์ศัลยกรรม

    … [Trackback]

    […] Read More on on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ร้านขายยา

    … [Trackback]

    […] There you will find 99936 additional Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • ร้านดอกไม้อารีย์

    … [Trackback]

    […] Here you can find 43336 more Information to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • lottovip

    … [Trackback]

    […] Info to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • https://ubis-geneva.org

    … [Trackback]

    […] There you will find 83338 more Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • coinbett 88 โปรโมชั่น

    … [Trackback]

    […] Read More on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • รับสร้างบ้านหาดใหญ่

    … [Trackback]

    […] Here you can find 51955 additional Info on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • Study Medicine in Nigeria

    … [Trackback]

    […] Information to that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • best online psilocybin store

    … [Trackback]

    […] Info on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • counseling san diego ca

    … [Trackback]

    […] Here you can find 59818 more Information on that Topic: rajantwanabashu.com.np/mobile/2016/09/20/distributing-ios-application-for-testing-and-debugging/ […]

  • social media analysis

    social media analysis

    cukvjcnxc ubdkg qtjrlmc eujv yfbrerqvzlsshfx