diff --git a/.github/actions/ios/action.yml b/.github/actions/ios/action.yml index 52deb0e14..f221e5bf3 100644 --- a/.github/actions/ios/action.yml +++ b/.github/actions/ios/action.yml @@ -16,30 +16,48 @@ runs: - name: Set up Flutter uses: subosito/flutter-action@v2 with: - cache: false # TODO set to after https://github.com/actions/runner/issues/449 is fixed + cache: false flutter-version-file: pubspec.yaml - name: Update Podfile shell: bash run: | - cd ./iOS + cd ./ios flutter pub get pod install --repo-update - - name: Build iOS IPA (No code signing for PRs) + - name: Build Unsigned iOS App (For PRs) if: ${{ github.event_name == 'pull_request' }} shell: bash env: VERSION_NAME: ${{ inputs.VERSION_NAME }} VERSION_CODE: ${{ inputs.VERSION_CODE }} run: | - flutter build ipa --no-codesign --build-name $VERSION_NAME --build-number $VERSION_CODE + # 1. Build the raw iOS binary + flutter build ios --release --no-codesign --build-name "$VERSION_NAME" --build-number "$VERSION_CODE" - - name: Build iOS IPA (With Code Signing) + # 2. Package it into an unsigned .ipa manually + cd build/ios/iphoneos + mkdir Payload + cp -r Runner.app Payload/ + zip -qr pslab-unsigned.ipa Payload/ + mv pslab-unsigned.ipa ../../../ + + - name: Build Signed iOS IPA (For Production) if: ${{ github.event_name != 'pull_request' }} shell: bash env: VERSION_NAME: ${{ inputs.VERSION_NAME }} VERSION_CODE: ${{ inputs.VERSION_CODE }} run: | - flutter build ipa --build-name $VERSION_NAME --build-number $VERSION_CODE \ No newline at end of file + # This will only succeed if the FOSSASIA repository certificates are present + flutter build ipa --build-name "$VERSION_NAME" --build-number "$VERSION_CODE" + + - name: Store IPA file + uses: actions/upload-artifact@v7 + with: + name: iOS IPA Generated + path: | + pslab-unsigned.ipa + build/ios/ipa/*.ipa + if-no-files-found: ignore diff --git a/lib/providers/tsl2561_provider.dart b/lib/providers/tsl2561_provider.dart index ace6f559c..bf48bf756 100644 --- a/lib/providers/tsl2561_provider.dart +++ b/lib/providers/tsl2561_provider.dart @@ -55,7 +55,7 @@ class TSL2561Provider extends ChangeNotifier { try { if (i2c == null || scienceLab == null) { onError(appLocalizations.pslabNotConnected); - logger.w('I2C or ScienceLab not available'); + logger.w('I2C or ScienceLab not ae'); return; }