iOS Enterprise Distribution

If you have an enterprise iOS account, you can distribute apps internally using an enterprise distribution certificate. Here are some instructions on how to get an installable IPA via shell commands which you can automate as part of a build process.

You need to have your code signing production certificate downloaded and installed into your Keychain on your build machine. Xcode can do this, or you can download the certificate from the Apple Developer site.

Also, you need to have a mobile provisioning profile installed. The mobile provisioning’s “App ID” should be a prefix (say com.example.*) of your app’s bundle ID (such as com.example.LoremIpsum). Again, you can download via Xcode or via the developer site.

Gather (Optional) Information

While the code signing and provisioning information can be set in the Xcode project’s build configuration, you may want to override the information in your build.

Code Sign Identity

If you need to specify your code signing identity during the build, find your certificate in the Keychain and get the Common Name of the certificate.

The production certificate’s Common Name will be the CODE_SIGN_IDENTITY value.

Mobile Provisioning Profile

If you downloaded the mobile provisioning file, you can open the provisioning profile and find the UUID value in the plist.

If you have downloaded the profile in Xcode, you can go back to Xocde and open the Accounts panel in the Xcode Preferences, look at your logged in Apple ID and View Details, and then find your Provisioning Profile. Right click on the name of the Provisioning Profile and click Show in Finder. You will see a file selected in ~/Library/MobileDevice/Provisioning Profiles. The filename is usually named <UUID>.mobileprovision, or you can verify by opening up the file and find the UUID value.

The UUID will be the PROVISIONING_PROFILE value.

Build an xcarchive

Assuming that LoremIpsum is your Xcode project, you can run the following in your shell:

You now have an Xcode archive which is similar to what is submitted to the App Store.

Export your app from xcarchive

The export archive option in xcodebuild allows a few options which will be saved in a plist file. The $TEAM_ID is the prefix in the App IDs in the Apple Developer portal. It can also be found in the mobile provisioning profile file as TeamIdentifier.

Impressions of Packer

It can bootstrap from an ISO or an existing image (for some cloud providers and from desktop virtual machine images). You can use shell scripts, Chef, Puppet and other provisioning tools.

Images seem like old school. Afterall, everything is being Dockerized. Containerized applications are pretty amazing and Docker is pretty good in concept. Like git, the raw speed and workflow make it leap over virtual machines. Performance (whether that be the raw processing power or the quickness of the workflow) enables faster feedback which developers always crave. DockerHub is also important.

While Docker is hyped, “raw” machine images are still important. You still need to bootstrap your infrastructure’s base machines. I can have a machine image that runs Docker but there’s still many things that need to be setup on the Docker host. Firewall rules, service discovery, monitoring tools, and so forth are still required outside a container on the host machine.

Building raw images using Packer makes the process repeatable while also making the image available on different possible platforms. There may be a few minor tweaks that need to be made for each platform but in general, I’ve been able to get a single Packer config working on multiple platforms.

I recommend all your software’s system requirements, caching systems, system updates, Docker, etc. to be setup using Packer. Packer allows you to control which version of the system requirements you really want to use.

Once you have Packer build your image, then you can use Vagrant, Terraform, or other infrastructure provisioning tools to do “the final provisioning leg”. The final leg would involve deploying the actual code and doing the final configurations for your services on that machine.

Whether it be building “simpler” and more straightforward images for demos/tests in a CICD process or creating the building blocks of a multi-node infrastructure, Packer is a good tool for repeatable machine image builds.

Apple Watch First Impressions

I got an Apple Watch on Monday. Having it for roughly 48 hours, I had a couple of quick impressions. Overall, it’s a first-generation product but is more useful than the first-generation iPad I got.

What Makes It Valuable

It’s a Watch!

While I used my iPhone to lookup the time, having a watch is actually
convenient. The little complications are also fun.

Activity Tracking

The Activity and Workout app are unique Watch features that are not on the
iPhone/iPad. The gamification with the Activity
rings is motiviating.
Instead of just numbers, the activity rings look like achievable goals every
day. We’ll see how long I keep it up.

Notifications

My iPhone 6 Plus is kept on silent during most work hours. However, I leave the
vibration on. Unfortunately, if I leave the phone on a table, it vibrates fairly
loudly.

With the Watch, I only get the haptic feedback which is nice. I like the idea
of long glances where only a general summary shows up first for a notification,
and if you leave your wrist raised, you get the actual notification.

I already limited my iPhone’s notifications (mostly communication and financial
apps) to being able to make sounds/vibrations. Other apps might be able to
leave a notification in the notification center, and a few are only allowed
to show a banner (e.g. time-sensitive notifications that don’t really matter
if I miss them). Since I limited the notifications, I think I’m not
overwhelmed with them on the Watch.

Needs Improvement

Setting up the App Layout

The App Layout on the iPhone is kind of annoying because it shuffles and
auto-rebalances the icon layout.

A Bit Heavy

While the bands are obviously lightweight, the 42mm watch is heavy enough to be
noticable, especially since I haven’t worn a watch for a while.

Also, sometimes the notifications are delayed or non-existent. For instance,
the actual text of iMessages sent to my phone number don’t show up sometimes
on the Watch but they do on the phone.

Third-Party Apps are Slow

The apps are slow to launch but hopefully that will improve with a native SDK.

Hard to Read/Touch

The display is not large so expecting to read email or other long messages is
difficult. Also, on several third-party apps, the touch targets do not seem
large enough. Sometimes though even the Apple “back” upper left navigation
is not easy to touch quickly.

Haptic Feedback is Not Always Noticable

The haptic feedback is great but sometimes when you’re busy, the feedback
can be ignored. So sometimes, I find notifications on the Watch that I
don’t recall being notified by touch. Even with the prominent haptic feedback
feature enabled.

Random Thoughts

The Watch is not for Apps like the iPhone

Granted there are many limitations with WatchKit and maybe that will change
once a native SDK comes out, but the Apple Watch seems to be focused on non-app
behavior. The Clock is the primary app. Glances are the main entrypoint into
important apps. Notifications are on the watch as a quick, timely,
context-aware, and informative burst of text.

Apps are a “secondary” feature. Launching the app home screen is actually
an impediment to doing something quickly on the watch. And if anything, the
Watch is about making more effective use of your time for quick actions.

Dictation is Improved But Not Totally, 100% Accurate

Dictation (not Siri) is improved but it is still troublesome enough that
a word in every few sentences is incorrect. The issue is compounded because
there is no easy way to correct the dictation.

Siri is more Useful

Easily add a reminder or ask for directions. Siri is gradually more useful
and functional.

Calibrating the Watch for Workouts

I took a 30 minute walk outside with my phone. It helps calibrate the Watch,
so when you don’t have your iPhone, it should estimate the distance fairly
accurately. I hope this is true. Running with an iPhone 6 Plus is not appealing.

Force Touch is not Long Press

Many times, I’ve caught myself doing a long press instead of a more forceful
press. Only the forceful press will result in the hidden menus in many apps.
I’m not sure I like hiding functionality behind the force touch, but I’m not
sure that there was a better solution.

Third-Party Useful Glances

Other Third-Party Apps

Apple Useful Apps

Conclusion

First, it is useful for performing quick actions in response to notifications
or making quick decisions based in the glances.

Second, it is valuable as an activity tracker. Anything to help my health
is a good thing.

I don’t recommend most people get the first generation but there are many
future applications of the Watch (as an identity, as a key to other
devices/cars, as a small storage of preferences, etc.) that will be
potentially compelling in the near future.