on: push: branches: - main paths: - "packages/react-native/ios/**" - "packages/react-native/HotUpdater.podspec" - "packages/react-native/Package.swift" - "packages/react-native/react-native.config.js" - "examples/v0.87.1-spm/**" - ".github/workflows/integration-ios.yml" pull_request: paths: - "packages/react-native/ios/**" - "packages/react-native/HotUpdater.podspec" - "packages/react-native/Package.swift" - "packages/react-native/react-native.config.js" - "examples/v0.87.1-spm/**" - ".github/workflows/integration-ios.yml" name: iOS Integration jobs: build-new-arch: runs-on: macos-15 name: Build iOS (New Architecture) steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup pnpm uses: pnpm/action-setup@eae0cfeb286e66ffb5155f1a79b90583a127a68b - name: Setup Ruby uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af with: ruby-version: "3.2" - name: Setup Node.js uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 with: node-version-file: .node-version cache: "pnpm" - run: pnpm install --frozen-lockfile --config.node-linker=hoisted - name: Install Ruby dependencies working-directory: examples/v0.76.1-new-arch run: bundle install # A Release build runs `hot-updater fingerprint hash`, which computes # the example's fingerprint with the bare adapter. - name: Library Build run: pnpm nx run-many -t build -p @hot-updater/react-native hot-updater @hot-updater/bare - name: Swift Tests run: pnpm test:swift - name: Build iOS run: | rm -rf ~/Library/Developer/Xcode/DerivedData cd examples/v0.76.1-new-arch rm -f ios/Podfile.lock bundle exec pod install --project-directory=ios xcodebuild -workspace ios/HotUpdaterExample.xcworkspace -scheme HotUpdaterExample -configuration Release -sdk iphonesimulator cd ../.. env: HOT_UPDATER_CHANNEL: dev build-old-arch: runs-on: macos-15 name: Build iOS (Old Architecture) steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup pnpm uses: pnpm/action-setup@eae0cfeb286e66ffb5155f1a79b90583a127a68b - name: Setup Ruby uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af with: ruby-version: "3.2" - name: Setup Node.js uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 with: node-version-file: .node-version cache: "pnpm" - run: pnpm install --frozen-lockfile --config.node-linker=hoisted - name: Install Ruby dependencies working-directory: examples/v0.74.1 run: bundle install # A Release build runs `hot-updater fingerprint hash`, which computes # the example's fingerprint with the bare adapter. - name: Library Build run: pnpm nx run-many -t build -p @hot-updater/react-native hot-updater @hot-updater/bare - name: Swift Tests run: pnpm test:swift - name: Build iOS run: | rm -rf ~/Library/Developer/Xcode/DerivedData cd examples/v0.74.1 rm -f ios/Podfile.lock bundle exec pod install --project-directory=ios xcodebuild -workspace ios/HotUpdaterExample.xcworkspace -scheme HotUpdaterExample -configuration Release -sdk iphonesimulator cd ../.. env: HOT_UPDATER_CHANNEL: dev # With dynamic frameworks every pod links on its own, so a symbol from a pod # HotUpdater does not declare fails to link here though a static build # passes. React Native's prebuilt core puts all of React in one framework, # so the build compiles React Native from source, as apps that need source # builds (such as React Native Firebase with Swift Package Manager) do. # The app is a fresh npm project with this package packed into it: a # source build of an example under the pnpm workspace fails on React # Native's own header copies ("Multiple commands produce"). CocoaPods # 1.17.0, because 1.15.2 fails on the runner with "pathname contains null # byte" (CocoaPods#12798). build-dynamic-frameworks: runs-on: macos-15 name: Build iOS (Dynamic Frameworks) steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup pnpm uses: pnpm/action-setup@eae0cfeb286e66ffb5155f1a79b90583a127a68b - name: Setup Ruby uses: ruby/setup-ruby@89f90524b88a01fe6e0b732220432cc6142926af with: ruby-version: "3.3" - name: Setup Node.js uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 with: node-version-file: .node-version cache: "pnpm" - run: pnpm install --frozen-lockfile - name: Install CocoaPods run: gem install cocoapods -v 1.17.0 - name: Pack @hot-updater/react-native run: | pnpm nx run @hot-updater/react-native:build pnpm --dir packages/react-native pack --pack-destination "$RUNNER_TEMP" - name: Create app working-directory: ${{ runner.temp }} run: | npx -y @react-native-community/cli@20.2.0 init DynamicApp --version 0.88.0 --skip-install --skip-git-init --pm npm cd DynamicApp npm install npm install "$RUNNER_TEMP"/hot-updater-react-native-*.tgz - name: Build iOS working-directory: ${{ runner.temp }}/DynamicApp/ios run: | pod _1.17.0_ install xcodebuild -workspace DynamicApp.xcworkspace -scheme DynamicApp -configuration Release -sdk iphonesimulator -destination "generic/platform=iOS Simulator" env: USE_FRAMEWORKS: dynamic RCT_USE_PREBUILT_RNCORE: "0" RCT_USE_RN_DEP: "0" build-swift-package-manager: runs-on: macos-26 name: Build iOS (Swift Package Manager) steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup pnpm uses: pnpm/action-setup@eae0cfeb286e66ffb5155f1a79b90583a127a68b - name: Setup Node.js uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 with: node-version-file: .node-version cache: "pnpm" - run: pnpm install --frozen-lockfile - name: Library Build run: pnpm nx run @hot-updater/react-native:build - name: Generate Swift packages working-directory: examples/v0.87.1-spm run: pnpm spm # Two builds over one DerivedData must ship different MIN_BUNDLE_IDs: # the build tool plugin regenerates the value on every build. - name: Build iOS working-directory: examples/v0.87.1-spm/ios run: | build() { xcodebuild -project HotUpdaterExample.xcodeproj -scheme HotUpdaterExample \ -configuration Release -sdk iphonesimulator \ -destination "generic/platform=iOS Simulator" \ -derivedDataPath DerivedData build >&2 strings DerivedData/Build/Products/Release-iphonesimulator/HotUpdaterExample.app/HotUpdaterExample \ | grep -E '^[0-9a-f]{8}-[0-9a-f]{4}-7000-8000-000000000000$' | sort -u } first=$(build) second=$(build) echo "MIN_BUNDLE_ID: $first, then $second" test -n "$first" && test -n "$second" && test "$first" != "$second"