snipeit-scanner/README.md

1.9 KiB

SnipeIT Scanner App

This is a scanner app for SnipeIT.

Creating JSON File for User Dropdown

// https://snipe.example.com/scanner_users.json
[
    {
        "name": "Max Mustermann",
        "token": "encrypted_token"
    }
]

The Key needs to be an encrypted API Key from SnipeIT. It's encrypted using AES in ECB mode using a numeric secret. The PIN in the login screen is prefixed with 0's until it has a length of 32. A script to generate a user entry for the JSON file lies here

I would not recommend to make this file available to the internet, as it uses weak pin codes as encryption for your access tokens. It's meant to be only available within your company network.

Development

To develop for this project setup an editor according to this After you have set up your editor successfully you need to run the initialize.sh script to initialize this project. It installs all the dependencies.

New Release

To release a new version open pubspec.yaml and edit the version number. Depending on your changes, increase either the major, minor or bugfix number. Also you need to increase the build number by one.

e.g. current version string: version: 1.3.5+16 next version: version: 1.3.6 next build number: 17 so your next tag should read version: 1.3.6+17

After this commit your code to the repository 🤓.

Run the build.sh script (if you are on linux or macos) It currently runs flutter build appbundle --release but if in the future this app needs more steps to build, it can be simply added to the build.sh

google REQUIRES build numbers to be unique when uploading to the play store!

Finally your new build (for the android app) resides in build/app/outputs/bundle which you can then distribute to your devices.