Our BlogTips, Tricks, and Thoughts from Cerebral Gardens

Introducing OTAgo, an OTA app distribution system

OTAgo

Over-the-Air (OTA) app distribution is one of the methods Apple provides that allows you and your users to securely install iOS apps on devices. Other methods you've most likely seen and used are directly installing the app via Xcode on a device in your possession, TestFlight (Apple's beta distribution system), and of course via the App Store.

Each of these methods has their purpose.

  • Direct via Xcode: Debugging and initial testing
  • TestFlight: Beta testing
  • App Store: Distribution to customers

So when is the OTA method needed?

Not every app can be distributed via the App Store: In-house apps for your staff, apps that Apple may not approve, or custom apps for your business customers that need to be distributed via Apple's private B2B store.

If the app you're building can't be distributed via the App Store, you're unable to use TestFlight for beta distribution either. OTA is a great way to distribute beta versions, and/or release builds for these apps.

Should you use OTA to distribute your apps?

Most likely, no. If you can use TestFlight and the App Store, use those. If you're building enterprise apps, or have a very early build that you can't get approved for TestFlight distribution yet, then OTA may be for you.

Why use OTAgo?

Setting up an OTA distribution system isn't very difficult. When you use Xcode to build your .ipa file, it gives you an option to create a manifest.plist file that's required for OTA distribution. You can basically drop that manifest.plist and your .ipa on your web site and set up the appropriate links. However, doing it this way, doesn't give you any protection and anyone that finds the link can install your app.

You can put the link behind basic authentication using Apache's .htaccess, or similar via nginx. But since iOS 13, using basic authentication requires the user to enter their credentials 3 times each time they install a build.

See @GeekAndDad's tweet here:

You might be thinking, let's just use an obscure link no one will find, and we'll rely on security by obscurity. This of course is never a good plan, with search engines and malicious web spiders, your hidden link is unlikely to stay hidden.

On top of that, Apple has a new requirement that's coming into play in 'Spring 2020'. Due to rampant abuse of Enterprise accounts being used to distribute apps outside of the App Store, Apple is cracking down and now asking developers using an Enterprise profile how and where the app will be distributed. They're requiring developers to use a secure authentication method. This means either username/passwords or a restricted network accessible only via VPN/Intranet. See a screenshot of the current settings (note you'll only see this in your developer account if you're using an Enterprise account):

Screenshot from the Dev Portal

OTAgo handles the secure authentication for you, and it does it in a way that works around the requirement to enter a username/password 3 times. I've designed it in a way that it should be easy to set up and configure. The initial version includes a `simpleAuth` mechanism that lets you authorize users as simply as providing a list of username/password pairs.

I've also made the authentication system pluggable, so if you want or need to link into an existing authentication mechanism, you can do so by adding in your own plugin. If OTAgo proves to be useful/popular, I'll likely add some additional authentication methods, OAuth, MySQL/MariaDB etc. Of course feel free to send pull requests with additional ones. :)

You can check out the project here: https://github.com/DaveWoodCom/OTAgo. Let me know what you think. If you find it useful, please star it on GitHub!

Acknowledgements:

My thanks to Freepik at flaticon.com for providing the koala used in the OTAgo logo.

Also thanks to Paweł Czerwiński on Unsplash for the background of the banner above.

Introducing All the Rings

All the Rings

Today we're proud to announce the launch of All the Rings, a companion to the built-in activity app that helps you stay focused, motivated, and most importantly, close all the rings, every day. If you're looking for an enhanced activity experience, All the Rings is for you and it's free to download on the App Store. You can read about the inspiration behind All the Rings here. (tl;dr: We often missed our activity goals by small margins, so we created a companion to the activity app that would solve the problem.) For now, let's dive in so you can see what All the Rings is all about.

More Alerts

