Closed jakubjenis closed 3 weeks ago
What version of Xcode are you using? Switch statements as expressions were introduced in Swift 5.9 which is shipped in Xcode 15 which Capacitor now requires
You are absolutely right, I was on XCode 14. Updating to 15 fixes the problem. Thanks!
Capacitor Version
Latest Dependencies:
@capacitor/cli: 6.0.0 @capacitor/core: 6.0.0 @capacitor/android: 6.0.0 @capacitor/ios: 6.0.0
Installed Dependencies:
@capacitor/cli: 6.0.0 @capacitor/core: 6.0.0 @capacitor/ios: 6.0.0 @capacitor/android: 6.0.0
Other API Details
Platforms Affected
Current Behavior
After upgrading from Capacitor v5 to v6 and running
npx cap sync
I am getting a build error on ios:...@capacitor/ios/Capacitor/Capacitor/Codable/JSValueEncoder.swift:103:5 Missing return in getter expected to return 'String'
It seems the JSValueEncoder is missing the default return here: https://github.com/ionic-team/capacitor/blob/5b2ab7c68db4e77b8b2961e927acc5a708ee260f/ios/Capacitor/Capacitor/Codable/JSValueEncoder.swift#L101
Expected Behavior
iOS builds without error
Project Reproduction
none
Additional Information
No response