Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nice idea. couldn't test on iOS. #1

Open
fforres opened this issue May 19, 2017 · 6 comments
Open

Nice idea. couldn't test on iOS. #1

fforres opened this issue May 19, 2017 · 6 comments

Comments

@fforres
Copy link

fforres commented May 19, 2017

Hi @alwx

First of all, thanks for having this code as opensource, looks like a nice implementation :)
I was just trying to test your module for a idea i have, and got some errors while linking for iOS.

➜  rn_vr git:(master) ✗ react-native link react-native-http-bridge

Scanning 751 folders for symlinks in /Users/fforrres/Github/fforres/rn_vr/node_modules (5ms)

rnpm-install info Linking react-native-http-bridge android dependency
rnpm-install info Android module react-native-http-bridge has been successfully linked
rnpm-install info Linking react-native-http-bridge ios dependency
rnpm-install ERR! Something went wrong while linking. Error: Cannot read property 'children' of null
Please file an issue here: https://github.com/facebook/react-native/issues

Sadly, the react-native link errors are not really much descriptive 😞

Anyways, just letting you know in case it's easy to solve. Or maybe I'm doing something wrong and i Havent figured it out yet.

If it helps, I'm currently running

react-native-cli: 2.0.1
react-native: 0.44.0

If I can help, let me know :)

All the best

@franky47
Copy link

I have the same issue, investigating.

@vinpro24
Copy link

Any idea? same issue

@tadasstra
Copy link

Added manually without react-native link , works

@KELiON
Copy link

KELiON commented Nov 16, 2017

+1, I have the same issue

react-native-cli: 2.0.1
react-native: 0.49.5

@KELiON
Copy link

KELiON commented Nov 16, 2017

@tadasstra can you please explain how did you manually link it? I used official guide but when I try to run the app in simulator I have long list of errors and build failed:


In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:2:
In file included from /Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridge.h:13:
/Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridgeModule.h:54:16: error: redefinition of 'RCTMethodInfo'
typedef struct RCTMethodInfo {
               ^
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:1:
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.h:1:
../../react-native/React/Base/RCTBridgeModule.h:54:16: note: previous definition is here
typedef struct RCTMethodInfo {
               ^
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:2:
In file included from /Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridge.h:13:
/Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridgeModule.h:58:3: error: typedef redefinition with different types ('struct (anonymous struct at /Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridgeModule.h:54:16)' vs 'struct RCTMethodInfo')
} RCTMethodInfo;
  ^
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:1:
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.h:1:
../../react-native/React/Base/RCTBridgeModule.h:58:3: note: previous definition is here
} RCTMethodInfo;
  ^
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:2:
In file included from /Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridge.h:13:
/Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTBridgeModule.h:65:11: warning: duplicate protocol definition of 'RCTBridgeModule' is ignored [-Wduplicate-protocol]
@protocol RCTBridgeModule <NSObject>
          ^
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:1:
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.h:1:
../../react-native/React/Base/RCTBridgeModule.h:65:11: note: previous definition is here
@protocol RCTBridgeModule <NSObject>
          ^
/Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:27:51: warning: values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
    RCTLogInfo(@"Running HTTP bridge server: %d", port);
                                             ~~   ^~~~
                                             %ld  (long)
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:3:
/Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:34:50: note: expanded from macro 'RCTLogInfo'
#define RCTLogInfo(...) _RCTLog(RCTLogLevelInfo, __VA_ARGS__)
                                                 ^~~~~~~~~~~
/Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTLog.h:129:74: note: expanded from macro '_RCTLog'
#define _RCTLog(lvl, ...) _RCTLogNativeInternal(lvl, __FILE__, __LINE__, __VA_ARGS__)
                                                                         ^~~~~~~~~~~
/Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:39:42: warning: 'sendAppEventWithName:body:' is deprecated: Subclass RCTEventEmitter instead [-Wdeprecated-declarations]
            [self.bridge.eventDispatcher sendAppEventWithName:@"httpServerResponseReceived"
                                         ^
In file included from /Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:4:
/Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTEventDispatcher.h:78:1: note: 'sendAppEventWithName:body:' has been explicitly marked deprecated here
__deprecated_msg("Subclass RCTEventEmitter instead");
^
In module 'Darwin' imported from /Users/kelion/projects/test-http-server/ios/build/Build/Products/Debug-iphonesimulator/include/React/RCTUtils.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/usr/include/sys/cdefs.h:180:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
                                                      ^
/Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:39:14: warning: capturing 'self' strongly in this block is likely to lead to a retain cycle [-Warc-retain-cycles]
            [self.bridge.eventDispatcher sendAppEventWithName:@"httpServerResponseReceived"
             ^~~~
/Users/kelion/projects/test-http-server/node_modules/react-native-http-bridge/ios/RCTHttpServer.m:32:10: note: block will be retained by an object strongly retained by the captured object
        [_webServer addDefaultHandlerForMethod:@"POST"
         ^~~~~~~~~~
4 warnings and 2 errors generated.

@Alwinator
Copy link

Hi guys, feel free to checkout: react-native-http-bridge-refurbished

It should work on ios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants