diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6b2a724..f01df01 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -48,6 +48,8 @@ jobs: with: java-version: 17 distribution: adopt + - if: contains(matrix.os, 'macos') + run: sudo xcode-select -s /Applications/Xcode_16.4.app - run: | npm run example -- --pm ${{ matrix.pm }} working-directory: react-native-hcaptcha diff --git a/__scripts__/generate-example.js b/__scripts__/generate-example.js index bd89747..26575c4 100644 --- a/__scripts__/generate-example.js +++ b/__scripts__/generate-example.js @@ -129,7 +129,7 @@ function main({ cliName, projectRelativeProjectPath, projectName, projectTemplat // Run the project initialization command console.log(`Running command: ${createCommand}`); - execSync(createCommand.join(' '), { stdio: 'inherit', shell: true, env: { ...process.env, PATH: cleanPathEnv(), USE_HERMES: 0 } }); + execSync(createCommand.join(' '), { stdio: 'inherit', shell: true, env: { ...process.env, PATH: cleanPathEnv() } }); const projectPath = path.join(process.cwd(), projectRelativeProjectPath); const packageManagerOptions = { stdio: 'inherit', cwd: projectPath }; @@ -143,7 +143,7 @@ function main({ cliName, projectRelativeProjectPath, projectName, projectTemplat // Install dependencies const isHcaptchaLinked = checkHcaptchaLinked(); const mainPackage = '@hcaptcha/react-native-hcaptcha'; - const mainPackagePath = `${path.dirname(projectRelativeProjectPath)}/react-native-hcaptcha`; + const mainPackagePath = path.join(path.dirname(projectRelativeProjectPath), path.basename(process.cwd())); const peerPackages = 'react-native-modal react-native-webview'; const devPackages = 'typescript @babel/preset-env'; @@ -167,7 +167,7 @@ function main({ cliName, projectRelativeProjectPath, projectName, projectTemplat // iOS: pod install if (platform() === 'darwin') { - const podOptions = { stdio: 'inherit', cwd: path.join(projectPath, 'ios'), env: { ...process.env, USE_HERMES: 0 } }; + const podOptions = { stdio: 'inherit', cwd: path.join(projectPath, 'ios') }; execSync('bundle install', podOptions); execSync('bundle exec pod install', podOptions); }