You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project should compile successfully on iOS with Capacitor 8.x.
Code Reproduction
This occurs in a standard Capacitor 8 environment when adding the @capacitor/geolocation plugin and syncing to iOS.
Other Technical Details
macOS Sonoma (darwin 23.4.0)
Swift 5
Additional Context
Important
Technical Disclaimer:
I am reporting this issue based on an AI-assisted investigation. Since I am not an expert in Capacitor's internal Swift architecture, I will not be able to provide further technical details or respond to follow-up questions. Please refer to the analysis below.
Root Cause Analysis (AI generated):
The errors are caused by breaking changes in the Capacitor 8 Swift API:
saveCall signature change:bridge.saveCall(call) now requires a second argument plugin: CAPBridgedPlugin.
CAPPluginCall method change: The reject method has been removed or modified in the new version, and should be replaced with error().
Suggested Fix:
Update GeolocationCallbackManager.swift to accept a reference to the plugin and use bridge?.saveCall(call, plugin: self.plugin).
Replace call.reject(message, code) with call.error(message, code).
Bug Report
Plugin(s)
@capacitor/geolocation 8.0.0
Capacitor Version
Platform(s)
iOS (Xcode 15.4, iPhone SDK 17.5)
Current Behavior
After upgrading to Capacitor 8.0.2 and @capacitor/geolocation 8.0.0, the iOS project fails to compile in Xcode with the following Swift errors:
GeolocationCallbackManager.swift:56:62: Missing argument for parameter Preserve aspect ratio capacitor-plugins#2 in call (saveCall)GeolocationCallbackManager.swift:112:14: Value of type 'CAPPluginCall' has no member 'reject'GeolocationPlugin.swift:70:69: Missing argument for parameter Preserve aspect ratio capacitor-plugins#2 in callExpected Behavior
The project should compile successfully on iOS with Capacitor 8.x.
Code Reproduction
This occurs in a standard Capacitor 8 environment when adding the
@capacitor/geolocationplugin and syncing to iOS.Other Technical Details
Additional Context
Important
Technical Disclaimer:
I am reporting this issue based on an AI-assisted investigation. Since I am not an expert in Capacitor's internal Swift architecture, I will not be able to provide further technical details or respond to follow-up questions. Please refer to the analysis below.
Root Cause Analysis (AI generated):
The errors are caused by breaking changes in the Capacitor 8 Swift API:
saveCallsignature change:bridge.saveCall(call)now requires a second argumentplugin: CAPBridgedPlugin.CAPPluginCallmethod change: Therejectmethod has been removed or modified in the new version, and should be replaced witherror().Suggested Fix:
GeolocationCallbackManager.swiftto accept a reference to the plugin and usebridge?.saveCall(call, plugin: self.plugin).call.reject(message, code)withcall.error(message, code).