ShaMan123/react-native-reanimated-canvas

Unable to build IOS after installing this library

surafelbm opened this issue · 9 comments

Hello,

i was trying to install this library and followed the installation instructions from here and upon running npx react-native run-ios i have getting a ton of error on the log. i have attached some of it below its actually more than this, is there a way to fix this? or why its happening.
REACT-NATIVE-VERSION = 0.63.4

`Ld /Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/SAMPLEIOSAPP.app/SAMPLEIOSAPP normal (in target 'SAMPLEIOSAPP' from project 'SAMPLEIOSAPP')
cd /Users/temp/Desktop/SAMPLEIOSAPP/ios
as/libRNSketchCanvas.a(RNSketchData.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(RNSketchData.o)
duplicate symbol 'OBJC_IVAR$_RNSketchData._strokeColor' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(RNSketchData.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(RNSketchData.o)
duplicate symbol 'OBJC_IVAR$_RNSketchData._strokeWidth' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(RNSketchData.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(RNSketchData.o)
duplicate symbol 'OBJC_IVAR$_RNSketchData._path' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(RNSketchData.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(RNSketchData.o)
duplicate symbol 'OBJC_IVAR$_RNSketchData._pathId' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(RNSketchData.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(RNSketchData.o)
duplicate symbol 'OBJC_CLASS$_RNSketchData' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(RNSketchData.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(RNSketchData.o)
duplicate symbol 'OBJC_METACLASS$_RNSketchData' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(RNSketchData.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(RNSketchData.o)
duplicate symbol 'OBJC_CLASS$_Utility' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(Utility.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(Utility.o)
duplicate symbol 'OBJC_METACLASS$_Utility' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(Utility.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(Utility.o)
duplicate symbol '_midPoint' in:
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/RNSketchCanvas/libRNSketchCanvas.a(Utility.o)
/Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/ReanimatedCanvas/libReanimatedCanvas.a(Utility.o)
ld: 41 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'OpenSSL-Universal' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'react-native-directed-scrollview' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'boost-for-react-native' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'CocoaLibEvent' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/temp/Desktop/SAMPLEIOSAPP/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/temp/Desktop/SAMPLEIOSAPP/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/temp/Desktop/SAMPLEIOSAPP/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'Flipper-PeerTalk' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'Flipper-Glog' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'Flipper-Folly' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'Flipper-DoubleConversion' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'react-native-viewpager' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'libwebp' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'SDWebImageWebPCoder' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'YogaKit' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'ReanimatedCanvas' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'RNSketchCanvas' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'RNFastImage' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'RNImageCropPicker' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'TOCropViewController' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.2.99. (in target 'RNImageCropPicker-QBImagePicker' from project 'Pods')

** BUILD FAILED **

The following build commands failed:
Ld /Users/temp/Library/Developer/Xcode/DerivedData/SAMPLEIOSAPP-guvbxssbpkvwvbarxyrjkohtimpk/Build/Products/Debug-iphonesimulator/SAMPLEIOSAPP.app/SAMPLEIOSAPP normal
(1 failure)`

Thanks for your fast reply,

but i thought i could use the package without using react-native-reanimated-canvas@next, also i think i saw on one of the comments that the @next version can be used with some limitations.
i only wanted to use the scrollable canvas functionality

It will work only on android. Unfortunately

Oh no, thanks for your response tho....one more thing, if you had to suggest on how i can achieve zooming and scrolling with only two fingers on the canvas what would you suggest, you can just give me a top level explanation, Thank You.

I suggest you look into the example.
RNGH

BTW, reanimted@2 might help too

Okay, will look into these libraries thanks again.

Hello again, just a quick question, i wrapped the SketchCanvas component inside a PinchGestureHandler and the gesture is working but when the scale of the container change the draw becomes out of sync with the touch point, please kindly let me know if you had this issue before, Thank You. i have attached a gif bellow.
Screen Recording 2021-02-14 at 11 40 39 PM

Take a look at PRs submitted under terrylinla. I don't remember if the example contains this case.
You will need to add calculations.