urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

Feature Request: Rename "Config" to "AirshipConfig" or a nested type inside Airship #324

Closed SwiftNativeDeveloper closed 1 year ago

SwiftNativeDeveloper commented 2 years ago

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 or Airship.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

rlepinski commented 2 years 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!

SwiftNativeDeveloper commented 2 years ago

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.

rlepinski commented 2 years ago

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:

rlepinski commented 1 year ago

Fixed in 17.0.0 - https://github.com/urbanairship/ios-library/blob/main/Documentation/Migration/migration-guide-16-17.md#renamed-classes