exponea / exponea-ios-sdk

MIT License
19 stars 27 forks source link

BC-breaking use of `isElementFullscreenEnabled` #38

Closed username0x0a closed 1 year ago

username0x0a commented 1 year ago

In Xcode 13.4.1/iOS 15.5 SDK, WKPreferences.isElementFullscreenEnabled is defined as API_AVAILABLE(macos(12.0), ios(15.0)). However in Xcode 14/iOS 16 SDK, this has been changed to API_AVAILABLE(macos(12.3), ios(15.4)) – this can be seen both in the reference for the property in Xcode 14 as well as on Apple Documentation website. Apple screwed it here, but they probably have reasons to rise that requirement in the end.

Because of this line:

        if #available(iOS 15.0, *) {
            preferences.isElementFullscreenEnabled = false
        }

Exponea package fails to compile in Xcode 14.

I'd suggest to simply rise the if #available condition to 15.4, just so it can be compiled now with Xcode 13.4.1 as well as later on with Xcode 14.

Now I can see I'm duplicating #37 😅 but doing it this way would allow building Exponea everywhere, with no public API being broken as this mentioned code is internal. 👍

Xcode 14 is also in RC so there's not really a high probability this will change.

adam1929 commented 1 year ago

Fix delivered in latest release https://github.com/exponea/exponea-ios-sdk/releases/tag/2.12.3