From f5b5c66578a20889ca734f0d1b43d1e077082286 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Wed, 20 Mar 2024 00:55:07 -0700 Subject: [PATCH] ci: Fix ObjC testing with latest Xcode (#1412) --- .github/workflows/ci.yml | 2 +- package.json | 2 +- tests/CordovaLibTests/CDVPluginInitTests.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 681b2853d..c5152657c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: node-version: [16.x, 18.x, 20.x] - os: [macos-latest] + os: [macos-14] steps: - uses: actions/checkout@v3 diff --git a/package.json b/package.json index 5636c790a..770872744 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "objc-tests": "npm run objc-tests-lib && npm run objc-tests-framework", "objc-tests-lib": "npm run xcodebuild -- -scheme CordovaLibTests", "objc-tests-framework": "npm run xcodebuild -- -scheme CordovaFrameworkApp", - "xcodebuild": "xcodebuild -quiet test -workspace tests/cordova-ios.xcworkspace -destination \"platform=iOS Simulator,name=iPhone 8\" CONFIGURATION_BUILD_DIR=\"`mktemp -d 2>/dev/null || mktemp -d -t 'cordova-ios'`\"", + "xcodebuild": "xcodebuild -quiet test -workspace tests/cordova-ios.xcworkspace -destination \"platform=iOS Simulator,name=iPhone 15\" -derivedDataPath \"`mktemp -d 2>/dev/null || mktemp -d -t 'cordova-ios'`\"", "preobjc-tests": "killall Simulator || true", "unit-tests": "jasmine --config=tests/spec/unit.json", "lint": "eslint . \"templates/cordova/lib/!(*.*)\"" diff --git a/tests/CordovaLibTests/CDVPluginInitTests.m b/tests/CordovaLibTests/CDVPluginInitTests.m index c5f8779ac..0b8c6f15d 100644 --- a/tests/CordovaLibTests/CDVPluginInitTests.m +++ b/tests/CordovaLibTests/CDVPluginInitTests.m @@ -38,7 +38,7 @@ - (void)setUp // uncaught and the app crashes upon a failed STAssert (oh well). // [self raiseAfterFailure]; - self.appDelegate = [[UIApplication sharedApplication] delegate]; + self.appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate]; [self.appDelegate createViewController]; self.viewController = self.appDelegate.viewController; }