vxrn 2.0.0-beta.60.1 → 2.0.0-beta.61.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/dist/exports/prebuildWithoutExpo.mjs +22 -53
- package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
- package/dist/exports/prebuildWithoutExpo.native.js +24 -76
- package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
- package/package.json +11 -11
- package/src/exports/prebuildWithoutExpo.test.ts +56 -9
- package/src/exports/prebuildWithoutExpo.ts +46 -131
- package/types/exports/prebuildWithoutExpo.d.ts +6 -34
- package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
|
@@ -2,17 +2,12 @@ import { execFileSync } from "node:child_process";
|
|
|
2
2
|
import module from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
|
+
import { validateNativeApp } from "@vxrn/utils/nativeAppManifest";
|
|
5
6
|
import FSExtra from "fs-extra";
|
|
6
7
|
import sharp from "sharp";
|
|
7
8
|
|
|
8
9
|
const nativeProjectPatches = module.createRequire(import.meta.url)("../../native-project-patches.cjs");
|
|
9
|
-
const
|
|
10
|
-
const SCHEME = /^[a-z][a-z0-9+.-]*$/i;
|
|
11
|
-
const VERSION = /^\d+\.\d+\.\d+/;
|
|
12
|
-
const BUILD_NUMBER = /^[A-Za-z0-9.]+$/;
|
|
13
|
-
const REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/;
|
|
14
|
-
const DEPLOYMENT_TARGET = /^\d+\.\d+$/;
|
|
15
|
-
const HEX_COLOR = /^#[\da-f]{6}$/i;
|
|
10
|
+
const validatePrebuildApp = validateNativeApp;
|
|
16
11
|
const ANDROID_DENSITIES = {
|
|
17
12
|
mdpi: 1,
|
|
18
13
|
hdpi: 1.5,
|
|
@@ -50,6 +45,9 @@ function patchIosBundlePhase(project) {
|
|
|
50
45
|
}
|
|
51
46
|
return patchedProject;
|
|
52
47
|
}
|
|
48
|
+
function escapeXml(value) {
|
|
49
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
50
|
+
}
|
|
53
51
|
const SCENE_DELEGATE_FILE_REF_ID = "1A2B3C4D5E6F7A8B9C0D1E2F";
|
|
54
52
|
const SCENE_DELEGATE_BUILD_FILE_ID = "2B3C4D5E6F7A8B9C0D1E2F1A";
|
|
55
53
|
function renderSceneDelegateSwift(appName) {
|
|
@@ -219,52 +217,6 @@ function generateSceneDelegate(args) {
|
|
|
219
217
|
if (platform !== "ios") return;
|
|
220
218
|
FSExtra.writeFileSync(path.join(dest, app.name, "SceneDelegate.swift"), renderSceneDelegateSwift(app.name));
|
|
221
219
|
}
|
|
222
|
-
function fail(message) {
|
|
223
|
-
throw new Error(`[vxrn] invalid native.app: ${message}`);
|
|
224
|
-
}
|
|
225
|
-
function validatePrebuildApp(app, platform) {
|
|
226
|
-
if (!app || typeof app !== "object") fail("manifest must be an object");
|
|
227
|
-
if (!app.name || !TARGET_NAME.test(app.name)) {
|
|
228
|
-
fail(`name "${app?.name}" must start with a letter and contain only letters, digits, and underscore`);
|
|
229
|
-
}
|
|
230
|
-
const schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme];
|
|
231
|
-
for (const scheme of schemes) {
|
|
232
|
-
if (typeof scheme !== "string" || !SCHEME.test(scheme)) {
|
|
233
|
-
fail(`scheme "${scheme}" must be a valid uri scheme`);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
if (app.icon !== void 0 && (!app.icon.source || !HEX_COLOR.test(app.icon.backgroundColor))) {
|
|
237
|
-
fail("icon requires source and a six-digit hex backgroundColor");
|
|
238
|
-
}
|
|
239
|
-
if (app.splash !== void 0 && (!app.splash.source || !HEX_COLOR.test(app.splash.backgroundColor) || app.splash.width !== void 0 && (!Number.isFinite(app.splash.width) || app.splash.width < 1 || app.splash.width > 288))) {
|
|
240
|
-
fail("splash requires source, a six-digit hex backgroundColor, and width from 1 to 288");
|
|
241
|
-
}
|
|
242
|
-
if (app.version !== void 0 && !VERSION.test(app.version)) {
|
|
243
|
-
fail(`version "${app.version}" must start with major.minor.patch`);
|
|
244
|
-
}
|
|
245
|
-
if (!platform || platform === "ios") {
|
|
246
|
-
if (!app.ios?.bundleId || !REVERSE_DNS.test(app.ios.bundleId)) {
|
|
247
|
-
fail(`ios.bundleId "${app.ios?.bundleId}" must be reverse-dns`);
|
|
248
|
-
}
|
|
249
|
-
if (app.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(app.ios.deploymentTarget)) {
|
|
250
|
-
fail(`ios.deploymentTarget "${app.ios.deploymentTarget}" must look like "17.0"`);
|
|
251
|
-
}
|
|
252
|
-
if (app.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(app.ios.buildNumber)) {
|
|
253
|
-
fail(`ios.buildNumber "${app.ios.buildNumber}" must contain only letters, digits, and dots`);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
if (!platform || platform === "android") {
|
|
257
|
-
if (!app.android?.applicationId || !REVERSE_DNS.test(app.android.applicationId)) {
|
|
258
|
-
fail(`android.applicationId "${app.android?.applicationId}" must be reverse-dns`);
|
|
259
|
-
}
|
|
260
|
-
if (app.android.minSdk !== void 0 && (!Number.isInteger(app.android.minSdk) || app.android.minSdk < 21 || app.android.minSdk > 36)) {
|
|
261
|
-
fail(`android.minSdk "${app.android.minSdk}" must be an integer from 21 to 36`);
|
|
262
|
-
}
|
|
263
|
-
if (app.android.versionCode !== void 0 && (!Number.isInteger(app.android.versionCode) || app.android.versionCode < 1)) {
|
|
264
|
-
fail(`android.versionCode "${app.android.versionCode}" must be a positive integer`);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
220
|
async function generateAppIcons(args) {
|
|
269
221
|
const { root, dest, platform, app } = args;
|
|
270
222
|
if (!app.icon) return;
|
|
@@ -465,6 +417,14 @@ ${schemes.map((scheme) => ` <string>${scheme}</string>`).join("\n")}
|
|
|
465
417
|
</dict>
|
|
466
418
|
</array>
|
|
467
419
|
<key>LSRequiresIPhoneOS</key>`);
|
|
420
|
+
}
|
|
421
|
+
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && app.imagePicker?.camera !== void 0) {
|
|
422
|
+
const anchor = "<uses-permission android:name=\"android.permission.INTERNET\" />";
|
|
423
|
+
if (!rendered.includes(anchor)) {
|
|
424
|
+
throw new Error("[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml");
|
|
425
|
+
}
|
|
426
|
+
rendered = rendered.replace(anchor, `${anchor}
|
|
427
|
+
<uses-permission android:name="android.permission.CAMERA" />`);
|
|
468
428
|
}
|
|
469
429
|
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && schemes.length) {
|
|
470
430
|
rendered = rendered.replace(" </activity>", ` <intent-filter>
|
|
@@ -491,6 +451,15 @@ ${schemes.map((scheme) => ` <data android:scheme="${scheme}" />`).joi
|
|
|
491
451
|
rendered = rendered.replace(" <key>LSRequiresIPhoneOS</key>", ` <key>ITSAppUsesNonExemptEncryption</key>
|
|
492
452
|
<${app.ios.usesNonExemptEncryption ? "true" : "false"}/>
|
|
493
453
|
<key>LSRequiresIPhoneOS</key>`);
|
|
454
|
+
}
|
|
455
|
+
if (app.imagePicker?.camera !== void 0) {
|
|
456
|
+
const anchor = " <key>LSRequiresIPhoneOS</key>";
|
|
457
|
+
if (!rendered.includes(anchor)) {
|
|
458
|
+
throw new Error("[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist");
|
|
459
|
+
}
|
|
460
|
+
rendered = rendered.replace(anchor, ` <key>NSCameraUsageDescription</key>
|
|
461
|
+
<string>${escapeXml(app.imagePicker.camera)}</string>
|
|
462
|
+
${anchor}`);
|
|
494
463
|
}
|
|
495
464
|
rendered = patchIosInfoPlistSceneManifest(rendered);
|
|
496
465
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.js","names":[],"sources":["exports/prebuildWithoutExpo.js"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport module from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nconst nativeProjectPatches = module.createRequire(import.meta.url)(\n \"../../native-project-patches.cjs\"\n);\nconst TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;\nconst SCHEME = /^[a-z][a-z0-9+.-]*$/i;\nconst VERSION = /^\\d+\\.\\d+\\.\\d+/;\nconst BUILD_NUMBER = /^[A-Za-z0-9.]+$/;\nconst REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\\.[A-Za-z][A-Za-z0-9-]*)+$/;\nconst DEPLOYMENT_TARGET = /^\\d+\\.\\d+$/;\nconst HEX_COLOR = /^#[\\da-f]{6}$/i;\nconst ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nconst IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nconst ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nconst ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n let patchedBundlePhases = 0;\n const patchedProject = project.replace(\n /shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g,\n (assignment, serializedScript) => {\n let script;\n try {\n script = JSON.parse(serializedScript);\n } catch {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n let patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n }\n );\n if (patchedBundlePhases !== 1) {\n throw new Error(\n `[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`\n );\n }\n return patchedProject;\n}\nconst SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nconst SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n const anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n const lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(\n anchor,\n `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`\n );\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n const anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\"\n );\n }\n return rendered.replace(\n anchor,\n `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`\n );\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n const edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n let patched = rendered;\n for (const [anchor, insertion] of edits) {\n const next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(\n `[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`\n );\n }\n patched = next;\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n const { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(\n path.join(dest, app.name, \"SceneDelegate.swift\"),\n renderSceneDelegateSwift(app.name)\n );\n}\nfunction fail(message) {\n throw new Error(`[vxrn] invalid native.app: ${message}`);\n}\nfunction validatePrebuildApp(app, platform) {\n if (!app || typeof app !== \"object\") fail(\"manifest must be an object\");\n if (!app.name || !TARGET_NAME.test(app.name)) {\n fail(\n `name \"${app?.name}\" must start with a letter and contain only letters, digits, and underscore`\n );\n }\n const schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme];\n for (const scheme of schemes) {\n if (typeof scheme !== \"string\" || !SCHEME.test(scheme)) {\n fail(`scheme \"${scheme}\" must be a valid uri scheme`);\n }\n }\n if (app.icon !== void 0 && (!app.icon.source || !HEX_COLOR.test(app.icon.backgroundColor))) {\n fail(\"icon requires source and a six-digit hex backgroundColor\");\n }\n if (app.splash !== void 0 && (!app.splash.source || !HEX_COLOR.test(app.splash.backgroundColor) || app.splash.width !== void 0 && (!Number.isFinite(app.splash.width) || app.splash.width < 1 || app.splash.width > 288))) {\n fail(\n \"splash requires source, a six-digit hex backgroundColor, and width from 1 to 288\"\n );\n }\n if (app.version !== void 0 && !VERSION.test(app.version)) {\n fail(`version \"${app.version}\" must start with major.minor.patch`);\n }\n if (!platform || platform === \"ios\") {\n if (!app.ios?.bundleId || !REVERSE_DNS.test(app.ios.bundleId)) {\n fail(`ios.bundleId \"${app.ios?.bundleId}\" must be reverse-dns`);\n }\n if (app.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(app.ios.deploymentTarget)) {\n fail(`ios.deploymentTarget \"${app.ios.deploymentTarget}\" must look like \"17.0\"`);\n }\n if (app.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(app.ios.buildNumber)) {\n fail(\n `ios.buildNumber \"${app.ios.buildNumber}\" must contain only letters, digits, and dots`\n );\n }\n }\n if (!platform || platform === \"android\") {\n if (!app.android?.applicationId || !REVERSE_DNS.test(app.android.applicationId)) {\n fail(`android.applicationId \"${app.android?.applicationId}\" must be reverse-dns`);\n }\n if (app.android.minSdk !== void 0 && (!Number.isInteger(app.android.minSdk) || app.android.minSdk < 21 || app.android.minSdk > 36)) {\n fail(`android.minSdk \"${app.android.minSdk}\" must be an integer from 21 to 36`);\n }\n if (app.android.versionCode !== void 0 && (!Number.isInteger(app.android.versionCode) || app.android.versionCode < 1)) {\n fail(\n `android.versionCode \"${app.android.versionCode}\" must be a positive integer`\n );\n }\n }\n}\nasync function generateAppIcons(args) {\n const { root, dest, platform, app } = args;\n if (!app.icon) return;\n const source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n const metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\n \"[vxrn] native.app.icon source must be a square image at least 1024px wide\"\n );\n }\n if (platform === \"ios\") {\n const iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n const contentsPath = path.join(iconDir, \"Contents.json\");\n const contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n for (const image of contents.images) {\n const points = Number.parseFloat(image.size.split(\"x\")[0]);\n const scale = Number.parseInt(image.scale, 10);\n const pixels = points * scale;\n const filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const pixels = 48 * multiplier;\n const iconDir = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (const filename of [\"ic_launcher.png\", \"ic_launcher_round.png\"]) {\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n }\n}\nasync function generateSplashScreen(args) {\n const { root, dest, platform, app } = args;\n if (!app.splash) return;\n const source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n const { data: artwork, info: metadata } = await sharp(source).rotate().trim({ background: app.splash.backgroundColor }).png().toBuffer({ resolveWithObject: true });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n const artworkWidth = app.splash.width ?? 200;\n const artworkHeight = Number(\n (artworkWidth * (metadata.height / metadata.width)).toFixed(3)\n );\n if (platform === \"ios\") {\n const appDir = path.join(dest, app.name);\n const splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, { recursive: true });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(\n path.join(splashDir, \"Contents.json\"),\n `${JSON.stringify(\n {\n images: [{ filename: \"splash.png\", idiom: \"universal\", scale: \"1x\" }],\n info: { author: \"xcode\", version: 1 }\n },\n null,\n 2\n )}\n`\n );\n const red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n const green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n const blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(\n path.join(appDir, \"LaunchScreen.storyboard\"),\n `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`\n );\n return;\n }\n const mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n const drawable = path.join(mainRes, \"drawable\");\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const canvasSize = 288 * multiplier;\n const imageSize = Math.round(artworkWidth * multiplier);\n const contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }).png().toBuffer();\n const drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, { recursive: true });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n FSExtra.writeFileSync(\n path.join(drawable, \"launch_screen.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`\n );\n FSExtra.writeFileSync(\n path.join(mainRes, \"values\", \"colors.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`\n );\n const stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n const styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\n \" <!-- Customize your theme here. -->\",\n ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>'\n );\n FSExtra.writeFileSync(stylesPath, styles);\n const stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, { recursive: true });\n FSExtra.writeFileSync(\n path.join(stylesV31, \"styles.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`\n );\n}\nfunction renderPrebuildFile(args) {\n const { relativePath, content, platform, app } = args;\n const appName = app.name;\n const schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme];\n let destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n const packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n let rendered = content;\n if (rendered !== null) {\n const replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([IOS_BUNDLE_PLACEHOLDER, app.ios.bundleId]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([ANDROID_PACKAGE_PLACEHOLDER, app.android.applicationId]);\n }\n replacements.push(\n [\"Hello App Display Name\", app.displayName || appName],\n [\"HelloWorld\", appName],\n [\"helloworld\", appName.toLowerCase()]\n );\n for (const [find, value] of replacements) {\n rendered = rendered.split(find).join(value);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\") && schemes.length) {\n rendered = rendered.replace(\n \"\t<key>LSRequiresIPhoneOS</key>\",\n `\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map((scheme) => `\t\t\t\t<string>${scheme}</string>`).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>LSRequiresIPhoneOS</key>`\n );\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\n \" </activity>\",\n ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map((scheme) => ` <data android:scheme=\"${scheme}\" />`).join(\"\\n\")}\n </intent-filter>\n </activity>`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = rendered.replace(\n /TARGETED_DEVICE_FAMILY = \"1,2\";/g,\n `TARGETED_DEVICE_FAMILY = \"${app.ios?.tablet ? \"1,2\" : \"1\"}\";`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /MARKETING_VERSION = [^;]+;/g,\n `MARKETING_VERSION = \"${app.version}\";`\n );\n }\n if (app.ios?.buildNumber !== void 0) {\n rendered = rendered.replace(\n /CURRENT_PROJECT_VERSION = [^;]+;/g,\n `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n if (app.ios?.usesNonExemptEncryption !== void 0) {\n rendered = rendered.replace(\n \"\t<key>LSRequiresIPhoneOS</key>\",\n `\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>\n\t<key>LSRequiresIPhoneOS</key>`\n );\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && app.ios?.deploymentTarget) {\n rendered = rendered.replace(\n \"platform :ios, min_ios_version_supported\",\n `platform :ios, '${app.ios.deploymentTarget}'`\n ).replace(\n /IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g,\n `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`\n );\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\n \" )\\n end\\nend\",\n ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n if (app.ios?.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if (app.ios?.useFrameworks) {\n rendered = rendered.replace(\n /^(platform :ios, .+)$/m,\n `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`\n );\n }\n if (app.ios?.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /versionName \"[^\"]*\"/g,\n `versionName \"${app.version}\"`\n );\n }\n if (app.android?.versionCode !== void 0) {\n rendered = rendered.replace(\n /versionCode \\d+/g,\n `versionCode ${app.android.versionCode}`\n );\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n const hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([...rendered.matchAll(hardcodedGradlePlugin)].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(\n hardcodedGradlePlugin,\n `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`\n );\n }\n if (platform === \"android\" && app.android?.minSdk !== void 0) {\n rendered = rendered.replace(\n /minSdkVersion = \\d+/g,\n `minSdkVersion = ${app.android.minSdk}`\n );\n }\n }\n return { destRelativePath, content: rendered };\n}\nconst generateForPlatform = async (root, platform, app, outDir = path.resolve(root, platform)) => {\n validatePrebuildApp(app, platform);\n const dest = outDir;\n const require2 = module.createRequire(root + \"/\");\n const importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [root]\n });\n const src = path.join(\n path.dirname(\n require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [root]\n })\n ),\n platform\n );\n const walkModule = await import(pathToFileURL(importPath).href);\n const walkFn = walkModule?.default?.default ?? walkModule?.default ?? walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n const files = [...walkFn(src)].sort();\n FSExtra.removeSync(dest);\n for (const absoluteSrc of files) {\n const relativeFilePath = path.relative(src, absoluteSrc);\n const stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n const extension = path.extname(absoluteSrc);\n const raw = [\".png\", \".jar\", \".keystore\"].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n const { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n const destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), { recursive: true });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n await generateAppIcons({ root, dest, platform, app });\n await generateSplashScreen({ root, dest, platform, app });\n generateSceneDelegate({ dest, platform, app });\n};\nfunction applyAndroidDependencyPatches(args) {\n const { root, app, inventory } = args;\n if (!app.android || !inventory.some(\n (dependency) => dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\")\n )) {\n return;\n }\n const activityPath = path.join(\n root,\n \"android\",\n \"app\",\n \"src\",\n \"main\",\n \"java\",\n ...app.android.applicationId.split(\".\"),\n \"MainActivity.kt\"\n );\n const rendered = nativeProjectPatches.addReactNativeScreensFix(\n FSExtra.readFileSync(activityPath, \"utf8\")\n );\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n const require2 = module.createRequire(root + \"/\");\n const cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [root]\n });\n const cliConfig = await import(pathToFileURL(cliConfigPath).href);\n const config = await cliConfig.loadConfigAsync({ projectRoot: root });\n const inventory = [];\n for (const name of Object.keys(config.dependencies).sort()) {\n const dependency = config.dependencies[name];\n const depRoot = dependency.root;\n let version = \"unknown\";\n try {\n version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version ?? \"unknown\";\n } catch {\n }\n const platforms = Object.entries(dependency.platforms).filter(([, platformConfig]) => platformConfig !== null).map(([platform]) => platform).sort();\n if (platforms.length > 0) inventory.push({ name, version, platforms });\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n const { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\"install\", `--project-directory=${path.join(root, \"ios\")}`], {\n stdio: \"inherit\"\n });\n }\n}\nconst transformPath = (filePath) => {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;AAMA,MAAM,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAChE,kCACF;AACA,MAAM,cAAc;AACpB,MAAM,SAAS;AACf,MAAM,UAAU;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,oBAAoB;AAC1B,MAAM,YAAY;AAClB,MAAM,oBAAoB;CACxB,MAAM;CACN,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AACA,MAAM,yBAAyB;AAC/B,MAAM,8BAA8B;AACpC,MAAM,uBAAuB;AAC7B,SAAS,oBAAoB,SAAS;CACpC,IAAI,sBAAsB;CAC1B,MAAM,i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"node:child_process\";\nimport module from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { validateNativeApp } from \"@vxrn/utils/nativeAppManifest\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nconst nativeProjectPatches = module.createRequire(import.meta.url)(\n \"../../native-project-patches.cjs\"\n);\nconst validatePrebuildApp = validateNativeApp;\nconst ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nconst IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nconst ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nconst ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n let patchedBundlePhases = 0;\n const patchedProject = project.replace(\n /shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g,\n (assignment, serializedScript) => {\n let script;\n try {\n script = JSON.parse(serializedScript);\n } catch {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n let patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n }\n );\n if (patchedBundlePhases !== 1) {\n throw new Error(\n `[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`\n );\n }\n return patchedProject;\n}\nfunction escapeXml(value) {\n return value.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n}\nconst SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nconst SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n const anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n const lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(\n anchor,\n `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`\n );\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n const anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\"\n );\n }\n return rendered.replace(\n anchor,\n `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`\n );\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n const edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n let patched = rendered;\n for (const [anchor, insertion] of edits) {\n const next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(\n `[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`\n );\n }\n patched = next;\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n const { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(\n path.join(dest, app.name, \"SceneDelegate.swift\"),\n renderSceneDelegateSwift(app.name)\n );\n}\nasync function generateAppIcons(args) {\n const { root, dest, platform, app } = args;\n if (!app.icon) return;\n const source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n const metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\n \"[vxrn] native.app.icon source must be a square image at least 1024px wide\"\n );\n }\n if (platform === \"ios\") {\n const iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n const contentsPath = path.join(iconDir, \"Contents.json\");\n const contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n for (const image of contents.images) {\n const points = Number.parseFloat(image.size.split(\"x\")[0]);\n const scale = Number.parseInt(image.scale, 10);\n const pixels = points * scale;\n const filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const pixels = 48 * multiplier;\n const iconDir = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (const filename of [\"ic_launcher.png\", \"ic_launcher_round.png\"]) {\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n }\n}\nasync function generateSplashScreen(args) {\n const { root, dest, platform, app } = args;\n if (!app.splash) return;\n const source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n const { data: artwork, info: metadata } = await sharp(source).rotate().trim({ background: app.splash.backgroundColor }).png().toBuffer({ resolveWithObject: true });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n const artworkWidth = app.splash.width ?? 200;\n const artworkHeight = Number(\n (artworkWidth * (metadata.height / metadata.width)).toFixed(3)\n );\n if (platform === \"ios\") {\n const appDir = path.join(dest, app.name);\n const splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, { recursive: true });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(\n path.join(splashDir, \"Contents.json\"),\n `${JSON.stringify(\n {\n images: [{ filename: \"splash.png\", idiom: \"universal\", scale: \"1x\" }],\n info: { author: \"xcode\", version: 1 }\n },\n null,\n 2\n )}\n`\n );\n const red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n const green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n const blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(\n path.join(appDir, \"LaunchScreen.storyboard\"),\n `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`\n );\n return;\n }\n const mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n const drawable = path.join(mainRes, \"drawable\");\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const canvasSize = 288 * multiplier;\n const imageSize = Math.round(artworkWidth * multiplier);\n const contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }).png().toBuffer();\n const drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, { recursive: true });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n FSExtra.writeFileSync(\n path.join(drawable, \"launch_screen.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`\n );\n FSExtra.writeFileSync(\n path.join(mainRes, \"values\", \"colors.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`\n );\n const stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n const styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\n \" <!-- Customize your theme here. -->\",\n ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>'\n );\n FSExtra.writeFileSync(stylesPath, styles);\n const stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, { recursive: true });\n FSExtra.writeFileSync(\n path.join(stylesV31, \"styles.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`\n );\n}\nfunction renderPrebuildFile(args) {\n const { relativePath, content, platform, app } = args;\n const appName = app.name;\n const schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme];\n let destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n const packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n let rendered = content;\n if (rendered !== null) {\n const replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([IOS_BUNDLE_PLACEHOLDER, app.ios.bundleId]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([ANDROID_PACKAGE_PLACEHOLDER, app.android.applicationId]);\n }\n replacements.push(\n [\"Hello App Display Name\", app.displayName || appName],\n [\"HelloWorld\", appName],\n [\"helloworld\", appName.toLowerCase()]\n );\n for (const [find, value] of replacements) {\n rendered = rendered.split(find).join(value);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\") && schemes.length) {\n rendered = rendered.replace(\n \"\t<key>LSRequiresIPhoneOS</key>\",\n `\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map((scheme) => `\t\t\t\t<string>${scheme}</string>`).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>LSRequiresIPhoneOS</key>`\n );\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && app.imagePicker?.camera !== void 0) {\n const anchor = '<uses-permission android:name=\"android.permission.INTERNET\" />';\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml\"\n );\n }\n rendered = rendered.replace(\n anchor,\n `${anchor}\n <uses-permission android:name=\"android.permission.CAMERA\" />`\n );\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\n \" </activity>\",\n ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map((scheme) => ` <data android:scheme=\"${scheme}\" />`).join(\"\\n\")}\n </intent-filter>\n </activity>`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = rendered.replace(\n /TARGETED_DEVICE_FAMILY = \"1,2\";/g,\n `TARGETED_DEVICE_FAMILY = \"${app.ios?.tablet ? \"1,2\" : \"1\"}\";`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /MARKETING_VERSION = [^;]+;/g,\n `MARKETING_VERSION = \"${app.version}\";`\n );\n }\n if (app.ios?.buildNumber !== void 0) {\n rendered = rendered.replace(\n /CURRENT_PROJECT_VERSION = [^;]+;/g,\n `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n if (app.ios?.usesNonExemptEncryption !== void 0) {\n rendered = rendered.replace(\n \"\t<key>LSRequiresIPhoneOS</key>\",\n `\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>\n\t<key>LSRequiresIPhoneOS</key>`\n );\n }\n if (app.imagePicker?.camera !== void 0) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist\"\n );\n }\n rendered = rendered.replace(\n anchor,\n `\t<key>NSCameraUsageDescription</key>\n\t<string>${escapeXml(app.imagePicker.camera)}</string>\n${anchor}`\n );\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && app.ios?.deploymentTarget) {\n rendered = rendered.replace(\n \"platform :ios, min_ios_version_supported\",\n `platform :ios, '${app.ios.deploymentTarget}'`\n ).replace(\n /IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g,\n `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`\n );\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\n \" )\\n end\\nend\",\n ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n if (app.ios?.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if (app.ios?.useFrameworks) {\n rendered = rendered.replace(\n /^(platform :ios, .+)$/m,\n `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`\n );\n }\n if (app.ios?.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /versionName \"[^\"]*\"/g,\n `versionName \"${app.version}\"`\n );\n }\n if (app.android?.versionCode !== void 0) {\n rendered = rendered.replace(\n /versionCode \\d+/g,\n `versionCode ${app.android.versionCode}`\n );\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n const hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([...rendered.matchAll(hardcodedGradlePlugin)].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(\n hardcodedGradlePlugin,\n `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`\n );\n }\n if (platform === \"android\" && app.android?.minSdk !== void 0) {\n rendered = rendered.replace(\n /minSdkVersion = \\d+/g,\n `minSdkVersion = ${app.android.minSdk}`\n );\n }\n }\n return { destRelativePath, content: rendered };\n}\nconst generateForPlatform = async (root, platform, app, outDir = path.resolve(root, platform)) => {\n validatePrebuildApp(app, platform);\n const dest = outDir;\n const require2 = module.createRequire(root + \"/\");\n const importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [root]\n });\n const src = path.join(\n path.dirname(\n require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [root]\n })\n ),\n platform\n );\n const walkModule = await import(pathToFileURL(importPath).href);\n const walkFn = walkModule?.default?.default ?? walkModule?.default ?? walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n const files = [...walkFn(src)].sort();\n FSExtra.removeSync(dest);\n for (const absoluteSrc of files) {\n const relativeFilePath = path.relative(src, absoluteSrc);\n const stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n const extension = path.extname(absoluteSrc);\n const raw = [\".png\", \".jar\", \".keystore\"].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n const { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n const destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), { recursive: true });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n await generateAppIcons({ root, dest, platform, app });\n await generateSplashScreen({ root, dest, platform, app });\n generateSceneDelegate({ dest, platform, app });\n};\nfunction applyAndroidDependencyPatches(args) {\n const { root, app, inventory } = args;\n if (!app.android || !inventory.some(\n (dependency) => dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\")\n )) {\n return;\n }\n const activityPath = path.join(\n root,\n \"android\",\n \"app\",\n \"src\",\n \"main\",\n \"java\",\n ...app.android.applicationId.split(\".\"),\n \"MainActivity.kt\"\n );\n const rendered = nativeProjectPatches.addReactNativeScreensFix(\n FSExtra.readFileSync(activityPath, \"utf8\")\n );\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n const require2 = module.createRequire(root + \"/\");\n const cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [root]\n });\n const cliConfig = await import(pathToFileURL(cliConfigPath).href);\n const config = await cliConfig.loadConfigAsync({ projectRoot: root });\n const inventory = [];\n for (const name of Object.keys(config.dependencies).sort()) {\n const dependency = config.dependencies[name];\n const depRoot = dependency.root;\n let version = \"unknown\";\n try {\n version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version ?? \"unknown\";\n } catch {\n }\n const platforms = Object.entries(dependency.platforms).filter(([, platformConfig]) => platformConfig !== null).map(([platform]) => platform).sort();\n if (platforms.length > 0) inventory.push({ name, version, platforms });\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n const { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\"install\", `--project-directory=${path.join(root, \"ios\")}`], {\n stdio: \"inherit\"\n });\n }\n}\nconst transformPath = (filePath) => {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;;AAOA,MAAM,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAChE,kCACF;AACA,MAAM,sBAAsB;AAC5B,MAAM,oBAAoB;CACxB,MAAM;CACN,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AACA,MAAM,yBAAyB;AAC/B,MAAM,8BAA8B;AACpC,MAAM,uBAAuB;AAC7B,SAAS,oBAAoB,SAAS;CACpC,IAAI,sBAAsB;CAC1B,MAAM,iBAAiB,QAAQ,QAC7B,wCACC,YAAY,qBAAqB;EAChC,IAAI;EACJ,IAAI;GACF,SAAS,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AAC,CAAC,KAAK,CAAC,cAAc,QAAQ,CAAC,CAAC,KAAK;EAClJ,IAAI,UAAU,SAAS,GAAG,UAAU,KAAK;GAAE;GAAM;GAAS;EAAU,CAAC;CACvE;CACA,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,MAAM,EAAE,MAAM,aAAa;CAC3B,IAAI,CAAC,YAAY,aAAa,OAAO;EACnC,aAAa,OAAO,CAAC,WAAW,uBAAuB,KAAK,KAAK,MAAM,KAAK,GAAG,GAAG,EAChF,OAAO,UACT,CAAC;CACH;AACF;AACA,MAAM,iBAAiB,aAAa;CAClC,OAAO,SAAS,QAAQ,SAAS,MAAM,CAAC,CAAC,QAAQ,cAAc,YAAY,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,YAAY,UAAU,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,gBAAgB,cAAc,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,mBAAmB,iBAAiB,CAAC,CAAC,QAAQ,cAAc,YAAY;AACviB"}
|
|
@@ -2,17 +2,12 @@ import { execFileSync } from "child_process";
|
|
|
2
2
|
import module from "module";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { pathToFileURL } from "url";
|
|
5
|
+
import { validateNativeApp } from "@vxrn/utils/nativeAppManifest";
|
|
5
6
|
import FSExtra from "fs-extra";
|
|
6
7
|
import sharp from "sharp";
|
|
7
8
|
|
|
8
9
|
var nativeProjectPatches = module.createRequire(import.meta.url)("../../native-project-patches.cjs");
|
|
9
|
-
var
|
|
10
|
-
var SCHEME = /^[a-z][a-z0-9+.-]*$/i;
|
|
11
|
-
var VERSION = /^\d+\.\d+\.\d+/;
|
|
12
|
-
var BUILD_NUMBER = /^[A-Za-z0-9.]+$/;
|
|
13
|
-
var REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/;
|
|
14
|
-
var DEPLOYMENT_TARGET = /^\d+\.\d+$/;
|
|
15
|
-
var HEX_COLOR = /^#[\da-f]{6}$/i;
|
|
10
|
+
var validatePrebuildApp = validateNativeApp;
|
|
16
11
|
var ANDROID_DENSITIES = {
|
|
17
12
|
mdpi: 1,
|
|
18
13
|
hdpi: 1.5,
|
|
@@ -50,6 +45,9 @@ function patchIosBundlePhase(project) {
|
|
|
50
45
|
}
|
|
51
46
|
return patchedProject;
|
|
52
47
|
}
|
|
48
|
+
function escapeXml(value) {
|
|
49
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
50
|
+
}
|
|
53
51
|
var SCENE_DELEGATE_FILE_REF_ID = "1A2B3C4D5E6F7A8B9C0D1E2F";
|
|
54
52
|
var SCENE_DELEGATE_BUILD_FILE_ID = "2B3C4D5E6F7A8B9C0D1E2F1A";
|
|
55
53
|
function renderSceneDelegateSwift(appName) {
|
|
@@ -236,73 +234,6 @@ function generateSceneDelegate(args) {
|
|
|
236
234
|
if (platform !== "ios") return;
|
|
237
235
|
FSExtra.writeFileSync(path.join(dest, app.name, "SceneDelegate.swift"), renderSceneDelegateSwift(app.name));
|
|
238
236
|
}
|
|
239
|
-
function fail(message) {
|
|
240
|
-
throw new Error(`[vxrn] invalid native.app: ${message}`);
|
|
241
|
-
}
|
|
242
|
-
function validatePrebuildApp(app, platform) {
|
|
243
|
-
if (!app || typeof app !== "object") fail("manifest must be an object");
|
|
244
|
-
if (!app.name || !TARGET_NAME.test(app.name)) {
|
|
245
|
-
fail(`name "${app === null || app === void 0 ? void 0 : app.name}" must start with a letter and contain only letters, digits, and underscore`);
|
|
246
|
-
}
|
|
247
|
-
var schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme];
|
|
248
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
249
|
-
try {
|
|
250
|
-
for (var _iterator = schemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
251
|
-
var scheme = _step.value;
|
|
252
|
-
if (typeof scheme !== "string" || !SCHEME.test(scheme)) {
|
|
253
|
-
fail(`scheme "${scheme}" must be a valid uri scheme`);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
} catch (err) {
|
|
257
|
-
_didIteratorError = true;
|
|
258
|
-
_iteratorError = err;
|
|
259
|
-
} finally {
|
|
260
|
-
try {
|
|
261
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
262
|
-
_iterator.return();
|
|
263
|
-
}
|
|
264
|
-
} finally {
|
|
265
|
-
if (_didIteratorError) {
|
|
266
|
-
throw _iteratorError;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
if (app.icon !== void 0 && (!app.icon.source || !HEX_COLOR.test(app.icon.backgroundColor))) {
|
|
271
|
-
fail("icon requires source and a six-digit hex backgroundColor");
|
|
272
|
-
}
|
|
273
|
-
if (app.splash !== void 0 && (!app.splash.source || !HEX_COLOR.test(app.splash.backgroundColor) || app.splash.width !== void 0 && (!Number.isFinite(app.splash.width) || app.splash.width < 1 || app.splash.width > 288))) {
|
|
274
|
-
fail("splash requires source, a six-digit hex backgroundColor, and width from 1 to 288");
|
|
275
|
-
}
|
|
276
|
-
if (app.version !== void 0 && !VERSION.test(app.version)) {
|
|
277
|
-
fail(`version "${app.version}" must start with major.minor.patch`);
|
|
278
|
-
}
|
|
279
|
-
if (!platform || platform === "ios") {
|
|
280
|
-
var _app_ios;
|
|
281
|
-
if (!((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.bundleId) || !REVERSE_DNS.test(app.ios.bundleId)) {
|
|
282
|
-
var _app_ios1;
|
|
283
|
-
fail(`ios.bundleId "${(_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.bundleId}" must be reverse-dns`);
|
|
284
|
-
}
|
|
285
|
-
if (app.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(app.ios.deploymentTarget)) {
|
|
286
|
-
fail(`ios.deploymentTarget "${app.ios.deploymentTarget}" must look like "17.0"`);
|
|
287
|
-
}
|
|
288
|
-
if (app.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(app.ios.buildNumber)) {
|
|
289
|
-
fail(`ios.buildNumber "${app.ios.buildNumber}" must contain only letters, digits, and dots`);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
if (!platform || platform === "android") {
|
|
293
|
-
var _app_android;
|
|
294
|
-
if (!((_app_android = app.android) === null || _app_android === void 0 ? void 0 : _app_android.applicationId) || !REVERSE_DNS.test(app.android.applicationId)) {
|
|
295
|
-
var _app_android1;
|
|
296
|
-
fail(`android.applicationId "${(_app_android1 = app.android) === null || _app_android1 === void 0 ? void 0 : _app_android1.applicationId}" must be reverse-dns`);
|
|
297
|
-
}
|
|
298
|
-
if (app.android.minSdk !== void 0 && (!Number.isInteger(app.android.minSdk) || app.android.minSdk < 21 || app.android.minSdk > 36)) {
|
|
299
|
-
fail(`android.minSdk "${app.android.minSdk}" must be an integer from 21 to 36`);
|
|
300
|
-
}
|
|
301
|
-
if (app.android.versionCode !== void 0 && (!Number.isInteger(app.android.versionCode) || app.android.versionCode < 1)) {
|
|
302
|
-
fail(`android.versionCode "${app.android.versionCode}" must be a positive integer`);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
237
|
async function generateAppIcons(args) {
|
|
307
238
|
var { root, dest, platform, app } = args;
|
|
308
239
|
if (!app.icon) return;
|
|
@@ -532,7 +463,7 @@ function renderPrebuildFile(args) {
|
|
|
532
463
|
destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());
|
|
533
464
|
var rendered = content;
|
|
534
465
|
if (rendered !== null) {
|
|
535
|
-
var _app_ios, _app_android;
|
|
466
|
+
var _app_imagePicker, _app_ios, _app_android;
|
|
536
467
|
var replacements = [];
|
|
537
468
|
if (platform === "ios" && app.ios) {
|
|
538
469
|
replacements.push([IOS_BUNDLE_PLACEHOLDER, app.ios.bundleId]);
|
|
@@ -576,6 +507,14 @@ ${schemes.map(function(scheme) {
|
|
|
576
507
|
</dict>
|
|
577
508
|
</array>
|
|
578
509
|
<key>LSRequiresIPhoneOS</key>`);
|
|
510
|
+
}
|
|
511
|
+
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && ((_app_imagePicker = app.imagePicker) === null || _app_imagePicker === void 0 ? void 0 : _app_imagePicker.camera) !== void 0) {
|
|
512
|
+
var anchor = "<uses-permission android:name=\"android.permission.INTERNET\" />";
|
|
513
|
+
if (!rendered.includes(anchor)) {
|
|
514
|
+
throw new Error("[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml");
|
|
515
|
+
}
|
|
516
|
+
rendered = rendered.replace(anchor, `${anchor}
|
|
517
|
+
<uses-permission android:name="android.permission.CAMERA" />`);
|
|
579
518
|
}
|
|
580
519
|
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && schemes.length) {
|
|
581
520
|
rendered = rendered.replace(" </activity>", ` <intent-filter>
|
|
@@ -602,11 +541,20 @@ ${schemes.map(function(scheme) {
|
|
|
602
541
|
}
|
|
603
542
|
}
|
|
604
543
|
if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
|
|
605
|
-
var _app_ios3;
|
|
544
|
+
var _app_ios3, _app_imagePicker1;
|
|
606
545
|
if (((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.usesNonExemptEncryption) !== void 0) {
|
|
607
546
|
rendered = rendered.replace(" <key>LSRequiresIPhoneOS</key>", ` <key>ITSAppUsesNonExemptEncryption</key>
|
|
608
547
|
<${app.ios.usesNonExemptEncryption ? "true" : "false"}/>
|
|
609
548
|
<key>LSRequiresIPhoneOS</key>`);
|
|
549
|
+
}
|
|
550
|
+
if (((_app_imagePicker1 = app.imagePicker) === null || _app_imagePicker1 === void 0 ? void 0 : _app_imagePicker1.camera) !== void 0) {
|
|
551
|
+
var anchor1 = " <key>LSRequiresIPhoneOS</key>";
|
|
552
|
+
if (!rendered.includes(anchor1)) {
|
|
553
|
+
throw new Error("[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist");
|
|
554
|
+
}
|
|
555
|
+
rendered = rendered.replace(anchor1, ` <key>NSCameraUsageDescription</key>
|
|
556
|
+
<string>${escapeXml(app.imagePicker.camera)}</string>
|
|
557
|
+
${anchor1}`);
|
|
610
558
|
}
|
|
611
559
|
rendered = patchIosInfoPlistSceneManifest(rendered);
|
|
612
560
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.native.js","names":[],"sources":["exports/prebuildWithoutExpo.native.js"],"sourcesContent":["import { execFileSync } from \"child_process\";\nimport module from \"module\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nvar nativeProjectPatches = module.createRequire(import.meta.url)(\"../../native-project-patches.cjs\");\nvar TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;\nvar SCHEME = /^[a-z][a-z0-9+.-]*$/i;\nvar VERSION = /^\\d+\\.\\d+\\.\\d+/;\nvar BUILD_NUMBER = /^[A-Za-z0-9.]+$/;\nvar REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\\.[A-Za-z][A-Za-z0-9-]*)+$/;\nvar DEPLOYMENT_TARGET = /^\\d+\\.\\d+$/;\nvar HEX_COLOR = /^#[\\da-f]{6}$/i;\nvar ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nvar IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nvar ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nvar ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n var patchedBundlePhases = 0;\n var patchedProject = project.replace(/shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g, function(assignment, serializedScript) {\n var script;\n try {\n script = JSON.parse(serializedScript);\n } catch (unused) {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n var patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n });\n if (patchedBundlePhases !== 1) {\n throw new Error(`[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`);\n }\n return patchedProject;\n}\nvar SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nvar SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n var anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n var lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n var anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(anchor, `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`);\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n var anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\");\n }\n return rendered.replace(anchor, `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`);\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n var edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n var patched = rendered;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = edits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [anchor, insertion] = _step.value;\n var next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(`[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`);\n }\n patched = next;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n var { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(path.join(dest, app.name, \"SceneDelegate.swift\"), renderSceneDelegateSwift(app.name));\n}\nfunction fail(message) {\n throw new Error(`[vxrn] invalid native.app: ${message}`);\n}\nfunction validatePrebuildApp(app, platform) {\n if (!app || typeof app !== \"object\") fail(\"manifest must be an object\");\n if (!app.name || !TARGET_NAME.test(app.name)) {\n fail(`name \"${app === null || app === void 0 ? void 0 : app.name}\" must start with a letter and contain only letters, digits, and underscore`);\n }\n var schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [\n app.scheme\n ];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = schemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var scheme = _step.value;\n if (typeof scheme !== \"string\" || !SCHEME.test(scheme)) {\n fail(`scheme \"${scheme}\" must be a valid uri scheme`);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (app.icon !== void 0 && (!app.icon.source || !HEX_COLOR.test(app.icon.backgroundColor))) {\n fail(\"icon requires source and a six-digit hex backgroundColor\");\n }\n if (app.splash !== void 0 && (!app.splash.source || !HEX_COLOR.test(app.splash.backgroundColor) || app.splash.width !== void 0 && (!Number.isFinite(app.splash.width) || app.splash.width < 1 || app.splash.width > 288))) {\n fail(\"splash requires source, a six-digit hex backgroundColor, and width from 1 to 288\");\n }\n if (app.version !== void 0 && !VERSION.test(app.version)) {\n fail(`version \"${app.version}\" must start with major.minor.patch`);\n }\n if (!platform || platform === \"ios\") {\n var _app_ios;\n if (!((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.bundleId) || !REVERSE_DNS.test(app.ios.bundleId)) {\n var _app_ios1;\n fail(`ios.bundleId \"${(_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.bundleId}\" must be reverse-dns`);\n }\n if (app.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(app.ios.deploymentTarget)) {\n fail(`ios.deploymentTarget \"${app.ios.deploymentTarget}\" must look like \"17.0\"`);\n }\n if (app.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(app.ios.buildNumber)) {\n fail(`ios.buildNumber \"${app.ios.buildNumber}\" must contain only letters, digits, and dots`);\n }\n }\n if (!platform || platform === \"android\") {\n var _app_android;\n if (!((_app_android = app.android) === null || _app_android === void 0 ? void 0 : _app_android.applicationId) || !REVERSE_DNS.test(app.android.applicationId)) {\n var _app_android1;\n fail(`android.applicationId \"${(_app_android1 = app.android) === null || _app_android1 === void 0 ? void 0 : _app_android1.applicationId}\" must be reverse-dns`);\n }\n if (app.android.minSdk !== void 0 && (!Number.isInteger(app.android.minSdk) || app.android.minSdk < 21 || app.android.minSdk > 36)) {\n fail(`android.minSdk \"${app.android.minSdk}\" must be an integer from 21 to 36`);\n }\n if (app.android.versionCode !== void 0 && (!Number.isInteger(app.android.versionCode) || app.android.versionCode < 1)) {\n fail(`android.versionCode \"${app.android.versionCode}\" must be a positive integer`);\n }\n }\n}\nasync function generateAppIcons(args) {\n var { root, dest, platform, app } = args;\n if (!app.icon) return;\n var source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n var metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\"[vxrn] native.app.icon source must be a square image at least 1024px wide\");\n }\n if (platform === \"ios\") {\n var iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n var contentsPath = path.join(iconDir, \"Contents.json\");\n var contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = contents.images[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var image = _step.value;\n var points = Number.parseFloat(image.size.split(\"x\")[0]);\n var scale = Number.parseInt(image.scale, 10);\n var pixels = points * scale;\n var filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir, filename));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var [density, multiplier] = _step1.value;\n var pixels1 = 48 * multiplier;\n var iconDir1 = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (var _i = 0, _iter = [\n \"ic_launcher.png\",\n \"ic_launcher_round.png\"\n ]; _i < _iter.length; _i++) {\n var filename1 = _iter[_i];\n await sharp(source).rotate().resize(pixels1, pixels1, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir1, filename1));\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n}\nasync function generateSplashScreen(args) {\n var _app_splash_width;\n var { root, dest, platform, app } = args;\n if (!app.splash) return;\n var source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n var { data: artwork, info: metadata } = await sharp(source).rotate().trim({\n background: app.splash.backgroundColor\n }).png().toBuffer({\n resolveWithObject: true\n });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n var artworkWidth = (_app_splash_width = app.splash.width) !== null && _app_splash_width !== void 0 ? _app_splash_width : 200;\n var artworkHeight = Number((artworkWidth * (metadata.height / metadata.width)).toFixed(3));\n if (platform === \"ios\") {\n var appDir = path.join(dest, app.name);\n var splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, {\n recursive: true\n });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(path.join(splashDir, \"Contents.json\"), `${JSON.stringify({\n images: [\n {\n filename: \"splash.png\",\n idiom: \"universal\",\n scale: \"1x\"\n }\n ],\n info: {\n author: \"xcode\",\n version: 1\n }\n }, null, 2)}\n`);\n var red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n var green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n var blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(path.join(appDir, \"LaunchScreen.storyboard\"), `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`);\n return;\n }\n var mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n var drawable = path.join(mainRes, \"drawable\");\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [density, multiplier] = _step.value;\n var canvasSize = 288 * multiplier;\n var imageSize = Math.round(artworkWidth * multiplier);\n var contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }).png().toBuffer();\n var drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, {\n recursive: true\n });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(path.join(drawable, \"launch_screen.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`);\n FSExtra.writeFileSync(path.join(mainRes, \"values\", \"colors.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`);\n var stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n var styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\" <!-- Customize your theme here. -->\", ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>');\n FSExtra.writeFileSync(stylesPath, styles);\n var stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, {\n recursive: true\n });\n FSExtra.writeFileSync(path.join(stylesV31, \"styles.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`);\n}\nfunction renderPrebuildFile(args) {\n var { relativePath, content, platform, app } = args;\n var appName = app.name;\n var schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [\n app.scheme\n ];\n var destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n var packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n var rendered = content;\n if (rendered !== null) {\n var _app_ios, _app_android;\n var replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([\n IOS_BUNDLE_PLACEHOLDER,\n app.ios.bundleId\n ]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([\n ANDROID_PACKAGE_PLACEHOLDER,\n app.android.applicationId\n ]);\n }\n replacements.push([\n \"Hello App Display Name\",\n app.displayName || appName\n ], [\n \"HelloWorld\",\n appName\n ], [\n \"helloworld\",\n appName.toLowerCase()\n ]);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = replacements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [find, value] = _step.value;\n rendered = rendered.split(find).join(value);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\") && schemes.length) {\n rendered = rendered.replace(\"\t<key>LSRequiresIPhoneOS</key>\", `\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map(function(scheme) {\n return `\t\t\t\t<string>${scheme}</string>`;\n }).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>LSRequiresIPhoneOS</key>`);\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\" </activity>\", ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map(function(scheme) {\n return ` <data android:scheme=\"${scheme}\" />`;\n }).join(\"\\n\")}\n </intent-filter>\n </activity>`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios1;\n rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = \"1,2\";/g, `TARGETED_DEVICE_FAMILY = \"${((_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.tablet) ? \"1,2\" : \"1\"}\";`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios2;\n if (app.version !== void 0) {\n rendered = rendered.replace(/MARKETING_VERSION = [^;]+;/g, `MARKETING_VERSION = \"${app.version}\";`);\n }\n if (((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.buildNumber) !== void 0) {\n rendered = rendered.replace(/CURRENT_PROJECT_VERSION = [^;]+;/g, `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n var _app_ios3;\n if (((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.usesNonExemptEncryption) !== void 0) {\n rendered = rendered.replace(\"\t<key>LSRequiresIPhoneOS</key>\", `\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>\n\t<key>LSRequiresIPhoneOS</key>`);\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && ((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.deploymentTarget)) {\n rendered = rendered.replace(\"platform :ios, min_ios_version_supported\", `platform :ios, '${app.ios.deploymentTarget}'`).replace(/IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g, `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`);\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\" )\\n end\\nend\", ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n var _app_ios4, _app_ios5, _app_ios6;\n if ((_app_ios4 = app.ios) === null || _app_ios4 === void 0 ? void 0 : _app_ios4.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if ((_app_ios5 = app.ios) === null || _app_ios5 === void 0 ? void 0 : _app_ios5.useFrameworks) {\n rendered = rendered.replace(/^(platform :ios, .+)$/m, `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`);\n }\n if ((_app_ios6 = app.ios) === null || _app_ios6 === void 0 ? void 0 : _app_ios6.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n var _app_android1;\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(/versionName \"[^\"]*\"/g, `versionName \"${app.version}\"`);\n }\n if (((_app_android1 = app.android) === null || _app_android1 === void 0 ? void 0 : _app_android1.versionCode) !== void 0) {\n rendered = rendered.replace(/versionCode \\d+/g, `versionCode ${app.android.versionCode}`);\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n var hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([\n ...rendered.matchAll(hardcodedGradlePlugin)\n ].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(hardcodedGradlePlugin, `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`);\n }\n if (platform === \"android\" && ((_app_android = app.android) === null || _app_android === void 0 ? void 0 : _app_android.minSdk) !== void 0) {\n rendered = rendered.replace(/minSdkVersion = \\d+/g, `minSdkVersion = ${app.android.minSdk}`);\n }\n }\n return {\n destRelativePath,\n content: rendered\n };\n}\nvar generateForPlatform = async function(root, platform, app) {\n var outDir = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : path.resolve(root, platform);\n var _ref, _ref1;\n var _walkModule_default;\n validatePrebuildApp(app, platform);\n var dest = outDir;\n var require2 = module.createRequire(root + \"/\");\n var importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [\n root\n ]\n });\n var src = path.join(path.dirname(require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [\n root\n ]\n })), platform);\n var walkModule = await import(pathToFileURL(importPath).href);\n var walkFn = (_ref = (_ref1 = walkModule === null || walkModule === void 0 ? void 0 : (_walkModule_default = walkModule.default) === null || _walkModule_default === void 0 ? void 0 : _walkModule_default.default) !== null && _ref1 !== void 0 ? _ref1 : walkModule === null || walkModule === void 0 ? void 0 : walkModule.default) !== null && _ref !== void 0 ? _ref : walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n var files = [\n ...walkFn(src)\n ].sort();\n FSExtra.removeSync(dest);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var absoluteSrc = _step.value;\n var relativeFilePath = path.relative(src, absoluteSrc);\n var stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n var extension = path.extname(absoluteSrc);\n var raw = [\n \".png\",\n \".jar\",\n \".keystore\"\n ].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n var { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n var destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), {\n recursive: true\n });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n await generateAppIcons({\n root,\n dest,\n platform,\n app\n });\n await generateSplashScreen({\n root,\n dest,\n platform,\n app\n });\n generateSceneDelegate({\n dest,\n platform,\n app\n });\n};\nfunction applyAndroidDependencyPatches(args) {\n var { root, app, inventory } = args;\n if (!app.android || !inventory.some(function(dependency) {\n return dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\");\n })) {\n return;\n }\n var activityPath = path.join(root, \"android\", \"app\", \"src\", \"main\", \"java\", ...app.android.applicationId.split(\".\"), \"MainActivity.kt\");\n var rendered = nativeProjectPatches.addReactNativeScreensFix(FSExtra.readFileSync(activityPath, \"utf8\"));\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n var require2 = module.createRequire(root + \"/\");\n var cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [\n root\n ]\n });\n var cliConfig = await import(pathToFileURL(cliConfigPath).href);\n var config = await cliConfig.loadConfigAsync({\n projectRoot: root\n });\n var inventory = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.keys(config.dependencies).sort()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n var dependency = config.dependencies[name];\n var depRoot = dependency.root;\n var version = \"unknown\";\n try {\n var _JSON_parse_version;\n version = (_JSON_parse_version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version) !== null && _JSON_parse_version !== void 0 ? _JSON_parse_version : \"unknown\";\n } catch (unused) {\n }\n var platforms = Object.entries(dependency.platforms).filter(function(param) {\n var [, platformConfig] = param;\n return platformConfig !== null;\n }).map(function(param) {\n var [platform] = param;\n return platform;\n }).sort();\n if (platforms.length > 0) inventory.push({\n name,\n version,\n platforms\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n var { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\n \"install\",\n `--project-directory=${path.join(root, \"ios\")}`\n ], {\n stdio: \"inherit\"\n });\n }\n}\nvar transformPath = function(filePath) {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;AAMA,IAAI,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAAC,kCAAkC;AACnG,IAAI,cAAc;AAClB,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,e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AC,CAAC,CAAC,IAAI,SAAS,OAAO;IACrB,IAAI,CAAC,YAAY;IACjB,OAAO;GACT,CAAC,CAAC,CAAC,KAAK;GACR,IAAI,UAAU,SAAS,GAAG,UAAU,KAAK;IACvC;IACA;IACA;GACF,CAAC;EACH;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,IAAI,EAAE,MAAM,aAAa;CACzB,IAAI,CAAC,YAAY,aAAa,OAAO;EACnC,aAAa,OAAO,CAClB,WACA,uBAAuB,KAAK,KAAK,MAAM,KAAK,GAC9C,GAAG,EACD,OAAO,UACT,CAAC;CACH;AACF;AACA,IAAI,gBAAgB,SAAS,UAAU;CACrC,OAAO,SAAS,QAAQ,SAAS,MAAM,CAAC,CAAC,QAAQ,cAAc,YAAY,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,YAAY,UAAU,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,gBAAgB,cAAc,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,mBAAmB,iBAAiB,CAAC,CAAC,QAAQ,cAAc,YAAY;AACviB"}
|
|
1
|
+
{"version":3,"file":"prebuildWithoutExpo.native.js","names":[],"sources":["exports/prebuildWithoutExpo.native.js"],"sourcesContent":["import { execFileSync } from \"child_process\";\nimport module from \"module\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { validateNativeApp } from \"@vxrn/utils/nativeAppManifest\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nvar nativeProjectPatches = module.createRequire(import.meta.url)(\"../../native-project-patches.cjs\");\nvar validatePrebuildApp = validateNativeApp;\nvar ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nvar IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nvar ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nvar ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n var patchedBundlePhases = 0;\n var patchedProject = project.replace(/shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g, function(assignment, serializedScript) {\n var script;\n try {\n script = JSON.parse(serializedScript);\n } catch (unused) {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n var patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n });\n if (patchedBundlePhases !== 1) {\n throw new Error(`[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`);\n }\n return patchedProject;\n}\nfunction escapeXml(value) {\n return value.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n}\nvar SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nvar SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n var anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n var lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n var anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(anchor, `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`);\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n var anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\");\n }\n return rendered.replace(anchor, `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`);\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n var edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n var patched = rendered;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = edits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [anchor, insertion] = _step.value;\n var next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(`[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`);\n }\n patched = next;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n var { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(path.join(dest, app.name, \"SceneDelegate.swift\"), renderSceneDelegateSwift(app.name));\n}\nasync function generateAppIcons(args) {\n var { root, dest, platform, app } = args;\n if (!app.icon) return;\n var source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n var metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\"[vxrn] native.app.icon source must be a square image at least 1024px wide\");\n }\n if (platform === \"ios\") {\n var iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n var contentsPath = path.join(iconDir, \"Contents.json\");\n var contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = contents.images[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var image = _step.value;\n var points = Number.parseFloat(image.size.split(\"x\")[0]);\n var scale = Number.parseInt(image.scale, 10);\n var pixels = points * scale;\n var filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir, filename));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var [density, multiplier] = _step1.value;\n var pixels1 = 48 * multiplier;\n var iconDir1 = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (var _i = 0, _iter = [\n \"ic_launcher.png\",\n \"ic_launcher_round.png\"\n ]; _i < _iter.length; _i++) {\n var filename1 = _iter[_i];\n await sharp(source).rotate().resize(pixels1, pixels1, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir1, filename1));\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n}\nasync function generateSplashScreen(args) {\n var _app_splash_width;\n var { root, dest, platform, app } = args;\n if (!app.splash) return;\n var source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n var { data: artwork, info: metadata } = await sharp(source).rotate().trim({\n background: app.splash.backgroundColor\n }).png().toBuffer({\n resolveWithObject: true\n });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n var artworkWidth = (_app_splash_width = app.splash.width) !== null && _app_splash_width !== void 0 ? _app_splash_width : 200;\n var artworkHeight = Number((artworkWidth * (metadata.height / metadata.width)).toFixed(3));\n if (platform === \"ios\") {\n var appDir = path.join(dest, app.name);\n var splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, {\n recursive: true\n });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(path.join(splashDir, \"Contents.json\"), `${JSON.stringify({\n images: [\n {\n filename: \"splash.png\",\n idiom: \"universal\",\n scale: \"1x\"\n }\n ],\n info: {\n author: \"xcode\",\n version: 1\n }\n }, null, 2)}\n`);\n var red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n var green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n var blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(path.join(appDir, \"LaunchScreen.storyboard\"), `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`);\n return;\n }\n var mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n var drawable = path.join(mainRes, \"drawable\");\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [density, multiplier] = _step.value;\n var canvasSize = 288 * multiplier;\n var imageSize = Math.round(artworkWidth * multiplier);\n var contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }).png().toBuffer();\n var drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, {\n recursive: true\n });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(path.join(drawable, \"launch_screen.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`);\n FSExtra.writeFileSync(path.join(mainRes, \"values\", \"colors.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`);\n var stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n var styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\" <!-- Customize your theme here. -->\", ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>');\n FSExtra.writeFileSync(stylesPath, styles);\n var stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, {\n recursive: true\n });\n FSExtra.writeFileSync(path.join(stylesV31, \"styles.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`);\n}\nfunction renderPrebuildFile(args) {\n var { relativePath, content, platform, app } = args;\n var appName = app.name;\n var schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [\n app.scheme\n ];\n var destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n var packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n var rendered = content;\n if (rendered !== null) {\n var _app_imagePicker, _app_ios, _app_android;\n var replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([\n IOS_BUNDLE_PLACEHOLDER,\n app.ios.bundleId\n ]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([\n ANDROID_PACKAGE_PLACEHOLDER,\n app.android.applicationId\n ]);\n }\n replacements.push([\n \"Hello App Display Name\",\n app.displayName || appName\n ], [\n \"HelloWorld\",\n appName\n ], [\n \"helloworld\",\n appName.toLowerCase()\n ]);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = replacements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [find, value] = _step.value;\n rendered = rendered.split(find).join(value);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\") && schemes.length) {\n rendered = rendered.replace(\"\t<key>LSRequiresIPhoneOS</key>\", `\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map(function(scheme) {\n return `\t\t\t\t<string>${scheme}</string>`;\n }).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>LSRequiresIPhoneOS</key>`);\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && ((_app_imagePicker = app.imagePicker) === null || _app_imagePicker === void 0 ? void 0 : _app_imagePicker.camera) !== void 0) {\n var anchor = '<uses-permission android:name=\"android.permission.INTERNET\" />';\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml\");\n }\n rendered = rendered.replace(anchor, `${anchor}\n <uses-permission android:name=\"android.permission.CAMERA\" />`);\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\" </activity>\", ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map(function(scheme) {\n return ` <data android:scheme=\"${scheme}\" />`;\n }).join(\"\\n\")}\n </intent-filter>\n </activity>`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios1;\n rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = \"1,2\";/g, `TARGETED_DEVICE_FAMILY = \"${((_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.tablet) ? \"1,2\" : \"1\"}\";`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios2;\n if (app.version !== void 0) {\n rendered = rendered.replace(/MARKETING_VERSION = [^;]+;/g, `MARKETING_VERSION = \"${app.version}\";`);\n }\n if (((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.buildNumber) !== void 0) {\n rendered = rendered.replace(/CURRENT_PROJECT_VERSION = [^;]+;/g, `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n var _app_ios3, _app_imagePicker1;\n if (((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.usesNonExemptEncryption) !== void 0) {\n rendered = rendered.replace(\"\t<key>LSRequiresIPhoneOS</key>\", `\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>\n\t<key>LSRequiresIPhoneOS</key>`);\n }\n if (((_app_imagePicker1 = app.imagePicker) === null || _app_imagePicker1 === void 0 ? void 0 : _app_imagePicker1.camera) !== void 0) {\n var anchor1 = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor1)) {\n throw new Error(\"[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist\");\n }\n rendered = rendered.replace(anchor1, `\t<key>NSCameraUsageDescription</key>\n\t<string>${escapeXml(app.imagePicker.camera)}</string>\n${anchor1}`);\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && ((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.deploymentTarget)) {\n rendered = rendered.replace(\"platform :ios, min_ios_version_supported\", `platform :ios, '${app.ios.deploymentTarget}'`).replace(/IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g, `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`);\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\" )\\n end\\nend\", ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n var _app_ios4, _app_ios5, _app_ios6;\n if ((_app_ios4 = app.ios) === null || _app_ios4 === void 0 ? void 0 : _app_ios4.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if ((_app_ios5 = app.ios) === null || _app_ios5 === void 0 ? void 0 : _app_ios5.useFrameworks) {\n rendered = rendered.replace(/^(platform :ios, .+)$/m, `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`);\n }\n if ((_app_ios6 = app.ios) === null || _app_ios6 === void 0 ? void 0 : _app_ios6.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n var _app_android1;\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(/versionName \"[^\"]*\"/g, `versionName \"${app.version}\"`);\n }\n if (((_app_android1 = app.android) === null || _app_android1 === void 0 ? void 0 : _app_android1.versionCode) !== void 0) {\n rendered = rendered.replace(/versionCode \\d+/g, `versionCode ${app.android.versionCode}`);\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n var hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([\n ...rendered.matchAll(hardcodedGradlePlugin)\n ].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(hardcodedGradlePlugin, `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`);\n }\n if (platform === \"android\" && ((_app_android = app.android) === null || _app_android === void 0 ? void 0 : _app_android.minSdk) !== void 0) {\n rendered = rendered.replace(/minSdkVersion = \\d+/g, `minSdkVersion = ${app.android.minSdk}`);\n }\n }\n return {\n destRelativePath,\n content: rendered\n };\n}\nvar generateForPlatform = async function(root, platform, app) {\n var outDir = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : path.resolve(root, platform);\n var _ref, _ref1;\n var _walkModule_default;\n validatePrebuildApp(app, platform);\n var dest = outDir;\n var require2 = module.createRequire(root + \"/\");\n var importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [\n root\n ]\n });\n var src = path.join(path.dirname(require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [\n root\n ]\n })), platform);\n var walkModule = await import(pathToFileURL(importPath).href);\n var walkFn = (_ref = (_ref1 = walkModule === null || walkModule === void 0 ? void 0 : (_walkModule_default = walkModule.default) === null || _walkModule_default === void 0 ? void 0 : _walkModule_default.default) !== null && _ref1 !== void 0 ? _ref1 : walkModule === null || walkModule === void 0 ? void 0 : walkModule.default) !== null && _ref !== void 0 ? _ref : walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n var files = [\n ...walkFn(src)\n ].sort();\n FSExtra.removeSync(dest);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var absoluteSrc = _step.value;\n var relativeFilePath = path.relative(src, absoluteSrc);\n var stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n var extension = path.extname(absoluteSrc);\n var raw = [\n \".png\",\n \".jar\",\n \".keystore\"\n ].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n var { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n var destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), {\n recursive: true\n });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n await generateAppIcons({\n root,\n dest,\n platform,\n app\n });\n await generateSplashScreen({\n root,\n dest,\n platform,\n app\n });\n generateSceneDelegate({\n dest,\n platform,\n app\n });\n};\nfunction applyAndroidDependencyPatches(args) {\n var { root, app, inventory } = args;\n if (!app.android || !inventory.some(function(dependency) {\n return dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\");\n })) {\n return;\n }\n var activityPath = path.join(root, \"android\", \"app\", \"src\", \"main\", \"java\", ...app.android.applicationId.split(\".\"), \"MainActivity.kt\");\n var rendered = nativeProjectPatches.addReactNativeScreensFix(FSExtra.readFileSync(activityPath, \"utf8\"));\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n var require2 = module.createRequire(root + \"/\");\n var cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [\n root\n ]\n });\n var cliConfig = await import(pathToFileURL(cliConfigPath).href);\n var config = await cliConfig.loadConfigAsync({\n projectRoot: root\n });\n var inventory = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.keys(config.dependencies).sort()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n var dependency = config.dependencies[name];\n var depRoot = dependency.root;\n var version = \"unknown\";\n try {\n var _JSON_parse_version;\n version = (_JSON_parse_version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version) !== null && _JSON_parse_version !== void 0 ? _JSON_parse_version : \"unknown\";\n } catch (unused) {\n }\n var platforms = Object.entries(dependency.platforms).filter(function(param) {\n var [, platformConfig] = param;\n return platformConfig !== null;\n }).map(function(param) {\n var [platform] = param;\n return platform;\n }).sort();\n if (platforms.length > 0) inventory.push({\n name,\n version,\n platforms\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n var { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\n \"install\",\n `--project-directory=${path.join(root, \"ios\")}`\n ], {\n stdio: \"inherit\"\n });\n }\n}\nvar transformPath = function(filePath) {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAAC,kCAAkC;AACnG,IAAI,sBAAsB;AAC1B,IAAI,oBAAoB;CACtB,MAAM;CACN,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AACA,IAAI,yBAAyB;AAC7B,IAAI,8BAA8B;AAClC,IAAI,uBAAuB;AAC3B,SAAS,oBAAoB,SAAS;CACpC,IAAI,sBAAsB;CAC1B,IAAI,iBAAiB,QAAQ,QAAQ,uCAAuC,SAAS,YAAY,kBAAkB;EACjH,IAAI;EACJ,IAAI;GACF,SAAS,KAAK,MAAM,gBAAgB;EACtC,SAAS,QAAQ;GACf,OAAO;EACT;EACA,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,uBAAuB,GAAG;GAC3E,OAAO;EACT;EACA,IAAI,UAAU;EACd,UAAU,qBAAqB,4CAA4C,OAAO;EAClF,UAAU,qBAAqB,4CAA4C,OAAO;EAClF,UAAU,qBAAqB,2CAA2C,OAAO;EACjF,IAAI,CAAC,QAAQ,SAAS,+CAA+C,KAAK,CAAC,QAAQ,SAAS,sCAAsC,KAAK,CAAC,QAAQ,SAAS,uCAAuC,GAAG;GACjM,MAAM,IAAI,MAAM,0DAA0D;EAC5E;EACA;EACA,OAAO,iBAAiB,KAAK,UAAU,OAAO,EAAE;CAClD,CAAC;CACD,IAAI,wBAAwB,GAAG;EAC7B,MAAM,IAAI,MAAM,4DAA4D,qBAAqB;CACnG;CACA,OAAO;AACT;AACA,SAAS,UAAU,OAAO;CACxB,OAAO,MAAM,QAAQ,MAAM,OAAO,CAAC,CAAC,QAAQ,MAAM,MAAM,CAAC,CAAC,QAAQ,MAAM,MAAM;AAChF;AACA,IAAI,6BAA6B;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;AACA,IAAI,gBAAgB,SAAS,UAAU;CACrC,OAAO,SAAS,QAAQ,SAAS,MAAM,CAAC,CAAC,QAAQ,cAAc,YAAY,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,YAAY,UAAU,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,gBAAgB,cAAc,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,mBAAmB,iBAAiB,CAAC,CAAC,QAAQ,cAAc,YAAY;AACviB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxrn",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.61.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
"@react-native/codegen": "^0.87.1",
|
|
65
65
|
"@react-native-community/cli-config": "^20.2.0",
|
|
66
66
|
"@react-native/dev-middleware": "^0.87.1",
|
|
67
|
-
"@vxrn/compiler": "2.0.0-beta.
|
|
68
|
-
"@vxrn/debug": "2.0.0-beta.
|
|
69
|
-
"@vxrn/query-string": "2.0.0-beta.
|
|
70
|
-
"@vxrn/resolve": "2.0.0-beta.
|
|
71
|
-
"@vxrn/safe-area": "2.0.0-beta.
|
|
72
|
-
"@vxrn/url-parse": "2.0.0-beta.
|
|
73
|
-
"@vxrn/utils": "2.0.0-beta.
|
|
74
|
-
"@vxrn/vendor": "2.0.0-beta.
|
|
75
|
-
"@vxrn/vite-flow": "2.0.0-beta.
|
|
76
|
-
"@vxrn/vite-plugin-metro": "2.0.0-beta.
|
|
67
|
+
"@vxrn/compiler": "2.0.0-beta.61.1",
|
|
68
|
+
"@vxrn/debug": "2.0.0-beta.61.1",
|
|
69
|
+
"@vxrn/query-string": "2.0.0-beta.61.1",
|
|
70
|
+
"@vxrn/resolve": "2.0.0-beta.61.1",
|
|
71
|
+
"@vxrn/safe-area": "2.0.0-beta.61.1",
|
|
72
|
+
"@vxrn/url-parse": "2.0.0-beta.61.1",
|
|
73
|
+
"@vxrn/utils": "2.0.0-beta.61.1",
|
|
74
|
+
"@vxrn/vendor": "2.0.0-beta.61.1",
|
|
75
|
+
"@vxrn/vite-flow": "2.0.0-beta.61.1",
|
|
76
|
+
"@vxrn/vite-plugin-metro": "2.0.0-beta.61.1",
|
|
77
77
|
"citty": "^0.1.6",
|
|
78
78
|
"dotenv": "^17.2.1",
|
|
79
79
|
"dotenv-expand": "^12.0.2",
|
|
@@ -27,6 +27,7 @@ const app = {
|
|
|
27
27
|
name: 'MyApp',
|
|
28
28
|
displayName: 'My App',
|
|
29
29
|
scheme: ['myapp', 'myapp-dev'],
|
|
30
|
+
imagePicker: { camera: 'Capture photos & videos' },
|
|
30
31
|
ios: {
|
|
31
32
|
bundleId: 'dev.one.myapp',
|
|
32
33
|
tablet: true,
|
|
@@ -40,18 +41,13 @@ const app = {
|
|
|
40
41
|
} satisfies PrebuildAppConfig
|
|
41
42
|
|
|
42
43
|
describe('native.app prebuild validation', () => {
|
|
43
|
-
|
|
44
|
+
// smoke for the shared definition re-export; the full cases live beside
|
|
45
|
+
// the canonical definition in @vxrn/utils.
|
|
46
|
+
it('accepts a valid manifest and rejects invalid ones before writing', () => {
|
|
44
47
|
expect(() => validatePrebuildApp(app)).not.toThrow()
|
|
45
48
|
expect(() => validatePrebuildApp(app, 'ios')).not.toThrow()
|
|
46
49
|
expect(() => validatePrebuildApp(app, 'android')).not.toThrow()
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
it('rejects invalid target names and missing platform ids before writing', () => {
|
|
50
50
|
expect(() => validatePrebuildApp({} as any)).toThrow(/name/)
|
|
51
|
-
expect(() => validatePrebuildApp({ name: 'my-app' } as any)).toThrow(/name/)
|
|
52
|
-
expect(() => validatePrebuildApp({ ...app, scheme: 'not a scheme' })).toThrow(
|
|
53
|
-
/scheme/
|
|
54
|
-
)
|
|
55
51
|
expect(() => validatePrebuildApp({ name: 'MyApp' } as any)).toThrow(/bundleId/)
|
|
56
52
|
expect(() =>
|
|
57
53
|
validatePrebuildApp({ name: 'MyApp', android: app.android } as any)
|
|
@@ -112,6 +108,9 @@ describe('native.app prebuild validation', () => {
|
|
|
112
108
|
splash: { source: './splash.png', backgroundColor: '#000000', width: 289 },
|
|
113
109
|
})
|
|
114
110
|
).toThrow(/splash/)
|
|
111
|
+
expect(() =>
|
|
112
|
+
validatePrebuildApp({ ...app, imagePicker: { camera: '' } })
|
|
113
|
+
).toThrow(/imagePicker\.camera/)
|
|
115
114
|
// platform-scoped: android-only skips the ios requirement and vice versa
|
|
116
115
|
expect(() =>
|
|
117
116
|
validatePrebuildApp({ name: 'MyApp', android: app.android } as any, 'android')
|
|
@@ -176,13 +175,19 @@ ${APP_DELEGATE_PBXPROJ}`,
|
|
|
176
175
|
expect(infoPlist.content).toContain('<string>myapp-dev</string>')
|
|
177
176
|
expect(infoPlist.content).toContain('<key>ITSAppUsesNonExemptEncryption</key>')
|
|
178
177
|
expect(infoPlist.content).toContain('<false/>')
|
|
178
|
+
expect(infoPlist.content).toContain('<key>NSCameraUsageDescription</key>')
|
|
179
|
+
expect(infoPlist.content).toContain('<string>Capture photos & videos</string>')
|
|
179
180
|
|
|
180
181
|
const androidManifest = renderPrebuildFile({
|
|
181
182
|
relativePath: 'app/src/main/AndroidManifest.xml',
|
|
182
|
-
content:
|
|
183
|
+
content:
|
|
184
|
+
'<manifest>\n <uses-permission android:name="android.permission.INTERNET" />\n <activity>\n </activity>',
|
|
183
185
|
platform: 'android',
|
|
184
186
|
app,
|
|
185
187
|
})
|
|
188
|
+
expect(androidManifest.content).toContain(
|
|
189
|
+
'<uses-permission android:name="android.permission.CAMERA" />'
|
|
190
|
+
)
|
|
186
191
|
expect(androidManifest.content).toContain(
|
|
187
192
|
'<action android:name="android.intent.action.VIEW" />'
|
|
188
193
|
)
|
|
@@ -273,6 +278,48 @@ includeBuild('../node_modules/@react-native/gradle-plugin')`,
|
|
|
273
278
|
expect(android.content).toContain('versionName "1.0"')
|
|
274
279
|
})
|
|
275
280
|
|
|
281
|
+
it('omits camera entries when imagePicker.camera is unset', () => {
|
|
282
|
+
const bare = { ...app, imagePicker: undefined }
|
|
283
|
+
const infoPlist = renderPrebuildFile({
|
|
284
|
+
relativePath: 'HelloWorld/Info.plist',
|
|
285
|
+
content: '<dict>\n\t<key>LSRequiresIPhoneOS</key>\n</dict>',
|
|
286
|
+
platform: 'ios',
|
|
287
|
+
app: bare,
|
|
288
|
+
})
|
|
289
|
+
expect(infoPlist.content).not.toContain('NSCameraUsageDescription')
|
|
290
|
+
const androidManifest = renderPrebuildFile({
|
|
291
|
+
relativePath: 'app/src/main/AndroidManifest.xml',
|
|
292
|
+
content:
|
|
293
|
+
'<manifest>\n <uses-permission android:name="android.permission.INTERNET" />',
|
|
294
|
+
platform: 'android',
|
|
295
|
+
app: bare,
|
|
296
|
+
})
|
|
297
|
+
expect(androidManifest.content).not.toContain('android.permission.CAMERA')
|
|
298
|
+
})
|
|
299
|
+
|
|
300
|
+
it('throws instead of silently skipping a missing camera anchor', () => {
|
|
301
|
+
expect(() =>
|
|
302
|
+
renderPrebuildFile({
|
|
303
|
+
relativePath: 'HelloWorld/Info.plist',
|
|
304
|
+
content: '<dict>\n</dict>',
|
|
305
|
+
platform: 'ios',
|
|
306
|
+
app,
|
|
307
|
+
})
|
|
308
|
+
).toThrow(
|
|
309
|
+
'[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist'
|
|
310
|
+
)
|
|
311
|
+
expect(() =>
|
|
312
|
+
renderPrebuildFile({
|
|
313
|
+
relativePath: 'app/src/main/AndroidManifest.xml',
|
|
314
|
+
content: '<manifest>\n</manifest>',
|
|
315
|
+
platform: 'android',
|
|
316
|
+
app,
|
|
317
|
+
})
|
|
318
|
+
).toThrow(
|
|
319
|
+
'[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml'
|
|
320
|
+
)
|
|
321
|
+
})
|
|
322
|
+
|
|
276
323
|
it('resolves the gradle plugin from the react-native package without hoisting', () => {
|
|
277
324
|
const root = mkdtempSync(join(tmpdir(), 'vxrn-gradle-plugin-'))
|
|
278
325
|
const settingsDir = join(root, 'android')
|
|
@@ -2,6 +2,7 @@ import { execFileSync } from 'node:child_process'
|
|
|
2
2
|
import module from 'node:module'
|
|
3
3
|
import path from 'node:path'
|
|
4
4
|
import { pathToFileURL } from 'node:url'
|
|
5
|
+
import { validateNativeApp, type NativeAppManifest } from '@vxrn/utils/nativeAppManifest'
|
|
5
6
|
import FSExtra from 'fs-extra'
|
|
6
7
|
import sharp from 'sharp'
|
|
7
8
|
|
|
@@ -26,47 +27,14 @@ This code block is partially copied from meta owned repos.
|
|
|
26
27
|
Copyright (c) Facebook, Inc. and its affiliates.
|
|
27
28
|
*/
|
|
28
29
|
|
|
29
|
-
//
|
|
30
|
-
// full manifest before passing it here; vxrn
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
version?: string
|
|
37
|
-
icon?: {
|
|
38
|
-
source: string
|
|
39
|
-
backgroundColor: string
|
|
40
|
-
}
|
|
41
|
-
splash?: {
|
|
42
|
-
source: string
|
|
43
|
-
backgroundColor: string
|
|
44
|
-
width?: number
|
|
45
|
-
}
|
|
46
|
-
ios?: {
|
|
47
|
-
bundleId: string
|
|
48
|
-
buildNumber?: string
|
|
49
|
-
tablet?: boolean
|
|
50
|
-
deploymentTarget?: string
|
|
51
|
-
screensGamma?: boolean
|
|
52
|
-
useFrameworks?: 'static' | 'dynamic'
|
|
53
|
-
ccache?: boolean
|
|
54
|
-
usesNonExemptEncryption?: boolean
|
|
55
|
-
}
|
|
56
|
-
android?: {
|
|
57
|
-
applicationId: string
|
|
58
|
-
versionCode?: number
|
|
59
|
-
minSdk?: number
|
|
60
|
-
}
|
|
61
|
-
}
|
|
30
|
+
// the manifest is one({ native: { app } }), defined once in @vxrn/utils. the
|
|
31
|
+
// one cli validates the full manifest before passing it here; vxrn
|
|
32
|
+
// re-validates through the same definition so direct callers fail before
|
|
33
|
+
// touching either project.
|
|
34
|
+
export type { NativeAppManifest as PrebuildAppConfig } from '@vxrn/utils/nativeAppManifest'
|
|
35
|
+
|
|
36
|
+
export const validatePrebuildApp = validateNativeApp
|
|
62
37
|
|
|
63
|
-
const TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/
|
|
64
|
-
const SCHEME = /^[a-z][a-z0-9+.-]*$/i
|
|
65
|
-
const VERSION = /^\d+\.\d+\.\d+/
|
|
66
|
-
const BUILD_NUMBER = /^[A-Za-z0-9.]+$/
|
|
67
|
-
const REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/
|
|
68
|
-
const DEPLOYMENT_TARGET = /^\d+\.\d+$/
|
|
69
|
-
const HEX_COLOR = /^#[\da-f]{6}$/i
|
|
70
38
|
const ANDROID_DENSITIES = {
|
|
71
39
|
mdpi: 1,
|
|
72
40
|
hdpi: 1.5,
|
|
@@ -119,6 +87,10 @@ function patchIosBundlePhase(project: string): string {
|
|
|
119
87
|
return patchedProject
|
|
120
88
|
}
|
|
121
89
|
|
|
90
|
+
function escapeXml(value: string): string {
|
|
91
|
+
return value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
|
92
|
+
}
|
|
93
|
+
|
|
122
94
|
// uiscene adoption for the xcode 27 sdk: an app built with sdk 27 must
|
|
123
95
|
// declare a scene manifest or it fails to launch on ios 27 ("UIScene life
|
|
124
96
|
// cycle is required for apps built with this SDK"). prebuild therefore
|
|
@@ -318,7 +290,7 @@ function patchIosPbxprojSceneDelegate(rendered: string, appName: string): string
|
|
|
318
290
|
function generateSceneDelegate(args: {
|
|
319
291
|
dest: string
|
|
320
292
|
platform: 'ios' | 'android'
|
|
321
|
-
app:
|
|
293
|
+
app: NativeAppManifest
|
|
322
294
|
}): void {
|
|
323
295
|
const { dest, platform, app } = args
|
|
324
296
|
if (platform !== 'ios') return
|
|
@@ -328,91 +300,6 @@ function generateSceneDelegate(args: {
|
|
|
328
300
|
)
|
|
329
301
|
}
|
|
330
302
|
|
|
331
|
-
function fail(message: string): never {
|
|
332
|
-
throw new Error(`[vxrn] invalid native.app: ${message}`)
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export function validatePrebuildApp(
|
|
336
|
-
app: PrebuildAppConfig,
|
|
337
|
-
platform?: 'ios' | 'android' | string
|
|
338
|
-
): void {
|
|
339
|
-
if (!app || typeof app !== 'object') fail('manifest must be an object')
|
|
340
|
-
if (!app.name || !TARGET_NAME.test(app.name)) {
|
|
341
|
-
fail(
|
|
342
|
-
`name "${app?.name}" must start with a letter and contain only letters, digits, and underscore`
|
|
343
|
-
)
|
|
344
|
-
}
|
|
345
|
-
const schemes =
|
|
346
|
-
app.scheme === undefined ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme]
|
|
347
|
-
for (const scheme of schemes) {
|
|
348
|
-
if (typeof scheme !== 'string' || !SCHEME.test(scheme)) {
|
|
349
|
-
fail(`scheme "${scheme}" must be a valid uri scheme`)
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
if (
|
|
353
|
-
app.icon !== undefined &&
|
|
354
|
-
(!app.icon.source || !HEX_COLOR.test(app.icon.backgroundColor))
|
|
355
|
-
) {
|
|
356
|
-
fail('icon requires source and a six-digit hex backgroundColor')
|
|
357
|
-
}
|
|
358
|
-
if (
|
|
359
|
-
app.splash !== undefined &&
|
|
360
|
-
(!app.splash.source ||
|
|
361
|
-
!HEX_COLOR.test(app.splash.backgroundColor) ||
|
|
362
|
-
(app.splash.width !== undefined &&
|
|
363
|
-
(!Number.isFinite(app.splash.width) ||
|
|
364
|
-
app.splash.width < 1 ||
|
|
365
|
-
app.splash.width > 288)))
|
|
366
|
-
) {
|
|
367
|
-
fail(
|
|
368
|
-
'splash requires source, a six-digit hex backgroundColor, and width from 1 to 288'
|
|
369
|
-
)
|
|
370
|
-
}
|
|
371
|
-
if (app.version !== undefined && !VERSION.test(app.version)) {
|
|
372
|
-
fail(`version "${app.version}" must start with major.minor.patch`)
|
|
373
|
-
}
|
|
374
|
-
if (!platform || platform === 'ios') {
|
|
375
|
-
if (!app.ios?.bundleId || !REVERSE_DNS.test(app.ios.bundleId)) {
|
|
376
|
-
fail(`ios.bundleId "${app.ios?.bundleId}" must be reverse-dns`)
|
|
377
|
-
}
|
|
378
|
-
if (
|
|
379
|
-
app.ios.deploymentTarget !== undefined &&
|
|
380
|
-
!DEPLOYMENT_TARGET.test(app.ios.deploymentTarget)
|
|
381
|
-
) {
|
|
382
|
-
fail(`ios.deploymentTarget "${app.ios.deploymentTarget}" must look like "17.0"`)
|
|
383
|
-
}
|
|
384
|
-
if (
|
|
385
|
-
app.ios.buildNumber !== undefined &&
|
|
386
|
-
!BUILD_NUMBER.test(app.ios.buildNumber)
|
|
387
|
-
) {
|
|
388
|
-
fail(
|
|
389
|
-
`ios.buildNumber "${app.ios.buildNumber}" must contain only letters, digits, and dots`
|
|
390
|
-
)
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
if (!platform || platform === 'android') {
|
|
394
|
-
if (!app.android?.applicationId || !REVERSE_DNS.test(app.android.applicationId)) {
|
|
395
|
-
fail(`android.applicationId "${app.android?.applicationId}" must be reverse-dns`)
|
|
396
|
-
}
|
|
397
|
-
if (
|
|
398
|
-
app.android.minSdk !== undefined &&
|
|
399
|
-
(!Number.isInteger(app.android.minSdk) ||
|
|
400
|
-
app.android.minSdk < 21 ||
|
|
401
|
-
app.android.minSdk > 36)
|
|
402
|
-
) {
|
|
403
|
-
fail(`android.minSdk "${app.android.minSdk}" must be an integer from 21 to 36`)
|
|
404
|
-
}
|
|
405
|
-
if (
|
|
406
|
-
app.android.versionCode !== undefined &&
|
|
407
|
-
(!Number.isInteger(app.android.versionCode) || app.android.versionCode < 1)
|
|
408
|
-
) {
|
|
409
|
-
fail(
|
|
410
|
-
`android.versionCode "${app.android.versionCode}" must be a positive integer`
|
|
411
|
-
)
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
303
|
export interface RenderedPrebuildFile {
|
|
417
304
|
destRelativePath: string
|
|
418
305
|
content: string | null
|
|
@@ -422,7 +309,7 @@ async function generateAppIcons(args: {
|
|
|
422
309
|
root: string
|
|
423
310
|
dest: string
|
|
424
311
|
platform: 'ios' | 'android'
|
|
425
|
-
app:
|
|
312
|
+
app: NativeAppManifest
|
|
426
313
|
}): Promise<void> {
|
|
427
314
|
const { root, dest, platform, app } = args
|
|
428
315
|
if (!app.icon) return
|
|
@@ -488,7 +375,7 @@ async function generateSplashScreen(args: {
|
|
|
488
375
|
root: string
|
|
489
376
|
dest: string
|
|
490
377
|
platform: 'ios' | 'android'
|
|
491
|
-
app:
|
|
378
|
+
app: NativeAppManifest
|
|
492
379
|
}): Promise<void> {
|
|
493
380
|
const { root, dest, platform, app } = args
|
|
494
381
|
if (!app.splash) return
|
|
@@ -648,7 +535,7 @@ export function renderPrebuildFile(args: {
|
|
|
648
535
|
relativePath: string
|
|
649
536
|
content: string | null
|
|
650
537
|
platform: 'ios' | 'android'
|
|
651
|
-
app:
|
|
538
|
+
app: NativeAppManifest
|
|
652
539
|
}): RenderedPrebuildFile {
|
|
653
540
|
const { relativePath, content, platform, app } = args
|
|
654
541
|
const appName = app.name
|
|
@@ -703,6 +590,22 @@ ${schemes.map((scheme) => `\t\t\t\t<string>${scheme}</string>`).join('\n')}
|
|
|
703
590
|
\t<key>LSRequiresIPhoneOS</key>`
|
|
704
591
|
)
|
|
705
592
|
}
|
|
593
|
+
if (
|
|
594
|
+
platform === 'android' &&
|
|
595
|
+
relativePath === 'app/src/main/AndroidManifest.xml' &&
|
|
596
|
+
app.imagePicker?.camera !== undefined
|
|
597
|
+
) {
|
|
598
|
+
const anchor = '<uses-permission android:name="android.permission.INTERNET" />'
|
|
599
|
+
if (!rendered.includes(anchor)) {
|
|
600
|
+
throw new Error(
|
|
601
|
+
'[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml'
|
|
602
|
+
)
|
|
603
|
+
}
|
|
604
|
+
rendered = rendered.replace(
|
|
605
|
+
anchor,
|
|
606
|
+
`${anchor}\n <uses-permission android:name="android.permission.CAMERA" />`
|
|
607
|
+
)
|
|
608
|
+
}
|
|
706
609
|
if (
|
|
707
610
|
platform === 'android' &&
|
|
708
611
|
relativePath === 'app/src/main/AndroidManifest.xml' &&
|
|
@@ -750,6 +653,18 @@ ${schemes.map((scheme) => ` <data android:scheme="${scheme}" />`).joi
|
|
|
750
653
|
`\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? 'true' : 'false'}/>\n\t<key>LSRequiresIPhoneOS</key>`
|
|
751
654
|
)
|
|
752
655
|
}
|
|
656
|
+
if (app.imagePicker?.camera !== undefined) {
|
|
657
|
+
const anchor = '\t<key>LSRequiresIPhoneOS</key>'
|
|
658
|
+
if (!rendered.includes(anchor)) {
|
|
659
|
+
throw new Error(
|
|
660
|
+
'[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist'
|
|
661
|
+
)
|
|
662
|
+
}
|
|
663
|
+
rendered = rendered.replace(
|
|
664
|
+
anchor,
|
|
665
|
+
`\t<key>NSCameraUsageDescription</key>\n\t<string>${escapeXml(app.imagePicker.camera)}</string>\n${anchor}`
|
|
666
|
+
)
|
|
667
|
+
}
|
|
753
668
|
rendered = patchIosInfoPlistSceneManifest(rendered)
|
|
754
669
|
}
|
|
755
670
|
if (platform === 'ios' && relativePath.endsWith('/AppDelegate.swift')) {
|
|
@@ -851,7 +766,7 @@ end`
|
|
|
851
766
|
export const generateForPlatform = async (
|
|
852
767
|
root: string,
|
|
853
768
|
platform: 'ios' | 'android',
|
|
854
|
-
app:
|
|
769
|
+
app: NativeAppManifest,
|
|
855
770
|
outDir: string = path.resolve(root, platform)
|
|
856
771
|
) => {
|
|
857
772
|
validatePrebuildApp(app, platform)
|
|
@@ -923,7 +838,7 @@ export interface NativeDependencyInventory {
|
|
|
923
838
|
|
|
924
839
|
export function applyAndroidDependencyPatches(args: {
|
|
925
840
|
root: string
|
|
926
|
-
app:
|
|
841
|
+
app: NativeAppManifest
|
|
927
842
|
inventory: readonly NativeDependencyInventory[]
|
|
928
843
|
}): void {
|
|
929
844
|
const { root, app, inventory } = args
|
|
@@ -1,35 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
scheme?: string | string[];
|
|
5
|
-
version?: string;
|
|
6
|
-
icon?: {
|
|
7
|
-
source: string;
|
|
8
|
-
backgroundColor: string;
|
|
9
|
-
};
|
|
10
|
-
splash?: {
|
|
11
|
-
source: string;
|
|
12
|
-
backgroundColor: string;
|
|
13
|
-
width?: number;
|
|
14
|
-
};
|
|
15
|
-
ios?: {
|
|
16
|
-
bundleId: string;
|
|
17
|
-
buildNumber?: string;
|
|
18
|
-
tablet?: boolean;
|
|
19
|
-
deploymentTarget?: string;
|
|
20
|
-
screensGamma?: boolean;
|
|
21
|
-
useFrameworks?: 'static' | 'dynamic';
|
|
22
|
-
ccache?: boolean;
|
|
23
|
-
usesNonExemptEncryption?: boolean;
|
|
24
|
-
};
|
|
25
|
-
android?: {
|
|
26
|
-
applicationId: string;
|
|
27
|
-
versionCode?: number;
|
|
28
|
-
minSdk?: number;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
1
|
+
import { validateNativeApp, type NativeAppManifest } from '@vxrn/utils/nativeAppManifest';
|
|
2
|
+
export type { NativeAppManifest as PrebuildAppConfig } from '@vxrn/utils/nativeAppManifest';
|
|
3
|
+
export declare const validatePrebuildApp: typeof validateNativeApp;
|
|
31
4
|
export declare function renderSceneDelegateSwift(appName: string): string;
|
|
32
|
-
export declare function validatePrebuildApp(app: PrebuildAppConfig, platform?: 'ios' | 'android' | string): void;
|
|
33
5
|
export interface RenderedPrebuildFile {
|
|
34
6
|
destRelativePath: string;
|
|
35
7
|
content: string | null;
|
|
@@ -38,9 +10,9 @@ export declare function renderPrebuildFile(args: {
|
|
|
38
10
|
relativePath: string;
|
|
39
11
|
content: string | null;
|
|
40
12
|
platform: 'ios' | 'android';
|
|
41
|
-
app:
|
|
13
|
+
app: NativeAppManifest;
|
|
42
14
|
}): RenderedPrebuildFile;
|
|
43
|
-
export declare const generateForPlatform: (root: string, platform: 'ios' | 'android', app:
|
|
15
|
+
export declare const generateForPlatform: (root: string, platform: 'ios' | 'android', app: NativeAppManifest, outDir?: string) => Promise<void>;
|
|
44
16
|
export interface NativeDependencyInventory {
|
|
45
17
|
name: string;
|
|
46
18
|
version: string;
|
|
@@ -48,7 +20,7 @@ export interface NativeDependencyInventory {
|
|
|
48
20
|
}
|
|
49
21
|
export declare function applyAndroidDependencyPatches(args: {
|
|
50
22
|
root: string;
|
|
51
|
-
app:
|
|
23
|
+
app: NativeAppManifest;
|
|
52
24
|
inventory: readonly NativeDependencyInventory[];
|
|
53
25
|
}): void;
|
|
54
26
|
export declare function getNativeDependencyInventory(root: string): Promise<NativeDependencyInventory[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.d.ts","sourceRoot":"","sources":["../../src/exports/prebuildWithoutExpo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prebuildWithoutExpo.d.ts","sourceRoot":"","sources":["../../src/exports/prebuildWithoutExpo.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AA6BzF,YAAY,EAA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