├── .gitignore ├── assets ├── ios_screen.gif └── android_screen.gif ├── react-native-file-opener.js ├── android ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── fileopener │ │ ├── FileOpenerPackage.java │ │ └── FileOpener.java └── build.gradle ├── ios ├── RNFileOpener │ ├── RNFileOpener.h │ └── RNFileOpener.m └── RNFileOpener.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── sujiexu.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ ├── xcuserdata │ └── sujiexu.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── RNFileOpener.xcscheme │ └── project.pbxproj ├── package.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | /android/build -------------------------------------------------------------------------------- /assets/ios_screen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangzuizui/react-native-file-opener/HEAD/assets/ios_screen.gif -------------------------------------------------------------------------------- /assets/android_screen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangzuizui/react-native-file-opener/HEAD/assets/android_screen.gif -------------------------------------------------------------------------------- /react-native-file-opener.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const React = require('react-native'); 4 | const FileOpener = React.NativeModules.FileOpener; 5 | 6 | module.exports = FileOpener; -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /ios/RNFileOpener/RNFileOpener.h: -------------------------------------------------------------------------------- 1 | #import "RCTBridgeModule.h" 2 | #import "RCTBridge.h" 3 | 4 | @import UIKit; 5 | 6 | @interface FileOpener : NSObject 7 | @property (nonatomic) UIDocumentInteractionController * FileOpener; 8 | @end -------------------------------------------------------------------------------- /ios/RNFileOpener.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/RNFileOpener.xcodeproj/project.xcworkspace/xcuserdata/sujiexu.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangzuizui/react-native-file-opener/HEAD/ios/RNFileOpener.xcodeproj/project.xcworkspace/xcuserdata/sujiexu.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ios/RNFileOpener.xcodeproj/xcuserdata/sujiexu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | RNFileOpener.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | DB8F70EE1CD3047700E71D6D 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-file-opener", 3 | "repository": { 4 | "type": "git", 5 | "url": "https://github.com/huangzuizui/react-native-file-opener.git" 6 | }, 7 | "version": "0.2.0", 8 | "description": "A React Native module that allows you to open a file (mp3, mp4, pdf, word, excel, dwg etc.) on your device with its default application", 9 | "author": "huang zuizui", 10 | "main": "react-native-file-opener.js", 11 | "contributors": [ 12 | { 13 | "name": "huang zuizui", 14 | "email": "huangzuizui@gmail.com" 15 | } 16 | ], 17 | "nativePackage": true, 18 | "keywords": [ 19 | "react-native", 20 | "react-native-file-opener", 21 | "react", 22 | "native", 23 | "file", 24 | "opener", 25 | "mp3", 26 | "mp4", 27 | "pdf", 28 | "office", 29 | "dwg", 30 | "word", 31 | "cad", 32 | "excel" 33 | ], 34 | "license": "MIT", 35 | "devDependencies": { 36 | "react-native": "^0.20.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /android/src/main/java/com/fileopener/FileOpenerPackage.java: -------------------------------------------------------------------------------- 1 | package com.fileopener; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | 9 | import java.util.Arrays; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | public class FileOpenerPackage implements ReactPackage { 14 | 15 | @Override 16 | public List createNativeModules(ReactApplicationContext reactContext) { 17 | //Registering the module. 18 | return Arrays.asList(new FileOpener(reactContext)); 19 | } 20 | 21 | @Override 22 | public List> createJSModules() { 23 | return Collections.emptyList(); 24 | } 25 | 26 | @Override 27 | public List createViewManagers(ReactApplicationContext reactContext) { 28 | return Collections.emptyList(); 29 | } 30 | } -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | import groovy.json.JsonSlurper 2 | 3 | def computeVersionName() { 4 | // dynamically retrieve version from package.json 5 | def slurper = new JsonSlurper() 6 | def json = slurper.parse(file('../package.json'), "utf-8") 7 | return json.version 8 | } 9 | 10 | buildscript { 11 | repositories { 12 | jcenter() 13 | } 14 | 15 | dependencies { 16 | classpath 'com.android.tools.build:gradle:1.1.3' 17 | } 18 | } 19 | 20 | apply plugin: 'com.android.library' 21 | 22 | android { 23 | compileSdkVersion 23 24 | buildToolsVersion "23.0.1" 25 | 26 | defaultConfig { 27 | minSdkVersion 16 28 | targetSdkVersion 22 29 | versionCode 1 30 | // get version name from package.json version 31 | versionName computeVersionName() 32 | } 33 | lintOptions { 34 | abortOnError false 35 | } 36 | } 37 | 38 | repositories { 39 | mavenCentral() 40 | } 41 | 42 | dependencies { 43 | compile 'com.facebook.react:react-native:0.20.+' 44 | } 45 | -------------------------------------------------------------------------------- /ios/RNFileOpener/RNFileOpener.m: -------------------------------------------------------------------------------- 1 | #import "RNFileOpener.h" 2 | 3 | @implementation FileOpener 4 | 5 | @synthesize bridge = _bridge; 6 | 7 | - (dispatch_queue_t)methodQueue 8 | { 9 | return dispatch_get_main_queue(); 10 | } 11 | 12 | RCT_EXPORT_MODULE(); 13 | 14 | RCT_REMAP_METHOD(open, filePath:(NSString *)filePath fileMine:(NSString *)fileMine fromRect:(CGRectMake)rect 15 | resolver:(RCTPromiseResolveBlock)resolve 16 | rejecter:(RCTPromiseRejectBlock)reject) 17 | { 18 | 19 | NSURL *fileURL = [NSURL fileURLWithPath:filePath]; 20 | 21 | NSFileManager *fileManager = [NSFileManager defaultManager]; 22 | if(![fileManager fileExistsAtPath:fileURL.path]) { 23 | NSError *error = [NSError errorWithDomain:@"File not found" code:404 userInfo:nil]; 24 | reject(@"File not found", @"File not found", error); 25 | return; 26 | } 27 | 28 | self.FileOpener = [UIDocumentInteractionController interactionControllerWithURL:fileURL]; 29 | self.FileOpener.delegate = self; 30 | 31 | UIViewController *ctrl = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 32 | 33 | BOOL wasOpened = [self.FileOpener presentOpenInMenuFromRect:ctrl.view.bounds inView:ctrl.view animated:YES]; 34 | 35 | if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) 36 | { 37 | wasOpened = [self.FileOpener presentOptionsMenuFromRect:rect inView:ctrl.view animated:YES]; 38 | } 39 | 40 | if (wasOpened) { 41 | resolve(@"Open success!!"); 42 | } else { 43 | NSError *error = [NSError errorWithDomain:@"Open error" code:500 userInfo:nil]; 44 | reject(@"Open error", @"Open error", error); 45 | } 46 | 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /android/src/main/java/com/fileopener/FileOpener.java: -------------------------------------------------------------------------------- 1 | package com.fileopener; 2 | 3 | import java.io.File; 4 | 5 | import android.app.Activity; 6 | import android.content.Intent; 7 | import android.content.pm.PackageManager; 8 | import android.net.Uri; 9 | import android.support.v4.content.FileProvider; 10 | 11 | import org.json.JSONArray; 12 | import org.json.JSONException; 13 | import org.json.JSONObject; 14 | 15 | 16 | import com.facebook.react.bridge.NativeModule; 17 | import com.facebook.react.bridge.ReactApplicationContext; 18 | import com.facebook.react.bridge.ReactContext; 19 | import com.facebook.react.bridge.Callback; 20 | import com.facebook.react.bridge.Promise; 21 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 22 | import com.facebook.react.bridge.ReactMethod; 23 | 24 | import java.util.Map; 25 | import java.util.HashMap; 26 | 27 | public class FileOpener extends ReactContextBaseJavaModule { 28 | 29 | public FileOpener(ReactApplicationContext reactContext) { 30 | super(reactContext); 31 | } 32 | 33 | @Override 34 | public String getName() { 35 | return "FileOpener"; 36 | } 37 | 38 | @Override 39 | public Map getConstants() { 40 | final Map constants = new HashMap<>(); 41 | return constants; 42 | } 43 | 44 | @ReactMethod 45 | public void open(String fileArg, String contentType, Promise promise) throws JSONException { 46 | File file = new File(fileArg); 47 | 48 | if (file.exists()) { 49 | try { 50 | Uri path = FileProvider.getUriForFile(getReactApplicationContext(), getReactApplicationContext().getPackageName() + ".fileprovider", file); 51 | Intent intent = new Intent(Intent.ACTION_VIEW); 52 | intent.setDataAndType(path, contentType); 53 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 54 | intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); 55 | getReactApplicationContext().startActivity(intent); 56 | 57 | promise.resolve("Open success!!"); 58 | } catch (android.content.ActivityNotFoundException e) { 59 | promise.reject("Open error!!"); 60 | } 61 | } else { 62 | promise.reject("File not found"); 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /ios/RNFileOpener.xcodeproj/xcuserdata/sujiexu.xcuserdatad/xcschemes/RNFileOpener.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | react-native-file-opener 2 | - 3 | A React Native module that allows you to open a file (mp3, mp4, pdf, word, excel, dwg etc.) on your device with its default application 4 | 5 | iOS | Android 6 | ------- | ---- 7 | | 8 | 9 | # Install 10 | ##iOS 11 | 1. `npm install react-native-file-opener --save` 12 | 2. in the XCode's "Project navigator", right click on your project's `Libraries` folder ➜ `Add Files to` 13 | 3. Go to `node_modules` ➜ `react-native-file-opener` ➜ `ios` ➜ select `RNFileOpener.xcodeproj` 14 | 4. Add `libRNFileOpener.a` to `Build Phases -> Link Binary With Libraries` 15 | 5. Compile and have fun 16 | 17 | ##Android 18 | * `npm install react-native-file-opener --save` 19 | ```java 20 | // file: android/settings.gradle 21 | ... 22 | include ':react-native-file-opener' 23 | project(':react-native-file-opener').projectDir = new File(settingsDir, '../node_modules/react-native-file-opener/android') 24 | ``` 25 | 26 | ```java 27 | // file: android/app/build.gradle 28 | ... 29 | dependencies { 30 | ... 31 | compile project(':react-native-file-opener') 32 | } 33 | ``` 34 | * register module 35 | * For react-native below 0.19.0 (use cat ./node_modules/react-native/package.json | grep version) 36 | ```java 37 | // file: MainActivity.java 38 | import com.fileopener.FileOpenerPackage; // <- import 39 | 40 | public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { 41 | 42 | ... 43 | 44 | @Override 45 | protected void onCreate(Bundle savedInstanceState) { 46 | super.onCreate(savedInstanceState); 47 | mReactRootView = new ReactRootView(this); 48 | 49 | mReactInstanceManager = ReactInstanceManager.builder() 50 | .setApplication(getApplication()) 51 | .setBundleAssetName("index.android.bundle") 52 | .setJSMainModuleName("index.android") 53 | .addPackage(new MainReactPackage()) 54 | .addPackage(new FileOpenerPackage()) // <- add package 55 | .setUseDeveloperSupport(BuildConfig.DEBUG) 56 | .setInitialLifecycleState(LifecycleState.RESUMED) 57 | .build(); 58 | 59 | mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null); 60 | 61 | setContentView(mReactRootView); 62 | } 63 | 64 | ... 65 | 66 | } 67 | ``` 68 | * For react-native 0.19.0 and higher 69 | ```java 70 | // file: MainActivity.java 71 | ... 72 | import com.fileopener.FileOpenerPackage;//<- import package 73 | 74 | public class MainActivity extends ReactActivity { 75 | 76 | /** 77 | * A list of packages used by the app. If the app uses additional views 78 | * or modules besides the default ones, add more packages here. 79 | */ 80 | @Override 81 | protected List getPackages() { 82 | return Arrays.asList( 83 | new MainReactPackage(), //<- Add comma 84 | new FileOpenerPackage() //<- Add package 85 | ); 86 | } 87 | ... 88 | } 89 | ``` 90 | ###Allow files access 91 | * AndroidManifest.xml 92 | ```xml 93 | 95 | 97 | 102 | 105 | 106 | ... 107 | 108 | 109 | ``` 110 | * android/app/src/main/res/xml/file_paths.xml (create if not exists) 111 | 112 | "path" attribute must contain the directory name. 113 | 114 | For setting up other directories (cache, external storage, ...) follow the guide at 115 | [https://developer.android.com/reference/android/support/v4/content/FileProvider.html](https://developer.android.com/reference/android/support/v4/content/FileProvider.html) 116 | ```xml 117 | 118 | ... 119 | 120 | ... 121 | 122 | ``` 123 | 124 | 125 | * For react-native 0.29.0 and higher, do the above in **MainApplication.java** 126 | 127 | ##Usage 128 | 1. In your React Native javascript code, bring in the native module 129 | ```javascript 130 | const FileOpener = require('react-native-file-opener'); 131 | ``` 132 | 2. Basic usage 133 | ```javascript 134 | const FilePath = ...; // path of the file 135 | const FileMimeType = ...; // mime type of the file 136 | FileOpener.open( 137 | FilePath, 138 | FileMimeType 139 | ).then((msg) => { 140 | console.log('success!!') 141 | },() => { 142 | console.log('error!!') 143 | }); 144 | ``` 145 | ##Usage with react-native-fs 146 | * You can get filepath by using [react-native-fs](https://github.com/johanneslumpe/react-native-fs) 147 | 148 | ```javascript 149 | const RNFS = require('react-native-fs'); 150 | const FileOpener = require('react-native-file-opener'); 151 | 152 | const SavePath = Platform.OS === 'ios' ? RNFS.DocumentDirectoryPath : RNFS.ExternalDirectoryPath; 153 | const sampleDocFilePath = SavePath + '/sample.doc'; 154 | 155 | ... 156 | 157 | function openSampleDoc() { 158 | FileOpener.open( 159 | sampleDocFilePath, 160 | 'application/msword' 161 | ).then(() => { 162 | console.log('success!!'); 163 | },(e) => { 164 | console.log('error!!'); 165 | }); 166 | 167 | } 168 | 169 | ... 170 | ``` 171 | ##Demo project 172 | [https://github.com/huangzuizui/react-native-file-opener-demo](https://github.com/huangzuizui/react-native-file-opener-demo) 173 | -------------------------------------------------------------------------------- /ios/RNFileOpener.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DB8F70F31CD3047700E71D6D /* RNFileOpener.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB8F70F21CD3047700E71D6D /* RNFileOpener.h */; }; 11 | DB8F70F51CD3047700E71D6D /* RNFileOpener.m in Sources */ = {isa = PBXBuildFile; fileRef = DB8F70F41CD3047700E71D6D /* RNFileOpener.m */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXCopyFilesBuildPhase section */ 15 | DB8F70ED1CD3047700E71D6D /* CopyFiles */ = { 16 | isa = PBXCopyFilesBuildPhase; 17 | buildActionMask = 2147483647; 18 | dstPath = "include/$(PRODUCT_NAME)"; 19 | dstSubfolderSpec = 16; 20 | files = ( 21 | DB8F70F31CD3047700E71D6D /* RNFileOpener.h in CopyFiles */, 22 | ); 23 | runOnlyForDeploymentPostprocessing = 0; 24 | }; 25 | /* End PBXCopyFilesBuildPhase section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | DB8F70EF1CD3047700E71D6D /* libRNFileOpener.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFileOpener.a; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | DB8F70F21CD3047700E71D6D /* RNFileOpener.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFileOpener.h; sourceTree = ""; }; 30 | DB8F70F41CD3047700E71D6D /* RNFileOpener.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFileOpener.m; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | DB8F70EC1CD3047700E71D6D /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | ); 39 | runOnlyForDeploymentPostprocessing = 0; 40 | }; 41 | /* End PBXFrameworksBuildPhase section */ 42 | 43 | /* Begin PBXGroup section */ 44 | DB8F70E61CD3047700E71D6D = { 45 | isa = PBXGroup; 46 | children = ( 47 | DB8F70F11CD3047700E71D6D /* RNFileOpener */, 48 | DB8F70F01CD3047700E71D6D /* Products */, 49 | ); 50 | sourceTree = ""; 51 | }; 52 | DB8F70F01CD3047700E71D6D /* Products */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | DB8F70EF1CD3047700E71D6D /* libRNFileOpener.a */, 56 | ); 57 | name = Products; 58 | sourceTree = ""; 59 | }; 60 | DB8F70F11CD3047700E71D6D /* RNFileOpener */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | DB8F70F21CD3047700E71D6D /* RNFileOpener.h */, 64 | DB8F70F41CD3047700E71D6D /* RNFileOpener.m */, 65 | ); 66 | path = RNFileOpener; 67 | sourceTree = ""; 68 | }; 69 | /* End PBXGroup section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | DB8F70EE1CD3047700E71D6D /* RNFileOpener */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = DB8F70F81CD3047700E71D6D /* Build configuration list for PBXNativeTarget "RNFileOpener" */; 75 | buildPhases = ( 76 | DB8F70EB1CD3047700E71D6D /* Sources */, 77 | DB8F70EC1CD3047700E71D6D /* Frameworks */, 78 | DB8F70ED1CD3047700E71D6D /* CopyFiles */, 79 | ); 80 | buildRules = ( 81 | ); 82 | dependencies = ( 83 | ); 84 | name = RNFileOpener; 85 | productName = RNFileOpener; 86 | productReference = DB8F70EF1CD3047700E71D6D /* libRNFileOpener.a */; 87 | productType = "com.apple.product-type.library.static"; 88 | }; 89 | /* End PBXNativeTarget section */ 90 | 91 | /* Begin PBXProject section */ 92 | DB8F70E71CD3047700E71D6D /* Project object */ = { 93 | isa = PBXProject; 94 | attributes = { 95 | LastUpgradeCheck = 0730; 96 | ORGANIZATIONNAME = zuizui; 97 | TargetAttributes = { 98 | DB8F70EE1CD3047700E71D6D = { 99 | CreatedOnToolsVersion = 7.3; 100 | }; 101 | }; 102 | }; 103 | buildConfigurationList = DB8F70EA1CD3047700E71D6D /* Build configuration list for PBXProject "RNFileOpener" */; 104 | compatibilityVersion = "Xcode 3.2"; 105 | developmentRegion = English; 106 | hasScannedForEncodings = 0; 107 | knownRegions = ( 108 | en, 109 | ); 110 | mainGroup = DB8F70E61CD3047700E71D6D; 111 | productRefGroup = DB8F70F01CD3047700E71D6D /* Products */; 112 | projectDirPath = ""; 113 | projectRoot = ""; 114 | targets = ( 115 | DB8F70EE1CD3047700E71D6D /* RNFileOpener */, 116 | ); 117 | }; 118 | /* End PBXProject section */ 119 | 120 | /* Begin PBXSourcesBuildPhase section */ 121 | DB8F70EB1CD3047700E71D6D /* Sources */ = { 122 | isa = PBXSourcesBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | DB8F70F51CD3047700E71D6D /* RNFileOpener.m in Sources */, 126 | ); 127 | runOnlyForDeploymentPostprocessing = 0; 128 | }; 129 | /* End PBXSourcesBuildPhase section */ 130 | 131 | /* Begin XCBuildConfiguration section */ 132 | DB8F70F61CD3047700E71D6D /* Debug */ = { 133 | isa = XCBuildConfiguration; 134 | buildSettings = { 135 | ALWAYS_SEARCH_USER_PATHS = NO; 136 | CLANG_ANALYZER_NONNULL = YES; 137 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 138 | CLANG_CXX_LIBRARY = "libc++"; 139 | CLANG_ENABLE_MODULES = YES; 140 | CLANG_ENABLE_OBJC_ARC = YES; 141 | CLANG_WARN_BOOL_CONVERSION = YES; 142 | CLANG_WARN_CONSTANT_CONVERSION = YES; 143 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 144 | CLANG_WARN_EMPTY_BODY = YES; 145 | CLANG_WARN_ENUM_CONVERSION = YES; 146 | CLANG_WARN_INT_CONVERSION = YES; 147 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 148 | CLANG_WARN_UNREACHABLE_CODE = YES; 149 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 150 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 151 | COPY_PHASE_STRIP = NO; 152 | DEBUG_INFORMATION_FORMAT = dwarf; 153 | ENABLE_STRICT_OBJC_MSGSEND = YES; 154 | ENABLE_TESTABILITY = YES; 155 | GCC_C_LANGUAGE_STANDARD = gnu99; 156 | GCC_DYNAMIC_NO_PIC = NO; 157 | GCC_NO_COMMON_BLOCKS = YES; 158 | GCC_OPTIMIZATION_LEVEL = 0; 159 | GCC_PREPROCESSOR_DEFINITIONS = ( 160 | "DEBUG=1", 161 | "$(inherited)", 162 | ); 163 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 164 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 165 | GCC_WARN_UNDECLARED_SELECTOR = YES; 166 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 167 | GCC_WARN_UNUSED_FUNCTION = YES; 168 | GCC_WARN_UNUSED_VARIABLE = YES; 169 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 170 | MTL_ENABLE_DEBUG_INFO = YES; 171 | ONLY_ACTIVE_ARCH = YES; 172 | SDKROOT = iphoneos; 173 | }; 174 | name = Debug; 175 | }; 176 | DB8F70F71CD3047700E71D6D /* Release */ = { 177 | isa = XCBuildConfiguration; 178 | buildSettings = { 179 | ALWAYS_SEARCH_USER_PATHS = NO; 180 | CLANG_ANALYZER_NONNULL = YES; 181 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 182 | CLANG_CXX_LIBRARY = "libc++"; 183 | CLANG_ENABLE_MODULES = YES; 184 | CLANG_ENABLE_OBJC_ARC = YES; 185 | CLANG_WARN_BOOL_CONVERSION = YES; 186 | CLANG_WARN_CONSTANT_CONVERSION = YES; 187 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 188 | CLANG_WARN_EMPTY_BODY = YES; 189 | CLANG_WARN_ENUM_CONVERSION = YES; 190 | CLANG_WARN_INT_CONVERSION = YES; 191 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 192 | CLANG_WARN_UNREACHABLE_CODE = YES; 193 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 194 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 195 | COPY_PHASE_STRIP = NO; 196 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 197 | ENABLE_NS_ASSERTIONS = NO; 198 | ENABLE_STRICT_OBJC_MSGSEND = YES; 199 | GCC_C_LANGUAGE_STANDARD = gnu99; 200 | GCC_NO_COMMON_BLOCKS = YES; 201 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 202 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 203 | GCC_WARN_UNDECLARED_SELECTOR = YES; 204 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 205 | GCC_WARN_UNUSED_FUNCTION = YES; 206 | GCC_WARN_UNUSED_VARIABLE = YES; 207 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 208 | MTL_ENABLE_DEBUG_INFO = NO; 209 | SDKROOT = iphoneos; 210 | VALIDATE_PRODUCT = YES; 211 | }; 212 | name = Release; 213 | }; 214 | DB8F70F91CD3047700E71D6D /* Debug */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | HEADER_SEARCH_PATHS = ( 218 | "$(SRCROOT)/../node_modules/react-native/React/**", 219 | "$(SRCROOT)/../../react-native/React/**", 220 | "$(SRCROOT)/../Example/node_modules/react-native/React/**", 221 | ); 222 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 223 | OTHER_LDFLAGS = "-ObjC"; 224 | PRODUCT_NAME = "$(TARGET_NAME)"; 225 | SKIP_INSTALL = YES; 226 | }; 227 | name = Debug; 228 | }; 229 | DB8F70FA1CD3047700E71D6D /* Release */ = { 230 | isa = XCBuildConfiguration; 231 | buildSettings = { 232 | HEADER_SEARCH_PATHS = ( 233 | "$(SRCROOT)/../node_modules/react-native/React/**", 234 | "$(SRCROOT)/../../react-native/React/**", 235 | "$(SRCROOT)/../Example/node_modules/react-native/React/**", 236 | ); 237 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 238 | OTHER_LDFLAGS = "-ObjC"; 239 | PRODUCT_NAME = "$(TARGET_NAME)"; 240 | SKIP_INSTALL = YES; 241 | }; 242 | name = Release; 243 | }; 244 | /* End XCBuildConfiguration section */ 245 | 246 | /* Begin XCConfigurationList section */ 247 | DB8F70EA1CD3047700E71D6D /* Build configuration list for PBXProject "RNFileOpener" */ = { 248 | isa = XCConfigurationList; 249 | buildConfigurations = ( 250 | DB8F70F61CD3047700E71D6D /* Debug */, 251 | DB8F70F71CD3047700E71D6D /* Release */, 252 | ); 253 | defaultConfigurationIsVisible = 0; 254 | defaultConfigurationName = Release; 255 | }; 256 | DB8F70F81CD3047700E71D6D /* Build configuration list for PBXNativeTarget "RNFileOpener" */ = { 257 | isa = XCConfigurationList; 258 | buildConfigurations = ( 259 | DB8F70F91CD3047700E71D6D /* Debug */, 260 | DB8F70FA1CD3047700E71D6D /* Release */, 261 | ); 262 | defaultConfigurationIsVisible = 0; 263 | defaultConfigurationName = Release; 264 | }; 265 | /* End XCConfigurationList section */ 266 | }; 267 | rootObject = DB8F70E71CD3047700E71D6D /* Project object */; 268 | } 269 | --------------------------------------------------------------------------------