theappbusiness / TABTestKit

Library designed to make writing and maintaining automated tests for iOS applications. This includes automation of bio-metrics and controlling of mock servers
MIT License
59 stars 13 forks source link

Added Swift Package Manager support #116

Closed KaneCheshire closed 4 years ago

KaneCheshire commented 4 years ago

Fixes #40

Before merging, need to make sure this works with Xcode 11 / Xcode 12, and also that you can still use Cocoapods and Carthage without any problems.

KaneCheshire commented 4 years ago

Xcode 12 SPM:

image

Note: to use the biometrics stuff directly, you need to import Biometrics at the top. If you're just using the helper functions in BiometricsContext, you can just import TABTestKit because BiometricsContext.swift imports Biometrics.

KaneCheshire commented 4 years ago

Xcode 11 SPM:

image

Also noticed you can create an instance of Biometrics with Biometrics.init. There's no harm since it doesn't do anything, but we can probably hide the init to make it a bit more obvious you don't create an instance and just use the class methods.

Should also update the README with info specifically for SPM, like needing to import Biometrics

KaneCheshire commented 4 years ago

Xcode 11 Cocoapods:

image

Biometrics import not needed

KaneCheshire commented 4 years ago

Xcode 12 Cocoapods:

image
zacoid55 commented 4 years ago

@KaneCheshire well this is damn exciting! Code looks good but it looks like Travis is having issues with the tests, specifically around Biometrics

KaneCheshire commented 4 years ago

@zacoid55 yeah I think it's the Carthage checks that are failing. Although the last build on develop also failed when the last PR was merged :/

KaneCheshire commented 4 years ago

Ah it's trying to build the package on Xcode 10.* which will never work because SPM is 11+. Will have to look into how to only run for one tomorrow

KaneCheshire commented 4 years ago

Now works with Carthage too 👌

KaneCheshire commented 4 years ago

Hmm one of the UI tests is failing on Xcode 11

KaneCheshire commented 4 years ago

Passed this time, looks like we might have a flake. Merging now