W-21080629: Upgrade to cordova-ios 8.1.0 — Swift AppDelegate, CDVPluginNotifications import#309
Merged
Conversation
…ios 8.x; update podspec Cordova dep 7.1.1→8.1.0
…odule compatibility
… (Swift accessibility requirement)
…er, PushNotificationManager, UserAccountManager.shared, UInt cache sizes, InitialViewController via Bridging-Header)
|
||||||||||||||
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #309 +/- ##
===========================================
+ Coverage 29.37% 62.62% +33.25%
===========================================
Files 21 21
Lines 1699 1699
===========================================
+ Hits 499 1064 +565
+ Misses 1200 635 -565
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…vs shared/hybrid/ vs external/
…/cordova submodule external/cordova: 7.1.1 → 8.1.0 Both sample apps (AccountEditor, MobileSyncExplorerHybrid): - AppDelegate.m → AppDelegate.swift (path update in project.pbxproj) - main.m: removed (no main.m in cordova-ios 8.x, replaced by @main in AppDelegate.swift) - AppDelegate.h, MainViewController.h paths: __PROJECT_NAME__/ → App/ - MainViewController.m/.xib: removed (replaced by ViewController.swift in 8.x) - ViewController.swift: added (from external/cordova/templates/project/App/) - SWIFT_VERSION = 5.0: added (required for Swift sources) - SWIFT_OBJC_BRIDGING_HEADER: added, points to shared/hybrid/SampleApp-Bridging-Header.h shared/hybrid/SampleApp-Bridging-Header.h (new): imports Cordova, AppDelegate.h, MainViewController.h (with deprecation silencing), and InitialViewController.h so all ObjC types are visible from AppDelegate.swift and ViewController.swift. Build verified: AccountEditor and MobileSyncExplorerHybrid both BUILD SUCCEEDED.
|
||||||||||||||
bbirman
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades hybrid iOS support from cordova-ios 7.1.1 to 8.1.0.
Changes
shared/hybrid/AppDelegate.swift(new) — Swift port ofAppDelegate.m. Uses@main @objc @implementation extension AppDelegatepattern required by cordova-ios 8.x. InitializesSalesforceHybridSDKManager, sets up URL cache, handles login flow, push notifications, and user-change notifications.shared/hybrid/AppDelegate.m(deleted) — replaced by Swift version above.libs/SalesforceHybridSDK/.../SFHybridViewController.m— adds#import <Cordova/CDVPluginNotifications.h>(cordova-ios 8.x moved notification constants to a separate header).SalesforceHybridSDK.podspec— Cordova dependency7.1.1→8.1.0.Notes
AppDelegate.his kept unchanged (declares@interface AppDelegate : CDVAppDelegate). The Bridging-Header generated by cordova-ios 8.x imports this header so the Swift implementation can extend the ObjC class.AppDelegate.swiftis not declared as a<source-file>inplugin.xmlbecause cordova-ios 8.x routes<source-file>entries to theCordovaPluginsSPM target which cannot link CocoaPods frameworks. Thepostinstall-ios.jshook in CordovaPlugin copies it and redirects the app target reference instead.Test plan
SalesforceHybridSDKTestAppTests) — verified locally ✅test_force.js --cli=forcehybrid --os=ios— verified locally ✅