iCloud Key-Value Store not Syncing ?

  • *> Background:*
    I am developing a Mac app and an iOS app, and the two apps need to share
    small piece of data.

    The Mac app has code-signed by a iCloud enabled development
    provisioning profile. The value of
    *com.apple.developer.ubiquity-kvstore-identifier
    *in the entitlement is set to *64xxxxxxQE.com.mycompany.myapp*, where
    64xxxxxxQE is the prefix. The Documents & Data in the mac icloud preference
    is also enabled.

    *> Problems:*
    I use [[*NSFileManager* *defaultManager*] *ubiquityIdentityToken**] *to
    check for iCloud availability as in Apple
    documentation<https://developer.apple.com/library/mac/#documentation/General/Conceptual/i
    CloudDesignGuide/Chapters/iCloudFundametals.html
    >,
    but both mac app and iOS app returns *nil. *
    *
    *
    The mac app set a value in the ubiquity store, but In the iOS app *[store
    arrayForKey:theKey] *return nil.

    *> Questions: *
    0. Any thoughts on the problems?
    1. Is there any way to check if the data is uploaded to the iCloud storage.
    2. I'm not a iOS developer membership yet, so the app isn't code-signed.
    Can I test the iCloud functionality with the iphone simulator in Xcode
    without code signing the iOS app?

    -
    Thanks
    *
    *
  • On 1 Jun 2013, at 06:16, Peng Gu <panygu...> wrote:

    > *> Questions: *
    > 0. Any thoughts on the problems?
    > 1. Is there any way to check if the data is uploaded to the iCloud storage.
    > 2. I'm not a iOS developer membership yet, so the app isn't code-signed.
    > Can I test the iCloud functionality with the iphone simulator in Xcode
    > without code signing the iOS app?

    iCloud key value storage doesn't work fully on the simulator - the data is saved locally, but it's never synced with the cloud.  To test this, you'll need to get a developer program membership and test on a real device.

    Jamie.
  • Thanks. I just bought the iOS membership, and wait it to be delivered.

    Do you have any thought why [[*NSFileManager* *defaultManager*] *
    ubiquityIdentityToken**] *returns nil? I have Mac OS membership, and AppID,
    entitlements .. seem to be correct.

    On Sun, Jun 2, 2013 at 5:24 AM, James Montgomerie <jamie...>wrote:

    > On 1 Jun 2013, at 06:16, Peng Gu <panygu...> wrote:
    >
    >> *> Questions: *
    >> 0. Any thoughts on the problems?
    >> 1. Is there any way to check if the data is uploaded to the iCloud
    > storage.
    >> 2. I'm not a iOS developer membership yet, so the app isn't code-signed.
    >> Can I test the iCloud functionality with the iphone simulator in Xcode
    >> without code signing the iOS app?
    >
    > iCloud key value storage doesn't work fully on the simulator - the data is
    > saved locally, but it's never synced with the cloud.  To test this, you'll
    > need to get a developer program membership and test on a real device.
    >
    > Jamie.
  • On Jun 1, 2013, at 6:14 PM, Peng Gu wrote:

    > Thanks. I just bought the iOS membership, and wait it to be delivered.
    >
    > Do you have any thought why [[*NSFileManager* *defaultManager*] *
    > ubiquityIdentityToken**] *returns nil? I have Mac OS membership, and AppID,
    > entitlements .. seem to be correct.
    >

    Need any cert or provisioning profile for that?  I'm speaking out of ignorance here, but wouldn't be surprised.
  • I've checked a million times. This drove me crazy.

    Another problem, whenever I run the iOS app on my iphone, the xcode
    complains 'Timed out waiting for app to launch'. I googled, it seems ad-hoc
    provisioning cannot be used for debugging. But the development profile
    doesn't have the option of enabling iCloud. If I choose development
    provisioning profile, the xocde gives me error 'The executable was signed
    with invalid entitlements.'

    How can I test iCloud without using ad-hoc provisioning ?

    On Sun, Jun 2, 2013 at 7:47 AM, Alex Zavatone <zav...> wrote:

    >
    > On Jun 1, 2013, at 6:14 PM, Peng Gu wrote:
    >
    >> Thanks. I just bought the iOS membership, and wait it to be delivered.
    >>
    >> Do you have any thought why [[*NSFileManager* *defaultManager*] *
    >> ubiquityIdentityToken**] *returns nil? I have Mac OS membership, and
    > AppID,
    >> entitlements .. seem to be correct.
    >>
    >
    > Need any cert or provisioning profile for that?  I'm speaking out of
    > ignorance here, but wouldn't be surprised.
    >
    >
  • On 2 Jun, 2013, at 8:55 AM, Peng Gu <panygu...> wrote:

    > I've checked a million times. This drove me crazy.

    Yes well take a deep breath, read the documentation again and start over. Entitlements and provisioning are actually quite simple when you understand them but they aren't obvious and you need to be methodical.

    >
    > Another problem, whenever I run the iOS app on my iphone, the xcode
    > complains 'Timed out waiting for app to launch'. I googled, it seems ad-hoc
    > provisioning cannot be used for debugging. But the development profile
    > doesn't have the option of enabling iCloud. If I choose development
    > provisioning profile, the xocde gives me error 'The executable was signed
    > with invalid entitlements.'

    Of course the development profile has options for enabling iCloud. That's how you test. If you get the 'invalid entitlements' you've not matched the entitlements with your provisioning profile or added extra entitlements you don't need in.

    I would advise reading this technote http://developer.apple.com/library/ios/#technotes/tn2250/_index.html in its entirety at least once and possibly more than that. It contains all the distilled knowledge about provisioning you should ever need. For a start it covers that error message. I have that technote linked in my bookmarks for the days I forget how it all works.

    >
    > How can I test iCloud without using ad-hoc provisioning ?
    >
    >
    >
    >
    >
    > On Sun, Jun 2, 2013 at 7:47 AM, Alex Zavatone <zav...> wrote:
    >
    >>
    >> On Jun 1, 2013, at 6:14 PM, Peng Gu wrote:
    >>
    >>> Thanks. I just bought the iOS membership, and wait it to be delivered.
    >>>
    >>> Do you have any thought why [[*NSFileManager* *defaultManager*] *
    >>> ubiquityIdentityToken**] *returns nil? I have Mac OS membership, and
    >> AppID,
    >>> entitlements .. seem to be correct.
    >>>
    >>
    >> Need any cert or provisioning profile for that?  I'm speaking out of
    >> ignorance here, but wouldn't be surprised.
    >>
    >>

  • How nice, I just found this

    https://developer.apple.com/library/ios/#documentation/IDEs/Conceptual/AppD
    istributionGuide/Introduction/Introduction.html


    which appears to be a new guide through app distribution. That might help too.

    On 2 Jun, 2013, at 10:35 AM, Roland King <rols...> wrote:

    >
    > On 2 Jun, 2013, at 8:55 AM, Peng Gu <panygu...> wrote:
    >
    >> I've checked a million times. This drove me crazy.
    >
    > Yes well take a deep breath, read the documentation again and start over. Entitlements and provisioning are actually quite simple when you understand them but they aren't obvious and you need to be methodical.
    >
    >>
    >> Another problem, whenever I run the iOS app on my iphone, the xcode
    >> complains 'Timed out waiting for app to launch'. I googled, it seems ad-hoc
    >> provisioning cannot be used for debugging. But the development profile
    >> doesn't have the option of enabling iCloud. If I choose development
    >> provisioning profile, the xocde gives me error 'The executable was signed
    >> with invalid entitlements.'
    >
    > Of course the development profile has options for enabling iCloud. That's how you test. If you get the 'invalid entitlements' you've not matched the entitlements with your provisioning profile or added extra entitlements you don't need in.
    >
    > I would advise reading this technote http://developer.apple.com/library/ios/#technotes/tn2250/_index.html in its entirety at least once and possibly more than that. It contains all the distilled knowledge about provisioning you should ever need. For a start it covers that error message. I have that technote linked in my bookmarks for the days I forget how it all works.
    >
    >
    >>
    >> How can I test iCloud without using ad-hoc provisioning ?
    >>
    >>
    >>
    >>
    >>
    >> On Sun, Jun 2, 2013 at 7:47 AM, Alex Zavatone <zav...> wrote:
    >>
    >>>
    >>> On Jun 1, 2013, at 6:14 PM, Peng Gu wrote:
    >>>
    >>>> Thanks. I just bought the iOS membership, and wait it to be delivered.
    >>>>
    >>>> Do you have any thought why [[*NSFileManager* *defaultManager*] *
    >>>> ubiquityIdentityToken**] *returns nil? I have Mac OS membership, and
    >>> AppID,
    >>>> entitlements .. seem to be correct.
    >>>>
    >>>
    >>> Need any cert or provisioning profile for that?  I'm speaking out of
    >>> ignorance here, but wouldn't be surprised.
    >>>
    >>>


  • Thanks, folks.

    After I logged out my iCloud account and logged in back. The iCloud starts
    working.

    Though I don't know what happened exactly, but I am happy it works. Just
    downloaded some iCloud videos from iTunes, will check them out.

    Thanks
    -
    Peng

    On Sun, Jun 2, 2013 at 10:35 AM, Roland King <rols...> wrote:

    >
    > On 2 Jun, 2013, at 8:55 AM, Peng Gu <panygu...> wrote:
    >
    > I've checked a million times. This drove me crazy.
    >
    >
    > Yes well take a deep breath, read the documentation again and start over.
    > Entitlements and provisioning are actually quite simple when you understand
    > them but they aren't obvious and you need to be methodical.
    >
    >
    > Another problem, whenever I run the iOS app on my iphone, the xcode
    > complains 'Timed out waiting for app to launch'. I googled, it seems ad-hoc
    > provisioning cannot be used for debugging. But the development profile
    > doesn't have the option of enabling iCloud. If I choose development
    > provisioning profile, the xocde gives me error 'The executable was signed
    > with invalid entitlements.'
    >
    >
    > Of course the development profile has options for enabling iCloud. That's
    > how you test. If you get the 'invalid entitlements' you've not matched the
    > entitlements with your provisioning profile or added extra entitlements you
    > don't need in.
    >
    > I would advise reading this technote
    > http://developer.apple.com/library/ios/#technotes/tn2250/_index.html in
    > its entirety at least once and possibly more than that. It contains all the
    > distilled knowledge about provisioning you should ever need. For a start it
    > covers that error message. I have that technote linked in my bookmarks for
    > the days I forget how it all works.
    >
    >
    >
    > How can I test iCloud without using ad-hoc provisioning ?
    >
    >
    >
    >
    >
    > On Sun, Jun 2, 2013 at 7:47 AM, Alex Zavatone <zav...> wrote:
    >
    >
    > On Jun 1, 2013, at 6:14 PM, Peng Gu wrote:
    >
    > Thanks. I just bought the iOS membership, and wait it to be delivered.
    >
    > Do you have any thought why [[*NSFileManager* *defaultManager*] *
    > ubiquityIdentityToken**] *returns nil? I have Mac OS membership, and
    >
    > AppID,
    >
    > entitlements .. seem to be correct.
    >
    >
    > Need any cert or provisioning profile for that?  I'm speaking out of
    > ignorance here, but wouldn't be surprised.
    >
    >
    >
  • On Jun 1, 2013, at 19:39 , Roland King <rols...> wrote:

    > How nice, I just found this
    >
    > https://developer.apple.com/library/ios/#documentation/IDEs/Conceptual/AppD
    istributionGuide/Introduction/Introduction.html

    >
    > which appears to be a new guide through app distribution. That might help too.

    Too bad you sometimes have to create an iTunes record to develop & test, which is not reflected in their little drawing.

    --
    Rick
previous month june 2013 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today