[ios] react-native-crop-picker moviePath build error 문의
517
작성한 질문수 3
moviePath를 찾지 못하는 에러를 발생합니다..
버전이 달라서 생긴 문제일까요..
버전
xcode: Version 14.1 (14B47b)
"react-native-image-crop-picker": "^0.38.1",
코딩
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSString* mediaType = [info objectForKey:UIImagePickerControllerMediaType];
if (CFStringCompare ((__bridge CFStringRef) mediaType, kUTTypeMovie, 0) == kCFCompareEqualTo) {
NSURL *url = [info objectForKey:UIImagePickerControllerMediaURL];
AVURLAsset *asset = [AVURLAsset assetWithURL:url];
NSString *moviePath = [url path];
NSString *fileName = [[asset.URL path] lastPathComponent];
if ([[self.options objectForKey:@"saveToPhotos"] boolValue]) {
if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(moviePath)) {
UISaveVideoAtPathToSavedPhotosAlbum(moviePath, nil, nil, nil);
}
}
[self handleVideo:asset
withFileName:fileName
withLocalIdentifier:nil
completion:^(NSDictionary* video) {
dispatch_async(dispatch_get_main_queue(), ^{
if (video == nil) {
[picker dismissViewControllerAnimated:YES completion:[self waitAnimationEnd:^{
self.reject(ERROR_CANNOT_PROCESS_VIDEO_KEY, ERROR_CANNOT_PROCESS_VIDEO_MSG, nil);
}]];
return;
}
[picker dismissViewControllerAnimated:YES completion:[self waitAnimationEnd:^{
self.resolve(video);
}]];
});
}
];
} else {
// UIImage *chosenImage = [info objectForKey:UIImagePickerControllerOriginalImage];
// NSURL *url = [info objectForKey:UIImagePickerControllerMediaURL];
// AVURLAsset *asset = [AVURLAsset assetWithURL:url];
// NSString *moviePath = [url path];
NSDictionary *exif;
if([[self.options objectForKey:@"includeExif"] boolValue]) {
exif = [info objectForKey:UIImagePickerControllerMediaMetadata];
}
if ([[self.options objectForKey:@"saveToPhotos"] boolValue]) {
// TODO: 문제 사항
UIImageWriteToSavedPhotosAlbum(moviePath, nil, nil, nil);
}
[self processSingleImagePick:chosenImage withExif:exif withViewController:picker withSourceURL:self.croppingFile[@"sourceURL"] withLocalIdentifier:self.croppingFile[@"localIdentifier"] withFilename:self.croppingFile[@"filename"] withCreationDate:self.croppingFile[@"creationDate"] withModificationDate:self.croppingFile[@"modificationDate"]];
}
}에러 내용
info Building (using "xcodebuild -workspace FoodDeliveryApp.xcworkspace -configuration Debug -scheme FoodDeliveryApp -destination id=66BF5043-E45F-46DA-9B84-EBDB63EA58BF")
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening FoodDeliveryApp.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace FoodDeliveryApp.xcworkspace -configuration Debug -scheme FoodDeliveryApp -destination id=66BF5043-E45F-46DA-9B84-EBDB63EA58BF
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Prepare packages
Computing target dependency graph and provisioning inputs
Create build description
Build description signature: 0c8000121eeafd63a74888e775bdfe5a
Build description path: /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/XCBuildData/0c8000121eeafd63a74888e775bdfe5a-desc.xcbuild
note: Building targets in dependency order
CompileC /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/Objects-normal/x86_64/ImageCropPicker.o /IdeaProjects/food-delivery-app/FoodDeliveryApp/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNImageCropPicker' from project 'Pods')
cd /IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios11.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path\=/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.1.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version\=2 -fobjc-legacy-dispatch -index-store-path /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Index.noindex/DataStore -iquote /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/RNImageCropPicker-generated-files.hmap -I/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/RNImageCropPicker-own-target-headers.hmap -I/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/RNImageCropPicker-all-non-framework-target-headers.hmap -ivfsoverlay /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/all-product-headers.yaml -iquote /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/RNImageCropPicker-project-headers.hmap -I/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Products/Debug-iphonesimulator/RNImageCropPicker/include -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Private -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Private/RNImageCropPicker -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/DoubleConversion -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/FBLazyVector -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/RCT-Folly -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/RCTRequired -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/RCTTypeSafety -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/RNImageCropPicker -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-Codegen -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-Core -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-bridging -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-callinvoker -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-cxxreact -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-jsi -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-jsiexecutor -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-jsinspector -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-logger -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-perflogger -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React-runtimeexecutor -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/ReactCommon -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/TOCropViewController -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/Yoga -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/fmt -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/glog -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/libevent -I/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Private/React-bridging/react/bridging -I/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Products/Debug-iphonesimulator/React-bridging/react_bridging.framework/Headers -I/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/DerivedSources-normal/x86_64 -I/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/DerivedSources/x86_64 -I/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/DerivedSources -F/Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Products/Debug-iphonesimulator/RNImageCropPicker -fmodule-map-file\=/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap -fmodule-map-file\=/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/ReactCommon/ReactCommon.modulemap -fmodule-map-file\=/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/React_Codegen/React-Codegen.modulemap -fmodule-map-file\=/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/folly/RCT-Folly.modulemap -fmodule-map-file\=/IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Headers/Public/yoga/Yoga.modulemap -include /IdeaProjects/food-delivery-app/FoodDeliveryApp/ios/Pods/Target\ Support\ Files/RNImageCropPicker/RNImageCropPicker-prefix.pch -MMD -MT dependencies -MF /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/Objects-normal/x86_64/ImageCropPicker.d --serialize-diagnostics /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/Objects-normal/x86_64/ImageCropPicker.dia -c /IdeaProjects/food-delivery-app/FoodDeliveryApp/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m -o /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/Objects-normal/x86_64/ImageCropPicker.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/Objects-normal/x86_64/ImageCropPicker.o
/IdeaProjects/food-delivery-app/FoodDeliveryApp/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m:243:44: error: use of undeclared identifier 'moviePath'
UIImageWriteToSavedPhotosAlbum(moviePath, nil, nil, nil);
^
/IdeaProjects/food-delivery-app/FoodDeliveryApp/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m:246:38: error: use of undeclared identifier 'chosenImage'
[self processSingleImagePick:chosenImage withExif:exif withViewController:picker withSourceURL:self.croppingFile[@"sourceURL"] withLocalIdentifier:self.croppingFile[@"localIdentifier"] withFilename:self.croppingFile[@"filename"] withCreationDate:self.croppingFile[@"creationDate"] withModificationDate:self.croppingFile[@"modificationDate"]];
^
2 errors generated.
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'FoodDeliveryApp' from project 'FoodDeliveryApp')
warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'FoodDeliveryApp' from project 'FoodDeliveryApp')
** BUILD FAILED **
The following build commands failed:
CompileC /Library/Developer/Xcode/DerivedData/FoodDeliveryApp-bvdueivcuebfnfaveqcmcylricfm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNImageCropPicker.build/Objects-normal/x86_64/ImageCropPicker.o /IdeaProjects/food-delivery-app/FoodDeliveryApp/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNImageCropPicker' from project 'Pods')
(1 failure)
답변 1
앱실행시 네이버맵 [401] 에러
0
987
2
스타일링 라이브러리
0
147
2
expo, cli 선택 중에 고민이 있습니다.
0
167
2
JDK 버전이 달라도 괜찮나요?
0
223
2
dimenstion usewindowdeminstion
0
121
3
[맥 전용]환경 설정하기 1편 & [맥 전용]환경 설정하기 2편의 영상이 안나옵니다.
0
210
1
jdk11 버전과 gradle 버전의 호환성 관련 질문드립니다.
0
399
2
강의 외 질문입니다!
0
157
2
react native랑 맞는 ui 라이브러리 어떤게 좋을까요?
0
1498
2
react native와 spring boot 연결
0
355
1
java가 아닌 .kt에서 code push 에러가 발생합니다.
0
214
2
flipper 239 에러가 발생합니다.
0
165
2
package.json에 /lib/panino.js 문제입니다.
0
470
2
window - mac 협업 과정 질문합니다
0
215
1
ios 빌드 중 RCTBridgeDelegate.h import 오류
0
289
2
ios 앱 빌드 중 hermesEnabled 관련 오류발생
0
239
2
Socket 연결시 질문 드립니다.!
0
152
2
wifi 환경에서 axios 통신이 로컬서버에서 안됩니다.
0
426
2
iOS render error 질문드립니다.
0
410
2
iOS 가상머신 오류
0
165
2
npc react init 명령어 실행시 발생되는 오류
0
220
1
nom start 시 오류
0
116
1
NextJS 기반으로 만들어서 웹뷰 React Native로 배포 가능한가요?
0
1001
2
안드로이드 rn75 버전에 맞게 설정 중에 android13 다운로드에 대해서 막혔습니다!
0
184
2





