├── .gitignore ├── LICENSE.md ├── README.md ├── RNUploader ├── RNUploader.ios.js ├── RNUploader.m └── RNUploader.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ └── contents.xcworkspacedata ├── examples └── UploadFromCameraRoll │ ├── .buckconfig │ ├── .flowconfig │ ├── .gitignore │ ├── .watchmanconfig │ ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ ├── react.gradle │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── uploadfromcameraroll │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ ├── build.gradle │ ├── gradle.properties │ └── settings.gradle │ ├── index.ios.js │ ├── ios │ ├── UploadFromCameraRoll.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── UploadFromCameraRoll.xcscheme │ ├── UploadFromCameraRoll │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── UploadFromCameraRollTests │ │ ├── Info.plist │ │ └── UploadFromCameraRollTests.m │ ├── package.json │ └── uploader.gif └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Adam Roth 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-uploader 2 | A React Native module for uploading files and camera roll assets. Supports progress notification. 3 | 4 | ## Install 5 | 6 | ### iOS 7 | 1. `npm install react-native-uploader --save` 8 | 9 | 2. Link the native modules: 10 | 11 | If you're using React-Native >= 0.29: 12 | * Link the library with the command `react-native link` 13 | 14 | If you're using React-Native < 0.29: 15 | * Install rnpm using the command `npm install -g rnpm` 16 | * Link the library with the command `rnpm link` 17 | 18 | If you have any issues, you can install the library manually: 19 | * In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` 20 | * Go to `node_modules` ➜ `react-native-uploader` ➜ `RNUploader` and add `RNUploader.xcodeproj` 21 | * In XCode, in the project navigator, select your project. Add `libRNUploader.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 22 | 23 | 3. Run your project (`Cmd+R`) 24 | 25 | 26 | ## Example 27 | See ./examples/UploadFromCameraRoll 28 | 29 | ![Example](https://raw.githubusercontent.com/aroth/react-native-uploader/master/examples/UploadFromCameraRoll/uploader.gif) 30 | 31 | 32 | ## Usage 33 | ```javascript 34 | import React, { Component } from 'react'; 35 | 36 | import { 37 | StyleSheet, 38 | Component, 39 | View, 40 | DeviceEventEmitter, 41 | } from 'react-native'; 42 | 43 | var RNUploader = NativeModules.RNUploader; 44 | ``` 45 | 46 | ```javascript 47 | componentDidMount() { 48 | // upload progress 49 | DeviceEventEmitter.addListener('RNUploaderProgress', (data)=>{ 50 | let bytesWritten = data.totalBytesWritten; 51 | let bytesTotal = data.totalBytesExpectedToWrite; 52 | let progress = data.progress; 53 | 54 | console.log( "upload progress: " + progress + "%"); 55 | }); 56 | } 57 | ``` 58 | 59 | ```javascript 60 | doUpload() { 61 | let files = [ 62 | { 63 | name: 'file[]', 64 | filename: 'image1.png', 65 | filepath: 'assets-library://....', // image from camera roll/assets library 66 | filetype: 'image/png', 67 | }, 68 | { 69 | name: 'file[]', 70 | filename: 'image2.gif', 71 | filepath: "data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7", 72 | filetype: 'image/gif', 73 | }, 74 | ]; 75 | 76 | let opts = { 77 | url: 'http://my.server/api/upload', 78 | files: files, 79 | method: 'POST', // optional: POST or PUT 80 | headers: { 'Accept': 'application/json' }, // optional 81 | params: { 'user_id': 1 }, // optional 82 | }; 83 | 84 | RNUploader.upload( opts, (err, response) => { 85 | if( err ){ 86 | console.log(err); 87 | return; 88 | } 89 | 90 | let status = response.status; 91 | let responseString = response.data; 92 | let json = JSON.parse( responseString ); 93 | 94 | console.log('upload complete with status ' + status); 95 | }); 96 | } 97 | 98 | ``` 99 | 100 | ## API 101 | #### RNUploader.upload( options, callback ) 102 | 103 | `options` is an object with values: 104 | 105 | ||type|required|description|example| 106 | |---|---|---|---|---| 107 | |`url`|string|required|URL to upload to|`http://my.server/api/upload`| 108 | |`method`|string|optional|HTTP method, values: [PUT,POST], default: POST|`POST`| 109 | |`headers`|object|optional|HTTP headers|`{ 'Accept': 'application/json' }`| 110 | |`params`|object|optional|Query parameters|`{ 'user_id': 1 }`| 111 | |`files`|array|required|Array of file objects to upload. See below.| `[{ name: 'file', filename: 'image1.png', filepath: 'assets-library://...', filetype: 'image/png' } ]` | 112 | 113 | `callback` is a method with two parameters: 114 | 115 | ||type|description|example| 116 | |---|---|---|---| 117 | |error|string|String detailing the error|`A server with the specified hostname could not be found.`| 118 | |response|object{status:Number, data:String}|Object returned with a status code and data.|`{ status: 200, data: '{ success: true }' }`| 119 | 120 | 121 | #### `files` 122 | `files` is an array of objects with values: 123 | 124 | ||type|required|description|example| 125 | |---|---|---|---|---| 126 | |name|string|optional|Form parameter key for the specified file. If missing, will use `filename`.|`file[]`| 127 | |filename|string|required|filename|`image1.png`| 128 | |filepath|string|required|File URI
Supports `assets-library:`, `data:` and `file:` URIs and file paths.|`assets-library://...`
`data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOV...`
`file:/tmp/image1.png`
`/tmp/image1.png`| 129 | |filetype|string|optional|MIME type of file. If missing, will infer based on the extension in `filepath`.|`image/png`| 130 | 131 | ### Progress 132 | To monitor upload progress simply subscribe to the `RNUploaderProgress` event using DeviceEventEmitter. 133 | 134 | ``` 135 | DeviceEventEmitter.addListener('RNUploaderProgress', (data)=>{ 136 | let bytesWritten = data.totalBytesWritten; 137 | let bytesTotal = data.totalBytesExpectedToWrite; 138 | let progress = data.progress; 139 | 140 | console.log( "upload progress: " + progress + "%"); 141 | }); 142 | ``` 143 | 144 | ### Cancel 145 | To cancel an upload in progress: 146 | ``` 147 | RNUploader.cancel() 148 | ``` 149 | 150 | ### Notes 151 | 152 | Inspired by similiar projects: 153 | * https://github.com/booxood/react-native-file-upload 154 | * https://github.com/kamilkp/react-native-file-transfer 155 | 156 | ...with noteable enhancements: 157 | * uploads are performed asynchronously on the native side 158 | * progress reporting 159 | * packaged as a static library 160 | * support for multiple files at a time 161 | * support for files from the assets library, base64 `data:` or `file:` paths 162 | * no external dependencies (ie: AFNetworking) 163 | 164 | ## License 165 | 166 | MIT 167 | -------------------------------------------------------------------------------- /RNUploader/RNUploader.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @providesModule RNUploader 3 | * @flow 4 | */ 5 | 'use strict'; 6 | 7 | var NativeRNUploader = require('NativeModules').RNUploader; 8 | 9 | /** 10 | * High-level docs for the RNUploader iOS API can be written here. 11 | */ 12 | 13 | var RNUploader = { 14 | test: function() { 15 | NativeRNUploader.test(); 16 | } 17 | }; 18 | 19 | module.exports = RNUploader; -------------------------------------------------------------------------------- /RNUploader/RNUploader.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | #import 7 | #import 8 | #import 9 | 10 | @interface RNUploader : NSObject 11 | @property NSMutableData *responseData; 12 | @property NSInteger responseStatusCode; 13 | 14 | @property NSURLConnection *connection; 15 | @property NSMutableURLRequest *request; 16 | @property NSMutableData *requestBody; 17 | @property NSMutableArray *files; 18 | 19 | @property NSString *formBoundaryString; 20 | @property NSData *formBoundaryData; 21 | 22 | @property dispatch_group_t fgroup; 23 | @end 24 | 25 | @implementation RNUploader 26 | 27 | @synthesize bridge = _bridge; 28 | RCTResponseSenderBlock _callback; 29 | 30 | 31 | RCT_EXPORT_MODULE() 32 | 33 | RCT_EXPORT_METHOD(cancel){ 34 | [self.connection cancel]; 35 | } 36 | 37 | RCT_EXPORT_METHOD(upload:(NSDictionary *)obj callback:(RCTResponseSenderBlock)callback) 38 | { 39 | _callback = callback; 40 | 41 | NSString *uploadURL = obj[@"url"]; 42 | NSDictionary *headers = obj[@"headers"]; 43 | NSDictionary *params = obj[@"params"]; 44 | NSArray *files = obj[@"files"]; 45 | NSString *method = obj[@"method"]; 46 | 47 | NSURL *url = [NSURL URLWithString:uploadURL]; 48 | 49 | self.formBoundaryString = [self generateBoundaryString]; 50 | self.formBoundaryData = [[NSString stringWithFormat:@"--%@\r\n", self.formBoundaryString] dataUsingEncoding:NSUTF8StringEncoding]; 51 | 52 | self.request = [NSMutableURLRequest requestWithURL:url]; 53 | self.responseData = [[NSMutableData alloc] init]; 54 | self.requestBody = [[NSMutableData alloc] init]; 55 | self.files = [[NSMutableArray alloc] init]; 56 | self.fgroup = dispatch_group_create(); 57 | 58 | [self setMethod:method]; 59 | [self setHeaders:headers]; 60 | [self setParams:params]; 61 | [self prepareFiles:files]; 62 | 63 | dispatch_group_notify(self.fgroup, dispatch_get_main_queue(), ^{ 64 | [self appendFiles]; 65 | [self sendRequest]; 66 | }); 67 | } 68 | 69 | // 70 | // Action Methods 71 | // 72 | 73 | - (void)setMethod:(NSString *)method { 74 | if( [method isEqualToString:@"POST"] || [method isEqualToString:@"PUT"] ){ 75 | [self.request setHTTPMethod:method]; 76 | }else{ 77 | [self.request setHTTPMethod:@"POST"]; 78 | } 79 | } 80 | 81 | - (void)setHeaders:(NSDictionary *)headers { 82 | NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", self.formBoundaryString]; 83 | [self.request setValue:contentType forHTTPHeaderField:@"Content-Type"]; 84 | for (NSString *key in headers) { 85 | id val = [headers objectForKey:key]; 86 | if ([val respondsToSelector:@selector(stringValue)]) { 87 | val = [val stringValue]; 88 | } 89 | if (![val isKindOfClass:[NSString class]]) { 90 | continue; 91 | } 92 | [self.request setValue:val forHTTPHeaderField:key]; 93 | } 94 | } 95 | 96 | - (void)setParams:(NSDictionary *)params { 97 | for (NSString *key in params) { 98 | id value = [params objectForKey:key]; 99 | if ([value respondsToSelector:@selector(stringValue)]) { 100 | value = [value stringValue]; 101 | } 102 | // 103 | // TODO: handle objects 104 | // 105 | if (![value isKindOfClass:[NSString class]]) { 106 | continue; 107 | } 108 | 109 | [self.requestBody appendData:self.formBoundaryData]; 110 | [self.requestBody appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key] dataUsingEncoding:NSUTF8StringEncoding]]; 111 | [self.requestBody appendData:[value dataUsingEncoding:NSUTF8StringEncoding]]; 112 | [self.requestBody appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; 113 | } 114 | } 115 | 116 | - (void)prepareFiles:(NSArray *)files { 117 | ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; 118 | 119 | for (NSDictionary *file in files) { 120 | dispatch_group_enter(self.fgroup); 121 | 122 | NSMutableDictionary *_file = [[NSMutableDictionary alloc] initWithDictionary:file]; 123 | [self.files addObject:_file]; 124 | 125 | if( [_file[@"filepath"] hasPrefix:@"assets-library:"]) { 126 | NSURL *assetURL = [[NSURL alloc] initWithString:file[@"filepath"]]; 127 | 128 | [library assetForURL:assetURL resultBlock:^(ALAsset *asset) { 129 | 130 | 131 | ALAssetRepresentation *representation = [asset defaultRepresentation]; 132 | 133 | NSString *fileName = [representation filename]; 134 | //Getting MIMEType 135 | NSString *MIMEType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass 136 | ((__bridge CFStringRef)[representation UTI], kUTTagClassMIMEType); 137 | 138 | 139 | ALAssetRepresentation *rep = [asset defaultRepresentation]; 140 | 141 | //testing RegExp (video|image) 142 | if([MIMEType rangeOfString:@"video" options:NSRegularExpressionSearch].location != NSNotFound){ 143 | 144 | //buffering output 145 | Byte *buffer = (Byte*)malloc((NSUInteger)rep.size); 146 | NSUInteger buffered = [rep getBytes:buffer fromOffset:0.0 length:(NSUInteger)rep.size error:nil]; 147 | NSData *data = [NSData dataWithBytesNoCopy:buffer length:buffered freeWhenDone:YES]; 148 | 149 | _file[@"data"] = data; 150 | 151 | }else if([MIMEType rangeOfString:@"image" options:NSRegularExpressionSearch].location != NSNotFound){ 152 | 153 | CGImageRef fullScreenImageRef = [rep fullScreenImage]; 154 | UIImage *image = [UIImage imageWithCGImage:fullScreenImageRef]; 155 | 156 | _file[@"data"] = UIImagePNGRepresentation(image); 157 | } 158 | 159 | dispatch_group_leave(self.fgroup); 160 | 161 | } failureBlock:^(NSError *error) { 162 | NSLog(@"Getting file from library failed: %@", error); 163 | dispatch_group_leave(self.fgroup); 164 | }]; 165 | 166 | 167 | }else{ 168 | NSString *filepath = _file[@"filepath"]; 169 | NSURL *fileUrl = [[NSURL alloc] initWithString:filepath]; 170 | 171 | if ( [filepath hasPrefix:@"data:"] || [filepath hasPrefix:@"file:"]) { 172 | _file[@"data"] = [NSData dataWithContentsOfURL: fileUrl]; 173 | } else { 174 | _file[@"data"] = [NSData dataWithContentsOfFile:filepath]; 175 | } 176 | 177 | dispatch_group_leave(self.fgroup); 178 | } 179 | } 180 | 181 | } 182 | 183 | - (void)appendFiles { 184 | for( NSMutableDictionary *file in self.files ){ 185 | NSString *name = file[@"name"]; 186 | NSString *filename = file[@"filename"]; 187 | NSString *filetype = file[@"filetype"]; 188 | NSData *data = file[@"data"]; 189 | 190 | [self.requestBody appendData:self.formBoundaryData]; 191 | [self.requestBody appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; filename=\"%@\"\r\n", name.length ? name : filename, filename] dataUsingEncoding:NSUTF8StringEncoding]]; 192 | 193 | if (filetype) { 194 | [self.requestBody appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n", filetype] dataUsingEncoding:NSUTF8StringEncoding]]; 195 | } else { 196 | [self.requestBody appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n", [self mimeTypeForPath:filename]] dataUsingEncoding:NSUTF8StringEncoding]]; 197 | } 198 | 199 | [self.requestBody appendData:[[NSString stringWithFormat:@"Content-Length: %ld\r\n\r\n", (long)[data length]] dataUsingEncoding:NSUTF8StringEncoding]]; 200 | [self.requestBody appendData:data]; 201 | [self.requestBody appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; 202 | } 203 | } 204 | 205 | - (void)sendRequest { 206 | NSData *endData = [[NSString stringWithFormat:@"--%@--\r\n", self.formBoundaryString] dataUsingEncoding:NSUTF8StringEncoding]; 207 | 208 | [self.requestBody appendData:endData]; 209 | [self.request setHTTPBody:self.requestBody]; 210 | 211 | // upload 212 | self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; 213 | [self.connection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; 214 | [self.connection start]; 215 | } 216 | 217 | // 218 | // Helpers 219 | // 220 | 221 | - (NSString *)generateBoundaryString 222 | { 223 | NSString *uuid = [[NSUUID UUID] UUIDString]; 224 | NSString *boundaryString = [NSString stringWithFormat:@"----%@", uuid]; 225 | return boundaryString; 226 | } 227 | 228 | - (NSString *)mimeTypeForPath:(NSString *)filepath 229 | { 230 | NSString *fileExtension = [filepath pathExtension]; 231 | NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)fileExtension, NULL); 232 | NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); 233 | 234 | if (!contentType) { 235 | contentType = @"application/octet-stream"; 236 | } 237 | 238 | return contentType; 239 | } 240 | 241 | // 242 | // Delegate Methods 243 | // 244 | 245 | #pragma mark - NSURLConnectionDelegate 246 | 247 | - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { 248 | [self.bridge.eventDispatcher sendDeviceEventWithName:@"RNUploaderDidFailWithError" body:[error localizedDescription]]; 249 | _callback(@[[error localizedDescription], [NSNull null]]); 250 | } 251 | 252 | #pragma mark - NSURLConnectionDataDelegate 253 | 254 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { 255 | [self.bridge.eventDispatcher sendDeviceEventWithName:@"RNUploaderDidReceiveResponse" body:nil]; 256 | self.responseStatusCode = [(NSHTTPURLResponse *)response statusCode]; 257 | } 258 | 259 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { 260 | NSString *resString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 261 | [self.bridge.eventDispatcher sendDeviceEventWithName:@"RNUploaderDidReceiveData" body:resString]; 262 | [self.responseData appendData:data]; 263 | } 264 | 265 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection { 266 | NSString *responseString = [[NSString alloc] initWithData:self.responseData encoding:NSUTF8StringEncoding]; 267 | [self.bridge.eventDispatcher sendDeviceEventWithName:@"RNUploaderDataFinishLoading" body:responseString]; 268 | 269 | NSDictionary *res= [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInteger:self.responseStatusCode],@"status",responseString,@"data",nil]; 270 | 271 | _callback(@[[NSNull null], res]); 272 | } 273 | 274 | - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite { 275 | NSNumber *progress = @([@(totalBytesWritten) floatValue]/[@(totalBytesExpectedToWrite) floatValue] * 100.0); 276 | [self.bridge.eventDispatcher sendDeviceEventWithName:@"RNUploaderProgress" 277 | body:@{ @"totalBytesWritten": @(totalBytesWritten), 278 | @"totalBytesExpectedToWrite": @(totalBytesExpectedToWrite), 279 | @"progress": progress }]; 280 | } 281 | 282 | @end 283 | -------------------------------------------------------------------------------- /RNUploader/RNUploader.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 13BE3DEE1AC21097009241FE /* RNUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = 13BE3DED1AC21097009241FE /* RNUploader.m */; }; 11 | /* End PBXBuildFile section */ 12 | 13 | /* Begin PBXCopyFilesBuildPhase section */ 14 | 58B511D91A9E6C8500147676 /* CopyFiles */ = { 15 | isa = PBXCopyFilesBuildPhase; 16 | buildActionMask = 2147483647; 17 | dstPath = "include/$(PRODUCT_NAME)"; 18 | dstSubfolderSpec = 16; 19 | files = ( 20 | ); 21 | runOnlyForDeploymentPostprocessing = 0; 22 | }; 23 | /* End PBXCopyFilesBuildPhase section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 134814201AA4EA6300B7C361 /* libRNUploader.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNUploader.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 13BE3DED1AC21097009241FE /* RNUploader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNUploader.m; sourceTree = ""; }; 28 | /* End PBXFileReference section */ 29 | 30 | /* Begin PBXFrameworksBuildPhase section */ 31 | 58B511D81A9E6C8500147676 /* Frameworks */ = { 32 | isa = PBXFrameworksBuildPhase; 33 | buildActionMask = 2147483647; 34 | files = ( 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXFrameworksBuildPhase section */ 39 | 40 | /* Begin PBXGroup section */ 41 | 134814211AA4EA7D00B7C361 /* Products */ = { 42 | isa = PBXGroup; 43 | children = ( 44 | 134814201AA4EA6300B7C361 /* libRNUploader.a */, 45 | ); 46 | name = Products; 47 | sourceTree = ""; 48 | }; 49 | 58B511D21A9E6C8500147676 = { 50 | isa = PBXGroup; 51 | children = ( 52 | 13BE3DED1AC21097009241FE /* RNUploader.m */, 53 | 134814211AA4EA7D00B7C361 /* Products */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | /* End PBXGroup section */ 58 | 59 | /* Begin PBXNativeTarget section */ 60 | 58B511DA1A9E6C8500147676 /* RNUploader */ = { 61 | isa = PBXNativeTarget; 62 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNUploader" */; 63 | buildPhases = ( 64 | 58B511D71A9E6C8500147676 /* Sources */, 65 | 58B511D81A9E6C8500147676 /* Frameworks */, 66 | 58B511D91A9E6C8500147676 /* CopyFiles */, 67 | ); 68 | buildRules = ( 69 | ); 70 | dependencies = ( 71 | ); 72 | name = RNUploader; 73 | productName = RCTDataManager; 74 | productReference = 134814201AA4EA6300B7C361 /* libRNUploader.a */; 75 | productType = "com.apple.product-type.library.static"; 76 | }; 77 | /* End PBXNativeTarget section */ 78 | 79 | /* Begin PBXProject section */ 80 | 58B511D31A9E6C8500147676 /* Project object */ = { 81 | isa = PBXProject; 82 | attributes = { 83 | LastUpgradeCheck = 0610; 84 | ORGANIZATIONNAME = "Adam Roth"; 85 | TargetAttributes = { 86 | 58B511DA1A9E6C8500147676 = { 87 | CreatedOnToolsVersion = 6.1.1; 88 | }; 89 | }; 90 | }; 91 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNUploader" */; 92 | compatibilityVersion = "Xcode 3.2"; 93 | developmentRegion = English; 94 | hasScannedForEncodings = 0; 95 | knownRegions = ( 96 | en, 97 | ); 98 | mainGroup = 58B511D21A9E6C8500147676; 99 | productRefGroup = 58B511D21A9E6C8500147676; 100 | projectDirPath = ""; 101 | projectRoot = ""; 102 | targets = ( 103 | 58B511DA1A9E6C8500147676 /* RNUploader */, 104 | ); 105 | }; 106 | /* End PBXProject section */ 107 | 108 | /* Begin PBXSourcesBuildPhase section */ 109 | 58B511D71A9E6C8500147676 /* Sources */ = { 110 | isa = PBXSourcesBuildPhase; 111 | buildActionMask = 2147483647; 112 | files = ( 113 | 13BE3DEE1AC21097009241FE /* RNUploader.m in Sources */, 114 | ); 115 | runOnlyForDeploymentPostprocessing = 0; 116 | }; 117 | /* End PBXSourcesBuildPhase section */ 118 | 119 | /* Begin XCBuildConfiguration section */ 120 | 58B511ED1A9E6C8500147676 /* Debug */ = { 121 | isa = XCBuildConfiguration; 122 | buildSettings = { 123 | ALWAYS_SEARCH_USER_PATHS = NO; 124 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 125 | CLANG_CXX_LIBRARY = "libc++"; 126 | CLANG_ENABLE_MODULES = YES; 127 | CLANG_ENABLE_OBJC_ARC = YES; 128 | CLANG_WARN_BOOL_CONVERSION = YES; 129 | CLANG_WARN_CONSTANT_CONVERSION = YES; 130 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 131 | CLANG_WARN_EMPTY_BODY = YES; 132 | CLANG_WARN_ENUM_CONVERSION = YES; 133 | CLANG_WARN_INT_CONVERSION = YES; 134 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 135 | CLANG_WARN_UNREACHABLE_CODE = YES; 136 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 137 | COPY_PHASE_STRIP = NO; 138 | ENABLE_STRICT_OBJC_MSGSEND = YES; 139 | GCC_C_LANGUAGE_STANDARD = gnu99; 140 | GCC_DYNAMIC_NO_PIC = NO; 141 | GCC_OPTIMIZATION_LEVEL = 0; 142 | GCC_PREPROCESSOR_DEFINITIONS = ( 143 | "DEBUG=1", 144 | "$(inherited)", 145 | ); 146 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 147 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 148 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 149 | GCC_WARN_UNDECLARED_SELECTOR = YES; 150 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 151 | GCC_WARN_UNUSED_FUNCTION = YES; 152 | GCC_WARN_UNUSED_VARIABLE = YES; 153 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 154 | MTL_ENABLE_DEBUG_INFO = YES; 155 | ONLY_ACTIVE_ARCH = YES; 156 | SDKROOT = iphoneos; 157 | }; 158 | name = Debug; 159 | }; 160 | 58B511EE1A9E6C8500147676 /* Release */ = { 161 | isa = XCBuildConfiguration; 162 | buildSettings = { 163 | ALWAYS_SEARCH_USER_PATHS = NO; 164 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 165 | CLANG_CXX_LIBRARY = "libc++"; 166 | CLANG_ENABLE_MODULES = YES; 167 | CLANG_ENABLE_OBJC_ARC = YES; 168 | CLANG_WARN_BOOL_CONVERSION = YES; 169 | CLANG_WARN_CONSTANT_CONVERSION = YES; 170 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 171 | CLANG_WARN_EMPTY_BODY = YES; 172 | CLANG_WARN_ENUM_CONVERSION = YES; 173 | CLANG_WARN_INT_CONVERSION = YES; 174 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 175 | CLANG_WARN_UNREACHABLE_CODE = YES; 176 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 177 | COPY_PHASE_STRIP = YES; 178 | ENABLE_NS_ASSERTIONS = NO; 179 | ENABLE_STRICT_OBJC_MSGSEND = YES; 180 | GCC_C_LANGUAGE_STANDARD = gnu99; 181 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 182 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 183 | GCC_WARN_UNDECLARED_SELECTOR = YES; 184 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 185 | GCC_WARN_UNUSED_FUNCTION = YES; 186 | GCC_WARN_UNUSED_VARIABLE = YES; 187 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 188 | MTL_ENABLE_DEBUG_INFO = NO; 189 | SDKROOT = iphoneos; 190 | VALIDATE_PRODUCT = YES; 191 | }; 192 | name = Release; 193 | }; 194 | 58B511F01A9E6C8500147676 /* Debug */ = { 195 | isa = XCBuildConfiguration; 196 | buildSettings = { 197 | HEADER_SEARCH_PATHS = ( 198 | "$(inherited)", 199 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 200 | "$(SRCROOT)/../../../React/**", 201 | "$(SRCROOT)/../../../node_modules/react-native/React/**", 202 | "$(SRCROOT)/node_modules/react-native/React/**", 203 | "$(SRCROOT)/../../node_modules/react-native/React/**/**", 204 | ); 205 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 206 | OTHER_LDFLAGS = "-ObjC"; 207 | PRODUCT_NAME = RNUploader; 208 | SKIP_INSTALL = YES; 209 | }; 210 | name = Debug; 211 | }; 212 | 58B511F11A9E6C8500147676 /* Release */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | HEADER_SEARCH_PATHS = ( 216 | "$(inherited)", 217 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 218 | "$(SRCROOT)/../../React/**", 219 | "$(SRCROOT)/../../node_modules/react-native/React/**", 220 | "$(SRCROOT)/../../node_modules/react-native/React/**/**", 221 | "$(SRCROOT)/../../../node_modules/react-native/React/**", 222 | "$(SRCROOT)/node_modules/react-native/React/**", 223 | ); 224 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 225 | OTHER_LDFLAGS = "-ObjC"; 226 | PRODUCT_NAME = RNUploader; 227 | SKIP_INSTALL = YES; 228 | }; 229 | name = Release; 230 | }; 231 | /* End XCBuildConfiguration section */ 232 | 233 | /* Begin XCConfigurationList section */ 234 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNUploader" */ = { 235 | isa = XCConfigurationList; 236 | buildConfigurations = ( 237 | 58B511ED1A9E6C8500147676 /* Debug */, 238 | 58B511EE1A9E6C8500147676 /* Release */, 239 | ); 240 | defaultConfigurationIsVisible = 0; 241 | defaultConfigurationName = Release; 242 | }; 243 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNUploader" */ = { 244 | isa = XCConfigurationList; 245 | buildConfigurations = ( 246 | 58B511F01A9E6C8500147676 /* Debug */, 247 | 58B511F11A9E6C8500147676 /* Release */, 248 | ); 249 | defaultConfigurationIsVisible = 0; 250 | defaultConfigurationName = Release; 251 | }; 252 | /* End XCConfigurationList section */ 253 | }; 254 | rootObject = 58B511D31A9E6C8500147676 /* Project object */; 255 | } 256 | -------------------------------------------------------------------------------- /RNUploader/RNUploader.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*[.]android.js 5 | 6 | # Ignore templates with `@flow` in header 7 | .*/local-cli/generator.* 8 | 9 | # Ignore malformed json 10 | .*/node_modules/y18n/test/.*\.json 11 | 12 | # Ignore the website subdir 13 | /website/.* 14 | 15 | # Ignore BUCK generated dirs 16 | /\.buckd/ 17 | 18 | # Ignore unexpected extra @providesModule 19 | .*/node_modules/commoner/test/source/widget/share.js 20 | .*/node_modules/.*/node_modules/fbjs/.* 21 | 22 | # Ignore duplicate module providers 23 | # For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root 24 | .*/Libraries/react-native/React.js 25 | .*/Libraries/react-native/ReactNative.js 26 | .*/node_modules/jest-runtime/build/__tests__/.* 27 | 28 | [include] 29 | 30 | [libs] 31 | node_modules/react-native/Libraries/react-native/react-native-interface.js 32 | node_modules/react-native/flow 33 | flow/ 34 | 35 | [options] 36 | module.system=haste 37 | 38 | esproposal.class_static_fields=enable 39 | esproposal.class_instance_fields=enable 40 | 41 | experimental.strict_type_args=true 42 | 43 | munge_underscores=true 44 | 45 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 46 | 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' 47 | 48 | suppress_type=$FlowIssue 49 | suppress_type=$FlowFixMe 50 | suppress_type=$FixMe 51 | 52 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 53 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 54 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 55 | 56 | unsafe.enable_getters_and_setters=true 57 | 58 | [version] 59 | ^0.33.0 60 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | *.iml 28 | .idea 29 | .gradle 30 | local.properties 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | 37 | # BUCK 38 | buck-out/ 39 | \.buckd/ 40 | android/app/libs 41 | *.keystore 42 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.uploadfromcameraroll', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.uploadfromcameraroll', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // the root of your project, i.e. where "package.json" lives 37 | * root: "../../", 38 | * 39 | * // where to put the JS bundle asset in debug mode 40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 41 | * 42 | * // where to put the JS bundle asset in release mode 43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 44 | * 45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 46 | * // require('./image.png')), in debug mode 47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 48 | * 49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 50 | * // require('./image.png')), in release mode 51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 52 | * 53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 57 | * // for example, you might want to remove it from here. 58 | * inputExcludes: ["android/**", "ios/**"], 59 | * 60 | * // override which node gets called and with what additional arguments 61 | * nodeExecutableAndArgs: ["node"] 62 | * 63 | * // supply additional arguments to the packager 64 | * extraPackagerArgs: [] 65 | * ] 66 | */ 67 | 68 | apply from: "../../node_modules/react-native/react.gradle" 69 | 70 | /** 71 | * Set this to true to create two separate APKs instead of one: 72 | * - An APK that only works on ARM devices 73 | * - An APK that only works on x86 devices 74 | * The advantage is the size of the APK is reduced by about 4MB. 75 | * Upload all the APKs to the Play Store and people will download 76 | * the correct one based on the CPU architecture of their device. 77 | */ 78 | def enableSeparateBuildPerCPUArchitecture = false 79 | 80 | /** 81 | * Run Proguard to shrink the Java bytecode in release builds. 82 | */ 83 | def enableProguardInReleaseBuilds = false 84 | 85 | android { 86 | compileSdkVersion 23 87 | buildToolsVersion "23.0.1" 88 | 89 | defaultConfig { 90 | applicationId "com.uploadfromcameraroll" 91 | minSdkVersion 16 92 | targetSdkVersion 22 93 | versionCode 1 94 | versionName "1.0" 95 | ndk { 96 | abiFilters "armeabi-v7a", "x86" 97 | } 98 | } 99 | splits { 100 | abi { 101 | reset() 102 | enable enableSeparateBuildPerCPUArchitecture 103 | universalApk false // If true, also generate a universal APK 104 | include "armeabi-v7a", "x86" 105 | } 106 | } 107 | buildTypes { 108 | release { 109 | minifyEnabled enableProguardInReleaseBuilds 110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 111 | } 112 | } 113 | // applicationVariants are e.g. debug, release 114 | applicationVariants.all { variant -> 115 | variant.outputs.each { output -> 116 | // For each separate APK per architecture, set a unique version code as described here: 117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 118 | def versionCodes = ["armeabi-v7a":1, "x86":2] 119 | def abi = output.getFilter(OutputFile.ABI) 120 | if (abi != null) { // null for the universal-debug, universal-release variants 121 | output.versionCodeOverride = 122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 123 | } 124 | } 125 | } 126 | } 127 | 128 | dependencies { 129 | compile fileTree(dir: "libs", include: ["*.jar"]) 130 | compile "com.android.support:appcompat-v7:23.0.1" 131 | compile "com.facebook.react:react-native:+" // From node_modules 132 | } 133 | 134 | // Run this once to be able to run the application with BUCK 135 | // puts all compile dependencies into folder libs for BUCK to use 136 | task copyDownloadableDepsToLibs(type: Copy) { 137 | from configurations.compile 138 | into 'libs' 139 | } 140 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/app/react.gradle: -------------------------------------------------------------------------------- 1 | import org.apache.tools.ant.taskdefs.condition.Os 2 | 3 | def config = project.hasProperty("react") ? project.react : []; 4 | 5 | def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" 6 | def entryFile = config.entryFile ?: "index.android.js" 7 | 8 | // because elvis operator 9 | def elvisFile(thing) { 10 | return thing ? file(thing) : null; 11 | } 12 | 13 | def reactRoot = elvisFile(config.root) ?: file("../../") 14 | def jsBundleDirDebug = elvisFile(config.jsBundleDirDebug) ?: 15 | file("$buildDir/intermediates/assets/debug") 16 | def jsBundleDirRelease = elvisFile(config.jsBundleDirRelease) ?: 17 | file("$buildDir/intermediates/assets/release") 18 | def resourcesDirDebug = elvisFile(config.resourcesDirDebug) ?: 19 | file("$buildDir/intermediates/res/merged/debug") 20 | def resourcesDirRelease = elvisFile(config.resourcesDirRelease) ?: 21 | file("$buildDir/intermediates/res/merged/release") 22 | def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] 23 | 24 | def jsBundleFileDebug = file("$jsBundleDirDebug/$bundleAssetName") 25 | def jsBundleFileRelease = file("$jsBundleDirRelease/$bundleAssetName") 26 | 27 | task bundleDebugJsAndAssets(type: Exec) { 28 | // create dirs if they are not there (e.g. the "clean" task just ran) 29 | doFirst { 30 | jsBundleDirDebug.mkdirs() 31 | resourcesDirDebug.mkdirs() 32 | } 33 | 34 | // set up inputs and outputs so gradle can cache the result 35 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 36 | outputs.dir jsBundleDirDebug 37 | outputs.dir resourcesDirDebug 38 | 39 | // set up the call to the react-native cli 40 | workingDir reactRoot 41 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 42 | commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 43 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 44 | } else { 45 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 46 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 47 | } 48 | 49 | enabled config.bundleInDebug ?: false 50 | } 51 | 52 | task bundleReleaseJsAndAssets(type: Exec) { 53 | // create dirs if they are not there (e.g. the "clean" task just ran) 54 | doFirst { 55 | jsBundleDirRelease.mkdirs() 56 | resourcesDirRelease.mkdirs() 57 | } 58 | 59 | // set up inputs and outputs so gradle can cache the result 60 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 61 | outputs.dir jsBundleDirRelease 62 | outputs.dir resourcesDirRelease 63 | 64 | // set up the call to the react-native cli 65 | workingDir reactRoot 66 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 67 | commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 68 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 69 | } else { 70 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 71 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 72 | } 73 | 74 | enabled config.bundleInRelease ?: true 75 | } 76 | 77 | gradle.projectsEvaluated { 78 | // hook bundleDebugJsAndAssets into the android build process 79 | bundleDebugJsAndAssets.dependsOn mergeDebugResources 80 | bundleDebugJsAndAssets.dependsOn mergeDebugAssets 81 | processDebugResources.dependsOn bundleDebugJsAndAssets 82 | 83 | // hook bundleReleaseJsAndAssets into the android build process 84 | bundleReleaseJsAndAssets.dependsOn mergeReleaseResources 85 | bundleReleaseJsAndAssets.dependsOn mergeReleaseAssets 86 | processReleaseResources.dependsOn bundleReleaseJsAndAssets 87 | } 88 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/app/src/main/java/com/uploadfromcameraroll/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.uploadfromcameraroll; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "UploadFromCameraRoll"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/app/src/main/java/com/uploadfromcameraroll/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.uploadfromcameraroll; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.react.shell.MainReactPackage; 11 | import com.facebook.soloader.SoLoader; 12 | 13 | import java.util.Arrays; 14 | import java.util.List; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 19 | @Override 20 | protected boolean getUseDeveloperSupport() { 21 | return BuildConfig.DEBUG; 22 | } 23 | 24 | @Override 25 | protected List getPackages() { 26 | return Arrays.asList( 27 | new MainReactPackage() 28 | ); 29 | } 30 | }; 31 | 32 | @Override 33 | public ReactNativeHost getReactNativeHost() { 34 | return mReactNativeHost; 35 | } 36 | 37 | @Override 38 | public void onCreate() { 39 | super.onCreate(); 40 | SoLoader.init(this, /* native exopackage */ false); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'UploadFromCameraRoll' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/index.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React, { Component } from 'react'; 4 | import { 5 | AppRegistry, 6 | StyleSheet, 7 | Text, 8 | View, 9 | Image, 10 | NativeModules, 11 | DeviceEventEmitter, 12 | ActivityIndicator, 13 | CameraRoll, 14 | TouchableOpacity, 15 | Modal, 16 | } from 'react-native'; 17 | 18 | var RNUploader = NativeModules.RNUploader; 19 | 20 | class UploadFromCameraRoll extends React.Component { 21 | 22 | constructor(props) { 23 | super(props); 24 | 25 | this.state = { 26 | uploading: false, 27 | showUploadModal: false, 28 | uploadProgress: 0, 29 | uploadTotal: 0, 30 | uploadWritten: 0, 31 | uploadStatus: undefined, 32 | cancelled: false, 33 | images: [], 34 | } 35 | } 36 | 37 | componentDidMount() { 38 | DeviceEventEmitter.addListener('RNUploaderProgress', (data) => { 39 | let bytesWritten = data.totalBytesWritten; 40 | let bytesTotal = data.totalBytesExpectedToWrite; 41 | let progress = data.progress; 42 | this.setState({uploadProgress: progress, uploadTotal: bytesTotal, uploadWritten: bytesWritten}); 43 | }); 44 | } 45 | 46 | _addImage() { 47 | const fetchParams = { 48 | first: 25, 49 | }; 50 | 51 | CameraRoll.getPhotos(fetchParams).then( 52 | (data) => { 53 | const assets = data.edges; 54 | const index = parseInt(Math.random() * (assets.length)); 55 | const randomImage = assets[index]; 56 | 57 | let images = this.state.images; 58 | images.push(randomImage.node.image); 59 | 60 | this.setState({images: images}); 61 | }, 62 | (err) => { 63 | console.log(err); 64 | }); 65 | } 66 | 67 | _closeUploadModal() { 68 | this.setState({showUploadModal: false, uploadProgress: 0, uploadTotal: 0, uploadWritten: 0, images: [], cancelled: false, }); 69 | } 70 | 71 | _cancelUpload() { 72 | RNUploader.cancel(); 73 | this.setState({uploading: false, cancelled: true}); 74 | } 75 | 76 | _uploadImages() { 77 | let files = this.state.images.map( (file) => { 78 | return { 79 | name: 'file', 80 | filename: _generateUUID + '.png', 81 | filepath: file.uri, 82 | filetype: 'image/png', 83 | } 84 | }); 85 | 86 | let opts = { 87 | url: 'https://posttestserver.com/post.php', 88 | files: files, 89 | params: {name: 'test-app'} 90 | }; 91 | 92 | this.setState({ uploading: true, showUploadModal: true, }); 93 | RNUploader.upload(opts, (err, res) => { 94 | if (err) { 95 | console.log(err); 96 | return; 97 | } 98 | 99 | let status = res.status; 100 | let responseString = res.data; 101 | 102 | console.log('Upload complete with status ' + status); 103 | console.log(responseString); 104 | this.setState({uploading: false, uploadStatus: status}); 105 | }); 106 | 107 | } 108 | 109 | uploadProgressModal() { 110 | let uploadProgress; 111 | 112 | if (this.state.cancelled) { 113 | uploadProgress = ( 114 | 115 | 116 | Upload Cancelled 117 | 118 | 119 | Close 120 | 121 | 122 | ); 123 | } else if (!this.state.uploading && this.state.uploadStatus) { 124 | uploadProgress = ( 125 | 126 | 127 | Upload complete with status: { this.state.uploadStatus } 128 | 129 | 130 | { this.state.uploading ? '' : 'Close' } 131 | 132 | 133 | ); 134 | } else if (this.state.uploading) { 135 | uploadProgress = ( 136 | 137 | Uploading { this.state.images.length } Image{ this.state.images.length == 1 ? '' : 's' } 138 | 142 | { this.state.uploadProgress.toFixed(0) }% 143 | 144 | { ( this.state.uploadWritten / 1024 ).toFixed(0) }/{ ( this.state.uploadTotal / 1024 ).toFixed(0) } KB 145 | 146 | 147 | { 'Cancel' } 148 | 149 | 150 | ); 151 | } 152 | 153 | return uploadProgress; 154 | } 155 | 156 | render() { 157 | return ( 158 | 159 | 160 | 161 | react-native-uploader example 162 | 163 | 164 | 168 | 169 | 170 | {this.uploadProgressModal()} 171 | 172 | 173 | 174 | 175 | 176 | 177 | Add Image 178 | 179 | 180 | 181 | Upload 182 | 183 | 184 | 185 | 186 | 187 | {this.state.images.map((image) => { 188 | return 189 | })} 190 | 191 | 192 | 193 | ); 194 | } 195 | 196 | } 197 | 198 | function _generateUUID() { 199 | var d = new Date().getTime(); 200 | var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { 201 | var r = (d + Math.random()*16)%16 | 0; 202 | d = Math.floor(d/16); 203 | return (c=='x' ? r : (r&0x3|0x8)).toString(16); 204 | }); 205 | return uuid; 206 | }; 207 | 208 | 209 | var styles = StyleSheet.create({ 210 | container: { 211 | flex: 1, 212 | backgroundColor: '#F5FCFF', 213 | padding: 20, 214 | paddingTop: 40, 215 | }, 216 | welcome: { 217 | fontSize: 20, 218 | textAlign: 'center', 219 | margin: 10, 220 | }, 221 | instructions: { 222 | textAlign: 'center', 223 | color: '#333333', 224 | marginBottom: 5, 225 | }, 226 | thumbnail: { 227 | width: 73, 228 | height: 73, 229 | borderWidth: 1, 230 | borderColor: '#DDD', 231 | margin: 5, 232 | }, 233 | modal: { 234 | margin: 50, 235 | borderWidth: 1, 236 | borderColor: '#DDD', 237 | padding: 20, 238 | borderRadius: 12, 239 | backgroundColor: 'lightyellow', 240 | justifyContent: 'center', 241 | alignItems: 'center', 242 | }, 243 | title: { 244 | textAlign: 'center', 245 | fontWeight: '500', 246 | fontSize: 14, 247 | }, 248 | button: { 249 | borderWidth: 1, 250 | borderColor: '#CCC', 251 | borderRadius: 8, 252 | padding: 10, 253 | backgroundColor: '#EEE', 254 | marginHorizontal: 5, 255 | } 256 | }); 257 | 258 | AppRegistry.registerComponent('UploadFromCameraRoll', () => UploadFromCameraRoll); 259 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 00E356F31AD99517003FC87E /* UploadFromCameraRollTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* UploadFromCameraRollTests.m */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 25 | 21D05D9B5D2A4D128F006224 /* libRNUploader.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63076A9F88D14F1FA676A0AF /* libRNUploader.a */; }; 26 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 27 | E3B159D51DE7C7BE00DB7928 /* libRCTCameraRoll.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E3B159B21DE7C75F00DB7928 /* libRCTCameraRoll.a */; }; 28 | E3B159DF1DE7CEA500DB7928 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E3B159DC1DE7CEA000DB7928 /* libRCTAnimation.a */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 35 | proxyType = 2; 36 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 37 | remoteInfo = RCTActionSheet; 38 | }; 39 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 42 | proxyType = 2; 43 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 44 | remoteInfo = RCTGeolocation; 45 | }; 46 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 49 | proxyType = 2; 50 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 51 | remoteInfo = RCTImage; 52 | }; 53 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 54 | isa = PBXContainerItemProxy; 55 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 56 | proxyType = 2; 57 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 58 | remoteInfo = RCTNetwork; 59 | }; 60 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 61 | isa = PBXContainerItemProxy; 62 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 63 | proxyType = 2; 64 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 65 | remoteInfo = RCTVibration; 66 | }; 67 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 68 | isa = PBXContainerItemProxy; 69 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 70 | proxyType = 1; 71 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 72 | remoteInfo = UploadFromCameraRoll; 73 | }; 74 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 75 | isa = PBXContainerItemProxy; 76 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 77 | proxyType = 2; 78 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 79 | remoteInfo = RCTSettings; 80 | }; 81 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 82 | isa = PBXContainerItemProxy; 83 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 84 | proxyType = 2; 85 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 86 | remoteInfo = RCTWebSocket; 87 | }; 88 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 89 | isa = PBXContainerItemProxy; 90 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 91 | proxyType = 2; 92 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 93 | remoteInfo = React; 94 | }; 95 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 96 | isa = PBXContainerItemProxy; 97 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 98 | proxyType = 2; 99 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 100 | remoteInfo = RCTLinking; 101 | }; 102 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 103 | isa = PBXContainerItemProxy; 104 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 105 | proxyType = 2; 106 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 107 | remoteInfo = RCTText; 108 | }; 109 | E3B159921DE7C74000DB7928 /* PBXContainerItemProxy */ = { 110 | isa = PBXContainerItemProxy; 111 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 112 | proxyType = 2; 113 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 114 | remoteInfo = "RCTImage-tvOS"; 115 | }; 116 | E3B159961DE7C74000DB7928 /* PBXContainerItemProxy */ = { 117 | isa = PBXContainerItemProxy; 118 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 119 | proxyType = 2; 120 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 121 | remoteInfo = "RCTLinking-tvOS"; 122 | }; 123 | E3B1599A1DE7C74000DB7928 /* PBXContainerItemProxy */ = { 124 | isa = PBXContainerItemProxy; 125 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 126 | proxyType = 2; 127 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 128 | remoteInfo = "RCTNetwork-tvOS"; 129 | }; 130 | E3B1599E1DE7C74000DB7928 /* PBXContainerItemProxy */ = { 131 | isa = PBXContainerItemProxy; 132 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 133 | proxyType = 2; 134 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 135 | remoteInfo = "RCTSettings-tvOS"; 136 | }; 137 | E3B159A21DE7C74000DB7928 /* PBXContainerItemProxy */ = { 138 | isa = PBXContainerItemProxy; 139 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 140 | proxyType = 2; 141 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 142 | remoteInfo = "RCTText-tvOS"; 143 | }; 144 | E3B159A71DE7C74000DB7928 /* PBXContainerItemProxy */ = { 145 | isa = PBXContainerItemProxy; 146 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 147 | proxyType = 2; 148 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 149 | remoteInfo = "RCTWebSocket-tvOS"; 150 | }; 151 | E3B159AB1DE7C74000DB7928 /* PBXContainerItemProxy */ = { 152 | isa = PBXContainerItemProxy; 153 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 154 | proxyType = 2; 155 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 156 | remoteInfo = "React-tvOS"; 157 | }; 158 | E3B159B11DE7C75F00DB7928 /* PBXContainerItemProxy */ = { 159 | isa = PBXContainerItemProxy; 160 | containerPortal = E3B159AD1DE7C75F00DB7928 /* RCTCameraRoll.xcodeproj */; 161 | proxyType = 2; 162 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 163 | remoteInfo = RCTCameraRoll; 164 | }; 165 | E3B159D31DE7C76D00DB7928 /* PBXContainerItemProxy */ = { 166 | isa = PBXContainerItemProxy; 167 | containerPortal = E379AC4F9F93444CAFB6E8CC /* RNUploader.xcodeproj */; 168 | proxyType = 2; 169 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 170 | remoteInfo = RNUploader; 171 | }; 172 | E3B159DB1DE7CEA000DB7928 /* PBXContainerItemProxy */ = { 173 | isa = PBXContainerItemProxy; 174 | containerPortal = E3B159D61DE7CEA000DB7928 /* RCTAnimation.xcodeproj */; 175 | proxyType = 2; 176 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 177 | remoteInfo = RCTAnimation; 178 | }; 179 | E3B159DD1DE7CEA000DB7928 /* PBXContainerItemProxy */ = { 180 | isa = PBXContainerItemProxy; 181 | containerPortal = E3B159D61DE7CEA000DB7928 /* RCTAnimation.xcodeproj */; 182 | proxyType = 2; 183 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 184 | remoteInfo = "RCTAnimation-tvOS"; 185 | }; 186 | /* End PBXContainerItemProxy section */ 187 | 188 | /* Begin PBXFileReference section */ 189 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 190 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 191 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 192 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 193 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 194 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 195 | 00E356EE1AD99517003FC87E /* UploadFromCameraRollTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UploadFromCameraRollTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 196 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 197 | 00E356F21AD99517003FC87E /* UploadFromCameraRollTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UploadFromCameraRollTests.m; sourceTree = ""; }; 198 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 199 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 200 | 13B07F961A680F5B00A75B9A /* UploadFromCameraRoll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UploadFromCameraRoll.app; sourceTree = BUILT_PRODUCTS_DIR; }; 201 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = UploadFromCameraRoll/AppDelegate.h; sourceTree = ""; }; 202 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = UploadFromCameraRoll/AppDelegate.m; sourceTree = ""; }; 203 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 204 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = UploadFromCameraRoll/Images.xcassets; sourceTree = ""; }; 205 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = UploadFromCameraRoll/Info.plist; sourceTree = ""; }; 206 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = UploadFromCameraRoll/main.m; sourceTree = ""; }; 207 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 208 | 63076A9F88D14F1FA676A0AF /* libRNUploader.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNUploader.a; sourceTree = ""; }; 209 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 210 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 211 | E379AC4F9F93444CAFB6E8CC /* RNUploader.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNUploader.xcodeproj; path = "../node_modules/react-native-uploader/RNUploader/RNUploader.xcodeproj"; sourceTree = ""; }; 212 | E3B159AD1DE7C75F00DB7928 /* RCTCameraRoll.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTCameraRoll.xcodeproj; path = "../node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj"; sourceTree = ""; }; 213 | E3B159D61DE7CEA000DB7928 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 214 | /* End PBXFileReference section */ 215 | 216 | /* Begin PBXFrameworksBuildPhase section */ 217 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 218 | isa = PBXFrameworksBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 226 | isa = PBXFrameworksBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | E3B159DF1DE7CEA500DB7928 /* libRCTAnimation.a in Frameworks */, 230 | E3B159D51DE7C7BE00DB7928 /* libRCTCameraRoll.a in Frameworks */, 231 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 232 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 233 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 234 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 235 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 236 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 237 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 238 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 239 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 240 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 241 | 21D05D9B5D2A4D128F006224 /* libRNUploader.a in Frameworks */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | /* End PBXFrameworksBuildPhase section */ 246 | 247 | /* Begin PBXGroup section */ 248 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 249 | isa = PBXGroup; 250 | children = ( 251 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 252 | ); 253 | name = Products; 254 | sourceTree = ""; 255 | }; 256 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 257 | isa = PBXGroup; 258 | children = ( 259 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 260 | ); 261 | name = Products; 262 | sourceTree = ""; 263 | }; 264 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 265 | isa = PBXGroup; 266 | children = ( 267 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 268 | E3B159931DE7C74000DB7928 /* libRCTImage-tvOS.a */, 269 | ); 270 | name = Products; 271 | sourceTree = ""; 272 | }; 273 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 274 | isa = PBXGroup; 275 | children = ( 276 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 277 | E3B1599B1DE7C74000DB7928 /* libRCTNetwork-tvOS.a */, 278 | ); 279 | name = Products; 280 | sourceTree = ""; 281 | }; 282 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 283 | isa = PBXGroup; 284 | children = ( 285 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 286 | ); 287 | name = Products; 288 | sourceTree = ""; 289 | }; 290 | 00E356EF1AD99517003FC87E /* UploadFromCameraRollTests */ = { 291 | isa = PBXGroup; 292 | children = ( 293 | 00E356F21AD99517003FC87E /* UploadFromCameraRollTests.m */, 294 | 00E356F01AD99517003FC87E /* Supporting Files */, 295 | ); 296 | path = UploadFromCameraRollTests; 297 | sourceTree = ""; 298 | }; 299 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 300 | isa = PBXGroup; 301 | children = ( 302 | 00E356F11AD99517003FC87E /* Info.plist */, 303 | ); 304 | name = "Supporting Files"; 305 | sourceTree = ""; 306 | }; 307 | 139105B71AF99BAD00B5F7CC /* Products */ = { 308 | isa = PBXGroup; 309 | children = ( 310 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 311 | E3B1599F1DE7C74000DB7928 /* libRCTSettings-tvOS.a */, 312 | ); 313 | name = Products; 314 | sourceTree = ""; 315 | }; 316 | 139FDEE71B06529A00C62182 /* Products */ = { 317 | isa = PBXGroup; 318 | children = ( 319 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 320 | E3B159A81DE7C74000DB7928 /* libRCTWebSocket-tvOS.a */, 321 | ); 322 | name = Products; 323 | sourceTree = ""; 324 | }; 325 | 13B07FAE1A68108700A75B9A /* UploadFromCameraRoll */ = { 326 | isa = PBXGroup; 327 | children = ( 328 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 329 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 330 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 331 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 332 | 13B07FB61A68108700A75B9A /* Info.plist */, 333 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 334 | 13B07FB71A68108700A75B9A /* main.m */, 335 | ); 336 | name = UploadFromCameraRoll; 337 | sourceTree = ""; 338 | }; 339 | 146834001AC3E56700842450 /* Products */ = { 340 | isa = PBXGroup; 341 | children = ( 342 | 146834041AC3E56700842450 /* libReact.a */, 343 | E3B159AC1DE7C74000DB7928 /* libReact-tvOS.a */, 344 | ); 345 | name = Products; 346 | sourceTree = ""; 347 | }; 348 | 78C398B11ACF4ADC00677621 /* Products */ = { 349 | isa = PBXGroup; 350 | children = ( 351 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 352 | E3B159971DE7C74000DB7928 /* libRCTLinking-tvOS.a */, 353 | ); 354 | name = Products; 355 | sourceTree = ""; 356 | }; 357 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 358 | isa = PBXGroup; 359 | children = ( 360 | E3B159D61DE7CEA000DB7928 /* RCTAnimation.xcodeproj */, 361 | E3B159AD1DE7C75F00DB7928 /* RCTCameraRoll.xcodeproj */, 362 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 363 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 364 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 365 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 366 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 367 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 368 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 369 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 370 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 371 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 372 | E379AC4F9F93444CAFB6E8CC /* RNUploader.xcodeproj */, 373 | ); 374 | name = Libraries; 375 | sourceTree = ""; 376 | }; 377 | 832341B11AAA6A8300B99B32 /* Products */ = { 378 | isa = PBXGroup; 379 | children = ( 380 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 381 | E3B159A31DE7C74000DB7928 /* libRCTText-tvOS.a */, 382 | ); 383 | name = Products; 384 | sourceTree = ""; 385 | }; 386 | 83CBB9F61A601CBA00E9B192 = { 387 | isa = PBXGroup; 388 | children = ( 389 | 13B07FAE1A68108700A75B9A /* UploadFromCameraRoll */, 390 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 391 | 00E356EF1AD99517003FC87E /* UploadFromCameraRollTests */, 392 | 83CBBA001A601CBA00E9B192 /* Products */, 393 | ); 394 | indentWidth = 2; 395 | sourceTree = ""; 396 | tabWidth = 2; 397 | }; 398 | 83CBBA001A601CBA00E9B192 /* Products */ = { 399 | isa = PBXGroup; 400 | children = ( 401 | 13B07F961A680F5B00A75B9A /* UploadFromCameraRoll.app */, 402 | 00E356EE1AD99517003FC87E /* UploadFromCameraRollTests.xctest */, 403 | ); 404 | name = Products; 405 | sourceTree = ""; 406 | }; 407 | E3B159AE1DE7C75F00DB7928 /* Products */ = { 408 | isa = PBXGroup; 409 | children = ( 410 | E3B159B21DE7C75F00DB7928 /* libRCTCameraRoll.a */, 411 | ); 412 | name = Products; 413 | sourceTree = ""; 414 | }; 415 | E3B159BE1DE7C76D00DB7928 /* Products */ = { 416 | isa = PBXGroup; 417 | children = ( 418 | E3B159D41DE7C76D00DB7928 /* libRNUploader.a */, 419 | ); 420 | name = Products; 421 | sourceTree = ""; 422 | }; 423 | E3B159D71DE7CEA000DB7928 /* Products */ = { 424 | isa = PBXGroup; 425 | children = ( 426 | E3B159DC1DE7CEA000DB7928 /* libRCTAnimation.a */, 427 | E3B159DE1DE7CEA000DB7928 /* libRCTAnimation-tvOS.a */, 428 | ); 429 | name = Products; 430 | sourceTree = ""; 431 | }; 432 | /* End PBXGroup section */ 433 | 434 | /* Begin PBXNativeTarget section */ 435 | 00E356ED1AD99517003FC87E /* UploadFromCameraRollTests */ = { 436 | isa = PBXNativeTarget; 437 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "UploadFromCameraRollTests" */; 438 | buildPhases = ( 439 | 00E356EA1AD99517003FC87E /* Sources */, 440 | 00E356EB1AD99517003FC87E /* Frameworks */, 441 | 00E356EC1AD99517003FC87E /* Resources */, 442 | ); 443 | buildRules = ( 444 | ); 445 | dependencies = ( 446 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 447 | ); 448 | name = UploadFromCameraRollTests; 449 | productName = UploadFromCameraRollTests; 450 | productReference = 00E356EE1AD99517003FC87E /* UploadFromCameraRollTests.xctest */; 451 | productType = "com.apple.product-type.bundle.unit-test"; 452 | }; 453 | 13B07F861A680F5B00A75B9A /* UploadFromCameraRoll */ = { 454 | isa = PBXNativeTarget; 455 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "UploadFromCameraRoll" */; 456 | buildPhases = ( 457 | 13B07F871A680F5B00A75B9A /* Sources */, 458 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 459 | 13B07F8E1A680F5B00A75B9A /* Resources */, 460 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 461 | ); 462 | buildRules = ( 463 | ); 464 | dependencies = ( 465 | ); 466 | name = UploadFromCameraRoll; 467 | productName = "Hello World"; 468 | productReference = 13B07F961A680F5B00A75B9A /* UploadFromCameraRoll.app */; 469 | productType = "com.apple.product-type.application"; 470 | }; 471 | /* End PBXNativeTarget section */ 472 | 473 | /* Begin PBXProject section */ 474 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 475 | isa = PBXProject; 476 | attributes = { 477 | LastUpgradeCheck = 0800; 478 | ORGANIZATIONNAME = Facebook; 479 | TargetAttributes = { 480 | 00E356ED1AD99517003FC87E = { 481 | CreatedOnToolsVersion = 6.2; 482 | TestTargetID = 13B07F861A680F5B00A75B9A; 483 | }; 484 | }; 485 | }; 486 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "UploadFromCameraRoll" */; 487 | compatibilityVersion = "Xcode 3.2"; 488 | developmentRegion = English; 489 | hasScannedForEncodings = 0; 490 | knownRegions = ( 491 | en, 492 | Base, 493 | ); 494 | mainGroup = 83CBB9F61A601CBA00E9B192; 495 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 496 | projectDirPath = ""; 497 | projectReferences = ( 498 | { 499 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 500 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 501 | }, 502 | { 503 | ProductGroup = E3B159D71DE7CEA000DB7928 /* Products */; 504 | ProjectRef = E3B159D61DE7CEA000DB7928 /* RCTAnimation.xcodeproj */; 505 | }, 506 | { 507 | ProductGroup = E3B159AE1DE7C75F00DB7928 /* Products */; 508 | ProjectRef = E3B159AD1DE7C75F00DB7928 /* RCTCameraRoll.xcodeproj */; 509 | }, 510 | { 511 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 512 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 513 | }, 514 | { 515 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 516 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 517 | }, 518 | { 519 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 520 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 521 | }, 522 | { 523 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 524 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 525 | }, 526 | { 527 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 528 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 529 | }, 530 | { 531 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 532 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 533 | }, 534 | { 535 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 536 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 537 | }, 538 | { 539 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 540 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 541 | }, 542 | { 543 | ProductGroup = 146834001AC3E56700842450 /* Products */; 544 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 545 | }, 546 | { 547 | ProductGroup = E3B159BE1DE7C76D00DB7928 /* Products */; 548 | ProjectRef = E379AC4F9F93444CAFB6E8CC /* RNUploader.xcodeproj */; 549 | }, 550 | ); 551 | projectRoot = ""; 552 | targets = ( 553 | 13B07F861A680F5B00A75B9A /* UploadFromCameraRoll */, 554 | 00E356ED1AD99517003FC87E /* UploadFromCameraRollTests */, 555 | ); 556 | }; 557 | /* End PBXProject section */ 558 | 559 | /* Begin PBXReferenceProxy section */ 560 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 561 | isa = PBXReferenceProxy; 562 | fileType = archive.ar; 563 | path = libRCTActionSheet.a; 564 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 565 | sourceTree = BUILT_PRODUCTS_DIR; 566 | }; 567 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 568 | isa = PBXReferenceProxy; 569 | fileType = archive.ar; 570 | path = libRCTGeolocation.a; 571 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 572 | sourceTree = BUILT_PRODUCTS_DIR; 573 | }; 574 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 575 | isa = PBXReferenceProxy; 576 | fileType = archive.ar; 577 | path = libRCTImage.a; 578 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 579 | sourceTree = BUILT_PRODUCTS_DIR; 580 | }; 581 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 582 | isa = PBXReferenceProxy; 583 | fileType = archive.ar; 584 | path = libRCTNetwork.a; 585 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 586 | sourceTree = BUILT_PRODUCTS_DIR; 587 | }; 588 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 589 | isa = PBXReferenceProxy; 590 | fileType = archive.ar; 591 | path = libRCTVibration.a; 592 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 593 | sourceTree = BUILT_PRODUCTS_DIR; 594 | }; 595 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 596 | isa = PBXReferenceProxy; 597 | fileType = archive.ar; 598 | path = libRCTSettings.a; 599 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 600 | sourceTree = BUILT_PRODUCTS_DIR; 601 | }; 602 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 603 | isa = PBXReferenceProxy; 604 | fileType = archive.ar; 605 | path = libRCTWebSocket.a; 606 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 607 | sourceTree = BUILT_PRODUCTS_DIR; 608 | }; 609 | 146834041AC3E56700842450 /* libReact.a */ = { 610 | isa = PBXReferenceProxy; 611 | fileType = archive.ar; 612 | path = libReact.a; 613 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 614 | sourceTree = BUILT_PRODUCTS_DIR; 615 | }; 616 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 617 | isa = PBXReferenceProxy; 618 | fileType = archive.ar; 619 | path = libRCTLinking.a; 620 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 621 | sourceTree = BUILT_PRODUCTS_DIR; 622 | }; 623 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 624 | isa = PBXReferenceProxy; 625 | fileType = archive.ar; 626 | path = libRCTText.a; 627 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 628 | sourceTree = BUILT_PRODUCTS_DIR; 629 | }; 630 | E3B159931DE7C74000DB7928 /* libRCTImage-tvOS.a */ = { 631 | isa = PBXReferenceProxy; 632 | fileType = archive.ar; 633 | path = "libRCTImage-tvOS.a"; 634 | remoteRef = E3B159921DE7C74000DB7928 /* PBXContainerItemProxy */; 635 | sourceTree = BUILT_PRODUCTS_DIR; 636 | }; 637 | E3B159971DE7C74000DB7928 /* libRCTLinking-tvOS.a */ = { 638 | isa = PBXReferenceProxy; 639 | fileType = archive.ar; 640 | path = "libRCTLinking-tvOS.a"; 641 | remoteRef = E3B159961DE7C74000DB7928 /* PBXContainerItemProxy */; 642 | sourceTree = BUILT_PRODUCTS_DIR; 643 | }; 644 | E3B1599B1DE7C74000DB7928 /* libRCTNetwork-tvOS.a */ = { 645 | isa = PBXReferenceProxy; 646 | fileType = archive.ar; 647 | path = "libRCTNetwork-tvOS.a"; 648 | remoteRef = E3B1599A1DE7C74000DB7928 /* PBXContainerItemProxy */; 649 | sourceTree = BUILT_PRODUCTS_DIR; 650 | }; 651 | E3B1599F1DE7C74000DB7928 /* libRCTSettings-tvOS.a */ = { 652 | isa = PBXReferenceProxy; 653 | fileType = archive.ar; 654 | path = "libRCTSettings-tvOS.a"; 655 | remoteRef = E3B1599E1DE7C74000DB7928 /* PBXContainerItemProxy */; 656 | sourceTree = BUILT_PRODUCTS_DIR; 657 | }; 658 | E3B159A31DE7C74000DB7928 /* libRCTText-tvOS.a */ = { 659 | isa = PBXReferenceProxy; 660 | fileType = archive.ar; 661 | path = "libRCTText-tvOS.a"; 662 | remoteRef = E3B159A21DE7C74000DB7928 /* PBXContainerItemProxy */; 663 | sourceTree = BUILT_PRODUCTS_DIR; 664 | }; 665 | E3B159A81DE7C74000DB7928 /* libRCTWebSocket-tvOS.a */ = { 666 | isa = PBXReferenceProxy; 667 | fileType = archive.ar; 668 | path = "libRCTWebSocket-tvOS.a"; 669 | remoteRef = E3B159A71DE7C74000DB7928 /* PBXContainerItemProxy */; 670 | sourceTree = BUILT_PRODUCTS_DIR; 671 | }; 672 | E3B159AC1DE7C74000DB7928 /* libReact-tvOS.a */ = { 673 | isa = PBXReferenceProxy; 674 | fileType = archive.ar; 675 | path = "libReact-tvOS.a"; 676 | remoteRef = E3B159AB1DE7C74000DB7928 /* PBXContainerItemProxy */; 677 | sourceTree = BUILT_PRODUCTS_DIR; 678 | }; 679 | E3B159B21DE7C75F00DB7928 /* libRCTCameraRoll.a */ = { 680 | isa = PBXReferenceProxy; 681 | fileType = archive.ar; 682 | path = libRCTCameraRoll.a; 683 | remoteRef = E3B159B11DE7C75F00DB7928 /* PBXContainerItemProxy */; 684 | sourceTree = BUILT_PRODUCTS_DIR; 685 | }; 686 | E3B159D41DE7C76D00DB7928 /* libRNUploader.a */ = { 687 | isa = PBXReferenceProxy; 688 | fileType = archive.ar; 689 | path = libRNUploader.a; 690 | remoteRef = E3B159D31DE7C76D00DB7928 /* PBXContainerItemProxy */; 691 | sourceTree = BUILT_PRODUCTS_DIR; 692 | }; 693 | E3B159DC1DE7CEA000DB7928 /* libRCTAnimation.a */ = { 694 | isa = PBXReferenceProxy; 695 | fileType = archive.ar; 696 | path = libRCTAnimation.a; 697 | remoteRef = E3B159DB1DE7CEA000DB7928 /* PBXContainerItemProxy */; 698 | sourceTree = BUILT_PRODUCTS_DIR; 699 | }; 700 | E3B159DE1DE7CEA000DB7928 /* libRCTAnimation-tvOS.a */ = { 701 | isa = PBXReferenceProxy; 702 | fileType = archive.ar; 703 | path = "libRCTAnimation-tvOS.a"; 704 | remoteRef = E3B159DD1DE7CEA000DB7928 /* PBXContainerItemProxy */; 705 | sourceTree = BUILT_PRODUCTS_DIR; 706 | }; 707 | /* End PBXReferenceProxy section */ 708 | 709 | /* Begin PBXResourcesBuildPhase section */ 710 | 00E356EC1AD99517003FC87E /* Resources */ = { 711 | isa = PBXResourcesBuildPhase; 712 | buildActionMask = 2147483647; 713 | files = ( 714 | ); 715 | runOnlyForDeploymentPostprocessing = 0; 716 | }; 717 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 718 | isa = PBXResourcesBuildPhase; 719 | buildActionMask = 2147483647; 720 | files = ( 721 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 722 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 723 | ); 724 | runOnlyForDeploymentPostprocessing = 0; 725 | }; 726 | /* End PBXResourcesBuildPhase section */ 727 | 728 | /* Begin PBXShellScriptBuildPhase section */ 729 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 730 | isa = PBXShellScriptBuildPhase; 731 | buildActionMask = 2147483647; 732 | files = ( 733 | ); 734 | inputPaths = ( 735 | ); 736 | name = "Bundle React Native code and images"; 737 | outputPaths = ( 738 | ); 739 | runOnlyForDeploymentPostprocessing = 0; 740 | shellPath = /bin/sh; 741 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; 742 | }; 743 | /* End PBXShellScriptBuildPhase section */ 744 | 745 | /* Begin PBXSourcesBuildPhase section */ 746 | 00E356EA1AD99517003FC87E /* Sources */ = { 747 | isa = PBXSourcesBuildPhase; 748 | buildActionMask = 2147483647; 749 | files = ( 750 | 00E356F31AD99517003FC87E /* UploadFromCameraRollTests.m in Sources */, 751 | ); 752 | runOnlyForDeploymentPostprocessing = 0; 753 | }; 754 | 13B07F871A680F5B00A75B9A /* Sources */ = { 755 | isa = PBXSourcesBuildPhase; 756 | buildActionMask = 2147483647; 757 | files = ( 758 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 759 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 760 | ); 761 | runOnlyForDeploymentPostprocessing = 0; 762 | }; 763 | /* End PBXSourcesBuildPhase section */ 764 | 765 | /* Begin PBXTargetDependency section */ 766 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 767 | isa = PBXTargetDependency; 768 | target = 13B07F861A680F5B00A75B9A /* UploadFromCameraRoll */; 769 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 770 | }; 771 | /* End PBXTargetDependency section */ 772 | 773 | /* Begin PBXVariantGroup section */ 774 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 775 | isa = PBXVariantGroup; 776 | children = ( 777 | 13B07FB21A68108700A75B9A /* Base */, 778 | ); 779 | name = LaunchScreen.xib; 780 | path = UploadFromCameraRoll; 781 | sourceTree = ""; 782 | }; 783 | /* End PBXVariantGroup section */ 784 | 785 | /* Begin XCBuildConfiguration section */ 786 | 00E356F61AD99517003FC87E /* Debug */ = { 787 | isa = XCBuildConfiguration; 788 | buildSettings = { 789 | BUNDLE_LOADER = "$(TEST_HOST)"; 790 | GCC_PREPROCESSOR_DEFINITIONS = ( 791 | "DEBUG=1", 792 | "$(inherited)", 793 | ); 794 | INFOPLIST_FILE = UploadFromCameraRollTests/Info.plist; 795 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 796 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 797 | LIBRARY_SEARCH_PATHS = ( 798 | "$(inherited)", 799 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 800 | ); 801 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 802 | PRODUCT_NAME = "$(TARGET_NAME)"; 803 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UploadFromCameraRoll.app/UploadFromCameraRoll"; 804 | }; 805 | name = Debug; 806 | }; 807 | 00E356F71AD99517003FC87E /* Release */ = { 808 | isa = XCBuildConfiguration; 809 | buildSettings = { 810 | BUNDLE_LOADER = "$(TEST_HOST)"; 811 | COPY_PHASE_STRIP = NO; 812 | INFOPLIST_FILE = UploadFromCameraRollTests/Info.plist; 813 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 814 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 815 | LIBRARY_SEARCH_PATHS = ( 816 | "$(inherited)", 817 | "\"$(SRCROOT)/$(TARGET_NAME)\"", 818 | ); 819 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 820 | PRODUCT_NAME = "$(TARGET_NAME)"; 821 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/UploadFromCameraRoll.app/UploadFromCameraRoll"; 822 | }; 823 | name = Release; 824 | }; 825 | 13B07F941A680F5B00A75B9A /* Debug */ = { 826 | isa = XCBuildConfiguration; 827 | buildSettings = { 828 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 829 | CURRENT_PROJECT_VERSION = 1; 830 | DEAD_CODE_STRIPPING = NO; 831 | HEADER_SEARCH_PATHS = ( 832 | "$(inherited)", 833 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 834 | "$(SRCROOT)/../node_modules/react-native/React/**", 835 | ); 836 | INFOPLIST_FILE = UploadFromCameraRoll/Info.plist; 837 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 838 | OTHER_LDFLAGS = ( 839 | "$(inherited)", 840 | "-ObjC", 841 | "-lc++", 842 | ); 843 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 844 | PRODUCT_NAME = UploadFromCameraRoll; 845 | VERSIONING_SYSTEM = "apple-generic"; 846 | }; 847 | name = Debug; 848 | }; 849 | 13B07F951A680F5B00A75B9A /* Release */ = { 850 | isa = XCBuildConfiguration; 851 | buildSettings = { 852 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 853 | CURRENT_PROJECT_VERSION = 1; 854 | HEADER_SEARCH_PATHS = ( 855 | "$(inherited)", 856 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 857 | "$(SRCROOT)/../node_modules/react-native/React/**", 858 | ); 859 | INFOPLIST_FILE = UploadFromCameraRoll/Info.plist; 860 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 861 | OTHER_LDFLAGS = ( 862 | "$(inherited)", 863 | "-ObjC", 864 | "-lc++", 865 | ); 866 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 867 | PRODUCT_NAME = UploadFromCameraRoll; 868 | VERSIONING_SYSTEM = "apple-generic"; 869 | }; 870 | name = Release; 871 | }; 872 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 873 | isa = XCBuildConfiguration; 874 | buildSettings = { 875 | ALWAYS_SEARCH_USER_PATHS = NO; 876 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 877 | CLANG_CXX_LIBRARY = "libc++"; 878 | CLANG_ENABLE_MODULES = YES; 879 | CLANG_ENABLE_OBJC_ARC = YES; 880 | CLANG_WARN_BOOL_CONVERSION = YES; 881 | CLANG_WARN_CONSTANT_CONVERSION = YES; 882 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 883 | CLANG_WARN_EMPTY_BODY = YES; 884 | CLANG_WARN_ENUM_CONVERSION = YES; 885 | CLANG_WARN_INFINITE_RECURSION = YES; 886 | CLANG_WARN_INT_CONVERSION = YES; 887 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 888 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 889 | CLANG_WARN_UNREACHABLE_CODE = YES; 890 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 891 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 892 | COPY_PHASE_STRIP = NO; 893 | ENABLE_STRICT_OBJC_MSGSEND = YES; 894 | ENABLE_TESTABILITY = YES; 895 | GCC_C_LANGUAGE_STANDARD = gnu99; 896 | GCC_DYNAMIC_NO_PIC = NO; 897 | GCC_NO_COMMON_BLOCKS = YES; 898 | GCC_OPTIMIZATION_LEVEL = 0; 899 | GCC_PREPROCESSOR_DEFINITIONS = ( 900 | "DEBUG=1", 901 | "$(inherited)", 902 | ); 903 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 904 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 905 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 906 | GCC_WARN_UNDECLARED_SELECTOR = YES; 907 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 908 | GCC_WARN_UNUSED_FUNCTION = YES; 909 | GCC_WARN_UNUSED_VARIABLE = YES; 910 | HEADER_SEARCH_PATHS = ( 911 | "$(inherited)", 912 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 913 | "$(SRCROOT)/../node_modules/react-native/React/**", 914 | ); 915 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 916 | MTL_ENABLE_DEBUG_INFO = YES; 917 | ONLY_ACTIVE_ARCH = YES; 918 | SDKROOT = iphoneos; 919 | }; 920 | name = Debug; 921 | }; 922 | 83CBBA211A601CBA00E9B192 /* Release */ = { 923 | isa = XCBuildConfiguration; 924 | buildSettings = { 925 | ALWAYS_SEARCH_USER_PATHS = NO; 926 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 927 | CLANG_CXX_LIBRARY = "libc++"; 928 | CLANG_ENABLE_MODULES = YES; 929 | CLANG_ENABLE_OBJC_ARC = YES; 930 | CLANG_WARN_BOOL_CONVERSION = YES; 931 | CLANG_WARN_CONSTANT_CONVERSION = YES; 932 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 933 | CLANG_WARN_EMPTY_BODY = YES; 934 | CLANG_WARN_ENUM_CONVERSION = YES; 935 | CLANG_WARN_INFINITE_RECURSION = YES; 936 | CLANG_WARN_INT_CONVERSION = YES; 937 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 938 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 939 | CLANG_WARN_UNREACHABLE_CODE = YES; 940 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 941 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 942 | COPY_PHASE_STRIP = YES; 943 | ENABLE_NS_ASSERTIONS = NO; 944 | ENABLE_STRICT_OBJC_MSGSEND = YES; 945 | GCC_C_LANGUAGE_STANDARD = gnu99; 946 | GCC_NO_COMMON_BLOCKS = YES; 947 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 948 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 949 | GCC_WARN_UNDECLARED_SELECTOR = YES; 950 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 951 | GCC_WARN_UNUSED_FUNCTION = YES; 952 | GCC_WARN_UNUSED_VARIABLE = YES; 953 | HEADER_SEARCH_PATHS = ( 954 | "$(inherited)", 955 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 956 | "$(SRCROOT)/../node_modules/react-native/React/**", 957 | ); 958 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 959 | MTL_ENABLE_DEBUG_INFO = NO; 960 | SDKROOT = iphoneos; 961 | VALIDATE_PRODUCT = YES; 962 | }; 963 | name = Release; 964 | }; 965 | /* End XCBuildConfiguration section */ 966 | 967 | /* Begin XCConfigurationList section */ 968 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "UploadFromCameraRollTests" */ = { 969 | isa = XCConfigurationList; 970 | buildConfigurations = ( 971 | 00E356F61AD99517003FC87E /* Debug */, 972 | 00E356F71AD99517003FC87E /* Release */, 973 | ); 974 | defaultConfigurationIsVisible = 0; 975 | defaultConfigurationName = Release; 976 | }; 977 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "UploadFromCameraRoll" */ = { 978 | isa = XCConfigurationList; 979 | buildConfigurations = ( 980 | 13B07F941A680F5B00A75B9A /* Debug */, 981 | 13B07F951A680F5B00A75B9A /* Release */, 982 | ); 983 | defaultConfigurationIsVisible = 0; 984 | defaultConfigurationName = Release; 985 | }; 986 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "UploadFromCameraRoll" */ = { 987 | isa = XCConfigurationList; 988 | buildConfigurations = ( 989 | 83CBBA201A601CBA00E9B192 /* Debug */, 990 | 83CBBA211A601CBA00E9B192 /* Release */, 991 | ); 992 | defaultConfigurationIsVisible = 0; 993 | defaultConfigurationName = Release; 994 | }; 995 | /* End XCConfigurationList section */ 996 | }; 997 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 998 | } 999 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll.xcodeproj/xcshareddata/xcschemes/UploadFromCameraRoll.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTBundleURLProvider.h" 13 | #import "RCTRootView.h" 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"UploadFromCameraRoll" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSCameraUsageDescription 37 | Used to load pictures from camera roll for uploading to a remote server 38 | NSLocationWhenInUseUsageDescription 39 | 40 | NSPhotoLibraryUsageDescription 41 | Used to load pictures from camera roll for uploading to a remote server 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UIViewControllerBasedStatusBarAppearance 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRoll/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRollTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/ios/UploadFromCameraRollTests/UploadFromCameraRollTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface UploadFromCameraRollTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation UploadFromCameraRollTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "UploadFromCameraRoll", 3 | "version": "0.0.2", 4 | "private": true, 5 | "scripts": { 6 | "start": "react-native start" 7 | }, 8 | "dependencies": { 9 | "react": "^15.4.1", 10 | "react-native": "^0.38.0", 11 | "react-native-uploader": "file:../../" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/UploadFromCameraRoll/uploader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aroth/react-native-uploader/689014e158af2232e451f215295ff9df79a257b1/examples/UploadFromCameraRoll/uploader.gif -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-uploader", 3 | "repository": { 4 | "type": "git", 5 | "url": "git+https://github.com/aroth/react-native-uploader.git" 6 | }, 7 | "version": "0.0.10", 8 | "description": "A React Native module to upload files and camera roll assets. Supports progress notification.", 9 | "author": { 10 | "name": "Adam Roth", 11 | "url": "aroth" 12 | }, 13 | "nativePackage": true, 14 | "keywords": [ 15 | "react-native", 16 | "react-native-upload", 17 | "react-component", 18 | "react", 19 | "native", 20 | "image", 21 | "upload", 22 | "transfer", 23 | "file" 24 | ], 25 | "bugs": { 26 | "url": "https://github.com/aroth/react-native-uploader/issues" 27 | }, 28 | "homepage": "https://github.com/aroth/react-native-uploader#readme", 29 | "maintainers": [ 30 | { 31 | "name": "aroth", 32 | "email": "adamjroth@gmail.com" 33 | } 34 | ] 35 | } 36 | --------------------------------------------------------------------------------