Open source the Sandbox plugin

Summary: This diff is mainly moving diffs around to open source the Sandbox plugin. I created the MD file writing some docs. The rest is just making our own FB implementation work

Reviewed By: danielbuechele

Differential Revision: D8731839

fbshipit-source-id: 27ac67223c6de9d1be406ab8c06b71b82d5407bc
This commit is contained in:
Edoardo Tognoni
2018-07-05 09:09:01 -07:00
committed by Facebook Github Bot
parent 03a8e696a9
commit 53753801b0
7 changed files with 276 additions and 1 deletions

25
docs/sandbox-plugin.md Normal file
View File

@@ -0,0 +1,25 @@
---
id: sandbox-plugin
title: Sandbox
---
The Sandbox plugin is useful for developers that had to test changes of their apps by pointing them to some Sandbox environment. Through this plugin and a few lines of code in the client,
the app can get a callback and get the value that the user has input through Sonar. At this point, the developer can plugin its logic to save this setting in its app.
## Setup
To use the sandbox plugin, you need to add the plugin to your Sonar client instance.
### Android
```java
import com.facebook.sonar.plugins.SandboxSonarPlugin;
import com.facebook.sonar.plugins.SandboxSonarPluginStrategy;
final SandboxSonarPluginStrategy strategy = getStrategy(); // Your strategy goes here
client.addPlugin(new SandboxSonarPlugin(strategy));
```
### iOS
Coming soon