shoutem / ui

Customizable set of components for React Native applications
Other
4.91k stars 452 forks source link

build fails on fresh install. trying restaurants app demo #64

Closed hounsellal closed 8 years ago

hounsellal commented 8 years ago

Followed the instructions exactly. Clones shoutem/ui, cd'd into restaurants app and installed and linked. tried starting on iOS simulator and:

/Users/al/Dropbox/Development/chopchop/ui/examples/RestaurantsApp/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:494:3: error: 
      ignoring return value of function declared with warn_unused_result
      attribute [-Werror,-Wunused-result]
  SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
  ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/al/Dropbox/Development/chopchop/ui/examples/RestaurantsApp/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:1334:5: error: 
      ignoring return value of function declared with warn_unused_result
      attribute [-Werror,-Wunused-result]
    SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
    ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

And:

** BUILD FAILED **

The following build commands failed:
    CompileC /Users/al/Dropbox/Development/chopchop/ui/examples/RestaurantsApp/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/ShoutemRestaurants.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/ShoutemRestaurants.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Any ideas?

jackbillstrom commented 8 years ago

Try react-native upgrade, and read this: https://github.com/facebook/react-native/issues/7308#issuecomment-219597774

hounsellal commented 8 years ago

Still doesn't work unfortunately.

SoHotSoup commented 8 years ago

Could you, please, try run XCode and clean your project (Cmd+Shift+K)? I've sometimes experienced this when trying to run react-native run-ios on my project regardless @shoutem/ui

jkomyno commented 8 years ago

Hi, I think this may help you @hounsellal : https://medium.com/@alberto.schiabel/react-native-on-xcode-beta-8-0-how-to-fix-initial-build-error-f0225c649850#.m0jxnivwt

This blog post of mine solves the following problem:

Print: Entry, ":CFBundleIdentifier", Does Not Exist /Users/jkomyno/dev/YourAwesomeProject/node_modules/promise/lib/done.js:10

  throw err;
  ^

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/YourAwesomeProject.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

tenodi commented 8 years ago

Closing, as this issue seems to be related with React Native.

kpatel1989 commented 6 years ago

In file included from /Users/kartikpatel/Documents/GoInt/shoutem/bswelcomeapp/node_modules/react-native-shopify/ios/RNShopify.m:1: /Users/kartikpatel/Documents/GoInt/shoutem/bswelcomeapp/node_modules/react-native-shopify/ios/RNShopify.h:10:9: fatal error: 'Buy.h' file not found

import "Buy.h"

    ^~~~~~~

1 error generated.

The following build commands failed: CompileC /Users/kartikpatel/Documents/GoInt/shoutem/bswelcomeapp/ios/build/Build/Intermediates.noindex/RNShopify.build/Debug-iphonesimulator/RNShopify.build/Objects-normal/x86_64/RNShopify.o RNShopify.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/BarberSupplies.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

When I create a simple React Native app that works. but shoutem app doesnt work.

The first error says the header file is missing.. I check the project and the file doesnt exist, So the compiler is correct that's an error. But how can the same project run on my colleague's machine.

The other errors I assume are the consequence of the first one.