build issue after enabling the iCloud Application Service

Hi,

I would like to add a DocumentPicker to my application, so I’ve activated the iCloud Application Service in my App identifier on developer.apple.com (as specified in DocumentPicker - Expo Documentation)

Now, I’m trying to recreate a new development build using eas build --profile preview --platform ios (documentation says “expo build:ios -c” but I guess it’s outdated information) but it always fails at the “Run fastlane” step.

As I already had issue with this step when I’ve migrated my project from expo to eas, I’ve tried the same things, that’s: rebuilding the package-lock.json and yarn.lock files, running expo doctor --fix-dependencies, but none solvde the issue.

I’m using a managed workflow with eas build --profile preview --platform ios.

Here’s an excerpt of the “Run fastlane” step’s logs:

$ xcodebuild -showBuildSettings -workspace ./NextcloudDeck.xcworkspace -scheme NextcloudDeck -configuration Release

[stderr] 2022-08-03 04:33:13.082 xcodebuild[4304:12862] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

[stderr] 2022-08-03 04:33:13.082 xcodebuild[4304:12862] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

[stderr] 2022-08-03 04:33:13.164 xcodebuild[4304:12862] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}

[stderr] 2022-08-03 04:33:13.164 xcodebuild[4304:12862] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts

[stderr] 2022-08-03 04:33:13.164 xcodebuild[4304:12862] XType: unable to make a connection to the font daemon!

[stderr] 2022-08-03 04:33:13.164 xcodebuild[4304:12862] XType: XTFontStaticRegistry is enabled as fontd is not available.

[stderr] --- xcodebuild: WARNING: Using the first of multiple matching destinations:

[stderr] { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

[stderr] 

Can anyone help me troubleshooting this issue?

PS:
There’s something unclear in the documentation. It says: “Enable iCloud service with CloudKit support, create one iCloud Container, and name it iCloud.<your_bundle_identifier>.” but there are 2 fields to be filled and none of them is called “name”. Maybe I should have filled both fields with iCloud.<your_bundle_identifier>

Hey @stcyr,

During the build process, does the CLI prompts you to login to Apple account? You might need to login and allow CLI to regenerate the provisioning profile.

Also, when you said there are two fields, I think the first field is called description which is just the name for the Container you are creating. The identifier field is where you will input iCloud.<your_bundle_identifier>.

Yeah, I think it’s what I did: put the bundle identifier in the identifier field, and put some “random” text in the description.

Yes, it asks my apple credentials, which I give, as usual.

Ho no! Now, even though I disable the iCloud service and remove the expo-document-picker from my dependencies, wouldn’t my project build anymore :scream: :scream: :scream:

Here are the fastlane logs now:

▸ resolved source packages:

$ xcodebuild -showBuildSettings -workspace ./NextcloudDeck.xcworkspace -scheme NextcloudDeck -configuration Release

[stderr] 2022-08-04 04:54:56.543 xcodebuild[4093:12105] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

[stderr] 2022-08-04 04:54:56.544 xcodebuild[4093:12105] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

[stderr] 2022-08-04 04:54:56.606 xcodebuild[4093:12105] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}

[stderr] 2022-08-04 04:54:56.606 xcodebuild[4093:12105] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts

[stderr] 2022-08-04 04:54:56.606 xcodebuild[4093:12105] XType: unable to make a connection to the font daemon!

[stderr] 2022-08-04 04:54:56.606 xcodebuild[4093:12105] XType: XTFontStaticRegistry is enabled as fontd is not available.

[stderr] --- xcodebuild: WARNING: Using the first of multiple matching destinations:

[stderr] { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }

As per your latest build, it seems to me that a component is called CardDetails.js is still importing or using DocumentPicker package. Can you please confirm that?

Yes, you’re right.

I’ve removed this import and now my development build succeed.

Oh damned! Now I see the actual error causing the fastlane step to fail, right at the bottom of the logs, and not the one at the top which I’ve been pasting here… It was all the same error for all my failed builds

The issue when my build failed because of the iCloud service was:

Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key "iCloudContainerEnvironment": expected one of {Development, Production}, but no value was provided" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key "iCloudContainerEnvironment": expected one of {Development, Production}, but no value was provided}

I will try to find the solution but, should anyone have it, your help is most welcome… I’m wondering where I should define that iCloudContainerEnvironment… Maybe in app.json…?

Regards,

Cyrille

Ok, I’ve solved it.

The solution was to add a plugin definition in the app.json file:

diff --git a/app.json b/app.json
index 22298d0..e14cc47 100644
--- a/app.json
+++ b/app.json
@@ -12,6 +12,14 @@
       "resizeMode": "contain",
       "backgroundColor": "#ffffff"
     },
+       "plugins": [
+               [
+                       "expo-document-picker",
+                               {
+                                       "iCloudContainerEnvironment": "Production"
+                               }
+               ]
+       ],
     "updates": {
1 Like