React-native-vector-icons: library not found for -lRNVectorIcons-tvOS

Created on 4 May 2017  路  5Comments  路  Source: oblador/react-native-vector-icons

On fresh react-native app, after npm install --save react-native-vector-icons and react-native link react-native-vector-icons, when I try to react-native run-ios, build fails with following:

Ld build/Build/Products/Debug-iphonesimulator/Prism.app/Prism normal x86_64
    cd /Users/aiall/Developments/Prism/ios
    export IPHONEOS_DEPLOYMENT_TARGET=8.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/iPhoneSimulator10.2.sdk -L/Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator -F/Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator -filelist /Users/aiall/Developments/Prism/ios/build/Build/Intermediates/Prism.build/Debug-iphonesimulator/Prism.build/Objects-normal/x86_64/Prism.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -object_path_lto -Xlinker /Users/aiall/Developments/Prism/ios/build/Build/Intermediates/Prism.build/Debug-iphonesimulator/Prism.build/Objects-normal/x86_64/Prism_lto.o -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/aiall/Developments/Prism/ios/build/Build/Intermediates/Prism.build/Debug-iphonesimulator/Prism.build/Prism.app.xcent /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libReact.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTAnimation.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -lRNVectorIcons -lRNVectorIcons-tvOS -Xlinker -dependency_info -Xlinker /Users/aiall/Developments/Prism/ios/build/Build/Intermediates/Prism.build/Debug-iphonesimulator/Prism.build/Objects-normal/x86_64/Prism_dependency_info.dat -o /Users/aiall/Developments/Prism/ios/build/Build/Products/Debug-iphonesimulator/Prism.app/Prism

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



** BUILD FAILED **


The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/Prism.app/Prism normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/Prism.app
An error was encountered processing the command (domain=MIInstallerErrorDomain, code=4):
Failed to chmod /Users/aiall/Library/Developer/CoreSimulator/Devices/5BFA79D7-480E-46D8-BA2A-F859E0311F21/data/Library/Caches/com.apple.containermanagerd/Bundle/Application/B736A8E4-3968-463E-85DE-8BC9B1881163/Prism.app/Prism : No such file or directory
Launching org.reactjs.native.example.Prism
org.reactjs.native.example.Prism: 9393

I am on:

"react": "16.0.0-alpha.6",
"react-native": "0.44.0",

Most helpful comment

apparently react-native link adds all targets to the ios target even if they are meant for tvOS

to get your app running remove the -tvOS.a file from link binary with libraries so it looks like this:
screen shot 2017-05-04 at 7 38 14 pm

have filed an issue here: https://github.com/facebook/react-native/issues/13783

All 5 comments

@cmcewen any thoughts?

apparently react-native link adds all targets to the ios target even if they are meant for tvOS

to get your app running remove the -tvOS.a file from link binary with libraries so it looks like this:
screen shot 2017-05-04 at 7 38 14 pm

have filed an issue here: https://github.com/facebook/react-native/issues/13783

Gonna try it! Will let you know.

It works fine using the steps you mentioned! Thanks.

Thanks @cmcewen that worked for me also.
FYI, for those who are using react-native 0.49.3 then you may also run into https://github.com/react-native-community/react-native-svg/issues/460

Was this page helpful?
0 / 5 - 0 ratings

Related issues

obykoo picture obykoo  路  3Comments

toddmetheny picture toddmetheny  路  4Comments

elnygren picture elnygren  路  3Comments

mahdidavoodi7 picture mahdidavoodi7  路  3Comments

rmilejcz picture rmilejcz  路  3Comments