@bacons/apple-targets 0.1.10 → 0.1.12
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/README.md +2 -2
- package/build/config.d.ts +1 -1
- package/build/icon/withIosIcon.js +1 -0
- package/build/withWidget.js +14 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,8 +77,8 @@ module.exports = {
|
|
|
77
77
|
thing: "../assets/thing.png",
|
|
78
78
|
},
|
|
79
79
|
|
|
80
|
-
// The iOS version fot the target.
|
|
81
|
-
deploymentTarget: "
|
|
80
|
+
// The iOS version fot the target. Defaults to 18.1
|
|
81
|
+
deploymentTarget: "15.1",
|
|
82
82
|
|
|
83
83
|
// Optional bundle identifier for the target. Will default to a sanitized version of the root project bundle id + target name.
|
|
84
84
|
// If the specified bundle identifier is prefixed with a dot (.), the bundle identifier will be appended to the main app's bundle identifier.
|
package/build/config.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export type Config = {
|
|
|
84
84
|
* @example ["UserNotifications", "Intents"]
|
|
85
85
|
*/
|
|
86
86
|
frameworks?: string[];
|
|
87
|
-
/** Deployment iOS version for the target. Defaults to `
|
|
87
|
+
/** Deployment iOS version for the target. Defaults to `18.1` */
|
|
88
88
|
deploymentTarget?: string;
|
|
89
89
|
/** Apple team ID to use for signing the target. Defaults to whatever is used in the main App target. */
|
|
90
90
|
appleTeamId?: string;
|
|
@@ -29,6 +29,7 @@ const image_utils_1 = require("@expo/image-utils");
|
|
|
29
29
|
const AssetContents_1 = require("@expo/prebuild-config/build/plugins/icons/AssetContents");
|
|
30
30
|
const fs = __importStar(require("fs-extra"));
|
|
31
31
|
const path_1 = require("path");
|
|
32
|
+
// TODO: support dark, tinted, and universal icons for widgets.
|
|
32
33
|
const withIosIcon = (config, { cwd, type, iconFilePath, isTransparent = false }) => {
|
|
33
34
|
return (0, config_plugins_1.withDangerousMod)(config, [
|
|
34
35
|
"ios",
|
package/build/withWidget.js
CHANGED
|
@@ -15,6 +15,7 @@ const withIosIcon_1 = require("./icon/withIosIcon");
|
|
|
15
15
|
const target_1 = require("./target");
|
|
16
16
|
const withEasCredentials_1 = require("./withEasCredentials");
|
|
17
17
|
const withXcodeChanges_1 = require("./withXcodeChanges");
|
|
18
|
+
const DEFAULT_DEPLOYMENT_TARGET = "18.1";
|
|
18
19
|
function memoize(fn) {
|
|
19
20
|
const cache = new Map();
|
|
20
21
|
return ((...args) => {
|
|
@@ -73,7 +74,7 @@ const withWidget = (config, props) => {
|
|
|
73
74
|
if (entitlementsJson) {
|
|
74
75
|
// Apply default entitlements that must be present for a target to work.
|
|
75
76
|
const applyDefaultEntitlements = (entitlements) => {
|
|
76
|
-
var _a, _b
|
|
77
|
+
var _a, _b;
|
|
77
78
|
if (props.type === "clip") {
|
|
78
79
|
entitlements["com.apple.developer.parent-application-identifiers"] = [
|
|
79
80
|
`$(AppIdentifierPrefix)${config.ios.bundleIdentifier}`,
|
|
@@ -97,15 +98,18 @@ const withWidget = (config, props) => {
|
|
|
97
98
|
});
|
|
98
99
|
}
|
|
99
100
|
else {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
prebuildLogQueue.add(() => {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
return console.warn((0, chalk_1.default) `{yellow [${widget}]} Apple target may require the App Groups entitlement but none were found in the Expo config.\nExample:\n${JSON.stringify({
|
|
104
|
+
ios: {
|
|
105
|
+
entitlements: {
|
|
106
|
+
[APP_GROUP_KEY]: [
|
|
107
|
+
`group.${(_b = (_a = config.ios) === null || _a === void 0 ? void 0 : _a.bundleIdentifier) !== null && _b !== void 0 ? _b : `com.example.${config.slug}`}`,
|
|
108
|
+
],
|
|
109
|
+
},
|
|
106
110
|
},
|
|
107
|
-
},
|
|
108
|
-
}
|
|
111
|
+
}, null, 2)}`);
|
|
112
|
+
});
|
|
109
113
|
}
|
|
110
114
|
}
|
|
111
115
|
return entitlements;
|
|
@@ -179,7 +183,7 @@ const withWidget = (config, props) => {
|
|
|
179
183
|
name: targetName,
|
|
180
184
|
cwd: "../" +
|
|
181
185
|
path_1.default.relative(config._internal.projectRoot, path_1.default.resolve(props.directory)),
|
|
182
|
-
deploymentTarget: (_f = props.deploymentTarget) !== null && _f !== void 0 ? _f :
|
|
186
|
+
deploymentTarget: (_f = props.deploymentTarget) !== null && _f !== void 0 ? _f : DEFAULT_DEPLOYMENT_TARGET,
|
|
183
187
|
bundleId,
|
|
184
188
|
icon: props.icon,
|
|
185
189
|
hasAccentColor: !!((_g = props.colors) === null || _g === void 0 ? void 0 : _g.$accent),
|