expo-document-picker 10.2.0 → 10.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +3 -10
- package/android/build.gradle +2 -2
- package/package.json +2 -2
- package/plugin/build/withDocumentPicker.d.ts +1 -3
- package/plugin/build/withDocumentPicker.js +1 -5
- package/plugin/build/withDocumentPickerIOS.d.ts +1 -2
- package/plugin/build/withDocumentPickerIOS.js +6 -12
- package/plugin/src/withDocumentPicker.ts +3 -11
- package/plugin/src/withDocumentPickerIOS.ts +14 -20
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 10.2.1 — 2022-04-25
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- [plugin] Update to use codesigning variables in entitlements. ([#17158](https://github.com/expo/expo/pull/17158) by [@EvanBacon](https://github.com/EvanBacon))
|
|
18
|
+
|
|
13
19
|
## 10.2.0 — 2022-04-18
|
|
14
20
|
|
|
15
21
|
### 💡 Others
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ No additional set up necessary.
|
|
|
31
31
|
|
|
32
32
|
### Plugin
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
You can change the `com.apple.developer.icloud-container-environment` entitlement using the `iCloudContainerEnvironment` property.
|
|
35
35
|
|
|
36
36
|
`app.json`
|
|
37
37
|
|
|
@@ -41,18 +41,11 @@ In order to enable Apple iCloud storage in managed EAS builds, you'll need to de
|
|
|
41
41
|
"usesIcloudStorage": true,
|
|
42
42
|
"bundleIdentifier": "com.yourname.yourapp"
|
|
43
43
|
},
|
|
44
|
-
"plugins": [
|
|
45
|
-
[
|
|
46
|
-
"expo-document-picker",
|
|
47
|
-
{
|
|
48
|
-
"appleTeamId": "YOUR_TEAM_ID"
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
]
|
|
44
|
+
"plugins": ["expo-document-picker"]
|
|
52
45
|
}
|
|
53
46
|
```
|
|
54
47
|
|
|
55
|
-
> Running `expo
|
|
48
|
+
> Running `expo prebuild` will generate a the [native project locally](https://docs.expo.io/workflow/customizing/) with the applied changes in your iOS Entitlements file.
|
|
56
49
|
|
|
57
50
|
# Contributing
|
|
58
51
|
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '10.2.
|
|
6
|
+
version = '10.2.1'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -74,7 +74,7 @@ android {
|
|
|
74
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
75
75
|
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
76
76
|
versionCode 17
|
|
77
|
-
versionName '10.2.
|
|
77
|
+
versionName '10.2.1'
|
|
78
78
|
}
|
|
79
79
|
lintOptions {
|
|
80
80
|
abortOnError false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-document-picker",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"description": "Provides access to the system's UI for selecting documents from the available providers on the user's device.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"expo": "*"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "8fa7ceccfeab2f5090019403d6472fb80d6d7eaf"
|
|
48
48
|
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { IosProps } from './withDocumentPickerIOS';
|
|
3
|
-
declare const _default: ConfigPlugin<void | IosProps>;
|
|
1
|
+
declare const _default: import("@expo/config-plugins").ConfigPlugin<import("./withDocumentPickerIOS").IosProps>;
|
|
4
2
|
export default _default;
|
|
@@ -3,8 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
4
4
|
const withDocumentPickerIOS_1 = require("./withDocumentPickerIOS");
|
|
5
5
|
const pkg = require('expo-document-picker/package.json');
|
|
6
|
-
|
|
7
|
-
config = (0, withDocumentPickerIOS_1.withDocumentPickerIOS)(config, { appleTeamId, iCloudContainerEnvironment });
|
|
8
|
-
return config;
|
|
9
|
-
};
|
|
10
|
-
exports.default = (0, config_plugins_1.createRunOncePlugin)(withDocumentPicker, pkg.name, pkg.version);
|
|
6
|
+
exports.default = (0, config_plugins_1.createRunOncePlugin)(withDocumentPickerIOS_1.withDocumentPickerIOS, pkg.name, pkg.version);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
2
|
import { ExpoConfig } from '@expo/config-types';
|
|
3
3
|
export declare type IosProps = {
|
|
4
|
-
appleTeamId?: string;
|
|
5
4
|
/**
|
|
6
5
|
* Sets the `com.apple.developer.icloud-container-environment` entitlement which is read by EAS CLI to set
|
|
7
6
|
* the `iCloudContainerEnvironment` in the `xcodebuild` `exportOptionsPlist`.
|
|
@@ -11,4 +10,4 @@ export declare type IosProps = {
|
|
|
11
10
|
iCloudContainerEnvironment?: 'Development' | 'Production';
|
|
12
11
|
};
|
|
13
12
|
export declare const withDocumentPickerIOS: ConfigPlugin<IosProps>;
|
|
14
|
-
export declare function setICloudEntitlements(config: Pick<ExpoConfig, 'ios'>, {
|
|
13
|
+
export declare function setICloudEntitlements(config: Pick<ExpoConfig, 'ios'>, { iCloudContainerEnvironment }: IosProps, { 'com.apple.developer.icloud-container-environment': _env, ...entitlements }: Record<string, any>): Record<string, any>;
|
|
@@ -2,32 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setICloudEntitlements = exports.withDocumentPickerIOS = void 0;
|
|
4
4
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
-
const withDocumentPickerIOS = (config, {
|
|
5
|
+
const withDocumentPickerIOS = (config, { iCloudContainerEnvironment } = {}) => {
|
|
6
6
|
return (0, config_plugins_1.withEntitlementsPlist)(config, (config) => {
|
|
7
|
-
|
|
8
|
-
config.modResults = setICloudEntitlements(config, { appleTeamId, iCloudContainerEnvironment }, config.modResults);
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
config_plugins_1.WarningAggregator.addWarningIOS('expo-document-picker', 'Cannot configure iOS entitlements because neither the appleTeamId property, nor the environment variable EXPO_APPLE_TEAM_ID were defined.');
|
|
12
|
-
}
|
|
7
|
+
config.modResults = setICloudEntitlements(config, { iCloudContainerEnvironment }, config.modResults);
|
|
13
8
|
return config;
|
|
14
9
|
});
|
|
15
10
|
};
|
|
16
11
|
exports.withDocumentPickerIOS = withDocumentPickerIOS;
|
|
17
|
-
function setICloudEntitlements(config, {
|
|
12
|
+
function setICloudEntitlements(config, { iCloudContainerEnvironment }, { 'com.apple.developer.icloud-container-environment': _env, ...entitlements }) {
|
|
18
13
|
var _a;
|
|
19
14
|
if ((_a = config.ios) === null || _a === void 0 ? void 0 : _a.usesIcloudStorage) {
|
|
20
15
|
// Used for AdHoc iOS builds: https://github.com/expo/eas-cli/issues/693
|
|
21
16
|
// https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_icloud-container-environment
|
|
22
17
|
entitlements['com.apple.developer.icloud-container-environment'] = iCloudContainerEnvironment;
|
|
23
18
|
entitlements['com.apple.developer.icloud-container-identifiers'] = [
|
|
24
|
-
|
|
19
|
+
`iCloud.${config.ios.bundleIdentifier}`,
|
|
25
20
|
];
|
|
26
21
|
entitlements['com.apple.developer.ubiquity-container-identifiers'] = [
|
|
27
|
-
|
|
22
|
+
`iCloud.${config.ios.bundleIdentifier}`,
|
|
28
23
|
];
|
|
29
|
-
entitlements['com.apple.developer.ubiquity-kvstore-identifier'] =
|
|
30
|
-
appleTeamId + '.' + config.ios.bundleIdentifier;
|
|
24
|
+
entitlements['com.apple.developer.ubiquity-kvstore-identifier'] = `$(TeamIdentifierPrefix)${config.ios.bundleIdentifier}`;
|
|
31
25
|
entitlements['com.apple.developer.icloud-services'] = ['CloudDocuments'];
|
|
32
26
|
}
|
|
33
27
|
return entitlements;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRunOncePlugin } from '@expo/config-plugins';
|
|
2
2
|
|
|
3
|
-
import { withDocumentPickerIOS
|
|
3
|
+
import { withDocumentPickerIOS } from './withDocumentPickerIOS';
|
|
4
4
|
|
|
5
5
|
const pkg = require('expo-document-picker/package.json');
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
config,
|
|
9
|
-
{ appleTeamId = process.env.EXPO_APPLE_TEAM_ID, iCloudContainerEnvironment } = {}
|
|
10
|
-
) => {
|
|
11
|
-
config = withDocumentPickerIOS(config, { appleTeamId, iCloudContainerEnvironment });
|
|
12
|
-
return config;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default createRunOncePlugin(withDocumentPicker, pkg.name, pkg.version);
|
|
7
|
+
export default createRunOncePlugin(withDocumentPickerIOS, pkg.name, pkg.version);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ConfigPlugin,
|
|
1
|
+
import { ConfigPlugin, withEntitlementsPlist } from '@expo/config-plugins';
|
|
2
2
|
import { ExpoConfig } from '@expo/config-types';
|
|
3
3
|
|
|
4
4
|
export type IosProps = {
|
|
5
|
-
appleTeamId?: string;
|
|
6
5
|
/**
|
|
7
6
|
* Sets the `com.apple.developer.icloud-container-environment` entitlement which is read by EAS CLI to set
|
|
8
7
|
* the `iCloudContainerEnvironment` in the `xcodebuild` `exportOptionsPlist`.
|
|
@@ -14,28 +13,21 @@ export type IosProps = {
|
|
|
14
13
|
|
|
15
14
|
export const withDocumentPickerIOS: ConfigPlugin<IosProps> = (
|
|
16
15
|
config,
|
|
17
|
-
{
|
|
16
|
+
{ iCloudContainerEnvironment } = {}
|
|
18
17
|
) => {
|
|
19
18
|
return withEntitlementsPlist(config, (config) => {
|
|
20
|
-
|
|
21
|
-
config
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
26
|
-
} else {
|
|
27
|
-
WarningAggregator.addWarningIOS(
|
|
28
|
-
'expo-document-picker',
|
|
29
|
-
'Cannot configure iOS entitlements because neither the appleTeamId property, nor the environment variable EXPO_APPLE_TEAM_ID were defined.'
|
|
30
|
-
);
|
|
31
|
-
}
|
|
19
|
+
config.modResults = setICloudEntitlements(
|
|
20
|
+
config,
|
|
21
|
+
{ iCloudContainerEnvironment },
|
|
22
|
+
config.modResults
|
|
23
|
+
);
|
|
32
24
|
return config;
|
|
33
25
|
});
|
|
34
26
|
};
|
|
35
27
|
|
|
36
28
|
export function setICloudEntitlements(
|
|
37
29
|
config: Pick<ExpoConfig, 'ios'>,
|
|
38
|
-
{
|
|
30
|
+
{ iCloudContainerEnvironment }: IosProps,
|
|
39
31
|
{ 'com.apple.developer.icloud-container-environment': _env, ...entitlements }: Record<string, any>
|
|
40
32
|
): Record<string, any> {
|
|
41
33
|
if (config.ios?.usesIcloudStorage) {
|
|
@@ -44,13 +36,15 @@ export function setICloudEntitlements(
|
|
|
44
36
|
entitlements['com.apple.developer.icloud-container-environment'] = iCloudContainerEnvironment;
|
|
45
37
|
|
|
46
38
|
entitlements['com.apple.developer.icloud-container-identifiers'] = [
|
|
47
|
-
|
|
39
|
+
`iCloud.${config.ios.bundleIdentifier}`,
|
|
48
40
|
];
|
|
49
41
|
entitlements['com.apple.developer.ubiquity-container-identifiers'] = [
|
|
50
|
-
|
|
42
|
+
`iCloud.${config.ios.bundleIdentifier}`,
|
|
51
43
|
];
|
|
52
|
-
entitlements[
|
|
53
|
-
|
|
44
|
+
entitlements[
|
|
45
|
+
'com.apple.developer.ubiquity-kvstore-identifier'
|
|
46
|
+
] = `$(TeamIdentifierPrefix)${config.ios.bundleIdentifier}`;
|
|
47
|
+
|
|
54
48
|
entitlements['com.apple.developer.icloud-services'] = ['CloudDocuments'];
|
|
55
49
|
}
|
|
56
50
|
return entitlements;
|