vxrn 2.7.7 → 2.8.0
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/dist/config/getBaseViteConfigOnly.mjs +1 -1
- package/dist/config/getBaseViteConfigOnly.mjs.map +1 -1
- package/dist/config/getBaseViteConfigOnly.native.js +1 -1
- package/dist/config/getBaseViteConfigOnly.native.js.map +1 -1
- package/dist/config/getReactNativePlugins.mjs +1 -2
- package/dist/config/getReactNativePlugins.mjs.map +1 -1
- package/dist/config/getReactNativePlugins.native.js +4 -2
- package/dist/config/getReactNativePlugins.native.js.map +1 -1
- package/dist/exports/prebuildWithoutExpo.mjs +26 -97
- package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
- package/dist/exports/prebuildWithoutExpo.native.js +47 -133
- package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.mjs +5 -2
- package/dist/plugins/autoDepOptimizePlugin.mjs.map +1 -1
- package/dist/plugins/autoDepOptimizePlugin.native.js +10 -7
- package/dist/plugins/autoDepOptimizePlugin.native.js.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.mjs +5 -4
- package/dist/rn-commands/bundle/buildBundle.mjs.map +1 -1
- package/dist/rn-commands/bundle/buildBundle.native.js +5 -4
- package/dist/rn-commands/bundle/buildBundle.native.js.map +1 -1
- package/dist/utils/createNativeDevEngine.mjs +17 -5
- package/dist/utils/createNativeDevEngine.mjs.map +1 -1
- package/dist/utils/createNativeDevEngine.native.js +17 -5
- package/dist/utils/createNativeDevEngine.native.js.map +1 -1
- package/package.json +27 -20
- package/src/config/getBaseViteConfigOnly.ts +1 -1
- package/src/config/getReactNativePlugins.ts +8 -4
- package/src/exports/prebuildWithoutExpo.test.ts +62 -157
- package/src/exports/prebuildWithoutExpo.ts +31 -125
- package/src/plugins/autoDepOptimizeExternal.test.ts +101 -0
- package/src/plugins/autoDepOptimizePlugin.ts +12 -6
- package/src/plugins/rnCodegenPlugin.ts +1 -2
- package/src/rn-commands/bundle/buildBundle.ts +8 -7
- package/src/utils/createNativeDevEngine.test.ts +228 -5
- package/src/utils/createNativeDevEngine.ts +35 -22
- package/types/config/getReactNativePlugins.d.ts +3 -2
- package/types/config/getReactNativePlugins.d.ts.map +1 -1
- package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
- package/types/plugins/autoDepOptimizePlugin.d.ts +1 -0
- package/types/plugins/autoDepOptimizePlugin.d.ts.map +1 -1
- package/types/plugins/rnCodegenPlugin.d.ts.map +1 -1
- package/types/rn-commands/bundle/buildBundle.d.ts +1 -1
- package/types/rn-commands/bundle/buildBundle.d.ts.map +1 -1
- package/types/utils/createNativeDevEngine.d.ts +3 -4
- package/types/utils/createNativeDevEngine.d.ts.map +1 -1
- package/src/plugins/autoDepOptimizePlugin.test.ts +0 -42
|
@@ -61,8 +61,6 @@ function patchIosBundlePhase(project, updatesRuntimeVersion) {
|
|
|
61
61
|
function escapeXml(value) {
|
|
62
62
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
63
63
|
}
|
|
64
|
-
var SCENE_DELEGATE_FILE_REF_ID = "1A2B3C4D5E6F7A8B9C0D1E2F";
|
|
65
|
-
var SCENE_DELEGATE_BUILD_FILE_ID = "2B3C4D5E6F7A8B9C0D1E2F1A";
|
|
66
64
|
var PUSH_ENTITLEMENTS_FILE_REF_ID = "3C4D5E6F7A8B9C0D1E2F1A2B";
|
|
67
65
|
function renderSceneDelegateSwift(appName) {
|
|
68
66
|
return `import UIKit
|
|
@@ -88,40 +86,19 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|
|
88
86
|
let window = UIWindow(windowScene: windowScene)
|
|
89
87
|
self.window = window
|
|
90
88
|
|
|
91
|
-
// cold-start links arrive in connectionOptions under scenes, never in
|
|
92
|
-
// the app launchOptions, so they are translated into the launchOptions
|
|
93
|
-
// shape RCTLinkingManager.getInitialURL reads.
|
|
94
|
-
var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]
|
|
95
|
-
if let url = connectionOptions.urlContexts.first?.url {
|
|
96
|
-
launchOptions[.url] = url
|
|
97
|
-
}
|
|
98
|
-
if let activity = connectionOptions.userActivities.first(where: {
|
|
99
|
-
$0.activityType == NSUserActivityTypeBrowsingWeb
|
|
100
|
-
}) {
|
|
101
|
-
launchOptions[.userActivityDictionary] = [
|
|
102
|
-
"UIApplicationLaunchOptionsUserActivityTypeKey": activity.activityType,
|
|
103
|
-
"UIApplicationLaunchOptionsUserActivityKey": activity,
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
|
|
107
89
|
factory.startReactNative(
|
|
108
90
|
withModuleName: "${appName}",
|
|
109
91
|
in: window,
|
|
110
|
-
|
|
92
|
+
connectionOptions: connectionOptions
|
|
111
93
|
)
|
|
112
94
|
}
|
|
113
95
|
|
|
114
96
|
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
|
|
115
|
-
|
|
116
|
-
RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])
|
|
97
|
+
RCTLinkingManager.scene(scene, openURLContexts: URLContexts)
|
|
117
98
|
}
|
|
118
99
|
|
|
119
100
|
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
|
|
120
|
-
RCTLinkingManager.
|
|
121
|
-
UIApplication.shared,
|
|
122
|
-
continue: userActivity,
|
|
123
|
-
restorationHandler: { _ in }
|
|
124
|
-
)
|
|
101
|
+
RCTLinkingManager.scene(scene, continue: userActivity)
|
|
125
102
|
}
|
|
126
103
|
}
|
|
127
104
|
`;
|
|
@@ -135,64 +112,24 @@ ${insertion}`;
|
|
|
135
112
|
return `${haystack.slice(0, lineEnd + 1)}${insertion}
|
|
136
113
|
${haystack.slice(lineEnd + 1)}`;
|
|
137
114
|
}
|
|
138
|
-
function
|
|
139
|
-
var anchor = " <key>LSRequiresIPhoneOS</key>";
|
|
140
|
-
if (!rendered.includes(anchor)) {
|
|
141
|
-
throw new Error("[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor");
|
|
142
|
-
}
|
|
143
|
-
return rendered.replace(anchor, ` <key>UIApplicationSceneManifest</key>
|
|
144
|
-
<dict>
|
|
145
|
-
<key>UIApplicationSupportsMultipleScenes</key>
|
|
146
|
-
<false/>
|
|
147
|
-
<key>UISceneConfigurations</key>
|
|
148
|
-
<dict>
|
|
149
|
-
<key>UIWindowSceneSessionRoleApplication</key>
|
|
150
|
-
<array>
|
|
151
|
-
<dict>
|
|
152
|
-
<key>UISceneConfigurationName</key>
|
|
153
|
-
<string>Default Configuration</string>
|
|
154
|
-
<key>UISceneDelegateClassName</key>
|
|
155
|
-
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
|
156
|
-
</dict>
|
|
157
|
-
</array>
|
|
158
|
-
</dict>
|
|
159
|
-
</dict>
|
|
160
|
-
${anchor}`);
|
|
161
|
-
}
|
|
162
|
-
function patchIosAppDelegateSceneLifecycle(rendered, appName, backgroundTasks, appIntents) {
|
|
115
|
+
function patchIosAppDelegateSceneLifecycle(rendered, backgroundTasks, appIntents) {
|
|
163
116
|
var anchor = `@main
|
|
164
117
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
165
|
-
var window: UIWindow?
|
|
166
|
-
|
|
167
|
-
var reactNativeDelegate: ReactNativeDelegate?
|
|
168
|
-
var reactNativeFactory: RCTReactNativeFactory?
|
|
169
|
-
|
|
170
118
|
func application(
|
|
171
119
|
_ application: UIApplication,
|
|
172
120
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
|
|
173
121
|
) -> Bool {
|
|
174
|
-
|
|
175
|
-
let factory = RCTReactNativeFactory(delegate: delegate)
|
|
176
|
-
delegate.dependencyProvider = RCTAppDependencyProvider()
|
|
177
|
-
|
|
178
|
-
reactNativeDelegate = delegate
|
|
179
|
-
reactNativeFactory = factory
|
|
180
|
-
|
|
181
|
-
window = UIWindow(frame: UIScreen.main.bounds)
|
|
182
|
-
|
|
183
|
-
factory.startReactNative(
|
|
184
|
-
withModuleName: "${appName}",
|
|
185
|
-
in: window,
|
|
186
|
-
launchOptions: launchOptions
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
return true
|
|
122
|
+
true
|
|
190
123
|
}
|
|
191
124
|
}`;
|
|
192
125
|
if (!rendered.includes(anchor)) {
|
|
193
|
-
throw new Error("[vxrn] prebuild template AppDelegate.swift changed shape: cannot
|
|
126
|
+
throw new Error("[vxrn] prebuild template AppDelegate.swift changed shape: cannot register the app-level React Native factory");
|
|
194
127
|
}
|
|
195
|
-
return rendered.replace(anchor,
|
|
128
|
+
return rendered.replace(anchor, `import React
|
|
129
|
+
import React_RCTAppDelegate
|
|
130
|
+
import ReactAppDependencyProvider
|
|
131
|
+
|
|
132
|
+
@main
|
|
196
133
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
197
134
|
var reactNativeDelegate: ReactNativeDelegate?
|
|
198
135
|
var reactNativeFactory: RCTReactNativeFactory?
|
|
@@ -210,6 +147,16 @@ ${backgroundTasks ? ` OneBackgroundTasksRegisterHost(factory, launchOptions)
|
|
|
210
147
|
` : ""}${appIntents ? ` OneAppIntentsRegisterHost(factory, launchOptions)
|
|
211
148
|
` : ""} return true
|
|
212
149
|
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
|
|
153
|
+
override func bundleURL() -> URL? {
|
|
154
|
+
#if DEBUG
|
|
155
|
+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
|
|
156
|
+
#else
|
|
157
|
+
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
|
158
|
+
#endif
|
|
159
|
+
}
|
|
213
160
|
}`);
|
|
214
161
|
}
|
|
215
162
|
var ONE_BRIDGING_HEADER_NAME = "One-Bridging-Header.h";
|
|
@@ -237,40 +184,6 @@ function patchIosPbxprojOneBridgingHeader(project, appName) {
|
|
|
237
184
|
return project.split(anchor).join(`${anchor}
|
|
238
185
|
${setting}`);
|
|
239
186
|
}
|
|
240
|
-
function patchIosPbxprojSceneDelegate(rendered, appName) {
|
|
241
|
-
var edits = [
|
|
242
|
-
["/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;", ` ${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`],
|
|
243
|
-
["/* AppDelegate.swift */ = {isa = PBXFileReference;", ` ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = "<group>"; };`],
|
|
244
|
-
["/* AppDelegate.swift */,", ` ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`],
|
|
245
|
-
["/* AppDelegate.swift in Sources */,", ` ${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`]
|
|
246
|
-
];
|
|
247
|
-
var patched = rendered;
|
|
248
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
249
|
-
try {
|
|
250
|
-
for (var _iterator = edits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
251
|
-
var [anchor, insertion] = _step.value;
|
|
252
|
-
var next = insertAfterLine(patched, anchor, insertion);
|
|
253
|
-
if (next === patched) {
|
|
254
|
-
throw new Error(`[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`);
|
|
255
|
-
}
|
|
256
|
-
patched = next;
|
|
257
|
-
}
|
|
258
|
-
} catch (err) {
|
|
259
|
-
_didIteratorError = true;
|
|
260
|
-
_iteratorError = err;
|
|
261
|
-
} finally {
|
|
262
|
-
try {
|
|
263
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
264
|
-
_iterator.return();
|
|
265
|
-
}
|
|
266
|
-
} finally {
|
|
267
|
-
if (_didIteratorError) {
|
|
268
|
-
throw _iteratorError;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return patched;
|
|
273
|
-
}
|
|
274
187
|
function patchIosPbxprojAppIntents(rendered, appName) {
|
|
275
188
|
var name = "OneAppIntents.swift";
|
|
276
189
|
var fileRef = pbxprojId("one-app-intents-file");
|
|
@@ -1814,7 +1727,7 @@ function renderPrebuildFile(args) {
|
|
|
1814
1727
|
}
|
|
1815
1728
|
destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());
|
|
1816
1729
|
if (content !== null) {
|
|
1817
|
-
var _app_imagePicker, _app_notifications, _app_ios, _app_android, _app_notifications1, _app_android1, _app_android_permissions, _app_android2, _app_android_blockedPermissions, _app_android3, _app_android_appLinks, _app_android4, _app_ios1,
|
|
1730
|
+
var _app_imagePicker, _app_notifications, _app_ios, _app_android, _app_notifications1, _app_android1, _app_android_permissions, _app_android2, _app_android_blockedPermissions, _app_android3, _app_android_appLinks, _app_android4, _app_ios1, _app_android5, _app_android6, _app_android7;
|
|
1818
1731
|
var rendered = content;
|
|
1819
1732
|
var replacements = [];
|
|
1820
1733
|
if (platform === "ios" && app.ios) {
|
|
@@ -1846,7 +1759,7 @@ function renderPrebuildFile(args) {
|
|
|
1846
1759
|
}
|
|
1847
1760
|
if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
|
|
1848
1761
|
var _ref, _ref1, _ref2;
|
|
1849
|
-
var _app_ios3, _app_ios4,
|
|
1762
|
+
var _app_ios2, _app_ios3, _app_ios4, _app_photoLibrary, _app_notifications2, _app_ios5, _app_ios_backgroundTasks, _app_ios6, _app_ios_backgroundTasks1, _app_ios7, _app_ios8, _app_audio, _app_location, _app_fonts, _app_ios9;
|
|
1850
1763
|
var stamps = [];
|
|
1851
1764
|
if (schemes.length) {
|
|
1852
1765
|
stamps.push(` <key>CFBundleURLTypes</key>
|
|
@@ -1863,14 +1776,14 @@ ${schemes.map(function(scheme) {
|
|
|
1863
1776
|
</dict>
|
|
1864
1777
|
</array>`);
|
|
1865
1778
|
}
|
|
1866
|
-
if (((
|
|
1779
|
+
if (((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.usesNonExemptEncryption) !== void 0) {
|
|
1867
1780
|
stamps.push(` <key>ITSAppUsesNonExemptEncryption</key>
|
|
1868
1781
|
<${app.ios.usesNonExemptEncryption ? "true" : "false"}/>`);
|
|
1869
1782
|
}
|
|
1870
|
-
if ((
|
|
1783
|
+
if ((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.accentColor) {
|
|
1871
1784
|
stamps.push(" <key>NSAccentColorName</key>\n <string>AccentColor</string>");
|
|
1872
1785
|
}
|
|
1873
|
-
if ((
|
|
1786
|
+
if ((_app_ios4 = app.ios) === null || _app_ios4 === void 0 ? void 0 : _app_ios4.fileSharing) {
|
|
1874
1787
|
stamps.push(` <key>UIFileSharingEnabled</key>
|
|
1875
1788
|
<true/>
|
|
1876
1789
|
<key>LSSupportsOpeningDocumentsInPlace</key>
|
|
@@ -1887,11 +1800,11 @@ ${schemes.map(function(scheme) {
|
|
|
1887
1800
|
stamps.push(` <key>${notificationsHost.pushInfoPlistKey}</key>
|
|
1888
1801
|
<true/>`);
|
|
1889
1802
|
}
|
|
1890
|
-
if ((
|
|
1803
|
+
if ((_app_ios5 = app.ios) === null || _app_ios5 === void 0 ? void 0 : _app_ios5.widgets) {
|
|
1891
1804
|
stamps.push(" <key>NSSupportsLiveActivities</key>\n <true/>");
|
|
1892
1805
|
}
|
|
1893
|
-
var refreshTasks = (_ref = (
|
|
1894
|
-
var processingTasks = (_ref1 = (
|
|
1806
|
+
var refreshTasks = (_ref = (_app_ios6 = app.ios) === null || _app_ios6 === void 0 ? void 0 : (_app_ios_backgroundTasks = _app_ios6.backgroundTasks) === null || _app_ios_backgroundTasks === void 0 ? void 0 : _app_ios_backgroundTasks.refresh) !== null && _ref !== void 0 ? _ref : [];
|
|
1807
|
+
var processingTasks = (_ref1 = (_app_ios7 = app.ios) === null || _app_ios7 === void 0 ? void 0 : (_app_ios_backgroundTasks1 = _app_ios7.backgroundTasks) === null || _app_ios_backgroundTasks1 === void 0 ? void 0 : _app_ios_backgroundTasks1.processing) !== null && _ref1 !== void 0 ? _ref1 : [];
|
|
1895
1808
|
if (refreshTasks.length || processingTasks.length) {
|
|
1896
1809
|
var plistArray = function plistArray2(key, identifiers) {
|
|
1897
1810
|
return ` <key>${key}</key>
|
|
@@ -1905,7 +1818,7 @@ ${identifiers.map(function(identifier) {
|
|
|
1905
1818
|
stamps.push(plistArray("OneBackgroundRefreshTaskIdentifiers", refreshTasks));
|
|
1906
1819
|
stamps.push(plistArray("OneBackgroundProcessingTaskIdentifiers", processingTasks));
|
|
1907
1820
|
}
|
|
1908
|
-
if ((
|
|
1821
|
+
if ((_app_ios8 = app.ios) === null || _app_ios8 === void 0 ? void 0 : _app_ios8.appIntents) {
|
|
1909
1822
|
stamps.push(` <key>OneAppIntentIdentifiers</key>
|
|
1910
1823
|
<array>
|
|
1911
1824
|
${app.ios.appIntents.actions.map(function(action) {
|
|
@@ -1971,7 +1884,7 @@ ${phoneOrientations.map(function(orientation) {
|
|
|
1971
1884
|
}
|
|
1972
1885
|
stamps.push(renderPlistEntries({ [key]: value2 }, " "));
|
|
1973
1886
|
};
|
|
1974
|
-
for (var _iterator1 = Object.entries((_ref2 = (
|
|
1887
|
+
for (var _iterator1 = Object.entries((_ref2 = (_app_ios9 = app.ios) === null || _app_ios9 === void 0 ? void 0 : _app_ios9.infoPlist) !== null && _ref2 !== void 0 ? _ref2 : {})[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) _loop();
|
|
1975
1888
|
} catch (err) {
|
|
1976
1889
|
_didIteratorError1 = true;
|
|
1977
1890
|
_iteratorError1 = err;
|
|
@@ -2076,7 +1989,7 @@ ${stamps2.join("\n")}`);
|
|
|
2076
1989
|
}
|
|
2077
1990
|
}
|
|
2078
1991
|
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && (app.audio !== void 0 || app.photoLibrary !== void 0 || app.contacts !== void 0 || app.calendar !== void 0 || ((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.backgroundTasks) !== void 0)) {
|
|
2079
|
-
var _app_audio1, _app_photoLibrary1, _app_photoLibrary2, _app_calendar, _app_calendar1, _app_audio2, _app_calendar2, _app_photoLibrary3, _app_audio3,
|
|
1992
|
+
var _app_audio1, _app_photoLibrary1, _app_photoLibrary2, _app_calendar, _app_calendar1, _app_audio2, _app_calendar2, _app_photoLibrary3, _app_audio3, _app_ios10;
|
|
2080
1993
|
var anchor7 = "<uses-permission android:name=\"android.permission.INTERNET\" />";
|
|
2081
1994
|
if (!rendered.includes(anchor7)) {
|
|
2082
1995
|
throw new Error("[vxrn] cannot stamp media permissions: expected the INTERNET permission in app/src/main/AndroidManifest.xml");
|
|
@@ -2122,7 +2035,7 @@ ${stamps3.join("\n")}`);
|
|
|
2122
2035
|
if (((_app_audio3 = app.audio) === null || _app_audio3 === void 0 ? void 0 : _app_audio3.background) === true) {
|
|
2123
2036
|
appStamps.push(" <meta-data android:name=\"one.audio.background\" android:value=\"true\" />", " <service android:name=\"com.margelo.nitro.one.OneAudioService\" android:exported=\"false\" android:foregroundServiceType=\"mediaPlayback\" />");
|
|
2124
2037
|
}
|
|
2125
|
-
if (((
|
|
2038
|
+
if (((_app_ios10 = app.ios) === null || _app_ios10 === void 0 ? void 0 : _app_ios10.backgroundTasks) !== void 0) {
|
|
2126
2039
|
var _app_ios_backgroundTasks_refresh, _app_ios_backgroundTasks_processing;
|
|
2127
2040
|
var refreshTasks1 = (_app_ios_backgroundTasks_refresh = app.ios.backgroundTasks.refresh) !== null && _app_ios_backgroundTasks_refresh !== void 0 ? _app_ios_backgroundTasks_refresh : [];
|
|
2128
2041
|
var processingTasks1 = (_app_ios_backgroundTasks_processing = app.ios.backgroundTasks.processing) !== null && _app_ios_backgroundTasks_processing !== void 0 ? _app_ios_backgroundTasks_processing : [];
|
|
@@ -2261,15 +2174,15 @@ ${schemes.map(function(scheme) {
|
|
|
2261
2174
|
</activity>`);
|
|
2262
2175
|
}
|
|
2263
2176
|
if (platform === "ios" && relativePath.endsWith(".xcodeproj/project.pbxproj")) {
|
|
2264
|
-
var
|
|
2265
|
-
rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = "1,2";/g, `TARGETED_DEVICE_FAMILY = "${((
|
|
2177
|
+
var _app_ios11;
|
|
2178
|
+
rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = "1,2";/g, `TARGETED_DEVICE_FAMILY = "${((_app_ios11 = app.ios) === null || _app_ios11 === void 0 ? void 0 : _app_ios11.tablet) ? "1,2" : "1"}";`);
|
|
2266
2179
|
}
|
|
2267
2180
|
if (platform === "ios" && relativePath.endsWith(".xcodeproj/project.pbxproj")) {
|
|
2268
|
-
var
|
|
2181
|
+
var _app_ios12;
|
|
2269
2182
|
if (app.version !== void 0) {
|
|
2270
2183
|
rendered = rendered.replace(/MARKETING_VERSION = [^;]+;/g, `MARKETING_VERSION = "${app.version}";`);
|
|
2271
2184
|
}
|
|
2272
|
-
if (((
|
|
2185
|
+
if (((_app_ios12 = app.ios) === null || _app_ios12 === void 0 ? void 0 : _app_ios12.buildNumber) !== void 0) {
|
|
2273
2186
|
rendered = rendered.replace(/CURRENT_PROJECT_VERSION = [^;]+;/g, `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`);
|
|
2274
2187
|
}
|
|
2275
2188
|
}
|
|
@@ -2283,7 +2196,7 @@ ${schemes.map(function(scheme) {
|
|
|
2283
2196
|
ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "${names}";`);
|
|
2284
2197
|
}
|
|
2285
2198
|
if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
|
|
2286
|
-
var _app_imagePicker2, _app_imagePicker3,
|
|
2199
|
+
var _app_imagePicker2, _app_imagePicker3, _app_ios13, _app_audio4;
|
|
2287
2200
|
var usage = /* @__PURE__ */ new Map();
|
|
2288
2201
|
if (((_app_imagePicker2 = app.imagePicker) === null || _app_imagePicker2 === void 0 ? void 0 : _app_imagePicker2.camera) !== void 0) {
|
|
2289
2202
|
usage.set("NSCameraUsageDescription", app.imagePicker.camera);
|
|
@@ -2319,7 +2232,7 @@ ${schemes.map(function(scheme) {
|
|
|
2319
2232
|
if (app.pedometer !== void 0) {
|
|
2320
2233
|
usage.set("NSMotionUsageDescription", app.pedometer.usage);
|
|
2321
2234
|
}
|
|
2322
|
-
if (((
|
|
2235
|
+
if (((_app_ios13 = app.ios) === null || _app_ios13 === void 0 ? void 0 : _app_ios13.faceIdUsageDescription) !== void 0) {
|
|
2323
2236
|
usage.set("NSFaceIDUsageDescription", app.ios.faceIdUsageDescription);
|
|
2324
2237
|
}
|
|
2325
2238
|
if (app.speech !== void 0) {
|
|
@@ -2371,11 +2284,10 @@ ${schemes.map(function(scheme) {
|
|
|
2371
2284
|
}).join("")}${anchor14}`);
|
|
2372
2285
|
}
|
|
2373
2286
|
rendered = rendered.replace(/\t<key>NS\w+UsageDescription<\/key>\s*<string><\/string>\n/g, "");
|
|
2374
|
-
rendered = patchIosInfoPlistSceneManifest(rendered);
|
|
2375
2287
|
}
|
|
2376
2288
|
if (platform === "ios" && relativePath.endsWith("/AppDelegate.swift")) {
|
|
2377
|
-
var
|
|
2378
|
-
rendered = patchIosAppDelegateSceneLifecycle(rendered,
|
|
2289
|
+
var _app_ios14, _app_ios15;
|
|
2290
|
+
rendered = patchIosAppDelegateSceneLifecycle(rendered, !!((_app_ios14 = app.ios) === null || _app_ios14 === void 0 ? void 0 : _app_ios14.backgroundTasks), !!((_app_ios15 = app.ios) === null || _app_ios15 === void 0 ? void 0 : _app_ios15.appIntents));
|
|
2379
2291
|
rendered = nativeProjectPatches.holdLaunchScreenOverRootView(rendered);
|
|
2380
2292
|
var bundleURLProvider = "RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: \"index\")";
|
|
2381
2293
|
if (!rendered.includes(bundleURLProvider)) {
|
|
@@ -2390,14 +2302,17 @@ ${schemes.map(function(scheme) {
|
|
|
2390
2302
|
rendered = nativeProjectPatches.pointReleaseBundleURLAtOneUpdates(rendered);
|
|
2391
2303
|
}
|
|
2392
2304
|
}
|
|
2393
|
-
if (platform === "ios"
|
|
2394
|
-
|
|
2305
|
+
if (platform === "ios") {
|
|
2306
|
+
var _ref5;
|
|
2307
|
+
var _app_ios16;
|
|
2308
|
+
var deploymentTarget = (_ref5 = (_app_ios16 = app.ios) === null || _app_ios16 === void 0 ? void 0 : _app_ios16.deploymentTarget) !== null && _ref5 !== void 0 ? _ref5 : "17.0";
|
|
2309
|
+
rendered = rendered.replace("platform :ios, min_ios_version_supported", `platform :ios, '${deploymentTarget}'`).replace(/IPHONEOS_DEPLOYMENT_TARGET = \d+(?:\.\d+)?;/g, `IPHONEOS_DEPLOYMENT_TARGET = ${deploymentTarget};`);
|
|
2395
2310
|
if (relativePath === "Podfile") {
|
|
2396
2311
|
rendered = rendered.replace(" )\n end\nend", ` )
|
|
2397
2312
|
|
|
2398
2313
|
installer.pods_project.targets.each do |target|
|
|
2399
2314
|
target.build_configurations.each do |config|
|
|
2400
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${
|
|
2315
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${deploymentTarget}'
|
|
2401
2316
|
end
|
|
2402
2317
|
end
|
|
2403
2318
|
end
|
|
@@ -2407,7 +2322,6 @@ end`);
|
|
|
2407
2322
|
if (platform === "ios" && relativePath.endsWith(".xcodeproj/project.pbxproj")) {
|
|
2408
2323
|
var _app_updates, _app_ios17, _app_ios18, _app_ios19;
|
|
2409
2324
|
rendered = patchIosBundlePhase(rendered, (_app_updates = app.updates) === null || _app_updates === void 0 ? void 0 : _app_updates.runtimeVersion);
|
|
2410
|
-
rendered = patchIosPbxprojSceneDelegate(rendered, appName);
|
|
2411
2325
|
if ((_app_ios17 = app.ios) === null || _app_ios17 === void 0 ? void 0 : _app_ios17.appIntents) rendered = patchIosPbxprojAppIntents(rendered, appName);
|
|
2412
2326
|
rendered = patchIosPbxprojOneBridgingHeader(rendered, appName);
|
|
2413
2327
|
if (Object.keys(appEntitlements(app)).length && !((_app_ios18 = app.ios) === null || _app_ios18 === void 0 ? void 0 : _app_ios18.widgets)) {
|