From 65620abd72d485402536abf5c21103375c9e22aa Mon Sep 17 00:00:00 2001 From: Norbel AMBANUMBEN Date: Mon, 18 Nov 2024 12:03:17 +0100 Subject: [PATCH] chore: fix ios build (#273) --- .github/workflows/validate.yml | 15 +++++++++++++++ iosApp/Podfile.lock | 2 +- iosApp/iosApp.xcodeproj/project.pbxproj | 17 ++++++----------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b76b4aa4..418010af 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -31,6 +31,21 @@ jobs: - name: Build iOS Framework run: ./gradlew link${{ matrix.type }}FrameworkIosSimulatorArm64 -Porganization=${{ matrix.organization }} + - run: ./gradlew podInstall + - run: cd iosApp/ && pod install + - name: Build iOS App + run: | + set -o pipefail + if [ "${{ matrix.organization }}" == "ooni" ]; then + SCHEME="OONIProbe" + elif [ "${{ matrix.organization }}" == "dw" ]; then + SCHEME="NewsMediaScan" + fi + + echo "Building $SCHEME" + echo "organization=${{ matrix.organization }}" >> gradle.properties + xcodebuild -workspace iosApp/iosApp.xcworkspace -scheme "$SCHEME" -destination='name=Any iOS Device' -sdk iphoneos archive CODE_SIGNING_ALLOWED="NO" | xcpretty + - name: Uploads artifacts uses: actions/upload-artifact@v4 if: matrix.type == 'Debug' # we want just the debug apk. Releases have to be signed and uploaded to the stores diff --git a/iosApp/Podfile.lock b/iosApp/Podfile.lock index 4ea84772..74e7870f 100644 --- a/iosApp/Podfile.lock +++ b/iosApp/Podfile.lock @@ -58,4 +58,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 7ccceb3a8043e0a52e0aaf77c23a4e93dbe689e7 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index b04874d6..91613bb0 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -11,6 +11,8 @@ 058557D9273AAEEB004C7B11 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */; }; 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2152FB032600AC8F00CF470E /* iOSApp.swift */; }; 7555FF83242A565900829871 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF82242A565900829871 /* ContentView.swift */; }; + 793F99462CE646DE0094FAFC /* IosBackgroundRunner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793F99452CE646DE0094FAFC /* IosBackgroundRunner.swift */; }; + 793F99472CE646DE0094FAFC /* IosBackgroundRunner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 793F99452CE646DE0094FAFC /* IosBackgroundRunner.swift */; }; 795E37782CD5053900086360 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 795E37772CD5053900086360 /* ShareViewController.swift */; }; 795E377B2CD5053900086360 /* Base in Resources */ = {isa = PBXBuildFile; fileRef = 795E377A2CD5053900086360 /* Base */; }; 795E377F2CD5053900086360 /* share.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 795E37752CD5053900086360 /* share.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; @@ -63,6 +65,7 @@ 7555FF7B242A565900829871 /* OONI Probe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "OONI Probe.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 793F99452CE646DE0094FAFC /* IosBackgroundRunner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = IosBackgroundRunner.swift; path = background/IosBackgroundRunner.swift; sourceTree = ""; }; 795E37752CD5053900086360 /* share.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = share.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 795E37772CD5053900086360 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = ""; }; 795E377A2CD5053900086360 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; @@ -81,10 +84,6 @@ DD59ED7E2702C84FF0455021 /* Pods_OONIProbe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OONIProbe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ -/* Begin PBXFileSystemSynchronizedRootGroup section */ - 79167AE52CE2A92800C070C5 /* background */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = background; sourceTree = ""; }; -/* End PBXFileSystemSynchronizedRootGroup section */ - /* Begin PBXFrameworksBuildPhase section */ 795E37722CD5053900086360 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; @@ -171,13 +170,13 @@ 7555FF7D242A565900829871 /* iosApp */ = { isa = PBXGroup; children = ( - 79167AE52CE2A92800C070C5 /* background */, 058557BA273AAA24004C7B11 /* Assets.xcassets */, 7555FF82242A565900829871 /* ContentView.swift */, 7555FF8C242A565B00829871 /* Info.plist */, 2152FB032600AC8F00CF470E /* iOSApp.swift */, 058557D7273AAEEB004C7B11 /* Preview Content */, 93E977722C4FCCF7009CCABC /* engine */, + 793F99452CE646DE0094FAFC /* IosBackgroundRunner.swift */, ); path = iosApp; sourceTree = ""; @@ -265,9 +264,6 @@ dependencies = ( 795E377E2CD5053900086360 /* PBXTargetDependency */, ); - fileSystemSynchronizedGroups = ( - 79167AE52CE2A92800C070C5 /* background */, - ); name = OONIProbe; productName = iosApp; productReference = 7555FF7B242A565900829871 /* OONI Probe.app */; @@ -307,9 +303,6 @@ ); dependencies = ( ); - fileSystemSynchronizedGroups = ( - 79167AE52CE2A92800C070C5 /* background */, - ); name = NewsMediaScan; productName = iosApp; productReference = 79FBD01A2C5A70AF004E041C /* News Media Scan.app */; @@ -574,6 +567,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 793F99462CE646DE0094FAFC /* IosBackgroundRunner.swift in Sources */, 79B9D19A2C6552DE004DCEE6 /* IosNetworkTypeFinder.swift in Sources */, 2152FB042600AC8F00CF470E /* iOSApp.swift in Sources */, 93E977712C4FCCE3009CCABC /* IosOonimkallBridge.swift in Sources */, @@ -593,6 +587,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 793F99472CE646DE0094FAFC /* IosBackgroundRunner.swift in Sources */, 79B9D19B2C6552DE004DCEE6 /* IosNetworkTypeFinder.swift in Sources */, 79FBD00D2C5A70AF004E041C /* iOSApp.swift in Sources */, 79FBD00E2C5A70AF004E041C /* IosOonimkallBridge.swift in Sources */,