3
votes

I am getting a build error with the react-native-icons. I did the linking command from the installation instructions from their github site. the message said the icons were already linked to the project.

Ld /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/NativeStarter.app/NativeStarter normal x86_64 cd /Users/rsanchez/Development/NativeStarter.git/ios export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator -F/Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator -filelist /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Intermediates/NativeStarter.build/Debug-iphonesimulator/NativeStarter.build/Objects-normal/x86_64/NativeStarter.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -lRNVectorIcons /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libReact.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Intermediates/NativeStarter.build/Debug-iphonesimulator/NativeStarter.build/Objects-normal/x86_64/NativeStarter_dependency_info.dat -o /Users/rsanchez/Library/Developer/Xcode/DerivedData/NativeStarter-ddtqngxgxoergggtejjrwdqafazh/Build/Products/Debug-iphonesimulator/NativeStarter.app/NativeStarter

ld: library not found for -lRNVectorIcons clang: error: linker command failed with exit code 1 (use -v to see invocation)

2

2 Answers

9
votes

We have updated the docs of Native Starter Pro. Please check the first question under FAQs

http://strapmobile.com/docs/native-starter-pro/faqs/

Probabilities:

  • This might be the problem if you have 'npm3' installed in your system.
  • Make sure you have installed 'npm2'.
  • Linking the Vector Icons repo in XCode will solve the issue

Solution 1: Drag-drop to link RN Vector Icons files:

  • In your finder / computer, navigate to (project folder) -> node_modules -> react-native-vector-icons
  • Drag the RNVectorIcons.xcodeproj to the Libraries in the sidebar as explained in the image below enter image description here

Solution 2: Manually link the RN Vector Icons files:

  • Go to 'Build Phases' in Xcode
  • Link Binaries with Libraries by clicking on '+'
  • Click on 'Add Other'
  • Navigate to 'NativeStarter' (project folder) -> node_modules -> react-native-vector-icons
  • Select 'RNVectorIcons.xcodeproj'
  • Clean Build
  • Build Again
4
votes

What that i have done is just follow documentation in github.

I just run rnpm link and it work without did it manually.

Please make sure that you have install 'rnpm'

npm install rnpm -g