mapiacompany / capacitor-codepush

Capacitor plugin for CodePush
http://appcenter.ms
Other
151 stars 65 forks source link

Maintenance: Update iOS CAPPluginCall access to use non-deprecated APIs #20

Open lincolnthree opened 3 years ago

lincolnthree commented 3 years ago

Description

Per Capacitor team, the NSString, BOOL, and NSNumber accessors for CAPPluginCall will be deprecated going forward, in favor of this api:

https://github.com/ionic-team/capacitor/blob/main/ios/Capacitor/Capacitor/JSTypes.swift https://github.com/ionic-team/capacitor/blob/main/ios/Capacitor/Capacitor/CAPBridgedJSTypes.h (requires additional import statement)

See: https://github.com/ionic-team/capacitor/pull/4303#issuecomment-794385052

Resolution steps

The iOS implementation should be refactored to use these new methods:

https://github.com/mapiacompany/capacitor-codepush/blob/capacitor/ios/Plugin/CodePush.m#L177 https://github.com/mapiacompany/capacitor-codepush/blob/capacitor/ios/Plugin/CodePush.m#L190

And other places that reference the deprecated methods.