Setup for DocumentPicker in bare Workflow (iOS)

Hi folks,

When executing this code in an iOS simulator:

    const res = await DocumentPicker.getDocumentAsync({
      type: 'application/zip',
      multiple: false,
    })

I get the following message:

DocumentPicker requires the iCloud entitlement. If you are using ExpoKit, you need to add this capability to your App Id. See https://docs.expo.io/versions/latest/expokit/advanced-expokit-topics#using-documentpicker for more info.

However, my app already has iCloud document capabilities:

Below is the entitlements file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>aps-environment</key>
	<string>development</string>
	<key>com.apple.developer.icloud-container-identifiers</key>
	<array>
		<string>iCloud.$(CFBundleIdentifier)</string>
	</array>
	<key>com.apple.developer.icloud-services</key>
	<array>
		<string>CloudDocuments</string>
		<string>CloudKit</string>
	</array>
	<key>com.apple.developer.ubiquity-container-identifiers</key>
	<array>
		<string>iCloud.$(CFBundleIdentifier)</string>
	</array>
	<key>com.apple.developer.ubiquity-kvstore-identifier</key>
	<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>

Have you got any clue of what I am missing?
I wonder if the issue comes from the fact my applications uses CloudKit. And by the way, those icloud-related functionalities are working perfectly.

Hey @jsamr, things look to be in order. Per your suspicions, have you tried disabling CloudKit temporarily and seeing if that resolves the error?

Cheers,
Adam

I can confirm you that disabling the CloudKit entitlement does resolve the issue. This should be treated as a bug though. I am using expo-document-picker@8.4.1. And the diff with aforementioned entitlement file:

diff --git a/ios/SmurBmpm/SmurBmpm.entitlements b/ios/SmurBmpm/SmurBmpm.entitlements
index c3c33861..635a1695 100644
--- a/ios/SmurBmpm/SmurBmpm.entitlements
+++ b/ios/SmurBmpm/SmurBmpm.entitlements
@@ -11,7 +11,6 @@
        <key>com.apple.developer.icloud-services</key>
        <array>
                <string>CloudDocuments</string>
-               <string>CloudKit</string>
        </array>
        <key>com.apple.developer.ubiquity-container-identifiers</key>
        <array>

EDIT: After a little bit more investigation, trying to reproduce from scratch, I can add that there must be a container set up for CloudKit with a scheme for the issue to appear.