Move plugin docs to plugin folders
Summary: Moved plugin documentation and related assets to plugin folders, fixed links and configured redirects where required. Now these docs are used for both showing docs in Flipper and generating Flipper docs website. Reviewed By: passy Differential Revision: D29465567 fbshipit-source-id: 3ec4240b215b0d5baea5154f64266a9ba7ead3a5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4ad7a70ee3
commit
039d3a4a08
@@ -0,0 +1,7 @@
|
||||
import useBaseUrl from '@docusaurus/useBaseUrl';
|
||||
|
||||
Easily inspect and modify the data contained within your app's shared preferences.
|
||||
|
||||
<img alt="Shared Preferences Plugin" src={useBaseUrl("img/shared-preferences.png")} />
|
||||
|
||||
All changes to the given shared preference file will automatically appear in Flipper. You may also edit the values in Flipper and have them synced to your device. This can be done by clicking on the value of the specific key you wish to edit, editing the value and then pressing enter.
|
||||
44
desktop/plugins/public/shared_preferences/docs/setup.mdx
Normal file
44
desktop/plugins/public/shared_preferences/docs/setup.mdx
Normal file
@@ -0,0 +1,44 @@
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
This plugin is available for both Android and iOS.
|
||||
|
||||
## Android
|
||||
|
||||
```java
|
||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||
|
||||
client.addPlugin(
|
||||
new SharedPreferencesFlipperPlugin(context, "my_shared_preference_file"));
|
||||
```
|
||||
|
||||
## iOS
|
||||
|
||||
If you want to use the Shared Preferences plugin, you need to add `FlipperKit/FlipperKitUserDefaultsPlugin` to your Podfile.
|
||||
|
||||
```ruby
|
||||
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', '~>' + flipperkit_version
|
||||
```
|
||||
|
||||
Initialize the plugin in the following way:
|
||||
|
||||
<Tabs defaultValue="ios" values={[{ label: 'iOS', value: 'ios'}, { label: 'Swift', value: 'swift'}]}>
|
||||
<TabItem value="ios">
|
||||
|
||||
```objectivec
|
||||
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
|
||||
|
||||
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:@"your_suitename"]];
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="swift">
|
||||
|
||||
```swift
|
||||
import FlipperKit
|
||||
|
||||
client?.add(FKUserDefaultsPlugin.init(suiteName: "your_suitename"))
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
Reference in New Issue
Block a user