1 Reply
      Latest reply on Nov 22, 2016 1:52 AM by eskimo
      spartan220 Level 1 Level 1 (0 points)

        Anyone else know why this always returns false in the new Swift 3?  It used to actually indicate whether iCloud was enabled on the device or not in previous versions of Swift.


        if FileManager.default.ubiquityIdentityToken != nil {

                    return true


                else {

                    return false


        • Re: UbiquityIdentityToken in Swift 3
          eskimo Apple Staff Apple Staff (13,325 points)

          I don’t think this has anything to do with Swift 3.  I ran your code in a newly-created app here in my office and it worked just fine.

          If you’re getting back nil for ubiquityIdentityToken it’s likely that either:

          • Your app is not set up for iCloud, or

          • iCloud is not set up on your device properly

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"