Skip to content
This repository was archived by the owner on May 26, 2019. It is now read-only.
This repository was archived by the owner on May 26, 2019. It is now read-only.

Installation tip #25

@darknessproduction

Description

@darknessproduction

Hello guys.

I have a problem with correct installation. You can see the error below.
When I try to use something like this:

    let _uuid = uuid.v4();
    RNCallKit.displayIncomingCall(_uuid, "886900000000");

Xcode error:

2018-01-18 21:57:21.495856+0200 calltravel[2858:1029881] n is not a function. (In 'n(e)', 'n' is undefined)
2018-01-18 21:57:21.496 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: n is not a function. (In 'n(e)', 'n' is undefined)
2018-01-18 21:57:21.496912+0200 calltravel[2858:1029907] Unhandled JS Exception: n is not a function. (In 'n(e)', 'n' is undefined)
2018-01-18 21:57:21.499252+0200 calltravel[2858:1029907] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: n is not a function. (In 'n(e)', 'n' is undefined)', reason: 'Unhandled JS Exception: n is not a function. (In 'n(e)', 'n' is undefined), stack:
<unknown>@405:2966
u@34:133
<unknown>@34:921
o@23:571
u@23:880
callImmediates@23:3178
value@18:2476
<unknown>@18:655
value@18:2304
flushedQueue@18:625
'
*** First throw call stack:
(0x1860dfd38 0x1855f4528 0x1860dfc80 0x104d66c08 0x104d64308 0x1860e76a0 0x185fc6820 0x185fcb22c 0x104d77790 0x104db787c 0x104db76e8 0x185a65088 0x185a65048 0x185a6ee48 0x185a6f7d8 0x185a70200 0x185a784a0 0x185d0afe0 0x185d0ac30)
libc++abi.dylib: terminating with uncaught exception of type NSException

I run that with:

		"react": "16.0.0-beta.5",
		"react-native": "0.49.3",
		"react-native-callkit": "^1.3.1",

I tried 1.3.0, 1.2.1 and I get same.

I also set up $(SRCROOT)/../node_modules/react-native-callkit/ios with recursive
And my AppDelegate.m looks like this

#import "AppDelegate.h"

#import "RNCallKit.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTPushNotificationManager.h>

#import <PushKit/PushKit.h>
#import "RNVoipPushNotificationManager.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];

 /* RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"calltravel"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];*/
  // Initialise RNCallKit
  RNCallKit *rncallkit = [[RNCallKit alloc] init];
  
  // Initialise React Bridge with RNCallKit
  RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
                                                                  moduleProvider:^{ return @[rncallkit]; }
                                                                   launchOptions:launchOptions];
  
  // Initialise React Root View with React Bridge you've just created
  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                                      moduleName:@"calltravel"
                                                                      initialProperties:nil];

Sure there is also rncallkit.a in link binary with libs
What am I doing wrong? help pls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions