-
Notifications
You must be signed in to change notification settings - Fork 7
android secure storage #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Included missing dependencies into the gradle templates and players settings
BellringerQuinn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm adding a few things to make an easier onboarding experience for integrators. Let's hold off on merging for just a touch
…ecorrect name of the library it uses for storage
…e so that if an integrator doesn't want to use secure storage, then they won't need to add a bunch of unnecessary android specific build files (manifests, gradle templates, etc.) in their publishing settings and can just use the Unity defaults. Without the script define, failure to include these will either cause a build failure or an exception on startup when Unity runtime is unable to locate the Java class, whether or not we use the code that tries to access the Java dependancy (if it is in the build, it will throw). Before building, either enable or disable the scripting define based on whether or not we have enabled the secure storage in SequenceConfig.
… storage enabled in sequence config
…hat's for the the README.md
… running at the end (as you must click to confirm and continue if a build fails
…re-processor define script is being added/removed and that the android key bridge plugin is being enabled/disabled accordingly.
…storage will not work - if not present log a warning and re-direct integrator to our docs. One of these two files are required in order to build, without it, the build will fail - in this case, the warning logs will not appear, so we display a popup to make sure the user sees the warning.
|
@caballoninja check this out, I've added a couple things to make the integration process easier. Starting with a docs PR (linked above in description). Since adding the custom gradle files are only needed for the secure storage, I've added them there. I noticed that if the Android Java plugin is present in the project when we try to build, the build will fail if we don't have the custom gradle files. So, I've added a pre-build script that will enable or disable the plugin based on whether or not we have enabled secure storage in SequenceConfig Then, once we've built the project without the Android Java plugin, we will get an exception at startup. This is because we have code in the project (AndroidKeystoreStorage.cs) that attempts to access it; whether or not this code is reached, it will throw an exception on startup. So, I nested this in a pre-processor directive/scripting define symbol; this is also added/removed by pre-build script based on SequenceConfig Finally, I've assumed that integrators don't actually read our documentation 😮💨; I have a script that will check if you have enabled using custom gradle files (for each of them we need) and will log a warning if you don't so that integrators have more context on why things aren't working and direct them to the docs. Since a failing build will clear the warnings, I also trigger a popup that displays the warnings as well |

Docs Checklist
Please ensure you have addressed documentation updates if needed as part of this PR: