@bacons/apple-targets 3.0.6 → 3.0.7
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 +4 -4
- package/build/with-xcode-changes.js +17 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# Apple Targets
|
|
1
|
+
# Apple Targets
|
|
2
2
|
|
|
3
3
|
> [!WARNING]
|
|
4
|
-
> This is
|
|
4
|
+
> This is an experimental Config Plugin not part of any official Expo workflow. Automated testing of targets is seemingly impossible meaning unexpected regressions can occur between versions.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
An experimental Expo Config Plugin that generates native Apple Targets like Widgets or App Clips, and links them outside the `/ios` directory. You can open Xcode and develop the targets inside the virtual `expo:targets` folder and the changes will be saved outside of the `ios` directory. This pattern enables building things that fall outside of the scope of React Native while still obtaining all the benefits of [Continuous Native Generation](https://docs.expo.dev/workflow/continuous-native-generation/).
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<img width="1728" height="963" alt="targets" src="https://github.com/user-attachments/assets/aedaafa0-1ef0-403c-a797-9f4c82cdb9f1" />
|
|
9
9
|
|
|
10
10
|
## 🚀 How to use
|
|
11
11
|
|
|
@@ -20,18 +20,18 @@ const withXcodeChanges = (config, props) => {
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
exports.withXcodeChanges = withXcodeChanges;
|
|
23
|
-
function getMainMarketingVersion(project) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
23
|
+
// function getMainMarketingVersion(project: XcodeProject) {
|
|
24
|
+
// const mainTarget = getMainAppTarget(project);
|
|
25
|
+
// const config = mainTarget.getDefaultConfiguration();
|
|
26
|
+
// const info = config.getInfoPlist();
|
|
27
|
+
// const version = info.CFBundleShortVersionString;
|
|
28
|
+
// // console.log('getMainMarketingVersion', mainTarget.getDisplayName(), version)
|
|
29
|
+
// if (!version || version === "$(MARKETING_VERSION)") {
|
|
30
|
+
// // console.log('getMainMarketingVersion.fallback', config.props.buildSettings.MARKETING_VERSION)
|
|
31
|
+
// return config.props.buildSettings.MARKETING_VERSION;
|
|
32
|
+
// }
|
|
33
|
+
// return version;
|
|
34
|
+
// }
|
|
35
35
|
async function applyXcodeChanges(config, project, props) {
|
|
36
36
|
var _a, _b;
|
|
37
37
|
var _c;
|
|
@@ -109,7 +109,11 @@ async function applyXcodeChanges(config, project, props) {
|
|
|
109
109
|
// CODE_SIGN_ENTITLEMENTS = MattermostShare/MattermostShare.entitlements;
|
|
110
110
|
}
|
|
111
111
|
function syncMarketingVersions() {
|
|
112
|
-
|
|
112
|
+
var _a;
|
|
113
|
+
// In Expo managed projects, the version will always be overwritten.
|
|
114
|
+
// Because the overwrite happens after this script runs, we just set it to the config value.
|
|
115
|
+
const mainVersion = ((_a = config.ios) === null || _a === void 0 ? void 0 : _a.version) || config.version || '1.0.0';
|
|
116
|
+
// const mainVersion = getMainMarketingVersion(project);
|
|
113
117
|
project.rootObject.props.targets.forEach((target) => {
|
|
114
118
|
if (xcode_1.PBXNativeTarget.is(target)) {
|
|
115
119
|
target.setBuildSetting("MARKETING_VERSION", mainVersion);
|