The first key feature we wanted to implement was more alerts and the ability to customize them. In my previous blog post I talked about just missing stand alerts. If you have an Apple Watch already, you know how it goes. You get the reminder and think "I'll stand up as soon as I finish..." and next thing you know it's too late. A single hourly alert is often not enough, but now you have the option of increasing your alert reminders so that you wont miss it so easily. You can now also receive move and exercise alerts to make sure you're hitting those goals too. 

Track Your Streaks

The second feature we wanted to add was the ability to better track streaks. We didn't call the app All the Rings for nothing. The idea here was that an increased awareness of your daily progress was critical in closing all the rings, every day. At a glance you can now look at your individual move, exercise, and stand streaks, as well as your All the Rings streak. Just for fun (and bragging rights, of course), we added is the ability for you to share this information and help you stay motivated.

Detailed Activity Stats

The third feature we wanted to incorporate was more detailed activity stats. At a glance we wanted the ability to see certain move, exercise, and stand data that was not available to us before. I had questions about my activity data and I wanted the answers. How many times did I reach my goals and what are my overall percentages? What was my best day? What are my overall averages? How many times have I increased or decreased my move goal? Am I making any progress? We answer those questions and then some. And once again, you can easily share this information.

Maximizing Workout Data

Once we got going with our initial feature list, we notice another area with opportunities for improvement: workout data. After playing tennis one evening, Dave and I noticed a huge spike in our activity performance as a result of that workout. In that moment we decided to tap into recorded exercise data to determine the efficiency of our favourite workouts. For example, if I needed 250 calories to hit my goal, I wanted to know which workout would get me there the fastest. ie. how many calories are burned per minute. While we were at it, we figured we would also let users sort their exercise data by most calories burned per workout or average calories burned per workout. You can also share the cumulative data from each type of workout you've logged.

All the Rings on the Apple Watch

Obviously, where All the Rings really shines is on the Apple Watch. Our goal was to make a companion app that complimented the built-in activity app, but at the same time could serve as a fully functional, standalone fitness tool that would be easy to use and get results. With one tap you can see your activity progress for the day and start a workout if you need to. All the Rings is all about efficiency too. No need to use two separate apps anymore.

Complications to Suit Everyones Needs

Choosing which complications appear on your watch face is a big deal. Screen real estate is at a premium, so we want you to get the most out of All the Rings' complications. Wether you want to see all the details or just see what your focused on, we've got you covered. Just go into the All the Rings Settings on your iPhone and select Configure Complications to choose from all of the options. My personal favourite is the circular move ring with the current stand hour indicator. At a glance, I can see how close I am to achieving my move goal and if I got my stand for the current hour. If the star is empty I still need to stand, if it's filled in I've got it already. So simple, yet so effective. You can see some of the other configurations below.

Set Multiple Goals for a Single Workout

For many people, the ability to set only one workout goal just doesn't cut it. Say you need an additional 250 calories and 15 minutes of exercise to close your rings for the day. With All the Rings you now have the option to set those goals. During your workout you will get progress alerts and a final alert when you hit each goal so you'll know when it's safe to wrap things up. Now that's workout #GOALS!

No More Screen Hopping

Focus and fluidity is essential when you're on the move. With All the Rings you can quickly see the status of your move and exercise progress during your workout without having to jump between the workout and activity app. But, that's not all. Your calories burned, heart rate, distance, and pace are front and center. Tap on each icon and get even more information including basal energy, average heart rate, speed, and steps - all on one screen.

We initially made All the Rings to improve our activity experience, and we want this app to fulfill your activity needs too. All the Rings wants to make it easier for you to close all the rings, every day, and that's why we're offering a free basic version of the app, with several paid Power Pack options to suit every budget. We even have a section inside the app that let's you vote on new features. We can't wait for you to try it and would love to hear your feedback!

An Activity Story: The Inspiration Behind All the Rings

It was a cold winter day last December. We had been out running errands all day, but apparently not moving enough to earn our 30 mins of exercise. At 11:58pm Dave noticed he still needed 3 minutes. He ran around the house in a desperate attempt to close his exercise ring, hoping just maybe the watch would be forgiving and give him credit for the 3 minutes. It was not to be. As the minutes ticked away into the new day, it became clear the 30th minute would never be filled. A 55 day exercise streak broken. "Damn it, my watch should have warned me" he said. And the idea for our newest app was born that night out of frustration.

Dave's story is not the exception. How many times have you been only a few calories away from achieving your move goal? Or missed getting your stand goal because you got the reminder and thought "I'll stand up as soon as I finish..." and next thing you know it's ten past and you've missed your window? It kept happening to Dave and I and it was really starting to get on our nerves. Instead of huffing and puffing about it, we decided to make a companion to the built in activity app that would solve the problem.

Once we decided to move forward with the idea, we realized there were a few more areas that had room for improvement. Over the past year, we've been working towards an enhanced activity experience - think, the activity app on steroids. It's called All the Rings, and it's available now on the App Store. You can read a detailed breakdown of everything All the Rings has to offer here.

StackSocial Essential Dev Tools Bundle Featuring Watchdog for Xcode

StackSocial Essential Dev Tools Bundle

Today, StackSocial launched the Essential Dev Tools Bundle for $49.99 USD. For the first time, developers can purchase Watchdog for Xcode outside of the Mac App Store. If you're a developer and you haven't purchased Watchdog yet, now is a great time. The version included in the bundle is not sandboxed which eliminates the hassle of having to grant Watchdog permission to access your drives. This is a major benefit to those of you using a RAM disk because with sandboxing you have to re-grant permission every time the RAM disk changes on reboots, remounts, etc. In addition to getting this amazing, non-sandboxed version of Watchdog for Xcode you'll be getting 7 other fantastic apps that will surely make you life as a developer much easier. Check them out below:

StackSocial Essential Dev Tools Bundle

That's a pretty great line-up of dev tools. StackSocial takes pride in curating the best in creative tech products so rest assured that this bundle will deliver. If you already have the MAS version of Watchdog and would benefit from the non-sandboxed version we'll be issuing an update soon that will let you convert your MAS license to a non-MAS license. You can learn more about Watchdog for Xcode here and grab the bundle here. 

Copyright

© sabby

Introducing Rudoku: A Numbers and Logic Game for Experts

Rudoku

We are so excited to announce the official launch of our new puzzle game, Rudoku! 

Rudoku is a nifty logic and numbers game for casual iPhone gamers.  Over here at Cerebral Gardens we love creating brain stimulating games and Rudoku is no exception. All you really need to solve the puzzles are basic math skills and you can make each puzzle as easy or as difficult as you like. We really strived to strike the right balance between minimal design and the right sounds and animations to make Rudoku a more relaxing experience.

We really love Rudoku, and we hope you do to. You can learn more about it here or go straight to the App Store and grab it. It’s just $1.99 USD ($2.29 CAD) with no in-app purchases. Pay once and enjoy endless playability. 

You can like Rudoku on Facebook or follow Rudoku on Twitter for more updates. 

 

Copyright

© sabby

Every iOS and Mac Developer Needs a Watchdog

Today, Cerebral Gardens introduces Watchdog for Xcode. Watchdog is a helpful utility for iOS and Mac OS X developers that monitors Xcode cache files (DerivedData) and cleans out stale files before they interfere with your builds.

If you’ve been building apps in Xcode for a while, you will see the value in Watchdog instantly as you are familiar with the weird errors that can happen with Xcode. If you’re new to using Xcode, you may not have run into these issues yet, but eventually you will and that’s when Watchdog will save immense time and frustration.

A Watchdog user will no longer see these weird issues:

  • Old images that you've replaced, still showing up in your app.
  • The DerivedData folder growing continuously over time, often taking up 10+ gigabytes of space.
  • Constants/Defines not updating in the app after you've changed them in the code.
  • Localization file changes not being seen.
  • Phantom breakpoints and/or breakpoints stopping on the wrong line.
  • Xcode refusing to run a build on your device, only reporting something obscure like: "Error launching remote program: No such file or directory"

