Skip to content

Commit 1974dbb

Browse files
authored
ci: Fix ObjC testing with latest Xcode (#1412)
1 parent c97845a commit 1974dbb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
matrix:
2828
node-version: [16.x, 18.x, 20.x]
29-
os: [macos-latest]
29+
os: [macos-14]
3030

3131
steps:
3232
- uses: actions/checkout@v3

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"objc-tests": "npm run objc-tests-lib && npm run objc-tests-framework",
2323
"objc-tests-lib": "npm run xcodebuild -- -scheme CordovaLibTests",
2424
"objc-tests-framework": "npm run xcodebuild -- -scheme CordovaFrameworkApp",
25-
"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'`\"",
25+
"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'`\"",
2626
"preobjc-tests": "killall Simulator || true",
2727
"unit-tests": "jasmine --config=tests/spec/unit.json",
2828
"lint": "eslint . \"templates/cordova/lib/!(*.*)\""

tests/CordovaLibTests/CDVPluginInitTests.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ - (void)setUp
3838
// uncaught and the app crashes upon a failed STAssert (oh well).
3939
// [self raiseAfterFailure];
4040

41-
self.appDelegate = [[UIApplication sharedApplication] delegate];
41+
self.appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
4242
[self.appDelegate createViewController];
4343
self.viewController = self.appDelegate.viewController;
4444
}

0 commit comments

Comments
 (0)