react-native-http-bridge icon indicating copy to clipboard operation
react-native-http-bridge copied to clipboard

Nice idea. couldn't test on iOS.

Open fforres opened this issue 7 years ago • 6 comments

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

fforres avatar May 19 '17 01:05 fforres

I have the same issue, investigating.

franky47 avatar Aug 18 '17 10:08 franky47

Any idea? same issue

vinpro24 avatar Oct 26 '17 19:10 vinpro24

Added manually without react-native link , works

tadasstra avatar Nov 11 '17 18:11 tadasstra

+1, I have the same issue

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

KELiON avatar Nov 16 '17 07:11 KELiON

@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.

KELiON avatar Nov 16 '17 08:11 KELiON

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

It should work on ios.

Alwinator avatar Feb 26 '23 17:02 Alwinator