I did not really mention it much online, but my wife became pregnant in the fall of 2013. Every time somebody would ask me “how far along is she?” I would have to stop and think, do some mental math, and eventually tell them the answer. I figured there had to be a better way.
Why I Wrote PregTracker
At the time, I was working on another app, that had to do with shopping lists (yes, very similar to a to-do list, but not quite!). It was using Core Data, which I must say, is not the best thing to start with when you are just getting your feet wet in iOS. It was going pretty decently nonetheless, but I digress.
I wanted something much easier to do, to really be able to learn programming for iOS, instead of fighting with advanced topics like Core Data right out of the gate. I figured a pregnancy tracker app was perfect. It’s function is very simple, but it will still give me a chance to learn many aspects of programming for iOS, without nearly as much pressure.
There are many other fine apps that help you track your pregnancy. They all have a lot more features than mine, but at least at this point, that is actually one of the major motivations. Yes the pictures are helpful, and a lot of text about week by week differences about your baby are good, but I wanted a simple app.
I wanted one that should just enough information right on the front page, in a simple and easy to read format.
After you’ve set a due date, every other time you open the app you are greeted with this:
A very simple, clean interface. You can clearly see your due date, text saying exactly how far along you are, a circular progress bar, and text saying what trimester your pregnancy is. I think it fits very well with the theme of iOS7 (which it was being programmed for originally), and it gives just what I wanted, right on the first screen.
The App and this Blog
It took some time to finish, especially with it being my first app, but I think that was probably good. I got to use it through the duration of the entire pregnancy, and really see how people will interact with the app over a long period of time helped me work out several bugs, especially with Updating an app when returning from background in iOS and Using UILocalNotification. I submitted it to Apple about a week after my son’s original due date, and got it on the App Store on July 1, 2014.
I did not announce my app on this website yet, so jumping straight to version 1.0.1 might be a bit odd, but there were a few bugs I found after approval that I wanted to fix before really trying to push the app. It did have its own website, or at least a page on my separate apps website. The astute among you may have noticed the new “Apps” button in the top menu, which would link to my apps subdomain Coding Explorer Apps. That showed up on this page with no fanfare, but I knew I had to connect to it. I wanted to get a few more Swift articles under my belt before self-promotion, and fix those few bugs I mentioned a moment ago as well.
Working on this app gave me most of the non-Swift topics I talked about on this blog, these include, but are not limited to:
- Supporting Dynamic Type for iOS7 Apps
- Updating an app when returning from background in iOS
- Storing data with NSUserDefaults
- Displaying a human readable NSDate
- Introduction to UIColor
- Using UILocalNotification
- Add sharing to your app via UIActivityViewController
- Getting Started With NSNumberFormatter
- Getting started with NSNotificationCenter
- Replace Keyboard with UIDatePicker
- MFMailComposeViewController – Send email in your apps
Acknowledgements
I want to particularly acknowledge a few resources I used in the creation of this app.
Firstly, you see that snazzy circular progress bar on the main page? I knew I wanted a circular progress bar, but I did not know how to make one, and that was one of the first things I knew I wanted in this app. I got that from Joe Conway of Stable/Kernel, available at http://stablekernel.com/blog/ios-circular-progress-bar/ . I could have used a standard progress bar, but I felt this made more sense, especially as a primary part of the user interface.
Secondly, I can’t draw very well, and do not currently have the budget for a designer. So I was very glad when I found the free Tab Bar icons courtesy of PixEden.com, available at http://www.pixeden.com/media-icons . They provided the timeline and settings tab bar icons. I actually found this website via The iOS Design Cheat Sheet, created by Ivo Mynttinen.
Thirdly, while not particularly programming related, I wanted to thank one source of the data I used in this app. I was also curious about what milestones or length’s my baby probably was at different times, so I added those to the app as well in that timeline tab. I got the average length information from BabyCenter, L.L.C., available at http://www.babycenter.com/average-fetal-length-weight-chart . Having all of this information in a cohesive and easy to read format was very helpful in making that part of the app.
Finally, this particular resource has been a big help in me learning to program in iOS since the beginning. The great classes taught at Stanford about programming for iOS by Paul Hegarty, available on iTunes U at https://itunes.apple.com/us/course/developing-ios-7-apps-for/id733644550 . Watching these iTunes U videos, as well as the associated lecture note PDFs have been extremely helpful.
Future of the App
So what plans do I have for this app? Well, one thing common in many other apps of this type is the comparison of your baby’s size to familiar objects to give you a sense of scale. I have been thinking of adding that, and maybe more information about what is going on that week with the user’s baby. Though if I do that, I will want to keep it a bit tucked away to not clutter the UI. Many other apps have it directly on the main screen, and while it is good to have, I want the main screen to still be very clear about how many weeks along your baby is.
One thing in particular though, I think it really lends itself well to a Today Extension (aka Notification Center Widget) for iOS 8. Currently it uses the app icon badge to also show the user how far along the baby is so they don’t have to even open the app. A Today Extension is a more appropriate place to show this information, and I can write a bit more in it than just the weeks along, like on the app icon badge. So when I write about Today Extensions on this blog, you’ll know that this is probably what I’m working on.
Conclusion
I know this isn’t really a programming post, but its my first app, I wanted to be able to announce it to those that are learning alongside me. I’m not sure how often I’ll post about my own apps directly like this, but probably only for major versions, or new apps.
I am working on a followup app, taking place where this one leaves off about baby development after they are born. This one I am writing in Swift, so after the more introduction to Swift posts that I’m doing now (with variables, optionals, functions (on their way)), look to see more posts about how I handle some new (to me) concept in Swift while working on my new app.
Thank you for reading this post, and if you know anybody having a child soon, please don’t hesitate to share this app with them. I hope this app will be as helpful to others as it was to me. If any of you check out the app, and are curious how I implemented something, don’t hesitate to ask. As usual, I can be reached on twitter @CodingExplorer. Thanks!
Available on the App Store for the iPhone and iPad for only $0.99