corymsmith / react-native-icons

Quick and easy icons in React Native
MIT License
1.14k stars 141 forks source link

Cannot install react-native-icons in my existing project #6

Closed billyshena closed 9 years ago

billyshena commented 9 years ago

Hello guys, I've tried to setup react-native-icons following the installation guide on github, however my build fails with some errors like (RCTRootView.h , RCTViewManager.h not found) I've also tried to clone the example and run it on my device but still errors appear when I try to build in xCode.

Any ideas?

Thanks in advance !

corymsmith commented 9 years ago

Hey @billyshena, that usually means the that the ReactNativeIcons project can't see the React Native headers, have you done Step 6 in the instructions?

billyshena commented 9 years ago

Thanks for your quick reply @corymsmith I've followed each step described in the installation guide. Here is a screenshot of my xCode settings on the 6th step: http://imgur.com/bwigjbp

Best,

chadobado commented 9 years ago

Currently having the same or similar problem.

Possibly also as mentioned here.

(null): error: /Users/Chad/Library/Developer/Xcode/DerivedData/ToyTime-dlspuucbonmitigximwovpmsceuh/Build/Products/Debug-iphonesimulator/ReactNativeIconsResources.bundle: No such file or directory

Full log:

CpResource /Users/Chad/Library/Developer/Xcode/DerivedData/ToyTime-dlspuucbonmitigximwovpmsceuh/Build/Products/Debug-iphonesimulator/ReactNativeIconsResources.bundle /Users/Chad/Library/Developer/Xcode/DerivedData/ToyTime-dlspuucbonmitigximwovpmsceuh/Build/Products/Debug-iphonesimulator/ToyTime.app/ReactNativeIconsResources.bundle
    cd /Users/Chad/Documents/ToyTime/ToyTime
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/Chad/Library/Developer/Xcode/DerivedData/ToyTime-dlspuucbonmitigximwovpmsceuh/Build/Products/Debug-iphonesimulator/ReactNativeIconsResources.bundle /Users/Chad/Library/Developer/Xcode/DerivedData/ToyTime-dlspuucbonmitigximwovpmsceuh/Build/Products/Debug-iphonesimulator/ToyTime.app

error: /Users/Chad/Library/Developer/Xcode/DerivedData/ToyTime-dlspuucbonmitigximwovpmsceuh/Build/Products/Debug-iphonesimulator/ReactNativeIconsResources.bundle: No such file or directory

Assuming not the cause, but noticed that installation instructions differed slightly:

3. Go to node_modules ➜ react-native-icons and add ReactNativeIcons.xcodeproj

node_modules/react-native-icons/ReactNativeIcons.xcodeproj (does not exist) node_modules/react-native-icons/ios/ReactNativeIcons.xcodeproj (does exist)

chadobado commented 9 years ago

Attempting again from scratch now gets me to the same issue as @billyshena

/Users/Chad/Documents/ToyTime/ToyTime/node_modules/react-native-icons/ios/IconTabBarItem/SMXTabBarManager.h:1:9: 'RCTViewManager.h' file not found

Edit:

Accidentally added the User Header Search Paths to the project and not to ReactNativeIcons.xcodeproj as in instructions.

Now fixed results in the original ReactNativeIconsResources.bundle: No such file or directory error mentioned above.

corymsmith commented 9 years ago

@chadobado @billyshena Can you try to drag ReactNativeIconsResources.bundle into the Copy Bundle Resources build phase of the ReactNativeIcons project as well? I'll have to update the Readme and the install process to clarify things a bit

chadobado commented 9 years ago

Great, that fixed it. Thanks for the quick reply @corymsmith

corymsmith commented 9 years ago

@chadobado Ok awesome, I'll update the readme

billyshena commented 9 years ago

EDIT: Now everything builds successfully ( I had to set Location: Absolute Path in xCode project => 'Identity and Type' panel. However, I get an error "requiring unknown module FAKIconImage" using the example code here: https://github.com/corymsmith/react-native-icons/blob/master/Example/index.ios.js

Any ideas?

Thanks !

dmnkgrc commented 9 years ago

I have the same issue as @billyshena, the absolute path fixed the building problem but I get the same error.

corymsmith commented 9 years ago

@billyshena @dominikgar Did you install via NPM? That error typically occurs if the JS files aren't found in node_modules in the root of your project

dmnkgrc commented 9 years ago

@corymsmith yes I did

billyshena commented 9 years ago

@corymsmith : Yes, installed via NPM but does not resolve the issue. After setting the absolute path, the builds is still failing but no errors.

linghuaj commented 9 years ago

i had the same issue in the first place, make sure the path was set to "recursive" resolved the problem for me. (you want to double click on the path , and choose recursive)

Hope this helps

billyshena commented 9 years ago

I've set also the option on recursive but that did not change anything.

Billy,

JonasJonny commented 9 years ago

I also had to set the location to something else than "default". From "relative to group" to "relative to project". I don't know why but it helps me to fix build error with "***.bundle".

corymsmith commented 9 years ago

I'm working on an update with support for react-native 0.3.11 and also reverting back to just including the font files in your bundle vs. Including a .bundle file. This will also allow you to only include the fonts you use in your app vs. bloating the binary size with icon fonts you aren't using.

On Sun, Apr 12, 2015 at 4:46 PM, Jonas Jonny notifications@github.com wrote:

I also had to set the location to something else than "default".

From "relative to group" to "relative to project". I don't know why but it helps me to fix build error with "***.bundle".

Reply to this email directly or view it on GitHub: https://github.com/corymsmith/react-native-icons/issues/6#issuecomment-92146154

leecade commented 9 years ago

:+1:

corymsmith commented 9 years ago

New version (0.0.2) is published to NPM, I've updated the install instructions as well.