See link below for a description of handling Core Data store change events. NOTE that the first storesDidChange notification is identical regardless of the state of your store. However if this is the first time you are creating the store AND there is an iCloud store already you will get another storesDidChange notification once the existing iCloud store initial import has been completed.
The problem is you don't know what the situation is before it happens UNLESS you know you are creating a new store and a store already exists in iCloud.
Sadly as noted in my explanation there is no real switch between a local store and an iCloud store - however Core Data does somehow import the sideLoad store at which point you get the transition type 4 notification (second storesDidChange).
Also be aware that if your store needed to be upgraded to a new model version you also get a whole bunch of storesDidChange notifications...
You may also want to check out how the sample apps do what you are trying to do at the same link http://ossh.com.au/design-and-technology/software-development/sample-library-style-ios-core-data-app-with-icloud-integration/