Accessing iCloud via iOS & Watckit

Hi,


I have a ios app that can access the default CloudKit Container, and then WatchKit App that is part of the Ios App I would like to be able to store to the same ios container.


I think I have tried everything.. Here we go.

Using the Project Manager I have set the IOS App to connect to the default Bundle Identifier Container and that works just fine.

Using the Project Manager, I then set the iCloud setting for the WatchKit Extension to a Specific Container, the IOS Container, however even after cleaning the and building the App, the Watch Kit App will not store to the Specific IOS Container.

It still stores to the default Watchkit Bundle Indentifier Container.


I thing I have tried everything..

Is there any Swift Code I need to change in each Swift File?


// Set database for iCloud

let database = CKContainer.default().privateCloudDatabase


The above code I am using for both the ios swift file and the watchkit Extension swift file.


Any suggestions ?


Thank you


Craig.