You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@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.
Activity
franky47 commentedon Aug 18, 2017
I have the same issue, investigating.
vinpro24 commentedon Oct 26, 2017
Any idea? same issue
tadasstra commentedon Nov 11, 2017
Added manually without react-native link , works
KELiON commentedon Nov 16, 2017
+1, I have the same issue
react-native-cli: 2.0.1
react-native: 0.49.5
KELiON commentedon 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:
Alwinator commentedon Feb 26, 2023
Hi guys, feel free to checkout: react-native-http-bridge-refurbished
It should work on ios.