xinthink / rnmk-demo

react-native-material-kit demo
80 stars 44 forks source link

Unable to build on iOS #15

Closed kristianmandrup closed 8 years ago

kristianmandrup commented 8 years ago

I cloned the repo. Ran npm install Then opened the rnmk-demo project in XCode and clicked run/play.

I think I'm missing this step:

Link your local RNMK module to the demo project but not sure exactly how? What is my RNMK module??

ld: library not found for -lRCTMaterialKit

Ld /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/Example.app/Example normal arm64
    cd /Users/kristianmandrup/repos/react-projs/rnmk-demo
    export IPHONEOS_DEPLOYMENT_TARGET=7.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos -F/Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos -filelist /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Intermediates/RNMKDemo.build/Debug-iphoneos/RNMKDemo.build/Objects-normal/arm64/Example.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=7.0 -dead_strip -fembed-bitcode-marker -ObjC -fobjc-arc -fobjc-link-runtime -lRCTMaterialKit /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libReact.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTActionSheet.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTGeolocation.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTImage.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTLinking.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTNetwork.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTSettings.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTText.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTVibration.a /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Intermediates/RNMKDemo.build/Debug-iphoneos/RNMKDemo.build/Objects-normal/arm64/Example_dependency_info.dat -o /Users/kristianmandrup/Library/Developer/Xcode/DerivedData/RNMKDemo-cqlnwjhtkogrsccizingawuxfwiy/Build/Products/Debug-iphoneos/Example.app/Example

ld: library not found for -lRCTMaterialKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
xinthink commented 8 years ago

Usually it should just work, everything is pre-configured in this demo project. You don't have to link the local RNMK module to build the demo, make sure you have this in your Xcode project: _2016-03-12_ 5_16_24

please refer to https://github.com/xinthink/react-native-material-kit#ios

kristianmandrup commented 8 years ago

Yeah thanks. I solved it ;) also added better instructions here

Run npm install then drag the .xcodeproj file from node_modules/react-native-material-kit/ios into Linked frameworks/libraries in Xcode.