Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iOS): skip Swift type coercion on Cordova plugin calls #4048

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

ikeith
Copy link
Contributor

@ikeith ikeith commented Jan 12, 2021

This branch moves the point at which the JSCall options are coerced into the preferred swift types. The coercion strips NSNull objects, which is an Obj-C placeholder for nil in collections. Removing the object(s) changes the indexes of arguments on Cordova calls and breaks existing behavior. The coercion is moved from the JSCall wrapper (which is used for both types of plugins) to the point where the CAPPluginCall is created for Capacitor plugins.

… otherwise it can break Cordova calls by stripping out NSNull values.
@ikeith ikeith added this to the 3.0.0-beta milestone Jan 12, 2021
@ikeith ikeith added this to In progress 🤺 in Capacitor Engineering ⚡️ via automation Jan 12, 2021
@ikeith ikeith moved this from In progress 🤺 to Needs review 🤔 in Capacitor Engineering ⚡️ Jan 12, 2021
@imhoffd imhoffd merged commit 7bb9e0f into main Jan 12, 2021
Capacitor Engineering ⚡️ automation moved this from Needs review 🤔 to Done 🎉 Jan 12, 2021
@imhoffd imhoffd deleted the argument-coercion branch January 12, 2021 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants