-
try to clean the build folder.
exit Xcode.
-
upgrade your capacitor core libraries
-
update cocoapods to 1.13.0
-
do "pod install --repo-udpdate"
after that:
- ionic build --prod
- npx cap update
- npx cap sync
- npx cap open ios
capacitor ios最低版本要求13
[Bug]: JSValueEncoder · Issue #7244 · ionic-team/capacitor · GitHub
麻了, 把报错的EncodingContainer方法替换成
private enum EncodingContainer: JSValueEncodingContainer {
case singleValue(SingleValueContainer)
case unkeyed(UnkeyedContainer)
case keyed(AnyKeyedContainer)
var data: JSValue? {
switch self {
case let .singleValue(container):
return container.data
case let .unkeyed(container):
return container.data
case let .keyed(container):
return container.data
}
}
var type: String {
switch self {
case .singleValue:
return "SingleValueContainer"
case .unkeyed:
return "UnkeyedContainer"
case .keyed:
return "KeyedContainer"
}
}
}