To setup this library you will need a mac, without one you can't publish or run this library.
Once you get a mac you can just clone this repo and this is all you need.
Open the Legiti.xcworkspace
and make the changes you want.
There are 2 different tests in this repo:
- Go to the LegitiUnitTest folder inside Xcode
- Run the unit test located in the
LegitiUnitTests.swift
file (Just press the "play" icon in line 12)
To run the integration test you should run the test app that is located inside the library
- In Xcode change the target from the library to the LegitiTestApp (The button to change the target is the first button after the play and stop buttons. Just click the Legiti and a dropdown should appear showing the available targets)
- Run the app
- Inside the app you can trigger the desired tracking actions
- Check if data corresponding to the events you've triggered appear in the
sessions table
in the staging DB (You can use thetracker_name
legiti.ios.tracker
to help you find the results)
To publish a new version of the Legiti iOS Library you need to follow this steps:
- Clone the Legiti-swift-framework-dist (
git clone git@github.com:Legiti/legiti-swift-framework-dist.git
) repo to the parent directory of where this library was cloned - Go back to the this repository
- Run the
./scripts/build-xcframework.sh
script - Go to the
legiti-swift-framework-dist
repo (cd ../legiti-swift-framework-dist
) - Run the following commands:
git add .
git commit -m "<an informative message here>"
git push origin master
git tag -a <new version> -m "<what changed?>"
git push origin --tags
- Go back to this repository (
cd ../Legiti-ios
) - Update the version inside the
Legiti.podspec
file - Publish the library
pod trunk push Legiti.podspec