From b00c05bb81047d60135fb44e78f8f89c3fe52bb9 Mon Sep 17 00:00:00 2001 From: Bartol Karuza Date: Sun, 24 Feb 2019 13:48:37 +0800 Subject: [PATCH] fix iOS library file reference --- .../project.pbxproj | 30 +++++++++++++++++++ ios/RNCCameraRoll.xcodeproj/project.pbxproj | 24 ++++----------- ios/RNCCameraRollManager.m | 2 +- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/example/ios/CameraRollExample.xcodeproj/project.pbxproj b/example/ios/CameraRollExample.xcodeproj/project.pbxproj index 51e1c0def..9566ddf47 100644 --- a/example/ios/CameraRollExample.xcodeproj/project.pbxproj +++ b/example/ios/CameraRollExample.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 4FD6D46C222264F300C8455E /* libRNCCameraRoll.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4FD6D46B222264DD00C8455E /* libRNCCameraRoll.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; }; @@ -251,6 +252,13 @@ remoteGlobalIDString = ED296FEE214C9CF800B7C4FE; remoteInfo = "jsiexecutor-tvOS"; }; + 4FD6D46A222264DD00C8455E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4FD6D441222264DD00C8455E /* RNCCameraRoll.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5115D1A9E6B3D00147676; + remoteInfo = RNCCameraRoll; + }; 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; @@ -306,6 +314,7 @@ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = CameraRollExample/main.m; sourceTree = ""; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 4FD6D441222264DD00C8455E /* RNCCameraRoll.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNCCameraRoll.xcodeproj; path = ../../ios/RNCCameraRoll.xcodeproj; sourceTree = ""; }; 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; @@ -332,6 +341,7 @@ 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, + 4FD6D46C222264F300C8455E /* libRNCCameraRoll.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -447,6 +457,14 @@ name = Frameworks; sourceTree = ""; }; + 4FD6D442222264DD00C8455E /* Products */ = { + isa = PBXGroup; + children = ( + 4FD6D46B222264DD00C8455E /* libRNCCameraRoll.a */, + ); + name = Products; + sourceTree = ""; + }; 5E91572E1DD0AC6500FF2AA8 /* Products */ = { isa = PBXGroup; children = ( @@ -468,6 +486,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( + 4FD6D441222264DD00C8455E /* RNCCameraRoll.xcodeproj */, 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, @@ -613,6 +632,10 @@ ProductGroup = 146834001AC3E56700842450 /* Products */; ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; }, + { + ProductGroup = 4FD6D442222264DD00C8455E /* Products */; + ProjectRef = 4FD6D441222264DD00C8455E /* RNCCameraRoll.xcodeproj */; + }, ); projectRoot = ""; targets = ( @@ -846,6 +869,13 @@ remoteRef = 4F41E1BF22225F52003029C8 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 4FD6D46B222264DD00C8455E /* libRNCCameraRoll.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRNCCameraRoll.a; + remoteRef = 4FD6D46A222264DD00C8455E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; diff --git a/ios/RNCCameraRoll.xcodeproj/project.pbxproj b/ios/RNCCameraRoll.xcodeproj/project.pbxproj index c60f27779..f6790f0cc 100644 --- a/ios/RNCCameraRoll.xcodeproj/project.pbxproj +++ b/ios/RNCCameraRoll.xcodeproj/project.pbxproj @@ -7,10 +7,8 @@ objects = { /* Begin PBXBuildFile section */ - 137620351B31C53500677FF0 /* RCTImagePickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 137620341B31C53500677FF0 /* RCTImagePickerManager.m */; }; 143879351AAD238D00F088A5 /* RNCCameraRollManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 143879341AAD238D00F088A5 /* RNCCameraRollManager.m */; }; - 8312EAEE1B85EB7C001867A2 /* RCTAssetsLibraryRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 8312EAED1B85EB7C001867A2 /* RCTAssetsLibraryRequestHandler.m */; }; - 8312EAF11B85F071001867A2 /* RCTPhotoLibraryImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 8312EAF01B85F071001867A2 /* RCTPhotoLibraryImageLoader.m */; }; + 4F788CB822226740001DB9D2 /* RNCAssetsLibraryRequestHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F788CB722226740001DB9D2 /* RNCAssetsLibraryRequestHandler.m */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -26,15 +24,11 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 137620331B31C53500677FF0 /* RCTImagePickerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTImagePickerManager.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 137620341B31C53500677FF0 /* RCTImagePickerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTImagePickerManager.m; sourceTree = ""; }; 143879331AAD238D00F088A5 /* RNCCameraRollManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RNCCameraRollManager.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 143879341AAD238D00F088A5 /* RNCCameraRollManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNCCameraRollManager.m; sourceTree = ""; }; + 4F788CB622226740001DB9D2 /* RNCAssetsLibraryRequestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNCAssetsLibraryRequestHandler.h; sourceTree = ""; }; + 4F788CB722226740001DB9D2 /* RNCAssetsLibraryRequestHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNCAssetsLibraryRequestHandler.m; sourceTree = ""; }; 58B5115D1A9E6B3D00147676 /* libRNCCameraRoll.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNCCameraRoll.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 8312EAEC1B85EB7C001867A2 /* RCTAssetsLibraryRequestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTAssetsLibraryRequestHandler.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 8312EAED1B85EB7C001867A2 /* RCTAssetsLibraryRequestHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTAssetsLibraryRequestHandler.m; sourceTree = ""; }; - 8312EAEF1B85F071001867A2 /* RCTPhotoLibraryImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTPhotoLibraryImageLoader.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 8312EAF01B85F071001867A2 /* RCTPhotoLibraryImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTPhotoLibraryImageLoader.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -51,14 +45,10 @@ 58B511541A9E6B3D00147676 = { isa = PBXGroup; children = ( - 8312EAEC1B85EB7C001867A2 /* RCTAssetsLibraryRequestHandler.h */, - 8312EAED1B85EB7C001867A2 /* RCTAssetsLibraryRequestHandler.m */, + 4F788CB622226740001DB9D2 /* RNCAssetsLibraryRequestHandler.h */, + 4F788CB722226740001DB9D2 /* RNCAssetsLibraryRequestHandler.m */, 143879331AAD238D00F088A5 /* RNCCameraRollManager.h */, 143879341AAD238D00F088A5 /* RNCCameraRollManager.m */, - 137620331B31C53500677FF0 /* RCTImagePickerManager.h */, - 137620341B31C53500677FF0 /* RCTImagePickerManager.m */, - 8312EAEF1B85F071001867A2 /* RCTPhotoLibraryImageLoader.h */, - 8312EAF01B85F071001867A2 /* RCTPhotoLibraryImageLoader.m */, 58B5115E1A9E6B3D00147676 /* Products */, ); indentWidth = 2; @@ -130,9 +120,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8312EAEE1B85EB7C001867A2 /* RCTAssetsLibraryRequestHandler.m in Sources */, - 8312EAF11B85F071001867A2 /* RCTPhotoLibraryImageLoader.m in Sources */, - 137620351B31C53500677FF0 /* RCTImagePickerManager.m in Sources */, + 4F788CB822226740001DB9D2 /* RNCAssetsLibraryRequestHandler.m in Sources */, 143879351AAD238D00F088A5 /* RNCCameraRollManager.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/ios/RNCCameraRollManager.m b/ios/RNCCameraRollManager.m index f0bef4bb3..b677894fc 100644 --- a/ios/RNCCameraRollManager.m +++ b/ios/RNCCameraRollManager.m @@ -21,7 +21,7 @@ #import #import -#import "RCTAssetsLibraryRequestHandler.h" +#import "RNCAssetsLibraryRequestHandler.h" @implementation RCTConvert (PHAssetCollectionSubtype)