274c5c78c4
Summary: This adds a persistent cookie store that shares cookies with WebView. Add a `ForwardingCookieHandler` to OkHttp that uses the underlying Android webkit `CookieManager`. Use a `LazyCookieHandler` to defer initialization of `CookieManager` as this will in turn trigger initialization of the Chromium stack in KitKat+ which takes some time. This was we will incur this cost on a background network thread instead of during startup. Also add a `clearCookies()` method to the network module. Add a cookies example to the XHR example. This example should also work for iOS (except for the clear cookies part). They are for now just scoped to Android. Closes #2792. public Reviewed By: andreicoman11 Differential Revision: D2615550 fb-gh-sync-id: ff726a35f0fc3c7124d2f755448fe24c9d1caf21 |
||
---|---|---|
.. | ||
AnimatedGratuitousApp | ||
Navigator | ||
Thumbnails | ||
UIExplorer | ||
UIExplorer.xcodeproj | ||
UIExplorerIntegrationTests | ||
UIExplorerUnitTests | ||
android/app | ||
AccessibilityAndroidExample.android.js | ||
AccessibilityIOSExample.js | ||
ActionSheetIOSExample.js | ||
ActivityIndicatorIOSExample.js | ||
AdSupportIOSExample.js | ||
AlertIOSExample.js | ||
AnimatedExample.js | ||
AppStateIOSExample.js | ||
AssetScaledImageExample.js | ||
AsyncStorageExample.js | ||
BorderExample.js | ||
CameraRollExample.ios.js | ||
CameraRollView.ios.js | ||
DatePickerIOSExample.js | ||
ExampleTypes.js | ||
GeolocationExample.js | ||
ImageCapInsetsExample.js | ||
ImageEditingExample.js | ||
ImageExample.js | ||
IntentAndroidExample.android.js | ||
LayoutEventsExample.js | ||
LayoutExample.js | ||
ListViewExample.js | ||
ListViewGridLayoutExample.js | ||
ListViewPagingExample.js | ||
MapViewExample.js | ||
ModalExample.js | ||
NavigatorIOSColorsExample.js | ||
NavigatorIOSExample.js | ||
NetInfoExample.js | ||
PanResponderExample.js | ||
PickerIOSExample.js | ||
PointerEventsExample.js | ||
ProgressBarAndroidExample.android.js | ||
ProgressViewIOSExample.js | ||
PushNotificationIOSExample.js | ||
RCTRootViewIOSExample.js | ||
README.md | ||
ScrollViewExample.js | ||
ScrollViewSimpleExample.js | ||
SegmentedControlIOSExample.js | ||
SetPropertiesExampleApp.js | ||
SliderIOSExample.js | ||
StatusBarIOSExample.js | ||
SwitchAndroidExample.android.js | ||
SwitchIOSExample.js | ||
TabBarIOSExample.js | ||
TextExample.android.js | ||
TextExample.ios.js | ||
TextInputExample.android.js | ||
TextInputExample.ios.js | ||
TimerExample.js | ||
ToastAndroidExample.android.js | ||
ToolbarAndroidExample.android.js | ||
TouchableExample.js | ||
TransformExample.js | ||
TransparentHitTestExample.js | ||
UIExplorerApp.android.js | ||
UIExplorerApp.ios.js | ||
UIExplorerBlock.js | ||
UIExplorerButton.js | ||
UIExplorerList.android.js | ||
UIExplorerList.ios.js | ||
UIExplorerListBase.js | ||
UIExplorerPage.js | ||
UIExplorerTitle.js | ||
VibrationIOSExample.js | ||
ViewExample.js | ||
ViewPagerAndroidExample.android.js | ||
WebViewExample.js | ||
XHRExample.android.js | ||
XHRExample.ios.js | ||
XHRExampleCookies.js | ||
XHRExampleHeaders.js | ||
bunny.png | ||
createExamplePage.js | ||
flux@3x.png | ||
hawk.png |
README.md
UIExplorer
The UIExplorer is a sample app that showcases React Native views and modules.
Running this app
Before running the app, make sure you ran:
git clone https://github.com/facebook/react-native.git
cd react-native
npm install
Running on iOS
Mac OS and Xcode are required.
- Open
Examples/UIExplorer/UIExplorer.xcodeproj
in Xcode - Hit the Run button
See Running on device if you want to use a physical device.
Running on Android
You'll need to have all the prerequisites (SDK, NDK) for Building React Native installed.
Start an Android emulator (Genymotion is recommended).
cd react-native
./gradlew :Examples:UIExplorer:android:app:installDebug
./packager/packager.sh
Note: Building for the first time can take a while.
Open the UIExplorer app in your emulator.
See Running on Device in case you want to use a physical device.
Built from source
Building the app on both iOS and Android means building the React Native framework from source. This way you're running the latest native and JS code the way you see it in your clone of the github repo.
This is different from apps created using react-native init
which have a dependency on a specific version of React Native JS and native code, declared in a package.json
file (and build.gradle
for Android apps).