Skip to content

Commit

Permalink
update Example with v1.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanpan committed Oct 24, 2016
1 parent 8801454 commit 94e3279
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 32 deletions.
3 changes: 3 additions & 0 deletions Example/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["react-native"]
}
25 changes: 21 additions & 4 deletions Example/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
[ignore]

# We fork some components by platform.
.*/*.android.js
.*/*[.]android.js

# Ignore templates with `@flow` in header
.*/local-cli/generator.*

# Ignore malformed json
.*/node_modules/y18n/test/.*\.json

# Ignore the website subdir
<PROJECT_ROOT>/website/.*

# Ignore BUCK generated dirs
<PROJECT_ROOT>/\.buckd/

# Ignore unexpected extra @providesModule
.*/node_modules/commoner/test/source/widget/share.js

# 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
.*/node_modules/jest-runtime/build/__tests__/.*

[include]

[libs]
Expand All @@ -33,9 +48,11 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

unsafe.enable_getters_and_setters=true

[version]
^0.27.0
^0.32.0
12 changes: 12 additions & 0 deletions Example/__tests__/index.android.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'react-native';
import React from 'react';
import Index from '../index.android.js';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
12 changes: 12 additions & 0 deletions Example/__tests__/index.ios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'react-native';
import React from 'react';
import Index from '../index.ios.js';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
2 changes: 1 addition & 1 deletion Example/android/app/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import re
# - install Buck
# - `npm start` - to start the packager
# - `cd android`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US`
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
# - `buck install -r android/app` - compile, install and run application
#
Expand Down
3 changes: 2 additions & 1 deletion Example/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
View
} from 'react-native';

class Example extends Component {
export default class Example extends Component {
render() {
return (
<View style={styles.container}>
Expand All @@ -23,6 +23,7 @@ class Example extends Component {
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Double tap R on your keyboard to reload,{'\n'}
Shake or press menu button for dev menu
</Text>
</View>
Expand Down
6 changes: 3 additions & 3 deletions Example/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

import CameraRollPicker from 'react-native-camera-roll-picker';

class Example extends Component {
export default class Example extends Component {
constructor(props) {
super(props);

Expand Down Expand Up @@ -48,10 +48,10 @@ class Example extends Component {
scrollRenderAheadDistance={500}
initialListSize={1}
pageSize={3}
removeClippedSubviews={true}
removeClippedSubviews={false}
groupTypes='SavedPhotos'
batchSize={5}
maximum={5}
maximum={3}
selected={this.state.selected}
assetType='Photos'
imagesPerRow={3}
Expand Down
36 changes: 20 additions & 16 deletions Example/ios/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
BC334C061D38D79200B3C48C /* libRCTCameraRoll.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BC334BFC1D38D78400B3C48C /* libRCTCameraRoll.a */; };
BC6A3A6D1DBDFA0C007AFF2A /* libRCTCameraRoll.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BC6A3A631DBDFA04007AFF2A /* libRCTCameraRoll.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -104,9 +104,9 @@
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
remoteInfo = RCTText;
};
BC334BFB1D38D78400B3C48C /* PBXContainerItemProxy */ = {
BC6A3A621DBDFA04007AFF2A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BC334BF61D38D78400B3C48C /* RCTCameraRoll.xcodeproj */;
containerPortal = BC6A3A5D1DBDFA04007AFF2A /* RCTCameraRoll.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
remoteInfo = RCTCameraRoll;
Expand Down Expand Up @@ -135,7 +135,7 @@
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
BC334BF61D38D78400B3C48C /* RCTCameraRoll.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTCameraRoll.xcodeproj; path = "../node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj"; sourceTree = "<group>"; };
BC6A3A5D1DBDFA04007AFF2A /* RCTCameraRoll.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTCameraRoll.xcodeproj; path = "../node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -151,7 +151,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BC334C061D38D79200B3C48C /* libRCTCameraRoll.a in Frameworks */,
BC6A3A6D1DBDFA0C007AFF2A /* libRCTCameraRoll.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
Expand Down Expand Up @@ -274,7 +274,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
BC334BF61D38D78400B3C48C /* RCTCameraRoll.xcodeproj */,
BC6A3A5D1DBDFA04007AFF2A /* RCTCameraRoll.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
Expand Down Expand Up @@ -318,10 +318,10 @@
name = Products;
sourceTree = "<group>";
};
BC334BF71D38D78400B3C48C /* Products */ = {
BC6A3A5E1DBDFA04007AFF2A /* Products */ = {
isa = PBXGroup;
children = (
BC334BFC1D38D78400B3C48C /* libRCTCameraRoll.a */,
BC6A3A631DBDFA04007AFF2A /* libRCTCameraRoll.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -397,8 +397,8 @@
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
},
{
ProductGroup = BC334BF71D38D78400B3C48C /* Products */;
ProjectRef = BC334BF61D38D78400B3C48C /* RCTCameraRoll.xcodeproj */;
ProductGroup = BC6A3A5E1DBDFA04007AFF2A /* Products */;
ProjectRef = BC6A3A5D1DBDFA04007AFF2A /* RCTCameraRoll.xcodeproj */;
},
{
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
Expand Down Expand Up @@ -516,11 +516,11 @@
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
BC334BFC1D38D78400B3C48C /* libRCTCameraRoll.a */ = {
BC6A3A631DBDFA04007AFF2A /* libRCTCameraRoll.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTCameraRoll.a;
remoteRef = BC334BFB1D38D78400B3C48C /* PBXContainerItemProxy */;
remoteRef = BC6A3A621DBDFA04007AFF2A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
Expand Down Expand Up @@ -611,7 +611,7 @@
"$(inherited)",
);
INFOPLIST_FILE = ExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
Expand All @@ -624,7 +624,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
INFOPLIST_FILE = ExampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
Expand All @@ -635,6 +635,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -649,13 +650,15 @@
"-lc++",
);
PRODUCT_NAME = Example;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
Expand All @@ -669,6 +672,7 @@
"-lc++",
);
PRODUCT_NAME = Example;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
Expand Down Expand Up @@ -711,7 +715,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -751,7 +755,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
1 change: 0 additions & 1 deletion Example/ios/Example/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
{
NSURL *jsCodeLocation;

[[RCTBundleURLProvider sharedSettings] setDefaults];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
Expand Down
3 changes: 2 additions & 1 deletion Example/ios/Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<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>NSExceptionDomains</key>
<dict>
Expand All @@ -50,5 +49,7 @@
</dict>
</dict>
</dict>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app attempts to access your camera data.</string>
</dict>
</plist>
19 changes: 15 additions & 4 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "15.2.1",
"react-native": "^0.29.1",
"react-native-camera-roll-picker": "^1.1.6"
"react": "15.3.2",
"react-native": "^0.35.0",
"react-native-camera-roll-picker": "^1.1.9"
},
"jest": {
"preset": "jest-react-native"
},
"devDependencies": {
"babel-jest": "16.0.0",
"babel-preset-react-native": "1.9.0",
"jest": "16.0.2",
"jest-react-native": "16.0.0",
"react-test-renderer": "15.3.2"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-camera-roll-picker",
"version": "1.1.8",
"version": "1.1.9",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 94e3279

Please sign in to comment.