prebid / prebid-mobile-ios

Prebid Mobile SDK for iOS applications
Apache License 2.0
47 stars 89 forks source link

PBMUIApplicationProtocol.h #981

Closed ankit-thanekar007 closed 4 months ago

ankit-thanekar007 commented 4 months ago

Hi, I wanted to know if we can remove the deprecated API.

https://github.com/prebid/prebid-mobile-ios/blob/master/PrebidMobile/PrebidMobileRendering/Utilities/PBMUIApplicationProtocol.h

Is it used for tests ?

https://github.com/prebid/prebid-mobile-ios/blob/master/PrebidMobileTests/RenderingTests/Mocks/MockUIApplication.swift

The reason I ask is because this is causing warnings in multiple projects for us, because it thinks that we're using

UIApplication.openURL(): https://developer.apple.com/documentation/uikit/uiapplication/1622961-openurl

Instead of

UIApplication.open() https://developer.apple.com/documentation/uikit/uiapplication/1648685-open

because the automatic Swift bridging is picking up the protocol from PBMUIApplicationProtocol.h and renaming it to UIApplication.open()

For solution we can do the following :

  1. Remove the deprecated method from the protocol
  2. Use NS_SWIFT_NAME(openURL) to properly bridge this to Swift.

Any other solution is welcomed as well.

@YuriyVelichkoPI @jsligh

ankit-thanekar007 commented 4 months ago

We can also move it to Swift and make it internal only so it doesn't affect the client apps.