Skip to content

Commit be584e7

Browse files
committed
feat: grant local network perms for iOS
1 parent b5f855a commit be584e7

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

actions/ios/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ runs:
4040
working-directory: ${{ inputs.projectRoot }}
4141
run: |
4242
xcrun simctl install booted ${{ inputs.app }}
43+
- name: Grant local network permission
44+
shell: bash
45+
working-directory: ${{ inputs.projectRoot }}
46+
run: |
47+
BUNDLE_ID="${{ fromJson(steps.load-config.outputs.config).config.bundleId }}"
48+
echo "Granting local network permission to app: $BUNDLE_ID"
49+
xcrun simctl privacy booted grant local-network "$BUNDLE_ID" || echo "Warning: Could not grant local-network permission"
4350
- name: Run E2E tests
4451
shell: bash
4552
working-directory: ${{ inputs.projectRoot }}

actions/shared/index.cjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4209,16 +4209,25 @@ var coerce = {
42094209
var NEVER = INVALID;
42104210

42114211
// ../config/dist/types.js
4212+
var RunnerSchema = external_exports.object({
4213+
name: external_exports.string().min(1, "Runner name is required").regex(/^[a-zA-Z0-9._-]+$/, "Runner name can only contain alphanumeric characters, dots, underscores, and hyphens"),
4214+
config: external_exports.record(external_exports.any()),
4215+
runner: external_exports.string()
4216+
});
42124217
var ConfigSchema = external_exports.object({
42134218
entryPoint: external_exports.string().min(1, "Entry point is required"),
42144219
appRegistryComponentName: external_exports.string().min(1, "App registry component name is required"),
4215-
runners: external_exports.array(external_exports.any()).min(1, "At least one runner is required"),
4220+
runners: external_exports.array(RunnerSchema).min(1, "At least one runner is required"),
42164221
defaultRunner: external_exports.string().optional(),
42174222
webSocketPort: external_exports.number().optional().default(3001),
42184223
bridgeTimeout: external_exports.number().min(1e3, "Bridge timeout must be at least 1 second").default(6e4),
4224+
bundleStartTimeout: external_exports.number().min(1e3, "Bundle start timeout must be at least 1 second").default(15e3),
4225+
maxAppRestarts: external_exports.number().min(0, "Max app restarts must be non-negative").default(2),
42194226
resetEnvironmentBetweenTestFiles: external_exports.boolean().optional().default(true),
42204227
unstable__skipAlreadyIncludedModules: external_exports.boolean().optional().default(false),
42214228
unstable__enableMetroCache: external_exports.boolean().optional().default(false),
4229+
detectNativeCrashes: external_exports.boolean().optional().default(true),
4230+
crashDetectionInterval: external_exports.number().min(100, "Crash detection interval must be at least 100ms").default(500),
42224231
// Deprecated property - used for migration detection
42234232
include: external_exports.array(external_exports.string()).optional()
42244233
}).refine((config) => {

packages/github-action/src/ios/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ runs:
4040
working-directory: ${{ inputs.projectRoot }}
4141
run: |
4242
xcrun simctl install booted ${{ inputs.app }}
43+
- name: Grant local network permission
44+
shell: bash
45+
working-directory: ${{ inputs.projectRoot }}
46+
run: |
47+
BUNDLE_ID="${{ fromJson(steps.load-config.outputs.config).config.bundleId }}"
48+
echo "Granting local network permission to app: $BUNDLE_ID"
49+
xcrun simctl privacy booted grant local-network "$BUNDLE_ID" || echo "Warning: Could not grant local-network permission"
4350
- name: Run E2E tests
4451
shell: bash
4552
working-directory: ${{ inputs.projectRoot }}

0 commit comments

Comments
 (0)