Closed SwiftNativeDeveloper closed 1 year ago
👍
We will have a major release this summer where we can address breaking changes like this. I'll have a better idea on timing of that release after WWDC. If you have any other breaking API recommendations please let me know ASAP. Thanks!
Is the plan to refactor the entire swift package to swift (eventually?).
I haven't tried doing a nested struct in swift bridged to obj-c so I want to be sensitive to that. But it's Apple's approach for many of their APIs in swift to do that so it must be a thing. I.e. UIApplication.LaunchOptionsKey.
Yeah, the plan is to go full swift this year but it might be a stretch. There are a few things that are really annoying to do in Swift, like gzip compression and option sets bridging to obj-c., so we might keep AirshipBasement as obj-c for those reasons. We are also looking at converting all of our OOTB UI to swift UI. That will bump the min version to IOS 13 to use any of our OOTB UI but historically we only have supported 3 iOS versions at a time in past SDKs.
We have to convert full modules at a time to do complications with SPM with multi modules, so its a real commitment for us to start converting a module. Depending on what Apple announces this year will dictate how much time we have to convert obj-c to swift.
There are a bunch of swift tricks Apple uses that we should be leveraging. If you stumble upon any any please call them out so we can add them to our list if they are not already there. A few API changes I have so far:
Preliminary Info
What Airship dependencies are you using?
16.7 SDK
What are the versions of any relevant development tools you are using?
Standard Xcode setup
Report
What unexpected behavior are you seeing?
Config
is too common of a type name and collides with other types from other SDKs and local types.What is the expected behavior?
Recommend changing the type name to
AirshipConfig
orAirship.Config
with nested type to avoid collision and needing to resolve type by module name.What are the steps to reproduce the unexpected behavior?
N/A
Do you have logging for the issue?
N/A