iOS App Deployment Options

Clients often ask ‘how can I deploy my app internally so just our staff sees it?’ Or ‘how can we sell our app to other companies without listing on the App Store?’ This article explains the different iOS app deployment options and pros/cons of each.

There are basically three ways to deploy your application. Either it goes into the public App Store where everyone can see it, a B2B deployment, or an Enterprise deployment where it is only available to your internal staff.

Option 1: Public App Store

The App Store is the huge marketplace for apps that we’ve all grown familiar with. As of this writing, there are over 1 million apps in the App Store. This is where we download all the major publicly available apps from Salesforce to Angry Birds. Every iOS user has access to the App Store and has their credit card setup with their iTunes account.

Pros

  1. Exposure to largest user base
  2. Opportunity to be ‘Featured’ or in the top rankings

Cons

  1. Competing against 1 million+ other apps
  2. Goes through Apple’s approval process prior to each release
  3. Can only filter user groups by OS version and country

Option 2: B2B Deployment

B2B deployment is where you can sell your app directly to businesses by registering their Apple IDs or providing them with redemption codes. B2B apps cannot be listed in the App Store (and vice versa) so it’s one or the other. There are opportunities to make different versions with different functionality, but B2B apps go through the same approval process as regular App Store apps.

Apps distributed via B2B have the same pricing model as the public App Store meaning they can be priced anywhere from free to $999.99. They are also created using the same Apple Developer account that is used for App Store deployment.

Pros

  1. Easy distribution directly to specific users via Apple’s Volume Purchasing Plans for Business or Education
  2. Ability to heavily customize the app for specific organizations beyond what would be suitable in the public App Store

Cons

  1. Goes through Apple’s approval process prior to each release
  2. Restricted to using public APIs and functionality

Option 3: Enterprise Deployment

If you’re looking to launch an app that is explicitly for your employees then Enterprise Deployment is ideal. This allows you to create a completely custom app that doesn’t have to go through Apple’s approval process. This means you don’t have to worry about their policies and can push the limits of your app beyond what is suitable for the public app store.

Pros

  1. Doesn’t go through Apple’s approval process meaning there are no delays and you aren’t limited to typical policies
  2. Can distribute the app internally without first registering devices
  3. Utilize advanced enterprise features for enhanced encryption, VPN, and MDM integration

Cons

  1. No exposure to users outside of your organization
  2. Requires an Apple Enterprise Developer account to publish apps internally

(image credit: florianplag)

How Facebook Field Tested Their iOS 7 Redesign

Facebook has always been known to be inventive and try new things even if it sometimes means that user experience is inconsistent or less polished than they expect. When Facebook developed the flexible Gatekeeper testing system, they were able to run thousands of variations of Facebook simultaneously and run tests collecting data about usage and performance. This data would be used to inform Facebook testers what improvements were ready to roll out.

FacebookRedesignsForIOS7 How Facebook Field Tested Their iOS 7 Redesign

Making the recent move away from the HTML5 platform and rebuilding the apps entirely on native infrastructure, the new apps are twice as fast as a result. Facebook’s app store ratings increased, and twice as many news feeds were read.

Facebook has no qualms about trying new ideas on their users and has never been afraid to see whether or not they are received well on a live environment. The “Gatekeeper” system was built to let their software testers simultaneously test thousands of variations of Facebook on the web with subsets of users, and collect data about usage and performance to inform what to roll out to everyone. Facebook software testers could test apps, upgrades, and patches, then roll back to a previous version without anyone barely noticing.

Although Facebook on the Android has a beta tester club, which launched in June 2013 that lets beta testers sign up and catch bugs, iOS still refuses to provide beta capabilities. Facebook decided to build out a new mobile app testing framework and started using it in March when they built the new and improved app, updated, and released it.

When you install the new Facebook for iOS, the app contains different versions of the user interface. You are one user in a group of a few thousand that is using one of those versions of one of the interfaces in the app. Facebook can then run multiple tests on multiple versions at once, rolling out multiple updates to see which variations benefit the user experience and Facebook.

Everyone has something they can learn from the Facebook testing team.

Checkout this unofficial video demonstrating the iOS7 Facebook App:

[youtube height=”300″ width=”600″]http://www.youtube.com/watch?v=gnXggjgWC3U[/youtube]

How to Implement Analytics and Ads into iOS Apps

We’ve found quite a few clients that have launched apps but then have no way to review their usage or monetize their users. We just did a project for a very interesting news aggregation software company called Infomous.

