Skip to content

Latest commit

 

History

History
73 lines (59 loc) · 3.43 KB

CONTRIBUTING.md

File metadata and controls

73 lines (59 loc) · 3.43 KB

Contributing

We're so excited you're interested in helping with SuperTokens! We are happy to help you get started, even if you don't have any previous open-source experience 😊

New to Open Source?

  1. Take a look at How to Contribute to an Open Source Project on GitHub
  2. Go thorugh the SuperTokens Code of Conduct

Where to ask Questions?

  1. Check our Github Issues to see if someone has already answered your question.
  2. Join our community on Discord and feel free to ask us your questions

Development Setup

Prerequisites

  • OS: macOS
  • IDE: XCode
  • NodeJS
  • Java

Project Setup

  1. Please setup supertokens-core by following this guide. If you are not contributing to supertokens-core, please skip steps 1 & 4 under "Project Setup" section.
  2. Clone the forked repository in the parent directory of the previously setup supertokens-root. That is, supertokens-ios and supertokens-root should exist side by side within the same parent directory.
  3. cd supertokens-ios
  4. Add git pre-commit hooks
    ./setup-pre-commit.sh
    

Modifying Code

  1. Open the supertokens-ios project in XCode by double clicking on ./Example/SuperTokensSession.xcworkspace.
  2. You can start modifying the code.

Testing

  1. Navigate to the supertokens-root repository

  2. Start the testing environment

    ./startTestingEnv --wait
    
  3. In a new terminal, navigate to the supertokens-ios repository.

  4. Start a node server required for testing

    cd ./testHelpers/server/
    npm i -d
    npm i git+https://github.com:supertokens/supertokens-node.git
    cd ../..
    ./testHelpers/startServer ../supertokens-root
    
  5. Open a new terminal in supertokens-ios and run all tests

    xcodebuild test -enableCodeCoverage YES -workspace testHelpers/testapp/SuperTokensSession.xcworkspace -scheme SuperTokensSession-Example -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=16.1,name=iPhone 14 Pro' ONLY_ACTIVE_ARCH=NO
    

    Alternatively, you can also run all tests via XCode. The tests are present in the testHelpers/testapp project.

  6. If all tests pass the output should be:

    IOS tests passing

Pull Request

  1. Before submitting a pull request make sure all tests have passed
  2. Reference the relevant issue or pull request and give a clear description of changes/features added when submitting a pull request

SuperTokens Community

SuperTokens is made possible by a passionate team and a strong community of developers. If you have any questions or would like to get more involved in the SuperTokens community you can check out:

Additional resources you might find useful: