This repository has been created to ease the job of authentication and integration process with Tamatem platform just by implementing the following steps:
Once your Unity project is ready and you want to setup your Android game/app, please follow the steps below:
- Go to File -> Build Settings...
- Click on Player Settings then make sure Android tab is selected.
- Open Publisher Settings panel.
- Check
Custom Gradle Properties Templatecheckbox. - Now Open
gradleTemplate.gradlefile and paste the following line at the end of file.
android.useAndroidX=true- Close the Player Settings screens and make sure the "Export Project" checkbox is checked.
- Press on the Export button and choose the folder that will contain the Android project.
- Open the project using Android Studio and run your app.
Once your Unity project is ready and you want to setup your iOS game/app, please follow the steps below:
- Go to File -> Build Settings...
- Press on "Build And Run" and choose the folder that will contain the iOS project.
- Once its finished, it will open the project on xCode.
- Go to "Unity-iPhone" Target and open the "Build Phase" tab.
- Expand the "Embed Frameworks" section and press the "+" button.
- Type "keyCSDK" to add "keyCSDK.framework".
- Now Make sure to stop all previous running tasks and run the app again.
- Congrats! your iOS app is ready to go.
- GAME_CLIENT_ID
- GAME_SCHEME
- GAME_REDIRECT_URI
- GAME_DEVELOPMENT_ENV
These values can be changed based on your game's configrations When setting GAME_DEVELOPMENT_ENV to true, means that it will connect the game to the dev server which is made for development purposed. Please make sure to set it to false before releasing to Production.
this method is to open the in-app browser to let the user login
this method is to get the logged-in user object
this method is to get the purchased items
this method is to get the redeemed items (you can set the is_redeemed parameter value from the AuthenticationBehaviour.cs script)
this method is to set a non-redeemed item to redeemed based on the inventory id
this method is to connect player's data based on the json object that will be sent (placeholder contains a sample of the json).
returns if user is logged in
triggers native authentication process
returns the logged-in user based on the sent token
returns all items
returns redeemed or non redeemed items based on isRedeemed
returns the status of the redeemed inventory
returns the token of the connected player's data
returns JToken containing the following
{
"id": 16,
"first_name": "Moath Test",
"last_name": "Test",
"email": "tesasdt+1@teasdsa3dasdasdasdst.com",
"country": "american-samoa",
"phone_number": "+962797351170",
"date_of_birth": "2022-05-14",
"sign_up_through": "email",
"gender": "f",
"qr_code": "/media/qr-codes/PR22000006.png",
"avatar": null,
"tamatem_id": "PR22000006"
}