react-native
react-native copied to clipboard
pod install 0.10.0-rc leads to a duplicate symbol error
The link error is below:
duplicate symbol _OBJC_IVAR_$_RCTHTTPFormDataHelper.parts in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_IVAR_$_RCTHTTPFormDataHelper._callback in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_IVAR_$_RCTHTTPFormDataHelper.multipartBody in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_IVAR_$_RCTHTTPFormDataHelper.boundary in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_IVAR_$_RCTHTTPFormDataHelper._networker in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_IVAR_$_RCTNetworking._tasksByRequestID in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_IVAR_$_RCTNetworking._bridge in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_IVAR_$_RCTNetworking._methodQueue in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_METACLASS_$_RCTHTTPFormDataHelper in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_CLASS_$_RCTHTTPFormDataHelper in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_CLASS_$_RCTNetworking in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
duplicate symbol _OBJC_METACLASS_$_RCTNetworking in:
/Users/robert/Library/Developer/Xcode/DerivedData/iMeituan-ciuisksmyjwgfxgymhjqawjgfhks/Build/Products/Debug-iphonesimulator/libPods-imeituan-React.a(RCTNetworking-B49E6004CEA934AB.o)
ld: 12 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Then I find two RCTNetworking.m in [Build Phases]->[Compile Sources] of Pods-imeituan-React
This reason for this error is in the podspec I think. RCTImage and RCTNetworking include source_files "Libraries/Network/*.{h,m}" both
{
"name": "RCTImage",
"dependencies": {
"React/Core": [
]
},
"source_files": [
"Libraries/Image/*.{h,m}",
"Libraries/Network/*.{h,m}"
],
"preserve_paths": "Libraries/Image/*.js"
},
{
"name": "RCTNetwork",
"dependencies": {
"React/Core": [
]
},
"source_files": "Libraries/Network/*.{h,m}",
"preserve_paths": "Libraries/Network/*.js"
}
Thanks -- for now you should be able to work around it by using only the RCTImage subspec.
If you use RCTImage, then no need to explicitly include RCTNetwork anymore as a sub-spec.