Related Posts Plugin for WordPress, Blogger...
This form does not yet contain any fields.

    Follow Me on Pinterest

    Our products are on iTunes!

     Nanaimo Studio

    Find us on Google+ 

     

    We are listed on: Dmegs Link Directory

    Blog Index
    404 page
    « Word Tracer - Learn Chinese Field Test | Main | Useful Xcode 4 Features »
    Thursday
    Nov102011

    Beta Testing iOS Apps Made Easy



    The success of iOS platform has spurred the creations of third party solutions that make certain aspects of iOS development less painful such as in-app purchase, push notifications and backend integration provided by companies like Urban Airship and ParseTestFlight is another such service and a damn awesome one. It was created to help facilitate your beta testing and lets you distribute your beta build over the air - made possible by the wireless app distribution model added in iOS4.

    Let's take a quick look at what TestFlight is all about and what they offer.  For a complete overview of the latest and greatest of the service, you should of course sign up and visit the site directly. If you are already using TestFlight for your beta testing, you can also skip this and go straight to the next section.

    1) Sign in after registration

    2) Check the email on any of your test devices and login:

    3) Tap Register Device to send your UDID over to TestFlight.

    4) TestFlight sends back the provisioning profile over the air. What are you waiting for, tap Install!

    5) Your device is now registered with your TestFlight's database.

     

    6) Now that you have registered some devices for testing, let's submit a build to TestFlight.

    7) We created the adhoc build in Xcode, saved the ipa file in Organizer, went to the folder where the ipa file is stored and dropped it here. Notice that it's quite a bit of work -- we will discuss how to automate this step without relying on Xcode later in this article, giving you a more pleasant test flight. :)

    8) When your ipa file is done uploading, this is what you will see, and it's where most of the power of TestFlight lies. In particular, pay attention to the left pane: History shows you the upload history of each build of the app, along with feedback sent by testers (from within the app), crash reports, test session info (such as what your testers have tested and how long), etc.
    (Names and photos have been blurred to protect the innocence)

    9) Crashes has got to be the #1 concern when it comees to testing. Be sure to upload your dSYM file so TestFlight can make sense of the crash reports coming from your build.

    10) This is an example crash report received from a test run of an app we worked on. Sexy, no?

    At this point, assuming we have convinced you enough to start trying out TestFlight, here comes one last goodies. (Names and photos have been blurred to protect the innocence)  

    Step (7) and (9) requires that you mess around with doing the build and uploading your ipa file and dSYM file to TestFlight. Wouldn't it be nice if this can somehow be taken care of as well? Well, you have chosen the right profession. All you need is create a shell script to automate this task and to save you time, we have created a script to do precisely that. If you are a gluten for punishment, you can skip the following and continue to use the good old Xcode way.

    Quick HOWTO:
    1) Save the script above to build.sh
    2) chmod +x build-ipa.sh
    3) ./build-ipa.sh

    Let's take a look at the script to automate the building and submission of our app to TestFlight:

    #!/bin/sh
    ProjectPath="~/Projects/Test/"
    Target="TestApp"
    AdHocPath="build/AdHoc-iphoneos/"
    AdHocConfigurationName="AdHoc"
    DeveloperName="developer name"
    ProvisionFile="8490865F-4F60-41BA-98EA-EA2E7B470CF2.mobileprovision"
    ipaName="TestApp"
    api_token="your test flight api key"
    team_token="your test flight team token"
    notes="Beta build #1"
    
    // Step (1)
    xcodebuild -target "$Target" -configuration ${AdHocConfigurationName}
    
    // Step (2)
    xcrun -sdk iphoneos PackageApplication -v "${AdHocPath}${Target}.app" -o ${ProjectPath}${ipaName}.ipa --sign "${DeveloperName}" --embed ${ProvisionFile}
    
    // Step (3)
    pushd .
    cd ${AdHocPath}
    zip -r ${ipaName}.app.dSYM.zip ${Target}.app.dSYM/
    
    // Step (4)
    popd
    curl -v http://testflightapp.com/api/builds.json \
      -F file=@${ipaName}.ipa \
      -F api_token="${api_token}" \
      -F team_token="${team_token}" \
      -F notes="${notes}"\
      -F notify=True \
      -F replace=False \
      -F dsym=@${AdHocPath}${ipaName}.app.dSYM.zip 
    
    // Step (5)
    rm ${AdHocPath}${ipaName}.app.dSYM.zip
    

    Explanations:

    Step (1) Here we use the xcodebuild command to build the project of our choice. Configure the target name and the configuration profile in the shell variables above it. In our case we are doing an adhoc build for our TestApp.
    Step (2) We then use xcrun to create the ipa file. The command also takes care of embedding the provisioning profile into the ipa.
    PackageApplication is a perl file locate at /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication
    The rest should be self-explanatory.

    NOTE: In case you wonder, ipa stands for iPhone Application. It's technically a folder and in Unix a folder is essentially a file.

    Step (3) After the ipa file is generated, the script proceeds to zip up the dSYM folder. This way when TestFlight receives a crash report from your beta builds, it will be able to make sense of things in the event that you have configured the build setting for the build process to strip the debug symbols out of the build (e.g. to reduce file size).

    NOTE: We use the Unix command "pushd ." to save where we are at before traversing into the build folder so we can return later with "popd".

    Step (4) We are now at ready to send the build off to TestFlight. Retract back to the project folder and use curl command to do the delivery. The parameters should be self explanatory so we won't get into them.

    Step (5) Finally we remove the dSYM zip file to keep things clean. You may choose to skip this step if you wish to keep it around for later use.

    With the build uploaded to TestFlight, you can now notify your beta users to start testing it away! Perhaps the next logical step for TestFlight is to automate the finding of beta testers for developers (sorry, we couldn't automate this part with shell script).

    "Thanks for flying with TestFlight and we hope you will fly with us again."

    Disclaimer: This article is the result of our subject evaluation with TestFlight. We are in no way affiliated with TestFlight and have received no bonus miles in promoting their service.

    PrintView Printer Friendly Version

    EmailEmail Article to Friend

    References (40)

    References allow you to track sources for this article, as well as articles that were written in response to this article.
    • Response
      Response: visit my webpage
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: Seo HOuston
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: Houston Seo
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: Houston Seo
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: Houston Seo
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: SEO Lawrenceville
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: Houston Seo
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: dating tips
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: orlando taxi rates
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: carma.zendesk.com
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: digital marketing
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: Child Porn
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: click hyperlink
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: www.petardas.eu
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: spelling checker
      Usually almost all of the test effort occurs following requirements have been described plus the coding procedure have been done, however in the actual agile approaches almost all of the test effort will be on-going.
    • Response
      Response: informations
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: warp7hosting.net
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: pop over here
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: Frank Dellaglio
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: custom patios katy
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio
    • Response
      Response: equivita Review
      Beta Testing iOS Apps Made Easy - Our Blog - Nanaimo Studio

    Reader Comments

    There are no comments for this journal entry. To create a new comment, use the form below.

    PostPost a New Comment

    Enter your information below to add a new comment.

    My response is on my own website »
    Author Email (optional):
    Author URL (optional):
    Post:
     
    Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>