Category: iOS Toggle Comment Threads | Keyboard Shortcuts

These posts are syndicated from my iOS Dev Diary over at

The format is slightly different with more code snippets and less explanations. I had originally designed it as a notebook in iOS Development – now you can follow along if you’re interested.

  • Jay Versluis 5:43 pm on August 7, 2016 Permalink | Reply

    Categories: iOS, Mac OS X ( 222 )

    How to make Notes App sync properly on iOS 

    ios9-notes-app-iconHave you ever wondered why some notes seemingly sync just fine between your iOS devices, but others do not? Wether a note is not fully updated, or you find a duplicate entry in the list, it can be an exercise in frustration.

    But fret not, it doesn’t have to be! This is not a bug in the Notes app; it’s the way we’re using it.

    Let me show yo what you can do to avoid such problems, and how they can happen in the first place.

    Why do we sometimes get random duplicate notes?

    This has to do with the way the app stores data in the cloud. Notes saves your content only when you close the note, or when you switch away from it. Your note is not saved while you’re typing it.

    Likewise, iOS can only “save over” the current note if you’re not actively editing it. Leaving it open, even if you’re only looking at it, means your note is locked for edits from other devices.

    When you make a change on device A, and the same note is opened and edited on device B, then iCloud cannot save your changes to the current note. Hence it creates a duplicate entry. This is a safety mechanism so that your changes are saved rather than lost, and you can decide which copy you’d like to keep when you’re done.

    How to avoid sync trouble on iPhone

    So on iPhone, the solution is simple: always return to the list view of all your notes. Do not leave a note open. That way, another device can edit its contents without trouble.

    How to avoid sync trouble on iPad and Mac?

    On the iPad as well as your Mac, things are a little different due to the nature of the Split View Controller. It displays both the list of your notes, as well as a note next to it. Even when you hold your iPad in portrait mode and cannot see the list view, one note is ALWAYS open and displayed, and therefore cannot be edited by another device. That’s usually when and why iOS (or macOS) saves a duplicate.

    To avoid this situation, make sure you switch to a note that you’re unlikely to edit from another device. Perhaps create a “dummy note” without content and switch to it when you’re finished with the Notes app.

    Remember you can look at a note even if it’s open on another device – it’s just that when editing an open note, trouble keeps in.

    Hope this helps 🙂

    • juliav305 8:26 pm on August 7, 2016 Permalink | Reply

      Another great article thank you – another part of the system that made me think I was going slightly crazy with duplicate notes of the same thing or not syncing up at all. Mystery solved 🙂

      • Jay Versluis 8:33 pm on August 7, 2016 Permalink | Reply

        Thanks Julia 🙂

      • Jay Versluis 8:34 pm on August 7, 2016 Permalink | Reply

        Thank you, Julia 🙂

  • Jay Versluis 4:45 pm on August 7, 2016 Permalink | Reply

    Categories: iOS ( 222 )

    How to sync past events in the Apple Calendar App on iOS 

    Apple-Calendar-Official-iconHave you ever been shocked to find out that a new iOS device does not show your old calendar entries, even though future events sync fine across your other devices?

    We’ve all been there! Turns out there’s a default setting in the Calendar App that only synchronises the last 1 month of entries. As if your life before that point didn’t matter. Kind of like Apple’s policy of not supporting hardware older than 4 weeks. But I digress…

    To fix this problem, open the Settings App on your iOS device, then head over to Mail, Contacts, Calendars and scroll all the way to the bottom. Find the Calendars section. There’s a section here called Sync, and by default it says “Events 1 Month Back”.

    Change this to All Events, and magically, past events are now synchronised on this device as well.

    Photo Aug 07, 16 38 37

    You must make this change on ALL your iOS devices so that all past calendar entries can be pushed to every device. Note that there is no such setting on the Calendar App for OS X.

    Another mystery solved!

  • Jay Versluis 1:02 pm on December 29, 2014 Permalink | Reply
    Tags: , GMX,   

    Categories: iOS ( 222 )

    How to override auto-detected Email Settings in iOS 


    The nature of any automation is that sometimes it just doesn’t work. Apple’s iOS is no exception.

    When you add a new email account on your iOS device, several mail providers’ settings can be auto detected. It’s there to make our lives easier so that we don’t have to add details for mail servers and ports manually. Yahoo Mail and Gmail are detected perfectly, but other services – for example GMX – are not.

    This is no problem if iOS simply says that you need to add details manually (as with Plesk mail), but it is an issue if iOS has detected the correct POP settings and you’d much rather use IMAP. iOS offers no way to change these settings when auto detection was successful.

    There’s a trick which will let you specify your own settings by bodging your password. Do the following:

    • under Settings – Mail, Contacts, Calendars – add a new account
    • choose other, then select Add Mail Account
    • This will show you a dialogue similar to the one in the screenshot above. Fill out your details but deliberately choose the wrong password. A single letter of your choice will do.
    • Hit Next and the auto-detection goes to work, telling you the password was wrong.
    • Now configure the settings to your liking, including a choice of POP and IMAP, incoming and outgoing mail servers, encryption options and ports.

    I found this out by helping my friend Oliver leave POP behind for good on his new iPhone 6. In case you need the GMX IMAP details, they can be found here:

  • Jay Versluis 11:46 am on August 4, 2014 Permalink | Reply

    Categories: iOS, Screencast ( 222 )

    Core Data Nugget #1: How to speak Core Data 

    In this screencast I’ll talk you through the lingo of Core Data: those scary classes and expressions that you’ll frequently come across. In fact, this is the start of a new series:

    Core Data Nuggets are bite-sized chunks about the framework. Dip in and out or watch them all in a row and learn how this super complicated framework works and what it has to offer.

    Don’t get overwhelmed by Core Data: it wants to help – it’s just not designed with humans in mind.

    As always, enjoy!

  • Jay Versluis 9:28 am on July 21, 2014 Permalink | Reply  
    Categories: iOS, Screencast ( 222 )

    Creating In-App Purchases in iOS 7 

    In this 7-part series I’ll show you how to create an In-App Purchase in iOS 7 with Xcode 5.1. The course will run you through everything from setting up your product in iTunes Connect, creating a custom shop class for easy re-use, making “first contact” with the App Store and how to deal with its responses.

    These are Parts 1+2 which are free to watch. You can see the rest of the course here:

  • Jay Versluis 8:51 am on July 14, 2014 Permalink | Reply  
    Categories: iOS, Screencast ( 222 )

    How to use a Popover on iPad 

    In this series I’ll show you how to create Popovers on iPad. They’re fairly easy to create once you get the hang of the inner workings of the UIPopoverController.

    I’ll show you how to create basic Popover in code and in your Storyboard, and we’ll discuss how you can retrieve data from a Popover when it’s dismissed. We’ll do this with a simple UIDatePicker. In the last video I’ll demonstrate how you can pick images from the camera roll using the UImagePickerController with a Popover – which is how you’re meant to do it on iPad.

    The series contains three videos in total. The first one is “free to air”, and the other two are for members only.

    You can watch the whole course here:

  • Jay Versluis 6:18 am on July 7, 2014 Permalink | Reply
    Tags: iPad, UIStoryboard,   

    Categories: iOS, Screencast ( 222 )

    How to change a UIStoryboard from iPhone to iPad in Xcode 5 

    In this screencast I’ll show you how to make an iPhone storyboard display as an iPad storyboard in Xcode 5.1’s Interface Builder. Under the hood a UIStoryboard is just an XML file, and with a small tweak we can make Xcode display it like an iPad or an iPhone. This is a good strategy if you’d like to use your iPhone storyboard as a starting point for an iPad version.

    You can read my full article on my iOS Dev Diary:

  • Jay Versluis 6:16 am on June 30, 2014 Permalink | Reply
    Tags: ,   

    Categories: iOS, Screencast ( 222 )

    How to use iCloud in your iOS App 

    In this series I’ll show you how to use iCloud in your iOS apps. We’ll discuss how to setup Xcode and your app, including App ID and Provisioning Profiles and I’ll demonstrate how to use all three flavours of iCloud: Key Value Storage, Document Storage and iCloud with Core Data.

    The rest of this series is for members of my iOS Dev Diary only – you can watch it here:


  • Jay Versluis 2:17 pm on April 14, 2014 Permalink | Reply  
    Categories: iOS, Screencast ( 222 )

    Creating a Searchable Table View in iOS 

    Xcode_iconIn this 6-part series I’ll show you how to create a searchable UITableView in an iOS App. We’ll start with a standard single view application template in Xcode, create a table view with dummy data, and finally make it searchable.

    This course demonstrates how to do this with Xcode 5.1 and iOS 7.1. We’ll also make the app compatible to for in iOS 6.

    These are the first two parts which are available for free. The rest of the course is only viewable by members of my iOS Dev Diary at

    You can get the source code and follow along here:



  • Jay Versluis 4:01 pm on December 31, 2013 Permalink | Reply  
    Categories: iOS ( 222 )

    How to display a “spinning wheel” indicator in the centre of your screen 

    Screen Shot 2013-12-31 at 15.58.02Sometimes you want to tell the user that something’s happening behind the scenes and that there’s no need to panic. While your process is happening you can display a “spinning gear” in the middle of your screen.

    One way of doing this is via a UIActivityIndicatorView.

    You can create them in Interface Builder, but it’s very easy to create one and show it if and when necessary. Here’s how:

    - (UIActivityIndicatorView *)indicator {
        if (!_indicator) {
            _indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
        return _indicator;
    - (void)viewDidLoad
        [super viewDidLoad];
        [self.view addSubview:self.indicator];

    This creates it in the centre of your UI, but it’s invisible until switched on like so:

    // to start spinning
    [self.indicator startAnimating];
    // and to stop it again
    [self.indicator stopAnimating];

    The UIActivityIndicatorView has a property that automatically hides it when stopped, so all we have to worry about is starting and stopping it when necessary.

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc