swift - CloudKit - "Invalid bundle ID for container" -
i've create project in xcode 9 beta 6 , add code:
let privatedb = ckcontainer.default().privateclouddatabase let greatid = ckrecordid(recordname: "greatplace") let place = ckrecord(recordtype: "place", recordid: greatid) privatedb.save(place) { (record, error) in if error != nil { let er = (error as! ckerror).erroruserinfo print("error: \n") print("ckerrordescription: \(er["ckerrordescription"]!)\n") print("containerid: \(er["containerid"]!)\n") print("nsdebugdescription: \(er["nsdebugdescription"]!)\n") print("nsunderlyingerror: \(er["nsunderlyingerror"]!)\n") print("nslocalizeddescription: \(er["nslocalizeddescription"]!)\n") print("servererrordescription: \(er["servererrordescription"]!)\n") } if record != nil { print("record: \(record!)") } }
and add capabilities:
and when run code receive error message:
what doing wrong ?
there bug causing associations missed. bug has been fixed , automatically fixed container/app associations broken during time.
if reason still need redo association can either use capabilities pane in xcode or use developer.apple.com -> certificates, identifiers & profiles -> app ids -> pick id -> edit -> edit under icloud -> check box container disassociate, save, re-associate.
if you're still stuck please email cloudkit[at]apple.com
Comments
Post a Comment