liferay / liferay-mobile-sdk

Other
47 stars 56 forks source link

Objective-C - Swift interoperability annotations #41

Closed victorg1991 closed 6 years ago

victorg1991 commented 7 years ago

This PR add some annotations to swift code in order to improve the interoperability with Swift.

Basically this annotations have information about the nullability of the different return types and parameters.

One extra thing, Xcode converts methods with a NSError** parameter into a throws function in swift but if the return type is void it doesn't do the conversion. To force Xcode to do the conversion we need to use the macro added in Macros.h CONVERT_ERROR_TO_THROWS. I have changed the template for generating the services to add this macro when the method returns void.

Any comments or questions will be appreciated :)

victorlaerte commented 6 years ago

@victorg1991 Can you fix the conflicts ?

victorg1991 commented 6 years ago

Done :D (Remember that this PR has breaking changes) we can't release a version like 7.0.X

victorg1991 commented 6 years ago

This now depends on https://github.com/liferay/liferay-mobile-sdk/pull/52

allanragec commented 6 years ago

Just started reviewing :)

:octocat: Sent from GH.

allanragec commented 6 years ago

Just started reviewing :)

:octocat: Sent from GH.

allanragec commented 6 years ago

Just started reviewing :)

:octocat: Sent from GH.

allanragec commented 6 years ago

Thank you, pull request merged!

:octocat: Sent from GH.