Their iOS app was launched and had a growing user base; however, they could only review analytics based upon API requests. Check out our case study below that details how we added Google Analytics so they have increased visibility into the apps usage across iPhone & iPad.

On the ads side, see how we helped them monetize the app by incorporating a few different advertising platforms.

To hear the full story, check out our case study on Implementing Analytics and Ads into iOS Apps.

Apple is Back in Maps

Apple recently purchased two mapping companies, HopStop and Locationary, pushing deeper into the map market and giving Apple more power in an area where they have experienced difficulty and embarrassment in the past.

Hopstop

One of the companies, HopStop, is a software application that can be used for directions, also providing real-time traffic delays. The iOS version has been updated with new features; however, the Android version hasn’t been updated and it is no longer available for the Windows Phone.

hopstop-300x142 Apple is Back in Maps

“Apple buys smaller technology companies from time to time,” said Kristin Huguet, an Apple spokesperson, “and we generally do not discuss our purpose or plans.”

Locationary

The other company, Locationary, is a crowd sourced location data company out of Toronto, and is a start-up that specializes in maps and mapping data. Locationary ensures that a business listing data is positionally accurate, as well as temporally accurate (i.e. a business is listed in the right location, and also noted whether or not it’s closed for renovation or closed permanently).

locationary Apple is Back in Maps

Steve Downling, an Apple spokesperson, confirmed the deal, echoing Huguet’s statement, saying, “Apple buys smaller technology companies from time to time, and we generally do not discuss our purpose or plans.” (Are there Apple spokesperson rehearsals where they practice saying that over and over?)

Apple introduced Apple Maps on iOS devices last year; promoting it as a feature of the iPhone 5; however, the software had major issues and was widely panned by users. In September, CEO Tim Cook offered an apology for the “frustration” and promising to improve the program, suggesting alternative apps, and in December, he said, “we’re putting all of our energy into making it right.”

Since the announcement of these two acquisitions in late July, Apple has posted more than 80 positions on their company job site hiring for its mapping group, including a series of “Maps Ground Truth Local Experts” posts, that state, “the Maps team is looking for people with a passion for mapping, great testing skills, and deep regional knowledge to help us build better and better maps. In this position, you will be responsible for the quality assessment of Apple Maps for your region, including both data and map services. You will monitor changes to our maps, provide feedback on unique local map requirements, collect ground truth information, and evaluate competing products.”

Apple has also extended invites to iOS users to “help improve maps” by enabling a new feature called “frequent locations”, which will provide a method to verify business locations and other destinations by tracking user movements. This is entirely opt-in, which should quell any concerns of privacy from users.

Now that Apple has acquired these companies, we can only speculate (since they generally do not discuss their purpose or plans), that they’re taking another stab at the map app space, only this time with more accurate data, giving them an edge on their competition.

How to Auto-Increment your iOS Build Number

When developing an iOS application it is a constant cycle of develop, build, test – develop, build, test – rinse and repeat. When doing this frequently it’s easy to forget to update the build number; however, if you’re working with a pool of users or testers,  it is really useful to know exactly which build they were using when they experienced an error. By keeping track of the build number of each release, it becomes easier to lookup problems, see where they were introduced, and triage accordingly.

The below guide is a summary of a discussion on stackoverflow that shows you how to setup your xcode project so it will automatically increment your build number each time you build you app (and only if the source files have changed!). To see this method in action, you can download the sample code.

Step 1: Create a ‘tools’ folder within your project

Start by opening up your iPhone/iPad project’s folder and create a new folder called ‘tools’. This folder will contain the shell script (and any other handy scripts you want to add down the road!).

increment-build-number-iphone-devleopment How to Auto-Increment your iOS Build Number

Step 2: Create the Shell file

Inside the ‘tools’ folder, create a shell file that contains the script below. In this example we named the file ‘bump_build_number.sh’.

