matomo-org / matomo-sdk-ios

Matomo iOS, tvOS and macOS SDK: a Matomo tracker written in Swift
MIT License
388 stars 164 forks source link

Migrate project to Swift 5.0 #306

Closed simonnickel closed 5 years ago

simonnickel commented 5 years ago

Basic automatically migrated to Swift 5.0 to get rid of warnings when using the SDK.

brototyp-bot commented 5 years ago
1 Warning
:warning: Are there any changes that should be explained in the README.md?

Generated by :no_entry_sign: Danger

simonnickel commented 5 years ago

Updated cocoapods (Quick and Nimble ) used in Test target to support Swift 5.0

simonnickel commented 5 years ago

Changed Swift version to 5.0 in Example project targets

simonnickel commented 5 years ago

$ rake test xcodebuild -workspace MatomoTracker.xcworkspace -scheme 'MatomoTracker' -sdk 'iphonesimulator' -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.2' -configuration Debug clean test | xcpretty -c ; exit ${PIPESTATUS[0]} Clean Succeeded ❌ error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'MatomoTracker') ❌ error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'Nimble') ❌ error: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'MatomoTrackerTests')

Seems like integration tools are not up-to-date?

brototyp commented 5 years ago

Hi @simonnickel, thanks for your PR. Have a look here. This should help you to select the Xcode version.

simonnickel commented 5 years ago

Still failing.

Not sure why though. This is the only information:

MatomoTrackerTests: xctest (3481) encountered an error (Failed to establish communication with the test runner. (Underlying error: The operation couldn’t be completed. (DTXProxyChannel error 1.)))

simonnickel commented 5 years ago

Retried and Tests are passing now :)

Had removed tests for iOS 9.3 and 8.4 though. Can anyone give support to reenable them? Or should the deployment target be upgraded to iOS 10?

brototyp commented 5 years ago

Hey @simonnickel, thanks for your work here. Looks great!

Yeah, the issue with the iOS 8 and 9 Simulators is simply that they aren't shipped with Xcode 10.3 anymore. So afaik there is no Xcode that supports Swift 5 as well as iOS 8 and 9 (aside of installing the simulators using an older version of Xcode, but that's just not supported by any CI afaik).

So, yes. Let's drop the support for iOS 8 and 9.

I'll do that on a different commit, so I can merge your PR here. Thanks again for your work here!

brototyp commented 5 years ago

This just got released in version 7.0.0