将KayakoMessenger与React-Native问题集成

时间:2018-07-25 12:22:54

标签: ios swift react-native

我正在尝试将this软件包与React-Native集成在一起。 当我在swift文件中导入KayakoMessenger时,出现此错误:

Include` of non-modular header inside framework module 'AsyncDisplayKit.ASDisplayNode_Beta': '..../Library/Developer/Xcode/DerivedData/BridgingLab-asvfdmgtyofsuzdlmwdeyrtdignw/Build/Products/Debug-iphonesimulator/include/yoga/Yoga.h'

enter image description here

这是我的KayakoMessenger.m

#import <React/RCTBridgeModule.h>

@interface RCT_EXTERN_MODULE(KayakoMessenger, NSObject)

RCT_EXTERN_METHOD(show);

@end

这是KayakoMessenger.swift     进口基金会     导入KayakoMessenger

func presentMessenger(in viewController: UIViewController) {
  let config = Configuration(brandName: "Kayako", instanceURL: URL(string: "kayako-mobile-testing.kayako.com")!, authorization: .auto, background: .patternGradient(BackgroundPattern.confetti.image(tone: .light), GradientColor.eggPlant.colors), primaryColor: UIColor(red:0.95, green:0.44, blue:0.25, alpha:1.00), homeTitle: "Good Morning ☕️", homeSubtitle: "The real coffee experts. How can we help?", homeTextColor: .white)

  let conversationNav = CustomerSuccessController(config: config)
  conversationNav.modalPresentationStyle = .custom
  let cardTransitionDelegate = CardTransitioningDelegate()
  conversationNav.transitioningDelegate = cardTransitionDelegate
  viewController.present(conversationNav, animated: true) { }
}


  @objc(KayakoMessenger)
  class KayakoMessenger: NSObject {

    @objc func show() -> Void {
      let rootView: UIViewController = UIApplication.shared.delegate?.window.rootViewController
      presentMessenger(in: rootView)
    }
  }

在我的BridgingLab-Bridging-Header.h

 #import <React/RCTBridgeModule.h>

0 个答案:

没有答案