When using the iCloud plugin on tvos, i get an error.
The same code on iOS works fine, i get the token returned and can save and get data.
To my best knowledge i have the provisioning profiles etc setup correct.
here is my code:
[lua]
main.lua:
print(“Going to call iCloud”)
print(“Calling iCloud to get the identityToken:”,iCloud.identityToken() )
print(“Did Call iCloud”)
build.settings:
tvos =
{
iCloud = true,
– Apple TV app icons consist of multiple “layers” in both small and large sizes
icon =
{
– A collection of 400x240 images, in order from top to bottom
small =
{
“Icon-tvOS-Small-4.png”,
“Icon-tvOS-Small-3.png”,
“Icon-tvOS-Small-2.png”,
“Icon-tvOS-Small-1.png”,
},
– A collection of 1280x768 images, in order from top to bottom
large =
{
“Icon-tvOS-Large-4.png”,
“Icon-tvOS-Large-3.png”,
“Icon-tvOS-Large-2.png”,
“Icon-tvOS-Large-1.png”,
}
},
– A 1920x720 image file, displayed when your app is on the “top shelf”
topShelfImage = “Icon-tvOS-TopShelf.png”,
– A 1920x1080 image file, displayed briefly as your app loads
launchImage = “Icon-tvOS-Launch.png”
},
plugins =
{
[“plugin.iCloud”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone=true, appletvos=true, [“iphone-sim”]=true, [“mac-sim”] = true },
},
}
[/lua]
and the terminal printout
[lua]
Dec 26 10:50:49 Apple-TV platform01_tvos[633] <Warning>: Going to call iCloud
Dec 26 10:50:49 Apple-TV platform01_tvos[633] <Error>: setting error: Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service named com.apple.bird.token was invalidated.” UserInfo={NSDebugDescription=The connection to service named com.apple.bird.token was invalidated.}
Dec 26 10:50:49 Apple-TV platform01_tvos[633] <Warning>: Calling iCloud to get the identityToken: nil
Dec 26 10:50:49 Apple-TV platform01_tvos[633] <Warning>: Did Call iCloud
[/lua]