aptabase / aptabase-swift

Swift SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps
https://aptabase.com
MIT License
23 stars 8 forks source link

Fix compile issues on Swift 5.6 #7

Closed manucheri closed 1 year ago

manucheri commented 1 year ago

The package manifest and Podspec indicates that the package is supporting Swift 5.5 and up, but the code uses optional binding syntax introduced first in Swift 5.7 - causing compilation errors on versions below that.

error: variable binding in a condition requires an initializer

An alternative to this PR is to keep the more modern syntax for optional binding, but then we might need to bump the minimum supported Swift version to Swift 5.7.

I have not tested Swift 5.5 (don't have easy access to the toolchain), but I hope/think it should work fine there, but it can be good to test.

goenning commented 1 year ago

That's another reason to setup github actions 😅