Regenerate example app (#303)
@ -1,4 +1,4 @@
|
|||||||
examples
|
example
|
||||||
|
|
||||||
# Assets
|
# Assets
|
||||||
docs
|
docs
|
||||||
|
12
README.md
@ -16,8 +16,6 @@ A component for UIVisualEffectView's blur and vibrancy effect on iOS, and [500px
|
|||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
**NOTE:** Latest version of the package is available in npm as `react-native-blur@3.0.0-alpha`
|
|
||||||
|
|
||||||
1. Install package via npm:
|
1. Install package via npm:
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -34,7 +32,7 @@ react-native link react-native-blur
|
|||||||
|
|
||||||
```
|
```
|
||||||
android {
|
android {
|
||||||
// make sure to use 23.0.3 instead of 23.0.1
|
// make sure to use 23.0.3 or greater
|
||||||
buildToolsVersion '23.0.3'
|
buildToolsVersion '23.0.3'
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
@ -50,10 +48,6 @@ android {
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import { BlurView, VibrancyView } from "react-native-blur";
|
import { BlurView, VibrancyView } from "react-native-blur";
|
||||||
|
|
||||||
// OR
|
|
||||||
|
|
||||||
const { BlurView, VibrancyView } = require("react-native-blur");
|
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Compile and have fun!
|
5. Compile and have fun!
|
||||||
@ -186,10 +180,10 @@ cd ~
|
|||||||
git clone https://github.com/react-native-community/react-native-blur.git
|
git clone https://github.com/react-native-community/react-native-blur.git
|
||||||
```
|
```
|
||||||
|
|
||||||
2. cd to `examples/Basic`
|
2. cd to `example`
|
||||||
|
|
||||||
```
|
```
|
||||||
cd react-native-blur/examples/Basic
|
cd react-native-blur/example
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Install dependencies
|
3. Install dependencies
|
||||||
|
@ -37,5 +37,5 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.facebook.react:react-native:[0.32,)'
|
implementation 'com.facebook.react:react-native:+'
|
||||||
}
|
}
|
||||||
|
69
example/.flowconfig
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
[ignore]
|
||||||
|
; We fork some components by platform
|
||||||
|
.*/*[.]android.js
|
||||||
|
|
||||||
|
; Ignore "BUCK" generated dirs
|
||||||
|
<PROJECT_ROOT>/\.buckd/
|
||||||
|
|
||||||
|
; Ignore unexpected extra "@providesModule"
|
||||||
|
.*/node_modules/.*/node_modules/fbjs/.*
|
||||||
|
|
||||||
|
; Ignore duplicate module providers
|
||||||
|
; For RN Apps installed via npm, "Libraries" folder is inside
|
||||||
|
; "node_modules/react-native" but in the source repo it is in the root
|
||||||
|
.*/Libraries/react-native/React.js
|
||||||
|
|
||||||
|
; Ignore polyfills
|
||||||
|
.*/Libraries/polyfills/.*
|
||||||
|
|
||||||
|
; Ignore metro
|
||||||
|
.*/node_modules/metro/.*
|
||||||
|
|
||||||
|
[include]
|
||||||
|
|
||||||
|
[libs]
|
||||||
|
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||||
|
node_modules/react-native/flow/
|
||||||
|
|
||||||
|
[options]
|
||||||
|
emoji=true
|
||||||
|
|
||||||
|
esproposal.optional_chaining=enable
|
||||||
|
esproposal.nullish_coalescing=enable
|
||||||
|
|
||||||
|
module.system=haste
|
||||||
|
module.system.haste.use_name_reducers=true
|
||||||
|
# get basename
|
||||||
|
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
|
||||||
|
# strip .js or .js.flow suffix
|
||||||
|
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
|
||||||
|
# strip .ios suffix
|
||||||
|
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
|
||||||
|
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
|
||||||
|
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||||
|
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||||
|
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||||
|
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||||
|
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||||
|
|
||||||
|
munge_underscores=true
|
||||||
|
|
||||||
|
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||||
|
|
||||||
|
module.file_ext=.js
|
||||||
|
module.file_ext=.jsx
|
||||||
|
module.file_ext=.json
|
||||||
|
module.file_ext=.native.js
|
||||||
|
|
||||||
|
suppress_type=$FlowIssue
|
||||||
|
suppress_type=$FlowFixMe
|
||||||
|
suppress_type=$FlowFixMeProps
|
||||||
|
suppress_type=$FlowFixMeState
|
||||||
|
|
||||||
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||||
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||||
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||||
|
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||||
|
|
||||||
|
[version]
|
||||||
|
^0.92.0
|
11
examples/Basic/.gitignore → example/.gitignore
vendored
@ -46,8 +46,11 @@ buck-out/
|
|||||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||||
# screenshots whenever they are needed.
|
# screenshots whenever they are needed.
|
||||||
# For more information about the recommended setup visit:
|
# For more information about the recommended setup visit:
|
||||||
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
|
# https://docs.fastlane.tools/best-practices/source-control/
|
||||||
|
|
||||||
fastlane/report.xml
|
*/fastlane/report.xml
|
||||||
fastlane/Preview.html
|
*/fastlane/Preview.html
|
||||||
fastlane/screenshots
|
*/fastlane/screenshots
|
||||||
|
|
||||||
|
# Bundle artifact
|
||||||
|
*.jsbundle
|
@ -2,26 +2,24 @@
|
|||||||
* Basic [Android] Example for react-native-blur
|
* Basic [Android] Example for react-native-blur
|
||||||
* https://github.com/react-native-community/react-native-blur
|
* https://github.com/react-native-community/react-native-blur
|
||||||
*/
|
*/
|
||||||
'use strict';
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import {
|
import {
|
||||||
AppRegistry,
|
Dimensions,
|
||||||
Image,
|
Image,
|
||||||
findNodeHandle,
|
InteractionManager,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
|
Switch,
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
Dimensions,
|
findNodeHandle,
|
||||||
Switch,
|
|
||||||
InteractionManager,
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import AndroidSegmented from 'react-native-segmented-android';
|
import SegmentedControlTab from 'react-native-segmented-control-tab';
|
||||||
|
|
||||||
import { BlurView } from 'react-native-blur';
|
import { BlurView } from 'react-native-blur';
|
||||||
|
|
||||||
const BLUR_TYPES = ['xlight', 'light', 'dark'];
|
const BLUR_TYPES = ['xlight', 'light', 'dark'];
|
||||||
|
|
||||||
class Basic extends Component {
|
export default class Basic extends Component {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -72,7 +70,7 @@ class Basic extends Component {
|
|||||||
Blur component (Android)
|
Blur component (Android)
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<AndroidSegmented
|
<SegmentedControlTab
|
||||||
tintColor={tintColor}
|
tintColor={tintColor}
|
||||||
style={{
|
style={{
|
||||||
width: Dimensions.get('window').width,
|
width: Dimensions.get('window').width,
|
||||||
@ -80,10 +78,10 @@ class Basic extends Component {
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}
|
}}
|
||||||
childText={BLUR_TYPES}
|
values={BLUR_TYPES}
|
||||||
orientation="horizontal"
|
orientation="horizontal"
|
||||||
selectedPosition={this.state.activeSegment}
|
selectedIndex={this.state.activeSegment}
|
||||||
onChange={this._onChange.bind(this)} />
|
onTabPress={this._onChange.bind(this)} />
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
@ -148,5 +146,3 @@ const styles = StyleSheet.create({
|
|||||||
alignItems: 'flex-end',
|
alignItems: 'flex-end',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
AppRegistry.registerComponent('Basic', () => Basic);
|
|
@ -4,18 +4,17 @@
|
|||||||
*/
|
*/
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import {
|
import {
|
||||||
AppRegistry,
|
|
||||||
StyleSheet,
|
|
||||||
Text,
|
|
||||||
Image,
|
Image,
|
||||||
View,
|
|
||||||
SegmentedControlIOS,
|
SegmentedControlIOS,
|
||||||
|
StyleSheet,
|
||||||
Switch,
|
Switch,
|
||||||
|
Text,
|
||||||
|
View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
|
||||||
import { BlurView, VibrancyView } from 'react-native-blur';
|
import { BlurView, VibrancyView } from 'react-native-blur';
|
||||||
|
|
||||||
class Basic extends Component {
|
export default class Basic extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@ -165,5 +164,3 @@ const styles = StyleSheet.create({
|
|||||||
alignItems: 'flex-end',
|
alignItems: 'flex-end',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
AppRegistry.registerComponent('Basic', () => Basic);
|
|
@ -8,23 +8,13 @@
|
|||||||
# - `buck install -r android/app` - compile, install and run application
|
# - `buck install -r android/app` - compile, install and run application
|
||||||
#
|
#
|
||||||
|
|
||||||
|
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
|
||||||
|
|
||||||
lib_deps = []
|
lib_deps = []
|
||||||
|
|
||||||
for jarfile in glob(['libs/*.jar']):
|
create_aar_targets(glob(["libs/*.aar"]))
|
||||||
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
|
|
||||||
lib_deps.append(':' + name)
|
|
||||||
prebuilt_jar(
|
|
||||||
name = name,
|
|
||||||
binary_jar = jarfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
for aarfile in glob(['libs/*.aar']):
|
create_jar_targets(glob(["libs/*.jar"]))
|
||||||
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
|
|
||||||
lib_deps.append(':' + name)
|
|
||||||
android_prebuilt_aar(
|
|
||||||
name = name,
|
|
||||||
aar = aarfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
android_library(
|
android_library(
|
||||||
name = "all-libs",
|
name = "all-libs",
|
||||||
@ -45,12 +35,12 @@ android_library(
|
|||||||
|
|
||||||
android_build_config(
|
android_build_config(
|
||||||
name = "build_config",
|
name = "build_config",
|
||||||
package = "com.basic",
|
package = "com.example",
|
||||||
)
|
)
|
||||||
|
|
||||||
android_resource(
|
android_resource(
|
||||||
name = "res",
|
name = "res",
|
||||||
package = "com.basic",
|
package = "com.example",
|
||||||
res = "src/main/res",
|
res = "src/main/res",
|
||||||
)
|
)
|
||||||
|
|
@ -33,6 +33,13 @@ import com.android.build.OutputFile
|
|||||||
* // bundleInPaidRelease: true,
|
* // bundleInPaidRelease: true,
|
||||||
* // bundleInBeta: true,
|
* // bundleInBeta: true,
|
||||||
*
|
*
|
||||||
|
* // whether to disable dev mode in custom build variants (by default only disabled in release)
|
||||||
|
* // for example: to disable dev mode in the staging build type (if configured)
|
||||||
|
* devDisabledInStaging: true,
|
||||||
|
* // The configuration property can be in the following formats
|
||||||
|
* // 'devDisabledIn${productFlavor}${buildType}'
|
||||||
|
* // 'devDisabledIn${buildType}'
|
||||||
|
*
|
||||||
* // the root of your project, i.e. where "package.json" lives
|
* // the root of your project, i.e. where "package.json" lives
|
||||||
* root: "../../",
|
* root: "../../",
|
||||||
*
|
*
|
||||||
@ -58,13 +65,17 @@ import com.android.build.OutputFile
|
|||||||
* inputExcludes: ["android/**", "ios/**"],
|
* inputExcludes: ["android/**", "ios/**"],
|
||||||
*
|
*
|
||||||
* // override which node gets called and with what additional arguments
|
* // override which node gets called and with what additional arguments
|
||||||
* nodeExecutableAndArgs: ["node"]
|
* nodeExecutableAndArgs: ["node"],
|
||||||
*
|
*
|
||||||
* // supply additional arguments to the packager
|
* // supply additional arguments to the packager
|
||||||
* extraPackagerArgs: []
|
* extraPackagerArgs: []
|
||||||
* ]
|
* ]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
project.ext.react = [
|
||||||
|
entryFile: "index.js"
|
||||||
|
]
|
||||||
|
|
||||||
apply from: "../../node_modules/react-native/react.gradle"
|
apply from: "../../node_modules/react-native/react.gradle"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,18 +94,19 @@ def enableSeparateBuildPerCPUArchitecture = false
|
|||||||
def enableProguardInReleaseBuilds = false
|
def enableProguardInReleaseBuilds = false
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
buildToolsVersion "23.0.3"
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.basic"
|
applicationId "com.example"
|
||||||
minSdkVersion 16
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion 22
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
ndk {
|
|
||||||
abiFilters "armeabi-v7a", "x86"
|
|
||||||
}
|
|
||||||
renderscriptTargetApi 23
|
renderscriptTargetApi 23
|
||||||
renderscriptSupportModeEnabled true
|
renderscriptSupportModeEnabled true
|
||||||
}
|
}
|
||||||
@ -103,7 +115,7 @@ android {
|
|||||||
reset()
|
reset()
|
||||||
enable enableSeparateBuildPerCPUArchitecture
|
enable enableSeparateBuildPerCPUArchitecture
|
||||||
universalApk false // If true, also generate a universal APK
|
universalApk false // If true, also generate a universal APK
|
||||||
include "armeabi-v7a", "x86"
|
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@ -117,7 +129,7 @@ android {
|
|||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
// For each separate APK per architecture, set a unique version code as described here:
|
// For each separate APK per architecture, set a unique version code as described here:
|
||||||
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
||||||
def versionCodes = ["armeabi-v7a":1, "x86":2]
|
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
|
||||||
def abi = output.getFilter(OutputFile.ABI)
|
def abi = output.getFilter(OutputFile.ABI)
|
||||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||||
output.versionCodeOverride =
|
output.versionCodeOverride =
|
||||||
@ -128,11 +140,10 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':react-native-blur')
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
compile project(':react-native-segmented-android')
|
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
|
||||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||||
compile "com.android.support:appcompat-v7:23.0.1"
|
implementation project(':react-native-blur')
|
||||||
compile "com.facebook.react:react-native:+" // From node_modules
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run this once to be able to run the application with BUCK
|
// Run this once to be able to run the application with BUCK
|
19
example/android/app/build_defs.bzl
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
"""Helper definitions to glob .aar and .jar targets"""
|
||||||
|
|
||||||
|
def create_aar_targets(aarfiles):
|
||||||
|
for aarfile in aarfiles:
|
||||||
|
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
|
||||||
|
lib_deps.append(":" + name)
|
||||||
|
android_prebuilt_aar(
|
||||||
|
name = name,
|
||||||
|
aar = aarfile,
|
||||||
|
)
|
||||||
|
|
||||||
|
def create_jar_targets(jarfiles):
|
||||||
|
for jarfile in jarfiles:
|
||||||
|
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
|
||||||
|
lib_deps.append(":" + name)
|
||||||
|
prebuilt_jar(
|
||||||
|
name = name,
|
||||||
|
binary_jar = jarfile,
|
||||||
|
)
|
17
example/android/app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# By default, the flags in this file are appended to flags specified
|
||||||
|
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
||||||
|
# You can edit the include path and order by changing the proguardFiles
|
||||||
|
# directive in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# Add any project specific keep options here:
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
8
example/android/app/src/debug/AndroidManifest.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||||
|
|
||||||
|
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
|
||||||
|
</manifest>
|
@ -1,20 +1,14 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.basic"
|
package="com.example">
|
||||||
android:versionCode="1"
|
|
||||||
android:versionName="1.0">
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
||||||
|
|
||||||
<uses-sdk
|
|
||||||
android:minSdkVersion="16"
|
|
||||||
android:targetSdkVersion="22" />
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".MainApplication"
|
android:name=".MainApplication"
|
||||||
android:allowBackup="true"
|
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:allowBackup="false"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
@ -1,4 +1,4 @@
|
|||||||
package com.basic;
|
package com.example;
|
||||||
|
|
||||||
import com.facebook.react.ReactActivity;
|
import com.facebook.react.ReactActivity;
|
||||||
|
|
||||||
@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String getMainComponentName() {
|
protected String getMainComponentName() {
|
||||||
return "Basic";
|
return "example";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +1,9 @@
|
|||||||
package com.basic;
|
package com.example;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
|
|
||||||
import com.facebook.react.ReactApplication;
|
import com.facebook.react.ReactApplication;
|
||||||
import com.cmcewen.blurview.BlurViewPackage;
|
import com.cmcewen.blurview.BlurViewPackage;
|
||||||
import com.higo.zhangyp.segmented.AndroidSegmentedPackage;
|
|
||||||
import com.facebook.react.ReactNativeHost;
|
import com.facebook.react.ReactNativeHost;
|
||||||
import com.facebook.react.ReactPackage;
|
import com.facebook.react.ReactPackage;
|
||||||
import com.facebook.react.shell.MainReactPackage;
|
import com.facebook.react.shell.MainReactPackage;
|
||||||
@ -25,10 +24,14 @@ public class MainApplication extends Application implements ReactApplication {
|
|||||||
protected List<ReactPackage> getPackages() {
|
protected List<ReactPackage> getPackages() {
|
||||||
return Arrays.<ReactPackage>asList(
|
return Arrays.<ReactPackage>asList(
|
||||||
new MainReactPackage(),
|
new MainReactPackage(),
|
||||||
new BlurViewPackage(),
|
new BlurViewPackage()
|
||||||
new AndroidSegmentedPackage()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getJSMainModuleName() {
|
||||||
|
return "index";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 4.9 KiB |
BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.8 KiB |
BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 6.9 KiB |
BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 10 KiB |
BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 15 KiB |
3
example/android/app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">example</string>
|
||||||
|
</resources>
|
@ -1,11 +1,19 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
ext {
|
||||||
|
buildToolsVersion = "28.0.3"
|
||||||
|
minSdkVersion = 16
|
||||||
|
compileSdkVersion = 28
|
||||||
|
targetSdkVersion = 28
|
||||||
|
supportLibVersion = "28.0.0"
|
||||||
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.3'
|
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@ -15,6 +23,7 @@ buildscript {
|
|||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven {
|
maven {
|
||||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
@ -16,5 +16,3 @@
|
|||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
|
|
||||||
android.useDeprecatedNdk=true
|
|
BIN
example/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
@ -6,47 +6,6 @@
|
|||||||
##
|
##
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS=""
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=`basename "$0"`
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
||||||
MAX_FD="maximum"
|
|
||||||
|
|
||||||
warn ( ) {
|
|
||||||
echo "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
die ( ) {
|
|
||||||
echo
|
|
||||||
echo "$*"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
|
||||||
cygwin=false
|
|
||||||
msys=false
|
|
||||||
darwin=false
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN* )
|
|
||||||
cygwin=true
|
|
||||||
;;
|
|
||||||
Darwin* )
|
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
|
||||||
if $cygwin ; then
|
|
||||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
PRG="$0"
|
||||||
@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
SAVED="`pwd`"
|
||||||
cd "`dirname \"$PRG\"`/" >&-
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
APP_HOME="`pwd -P`"
|
APP_HOME="`pwd -P`"
|
||||||
cd "$SAVED" >&-
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
@ -90,7 +89,7 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
@ -114,6 +113,7 @@ fi
|
|||||||
if $cygwin ; then
|
if $cygwin ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
@ -154,11 +154,19 @@ if $cygwin ; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
# Escape application args
|
||||||
function splitJvmOpts() {
|
save () {
|
||||||
JVM_OPTS=("$@")
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
}
|
}
|
||||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
APP_ARGS=$(save "$@")
|
||||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
|
||||||
|
|
||||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
@ -8,14 +8,14 @@
|
|||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS=
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
@ -46,10 +46,9 @@ echo location of your Java installation.
|
|||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
:init
|
||||||
@rem Get command-line arguments, handling Windowz variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
|
||||||
|
|
||||||
:win9xME_args
|
:win9xME_args
|
||||||
@rem Slurp the command line arguments.
|
@rem Slurp the command line arguments.
|
||||||
@ -60,11 +59,6 @@ set _SKIP=2
|
|||||||
if "x%~1" == "x" goto execute
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
set CMD_LINE_ARGS=%*
|
||||||
goto execute
|
|
||||||
|
|
||||||
:4NT_args
|
|
||||||
@rem Get arguments from the 4NT Shell from JP Software
|
|
||||||
set CMD_LINE_ARGS=%$
|
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
5
example/android/settings.gradle
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
rootProject.name = 'example'
|
||||||
|
include ':react-native-blur'
|
||||||
|
project(':react-native-blur').projectDir = new File(rootProject.projectDir, '../../android')
|
||||||
|
|
||||||
|
include ':app'
|
4
example/app.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"name": "example",
|
||||||
|
"displayName": "example"
|
||||||
|
}
|
3
example/babel.config.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: ['module:metro-react-native-babel-preset'],
|
||||||
|
};
|
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 191 KiB |
9
example/index.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* @format
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {AppRegistry} from 'react-native';
|
||||||
|
import App from './App';
|
||||||
|
import {name as appName} from './app.json';
|
||||||
|
|
||||||
|
AppRegistry.registerComponent(appName, () => App);
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0830"
|
LastUpgradeVersion = "0940"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "NO"
|
parallelizeBuildables = "NO"
|
||||||
@ -29,9 +29,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||||
BuildableName = "Basic-tvOS.app"
|
BuildableName = "example-tvOS.app"
|
||||||
BlueprintName = "Basic-tvOS"
|
BlueprintName = "example-tvOS"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
@ -43,9 +43,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
|
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
|
||||||
BuildableName = "Basic-tvOSTests.xctest"
|
BuildableName = "example-tvOSTests.xctest"
|
||||||
BlueprintName = "Basic-tvOSTests"
|
BlueprintName = "example-tvOSTests"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
</BuildActionEntries>
|
</BuildActionEntries>
|
||||||
@ -61,9 +61,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
|
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
|
||||||
BuildableName = "Basic-tvOSTests.xctest"
|
BuildableName = "example-tvOSTests.xctest"
|
||||||
BlueprintName = "Basic-tvOSTests"
|
BlueprintName = "example-tvOSTests"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
</Testables>
|
</Testables>
|
||||||
@ -71,9 +71,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||||
BuildableName = "Basic-tvOS.app"
|
BuildableName = "example-tvOS.app"
|
||||||
BlueprintName = "Basic-tvOS"
|
BlueprintName = "example-tvOS"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
<AdditionalOptions>
|
<AdditionalOptions>
|
||||||
@ -94,9 +94,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||||
BuildableName = "Basic-tvOS.app"
|
BuildableName = "example-tvOS.app"
|
||||||
BlueprintName = "Basic-tvOS"
|
BlueprintName = "example-tvOS"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
<AdditionalOptions>
|
<AdditionalOptions>
|
||||||
@ -113,9 +113,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||||
BuildableName = "Basic-tvOS.app"
|
BuildableName = "example-tvOS.app"
|
||||||
BlueprintName = "Basic-tvOS"
|
BlueprintName = "example-tvOS"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
</ProfileAction>
|
</ProfileAction>
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0830"
|
LastUpgradeVersion = "0940"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "NO"
|
parallelizeBuildables = "NO"
|
||||||
@ -29,9 +29,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "Basic.app"
|
BuildableName = "example.app"
|
||||||
BlueprintName = "Basic"
|
BlueprintName = "example"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
@ -43,9 +43,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||||
BuildableName = "BasicTests.xctest"
|
BuildableName = "exampleTests.xctest"
|
||||||
BlueprintName = "BasicTests"
|
BlueprintName = "exampleTests"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
</BuildActionEntries>
|
</BuildActionEntries>
|
||||||
@ -61,9 +61,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||||
BuildableName = "BasicTests.xctest"
|
BuildableName = "exampleTests.xctest"
|
||||||
BlueprintName = "BasicTests"
|
BlueprintName = "exampleTests"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
</Testables>
|
</Testables>
|
||||||
@ -71,9 +71,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "Basic.app"
|
BuildableName = "example.app"
|
||||||
BlueprintName = "Basic"
|
BlueprintName = "example"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</MacroExpansion>
|
</MacroExpansion>
|
||||||
<AdditionalOptions>
|
<AdditionalOptions>
|
||||||
@ -94,9 +94,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "Basic.app"
|
BuildableName = "example.app"
|
||||||
BlueprintName = "Basic"
|
BlueprintName = "example"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
<AdditionalOptions>
|
<AdditionalOptions>
|
||||||
@ -113,9 +113,9 @@
|
|||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||||
BuildableName = "Basic.app"
|
BuildableName = "example.app"
|
||||||
BlueprintName = "Basic"
|
BlueprintName = "example"
|
||||||
ReferencedContainer = "container:Basic.xcodeproj">
|
ReferencedContainer = "container:example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
</ProfileAction>
|
</ProfileAction>
|
15
example/ios/example/AppDelegate.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <React/RCTBridgeDelegate.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIWindow *window;
|
||||||
|
|
||||||
|
@end
|
42
example/ios/example/AppDelegate.m
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
|
#import <React/RCTBridge.h>
|
||||||
|
#import <React/RCTBundleURLProvider.h>
|
||||||
|
#import <React/RCTRootView.h>
|
||||||
|
|
||||||
|
@implementation AppDelegate
|
||||||
|
|
||||||
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||||
|
{
|
||||||
|
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
||||||
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
||||||
|
moduleName:@"example"
|
||||||
|
initialProperties:nil];
|
||||||
|
|
||||||
|
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
||||||
|
|
||||||
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||||
|
UIViewController *rootViewController = [UIViewController new];
|
||||||
|
rootViewController.view = rootView;
|
||||||
|
self.window.rootViewController = rootViewController;
|
||||||
|
[self.window makeKeyAndVisible];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
||||||
|
#else
|
||||||
|
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@ -18,7 +18,7 @@
|
|||||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Basic" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
||||||
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
||||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
||||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
@ -1,5 +1,15 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "20x20",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "20x20",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
@ -29,6 +39,11 @@
|
|||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"size" : "60x60",
|
"size" : "60x60",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "ios-marketing",
|
||||||
|
"size" : "1024x1024",
|
||||||
|
"scale" : "1x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
6
example/ios/example/Images.xcassets/Contents.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Basic</string>
|
<string>example</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@ -24,17 +24,6 @@
|
|||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSAppTransportSecurity</key>
|
|
||||||
<dict>
|
|
||||||
<key>NSExceptionDomains</key>
|
|
||||||
<dict>
|
|
||||||
<key>localhost</key>
|
|
||||||
<dict>
|
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
@ -51,5 +40,21 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
|
<string></string>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSExceptionDomains</key>
|
||||||
|
<dict>
|
||||||
|
<key>localhost</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
16
example/ios/example/main.m
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
|
int main(int argc, char * argv[]) {
|
||||||
|
@autoreleasepool {
|
||||||
|
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
@ -16,11 +14,11 @@
|
|||||||
#define TIMEOUT_SECONDS 600
|
#define TIMEOUT_SECONDS 600
|
||||||
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
|
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
|
||||||
|
|
||||||
@interface BasicTests : XCTestCase
|
@interface exampleTests : XCTestCase
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation BasicTests
|
@implementation exampleTests
|
||||||
|
|
||||||
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
|
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
|
||||||
{
|
{
|
||||||
@ -37,7 +35,7 @@
|
|||||||
|
|
||||||
- (void)testRendersWelcomeScreen
|
- (void)testRendersWelcomeScreen
|
||||||
{
|
{
|
||||||
UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
|
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
|
||||||
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
|
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
|
||||||
BOOL foundElement = NO;
|
BOOL foundElement = NO;
|
||||||
|
|
28
example/metro.config.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* Metro configuration for React Native
|
||||||
|
* https://github.com/facebook/react-native
|
||||||
|
*
|
||||||
|
* @format
|
||||||
|
*/
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const blacklist = require('metro-config/src/defaults/blacklist');
|
||||||
|
|
||||||
|
const reactNativeBlur = path.resolve(__dirname, '..');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
watchFolders: [path.resolve(__dirname, 'node_modules'), reactNativeBlur],
|
||||||
|
resolver: {
|
||||||
|
blacklistRE: blacklist([
|
||||||
|
new RegExp(`${reactNativeBlur}/node_modules/react-native/.*`),
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
transformer: {
|
||||||
|
getTransformOptions: async () => ({
|
||||||
|
transform: {
|
||||||
|
experimentalImportSupport: false,
|
||||||
|
inlineRequires: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
};
|
28
example/package.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "example",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||||
|
"test": "jest",
|
||||||
|
"lint": "eslint ."
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"react": "16.8.3",
|
||||||
|
"react-native": "0.59.2",
|
||||||
|
"react-native-segmented-control-tab": "^3.4.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.4.0",
|
||||||
|
"@babel/runtime": "^7.4.2",
|
||||||
|
"@react-native-community/eslint-config": "^0.0.3",
|
||||||
|
"babel-jest": "^24.5.0",
|
||||||
|
"eslint": "^5.15.3",
|
||||||
|
"jest": "^24.5.0",
|
||||||
|
"metro-react-native-babel-preset": "^0.53.1",
|
||||||
|
"react-test-renderer": "16.8.3"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"preset": "react-native"
|
||||||
|
}
|
||||||
|
}
|
6664
example/yarn.lock
Normal file
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"presets": ["react-native"]
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
[ignore]
|
|
||||||
; We fork some components by platform
|
|
||||||
.*/*[.]android.js
|
|
||||||
|
|
||||||
; Ignore "BUCK" generated dirs
|
|
||||||
<PROJECT_ROOT>/\.buckd/
|
|
||||||
|
|
||||||
; Ignore unexpected extra "@providesModule"
|
|
||||||
.*/node_modules/.*/node_modules/fbjs/.*
|
|
||||||
|
|
||||||
; Ignore duplicate module providers
|
|
||||||
; For RN Apps installed via npm, "Libraries" folder is inside
|
|
||||||
; "node_modules/react-native" but in the source repo it is in the root
|
|
||||||
.*/Libraries/react-native/React.js
|
|
||||||
.*/Libraries/react-native/ReactNative.js
|
|
||||||
|
|
||||||
[include]
|
|
||||||
|
|
||||||
[libs]
|
|
||||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
|
||||||
node_modules/react-native/flow
|
|
||||||
flow/
|
|
||||||
|
|
||||||
[options]
|
|
||||||
emoji=true
|
|
||||||
|
|
||||||
module.system=haste
|
|
||||||
|
|
||||||
experimental.strict_type_args=true
|
|
||||||
|
|
||||||
munge_underscores=true
|
|
||||||
|
|
||||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
|
||||||
|
|
||||||
suppress_type=$FlowIssue
|
|
||||||
suppress_type=$FlowFixMe
|
|
||||||
suppress_type=$FixMe
|
|
||||||
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
|
||||||
|
|
||||||
unsafe.enable_getters_and_setters=true
|
|
||||||
|
|
||||||
[version]
|
|
||||||
^0.40.0
|
|
66
examples/Basic/android/app/proguard-rules.pro
vendored
@ -1,66 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# By default, the flags in this file are appended to flags specified
|
|
||||||
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
|
||||||
# You can edit the include path and order by changing the proguardFiles
|
|
||||||
# directive in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# Add any project specific keep options here:
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Disabling obfuscation is useful if you collect stack traces from production crashes
|
|
||||||
# (unless you are using a system that supports de-obfuscate the stack traces).
|
|
||||||
-dontobfuscate
|
|
||||||
|
|
||||||
# React Native
|
|
||||||
|
|
||||||
# Keep our interfaces so they can be used by other ProGuard rules.
|
|
||||||
# See http://sourceforge.net/p/proguard/bugs/466/
|
|
||||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
|
|
||||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
|
|
||||||
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
|
|
||||||
|
|
||||||
# Do not strip any method/class that is annotated with @DoNotStrip
|
|
||||||
-keep @com.facebook.proguard.annotations.DoNotStrip class *
|
|
||||||
-keep @com.facebook.common.internal.DoNotStrip class *
|
|
||||||
-keepclassmembers class * {
|
|
||||||
@com.facebook.proguard.annotations.DoNotStrip *;
|
|
||||||
@com.facebook.common.internal.DoNotStrip *;
|
|
||||||
}
|
|
||||||
|
|
||||||
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
|
|
||||||
void set*(***);
|
|
||||||
*** get*();
|
|
||||||
}
|
|
||||||
|
|
||||||
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
|
|
||||||
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
|
|
||||||
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
|
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
|
|
||||||
|
|
||||||
-dontwarn com.facebook.react.**
|
|
||||||
|
|
||||||
# okhttp
|
|
||||||
|
|
||||||
-keepattributes Signature
|
|
||||||
-keepattributes *Annotation*
|
|
||||||
-keep class okhttp3.** { *; }
|
|
||||||
-keep interface okhttp3.** { *; }
|
|
||||||
-dontwarn okhttp3.**
|
|
||||||
|
|
||||||
# okio
|
|
||||||
|
|
||||||
-keep class sun.misc.Unsafe { *; }
|
|
||||||
-dontwarn java.nio.file.*
|
|
||||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
|
||||||
-dontwarn okio.**
|
|
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 7.5 KiB |
@ -1,3 +0,0 @@
|
|||||||
<resources>
|
|
||||||
<string name="app_name">Basic</string>
|
|
||||||
</resources>
|
|
@ -1,10 +0,0 @@
|
|||||||
rootProject.name = 'Basic'
|
|
||||||
include ':react-native-blur'
|
|
||||||
project(':react-native-blur').projectDir =
|
|
||||||
new File(rootProject.projectDir, '../../../android')
|
|
||||||
|
|
||||||
include ':react-native-segmented-android', ':app'
|
|
||||||
project(':react-native-segmented-android').projectDir =
|
|
||||||
new File(rootProject.projectDir,'../node_modules/react-native-segmented-android')
|
|
||||||
|
|
||||||
include ':app'
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Basic",
|
|
||||||
"displayName": "Basic"
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the BSD-style license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
|
|
||||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
|
||||||
|
|
||||||
@property (nonatomic, strong) UIWindow *window;
|
|
||||||
|
|
||||||
@end
|
|
@ -1,37 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the BSD-style license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
|
||||||
|
|
||||||
#import <React/RCTBundleURLProvider.h>
|
|
||||||
#import <React/RCTRootView.h>
|
|
||||||
|
|
||||||
@implementation AppDelegate
|
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
||||||
{
|
|
||||||
NSURL *jsCodeLocation;
|
|
||||||
|
|
||||||
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
|
|
||||||
|
|
||||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
|
||||||
moduleName:@"Basic"
|
|
||||||
initialProperties:nil
|
|
||||||
launchOptions:launchOptions];
|
|
||||||
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
|
||||||
|
|
||||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
||||||
UIViewController *rootViewController = [UIViewController new];
|
|
||||||
rootViewController.view = rootView;
|
|
||||||
self.window.rootViewController = rootViewController;
|
|
||||||
[self.window makeKeyAndVisible];
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
@ -1,18 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the BSD-style license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
|
||||||
@autoreleasepool {
|
|
||||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Basic",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
|
||||||
"test": "jest"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"react": "16.0.0-alpha.6",
|
|
||||||
"react-native": "0.43.3",
|
|
||||||
"react-native-blur": "file:../../",
|
|
||||||
"react-native-segmented-android": "sooth-sayer/react-native-segmented-android"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"babel-jest": "19.0.0",
|
|
||||||
"babel-preset-react-native": "1.9.1",
|
|
||||||
"jest": "19.0.2",
|
|
||||||
"react-test-renderer": "16.0.0-alpha.6"
|
|
||||||
},
|
|
||||||
"jest": {
|
|
||||||
"preset": "react-native"
|
|
||||||
}
|
|
||||||
}
|
|
@ -30,7 +30,9 @@
|
|||||||
"eslint": "^5.15.3",
|
"eslint": "^5.15.3",
|
||||||
"husky": "^1.3.1",
|
"husky": "^1.3.1",
|
||||||
"lint-staged": "^8.1.5",
|
"lint-staged": "^8.1.5",
|
||||||
"prettier": "1.16.4"
|
"prettier": "1.16.4",
|
||||||
|
"react": "16.8.3",
|
||||||
|
"react-native": "0.59.2"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
@ -38,6 +40,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,json,css,md}": ["prettier --write", "git add"]
|
"*.{js,json,css,md}": [
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|