Doesn’t look like any entitlement-specific entries are being added to the info.plist…
[code]<?xml version="1.0" encoding="UTF-8"?>
CFBundleExecutable
test.debug
CFBundleName
test.debug
CFBundleIdentifier
com.private.iCloudTest
CFBundleInfoDictionaryVersion
6.0
CFBundleVersion
16.0.21
CFBundleDevelopmentRegion
en
CFBundlePackageType
APPL
CFBundleSignature
????
CFBundleShortVersionString
16.0.21
LSRequiresIPhoneOS
CFBundleSupportedPlatforms
iPhoneOS
UIDeviceFamily
1 2
UIRequiredDeviceCapabilities
armv7
DTPlatformBuild
12B411
DTPlatformName
iphoneos
DTPlatformVersion
8.1
DTSDKBuild
12B411
DTSDKName
iphoneos8.1
DTXcode
0610
DTXcodeBuild
6A1052d
MinimumOSVersion
7.0
CFBundleIcons
CFBundlePrimaryIcon
CFBundleIconFiles
AppIcon29x29
AppIcon40x40
AppIcon60x60
CFBundleIcons~ipad
CFBundlePrimaryIcon
CFBundleIconFiles
AppIcon29x29
AppIcon40x40
AppIcon76x76
UILaunchImages
UILaunchImageMinimumOSVersion8.0UILaunchImageNameLaunchImage-800-Portrait-736hUILaunchImageOrientationPortraitUILaunchImageSize{414, 736}
UILaunchImageMinimumOSVersion8.0UILaunchImageNameLaunchImage-800-Landscape-736hUILaunchImageOrientationLandscapeUILaunchImageSize{414, 736}
UILaunchImageMinimumOSVersion8.0UILaunchImageNameLaunchImage-800-667hUILaunchImageOrientationPortraitUILaunchImageSize{375, 667}
UILaunchImageMinimumOSVersion7.0UILaunchImageNameLaunchImage-700UILaunchImageOrientationPortraitUILaunchImageSize{320, 480}
UILaunchImageMinimumOSVersion7.0UILaunchImageNameLaunchImage-700-568hUILaunchImageOrientationPortraitUILaunchImageSize{320, 568}
UILaunchImageMinimumOSVersion7.0UILaunchImageNameLaunchImage-700-PortraitUILaunchImageOrientationPortraitUILaunchImageSize{768, 1024}
UILaunchImageMinimumOSVersion7.0UILaunchImageNameLaunchImage-700-LandscapeUILaunchImageOrientationLandscapeUILaunchImageSize{768, 1024}
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
UIInterfaceOrientationPortraitUpsideDown
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
[/code]
What do you get when you view the entitlements as per Jason’s post (in both the app and mobileprovision) ?
Jason_King
(Jason King)
November 13, 2015, 7:48pm
24
I’m trying to figure out what is going wrong now, but it seems that when I remove my generic signing profile (identifier is just a *) then Xojo is no longer able to build even though I have one with the same explicit app ID. I’ll have to continue looking…
Just created a CloudKit app with xCode and Xojo (minimal)
xCode app run on simulator as designed
Xojo app don’t have a mobileprovisionfile and can’t run on simulator (The application is missing required entitlement com.apple.developer.icloud-services)
Build Xojo app has a mobile profile but it’s not the right one! (in the mobile provision file list there is the right one with the entitlements)
If Xojo isn’t grabbing the proper mobileprovision, then we might be on to something to address for this (and might lead to a potential workaround).
Is it grabbing a general mobileprovision file (* is present for the profile, or it is just *) when it should be getting an explicit one (no *)?
Jason_King
(Jason King)
November 13, 2015, 8:17pm
27
See <https://xojo.com/issue/41579 > for an explanation, I just submitted it.
Jason_King
(Jason King)
November 13, 2015, 8:35pm
29
Do you have any ideas on this? Or will I have to wait for r3.2/r4 betas?
It looks like a bug we’ll need to fix in a future release.
Not sure if this makes a difference, but I am seeing some iCloud stuff in my build…
codesign -d --entitlements :- “TEST.app”:
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>PRIVATE.com.private.iCloudTest</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.private.iCloudTest</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudDocuments</string>
<string>CloudKit</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>PRIVATE</string>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.com.private.iCloudTest</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<array>
<string>iCloud.com.private.iCloudTest</string>
</array>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>PRIVATE.com.private.iCloudTest</string>
</array>
</dict>
</plist>
security cos -D -i “TEST.app/embedded.mobileprovision”:
[code]
AppIDName
iCloud test
ApplicationIdentifierPrefix
PRIVATE
CreationDate
2015-11-11T23:25:00Z
Platform
iOS
DeveloperCertificates
PRIVATE
Entitlements
keychain-access-groups
PRIVATE.
get-task-allow
application-identifier
PRIVATE.com.PRIVATE.iCloudTest
com.apple.developer.ubiquity-kvstore-identifier
PRIVATE.
<key>com.apple.developer.icloud-services</key>
<string>*</string>
<key>com.apple.developer.icloud-container-environment</key>
<array>
<string>Development</string>
<string>Production</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.PRIVATE.iCloudTest</string>
</array>
<key>com.apple.developer.icloud-container-development-container-identifiers</key>
<array>
<string>iCloud.com.PRIVATE.iCloudTest</string>
</array>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.com.PRIVATE.iCloudTest</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>PRIVATE</string>
<key>aps-environment</key>
<string>development</string>
</dict>
<key>ExpirationDate</key>
<date>2016-11-10T23:25:00Z</date>
<key>Name</key>
<string>iOS Team Provisioning Profile: com.PRIVATE.iCloudTest</string>
<key>ProvisionedDevices</key>
<array>
<string>PRIVATE/string>
</array>
<key>TeamIdentifier</key>
<array>
<string>PRIVATE</string>
</array>
<key>TeamName</key>
<string>PRIVATE</string>
<key>TimeToLive</key>
<integer>365</integer>
<key>UUID</key>
<string>PRIVATE</string>
<key>Version</key>
<integer>1</integer>
[/code]
OK, so it seems you are getting the proper mobileprovision selected in the configuration you have.
But that test.app gets the same exception?
Also, do you get the exception when running your test.app on the simulator- and on a device itself?
Ok so investigating further it looks like the embedded.mobileprovision file does not get included in the debug simulator build…
Is that normal?
If not, that explains the crashing on the simulator – at least on my end…
Unfortunately I don’t have an iOS device near by to test it, but I will have one in about 2 hours…
Yeah at this point I’m hopeful we can get you to a point where you can build for a device, and be OK. You could then wrap iCloud calls in a conditional for now…
That would be awesome, I appreciate all your help (and everyone else’s help also). I will let you know what happens ASAP when I get my hands on a test device in the next hour or two.
Jason_King
(Jason King)
November 13, 2015, 9:54pm
38
I’m actually very surprised that is was never noticed before that Xojo fails to build iOS when not using a generic (*) profile. It seems like something that would have been noticed along the way. Hopefully you guys can find a fix and get it out soon.
Travis_Hill
(Travis Hill)
November 13, 2015, 10:04pm
39
Well, it isn’t always the case, as you can see in George’s scenario above- he’s now built with the proper, app specific profile. I haven’t narrowed it down to the exact scenarios under which it occurs, but I could replicate it in at least one.
I can confirm that the generic (*) profile is used at least for this CloudKit test
In another test the right profile is used
But we need the Entitlements also in the simulator not only in the build app