Sometimes the cause is related to your version control system updating files without Xcode noticing. Sometimes it’s random. Regardless, the result is the same: a bad build, time wasted, a frustrated developer, or even worse, an annoyed customer.

These errors can be mind numbing. Let Watchdog be your guard against these errors so you never again have your time wasted.

Watchdog gives you truly clean builds, saves time, and your sanity. It guards, protects and, most importantly, prevents.

Download Watchdog for Xcode

Copyright

© sabby

Introducing Party Doodles, and the Lessons It Has to Share

Last Wednesday we released our newest game, Party Doodles. A unique picture guessing game that uses AirPlay mirroring to create a party game experience unseen before now on the App Store. It has been in the works since AirPlay mirroring was announced (yes, almost a year from concept to release).

I believe, and app reviewers (here, here, and here) seem to agree, that Party Doodles is the first of it's kind on the App Store. The tag line for the game is 'Made for iPad, designed for Apple TV' because while you can play without Apple TV, the game is really meant to be played on the Apple TV.

The easiest way to describe the game, is to compare it to Pictionary. A group of friends break into two teams, each person takes a turn drawing clues (on the iPad) while their teammates try and guess what it is (watching on the big screen TV) before time is up. If time runs out, the other team can steal the points. I added some strategy to the game by having 3 difficulty levels baked into each turn, the person doodling can pick an easy topic to win 1 point, a medium topic for 2 points, or a hard topic for 3 points. If you're behind the other team it gives you a chance to catch up, or if you're winning, a chance to get even further ahead!

The game really is a lot of fun, and I'm not just saying that cause I made it. I had people actually come over to my house and ask to play it. And it's not uncommon for players to break out into uncontrollable laughter.

Anyway, enough plugging the game, please download it and give it a try. Did I mention it's free?

On to what lessons the game has for us, as developers....

First, it's important to know that progress on the game was sometimes slow as I was working full time at a normal job when I first started working on the game. Even when I went full time indie, client projects usually take precedence and consume the majority of my time. I recently looked back at my source commits and noticed several months where I hadn't committed a single line.

A lot of things happened over the course of the development of the game. One of which was that Draw Something came out and became a massive hit. There was a definite 'Oh shit' moment at that point. But it didn't take long to come to terms with the fact that the games are significantly different. I never intended Party Doodles to have mass market appeal anyway. It's definitely for a niche market since the requirements to play properly are high; you need:

  1. an iPad
  2. an Apple TV
  3. actual friends in the same room1

The goals for Party Doodles were to create a unique experience doing something that no other app on the store was doing yet (I expect more will come along shortly), to try the freemium model out, to create a fun game that people can really enjoy playing together, and to get a little attention for the game itself since it is the first of it's kind on the App Store, not an easy feat nowadays.

I've definitely learned a lot while developing this game and plan to share a bunch of tips/tools and code over the next few blog posts. Today's tip is a short one though (since I used up so much space detailing the game in the first place).

When releasing an app with In-App purchases, make sure you test the purchase functionality with the live app from the App Store as soon as it's available. (Use a promo code to download the app after it's approved and before it's released if need be). There are some slight differences between the Production IAP system and the sandbox we can get to test with before submission. In my case, I added receipt verification as suggested by Apple (using PHP on the server, with code I'll likely share in a later post) and the verification process would fail on production requests only due to a minor difference in data sent back from Apple. That caused the first few purchases to be rejected. Not a good user experience at all! Even Apple's reviewers test the app in the sandbox and thus missed my production only bug.

Fortunately I was able to fix it fast since it was just server side code and not in-app code that needed to be changed.

Ok, lots more to come in future articles so stay tuned. In the meantime, please download the game, and like us on Facebook.

1As a french review (Google Translation) of the game pointed out, you also need a TV which they said makes my free game very expensive. I hadn't considered that someone would add the TV to the cost of my game.

Copyright

© sabby