#!/bin/sh
if [ $# -ne 1 ]; then
echo usage: $0 plist-file
exit 1
fi

plist="$1"
dir="$(dirname "$plist")"

# Only increment the build number if source files have changed
if [ -n "$(find "$dir" \! -path "*xcuserdata*" \! -path "*.git" -newer "$plist")" ]; then
buildnum=$(/usr/libexec/Plistbuddy -c "Print CFBundleVersion" "$plist")
if [ -z "$buildnum" ]; then
echo "No build number in $plist"
exit 2
fi
buildnum=$(expr $buildnum + 1)
/usr/libexec/Plistbuddy -c "Set CFBundleVersion $buildnum" "$plist"
echo "Incremented build number to $buildnum"
else
echo "Not incrementing build number as source files have not changed"
fi

Step 3: Add a new Build Phase

Now that the shell file has been created within the ‘tools’ folder, you have to tell Xcode to run that shell command each time you create a build in Xcode. To do so, select the target and add a new build phase. You can rename the build phase by double clicking on the header (we renamed ours to ‘Increment Build Number’ as shown in the screenshot below). Then add the command that will execute the shell script.

auto-increment-build-number-in-xcode How to Auto-Increment your iOS Build Number

Step 4: Build and Test!

Now each time you create a new build, the number will automatically increment. And a handy little feature is that it’ll only increment if the files have been changed – just in case you run a few builds on different devices without actually making any changes to the code.

The post How to Auto-Increment your iOS Build Number appeared first on OptimusMobility.

How to Auto-Increment your iOS Build Number

When developing an iOS application it is a constant cycle of develop, build, test – develop, build, test – rinse and repeat. When doing this frequently it’s easy to forget to update the build number; however, if you’re working with a pool of users or testers,  it is really useful to know exactly which build they were using when they experienced an error. By keeping track of the build number of each release, it becomes easier to lookup problems, see where they were introduced, and triage accordingly.

The below guide is a summary of a discussion on stackoverflow that shows you how to setup your xcode project so it will automatically increment your build number each time you build you app (and only if the source files have changed!). To see this method in action, you can download the sample code.

Step 1: Create a ‘tools’ folder within your project

Start by opening up your iPhone/iPad project’s folder and create a new folder called ‘tools’. This folder will contain the shell script (and any other handy scripts you want to add down the road!).

increment-build-number-iphone-devleopment How to Auto-Increment your iOS Build Number

Step 2: Create the Shell file

Inside the ‘tools’ folder, create a shell file that contains the script below. In this example we named the file ‘bump_build_number.sh’.

[code]
#!/bin/sh
if [ $# -ne 1 ]; then
echo usage: $0 plist-file
exit 1
fi

plist="$1"
dir="$(dirname "$plist")"

# Only increment the build number if source files have changed
if [ -n "$(find "$dir" ! -path "*xcuserdata*" ! -path "*.git" -newer "$plist")" ]; then
buildnum=$(/usr/libexec/Plistbuddy -c "Print CFBundleVersion" "$plist")
if [ -z "$buildnum" ]; then
echo "No build number in $plist"
exit 2
fi
buildnum=$(expr $buildnum + 1)
/usr/libexec/Plistbuddy -c "Set CFBundleVersion $buildnum" "$plist"
echo "Incremented build number to $buildnum"
else
echo "Not incrementing build number as source files have not changed"
fi
[/code]

Step 3: Add a new Build Phase

Now that the shell file has been created within the ‘tools’ folder, you have to tell Xcode to run that shell command each time you create a build in Xcode. To do so, select the target and add a new build phase. You can rename the build phase by double clicking on the header (we renamed ours to ‘Increment Build Number’ as shown in the screenshot below). Then add the command that will execute the shell script.

auto-increment-build-number-in-xcode How to Auto-Increment your iOS Build Number

Step 4: Build and Test!

Now each time you create a new build, the number will automatically increment. And a handy little feature is that it’ll only increment if the files have been changed – just in case you run a few builds on different devices without actually making any changes to the code.

How to Set Up TestFlight on your iPhone or iPad

TestFlight is practically an essential utility for testing iOS apps on iPhone or iPad and is still quite useful for testing Android.

Having shared alpha apps over TestFlight with dozens of clients, their testers and our testers, I’ve seen that setting up TestFlight is not always as intuitive as it needs to be.

The following video walks you through the setup process, covering the most common problem areas and the solutions to those problems.

testflight-ios How to Set Up TestFlight on your iPhone or iPad

Transcript

So you’ve received an invite to do some beta testing through TestFlight.

TestFlight is a great over the air distribution tool where developers can send you the latest build and you can install it on your device without having to sync up through iTunes.

So, you’ve probably receive the email already. And now I’ll show you the steps to accept the invite and set up your device.

There’s a couple of gotchas along the way, so we’ll show how to troubleshoot those.

Fist of all open up the email you received to join the team. And just tap accept and that will take you right to testflightapp.com where you can either sign in with an existing account or create a new account.

In this case I’ll create a new account to show you the whole process. And when you sign up you can optionally sign up as a developer if you want, but if you’re just testing then you don’t need to worry about it.

Once you’ve signed up, you get this congratulations screen where you are now a member of whichever team. In this case, the Optimus team.

So now that you’ve accepted the invite and joined the team as a tester you’ll be prompted to connect your device.

If you don’t see this screen, you might see the app screen with no apps listed in which case you should press the connect a device button or through the menu go to Device Information and Connect Current Device.

If you’re setting up multiple devices you’ll want to log in to test flightapp.com on all of those different devices and go through this process.

So we’re going to tap on connect current device.

This will install the provisioning profile.

Lets reconnect this device.

It takes you into your setting, asks you if you want to install the profile. You do.

It takes a few minutes to install the profile, so just press done when it’s complete. It will take you back to the browser and refresh.

In the video I fast forwarded it to save time.

Now you can see that your device has been successfully connected. And so what that has done, is it’s taken your devices information, sent it to the development team so that they can add it to the profile and send you a build to test.

If you got to view all apps, you’ll most likely see an empty screen. Because no app have been assigned to you yet.

And so you wait for the next email from the developer with your invitation to test their app.

Here we can see that the developer has sent us an invite to test the Optimus app version 1.0 build number 42.

From here we can see an icon, the version number and what’s new in this application.

Lets go install the application. That will take us to testflightapp.com

And now we have the option to install the application.

And now you can see the application icon and the waiting screen in that progress bar along the bottom.

This is often where you will get in to problems.

If that progress bar doesn’t complete, it will give you a warning that application could not be installed. That’s very likely because the provisioning profile hasn’t been properly installed on your device.

In that case go back to testflightapp.com, go to the menu to Device Information and reconnect your device.

Now the app is properly installed. So I can go ahead and launch the application and test freely.

On the developer side they can see that you have successfully downloaded and installed the application and you can report any issues back to them.

The post How to Set Up TestFlight on your iPhone or iPad appeared first on OptimusMobility.

How to Set Up TestFlight on your iPhone or iPad

TestFlight is practically an essential utility for testing iOS apps on iPhone or iPad and is still quite useful for testing Android.

Having shared alpha apps over TestFlight with dozens of clients, their testers and our testers, I’ve seen that setting up TestFlight is not always as intuitive as it needs to be.

The following video walks you through the setup process, covering the most common problem areas and the solutions to those problems.

testflight-ios How to Set Up TestFlight on your iPhone or iPad

Transcript

So you’ve received an invite to do some beta testing through TestFlight.

TestFlight is a great over the air distribution tool where developers can send you the latest build and you can install it on your device without having to sync up through iTunes.

So, you’ve probably receive the email already. And now I’ll show you the steps to accept the invite and set up your device.

There’s a couple of gotchas along the way, so we’ll show how to troubleshoot those.

Fist of all open up the email you received to join the team. And just tap accept and that will take you right to testflightapp.com where you can either sign in with an existing account or create a new account.

In this case I’ll create a new account to show you the whole process. And when you sign up you can optionally sign up as a developer if you want, but if you’re just testing then you don’t need to worry about it.

Once you’ve signed up, you get this congratulations screen where you are now a member of whichever team. In this case, the Optimus team.

So now that you’ve accepted the invite and joined the team as a tester you’ll be prompted to connect your device.

If you don’t see this screen, you might see the app screen with no apps listed in which case you should press the connect a device button or through the menu go to Device Information and Connect Current Device.

If you’re setting up multiple devices you’ll want to log in to test flightapp.com on all of those different devices and go through this process.

So we’re going to tap on connect current device.

This will install the provisioning profile.

Lets reconnect this device.

It takes you into your setting, asks you if you want to install the profile. You do.

It takes a few minutes to install the profile, so just press done when it’s complete. It will take you back to the browser and refresh.

In the video I fast forwarded it to save time.

Now you can see that your device has been successfully connected. And so what that has done, is it’s taken your devices information, sent it to the development team so that they can add it to the profile and send you a build to test.

If you got to view all apps, you’ll most likely see an empty screen. Because no app have been assigned to you yet.

And so you wait for the next email from the developer with your invitation to test their app.

Here we can see that the developer has sent us an invite to test the Optimus app version 1.0 build number 42.

From here we can see an icon, the version number and what’s new in this application.

Lets go install the application. That will take us to testflightapp.com

And now we have the option to install the application.

And now you can see the application icon and the waiting screen in that progress bar along the bottom.

This is often where you will get in to problems.

If that progress bar doesn’t complete, it will give you a warning that application could not be installed. That’s very likely because the provisioning profile hasn’t been properly installed on your device.

In that case go back to testflightapp.com, go to the menu to Device Information and reconnect your device.

Now the app is properly installed. So I can go ahead and launch the application and test freely.

On the developer side they can see that you have successfully downloaded and installed the application and you can report any issues back to them.

Sencha API for Accessing Elements at Run Time

Sencha provides solution for clicking and retrieving the dynamic ID of any element using text, class or any other property. Below are a few methods which help to access the elements at run time:

1. Clicking Dynamic ID with Extjs

Dynamic ID of an element can be accessed and those elements can be clicked at run time using the Extjs methods given below:

By Class

var dom=Ext.DomQuery.select("*[class=x-grid3-cell-inner x-grid3-col-spec]");Ext.get(dom[0]).id

This query will retrieve the id of the element whose class is specified as “x-grid3-cell-inner x-grid3-col-spec”.

By Text

var a = Ext.ComponentMgr.all; var b = a.filter('title', 'Reports', 0, 0); b.keys[0]

This query will retrieve the dynamic id of window whose title is “Reports”.

Ext.ComponentMgr.all.filter('text',Yes,0,0).keys[0]

This query will retrieve the dynamic id of window which contains the button having text as “Yes”.

2. Drop Down at Run Time

For clicking the elements that appear in drop down list at run time, the below method is used:

Ext.DomQuery.select("div:contains(text)").pop().click()

The string text is replaced with whichever item that the user wants to click from the drop down list.

3. Editing Rows at Run Time

For editing the rows that appears at run time in the grid whose id is static.

Ext.ComponentMgr.get('id-schm-grid').startEditing(0,2);

This query will place the cursor for editing in the 0th row and 2nd column of the grid.

The id-schm-grid is the static id of the grid in which editing is to be made.

4. Clicking Window Control Buttons

For clicking the window control buttons such as maximize, minimize and close options.

Ext.DomQuery.select('[class=x-tool x-tool-close]')[0].click()

This query will click on the window control option on the basis of its class.

5. Language Independency

For language independency, _() function is used which will convert the text in native language:

For example, if the string Alarm needs to be converted into French at run time, then _(‘Alarm’) can be used which will give the resultant string as Alarme.

The post Sencha API for Accessing Elements at Run Time appeared first on OptimusMobility.

Sencha API for Accessing Elements at Run Time

Sencha provides solution for clicking and retrieving the dynamic ID of any element using text, class or any other property. Below are a few methods which help to access the elements at run time:

1. Clicking Dynamic ID with Extjs

Dynamic ID of an element can be accessed and those elements can be clicked at run time using the Extjs methods given below:

By Class

[code language=”javascript”]var dom=Ext.DomQuery.select("*[class=x-grid3-cell-inner x-grid3-col-spec]");Ext.get(dom[0]).id[/code]

This query will retrieve the id of the element whose class is specified as “x-grid3-cell-inner x-grid3-col-spec”.

By Text

[code language=”javascript”]var a = Ext.ComponentMgr.all; var b = a.filter(‘title’, ‘Reports’, 0, 0); b.keys[0][/code]

This query will retrieve the dynamic id of window whose title is “Reports”.

[code language=”javascript”]Ext.ComponentMgr.all.filter(‘text’,Yes,0,0).keys[0][/code]

This query will retrieve the dynamic id of window which contains the button having text as “Yes”.

2. Drop Down at Run Time

For clicking the elements that appear in drop down list at run time, the below method is used:

[code language=”javascript”]Ext.DomQuery.select("div:contains(text)").pop().click()[/code]

The string text is replaced with whichever item that the user wants to click from the drop down list.

3. Editing Rows at Run Time

For editing the rows that appears at run time in the grid whose id is static.

[code language=”javascript”]Ext.ComponentMgr.get(‘id-schm-grid’).startEditing(0,2);[/code]

This query will place the cursor for editing in the 0th row and 2nd column of the grid.

The id-schm-grid is the static id of the grid in which editing is to be made.

4. Clicking Window Control Buttons

For clicking the window control buttons such as maximize, minimize and close options.

[code language=”javascript”]Ext.DomQuery.select(‘[class=x-tool x-tool-close]’)[0].click()[/code]

This query will click on the window control option on the basis of its class.

5. Language Independency

For language independency, _() function is used which will convert the text in native language:

For example, if the string Alarm needs to be converted into French at run time, then _(‘Alarm’) can be used which will give the resultant string as Alarme.