我正在遵循将OneSignal添加到React Native的指南,其中有一个部分说:
Open NotificationService.m or NotificationService.swift and replace the whole file contents with the code below:
<provides code to add>
If you are using Swift, make sure to create a separate Objective-C Bridging Header for your OneSignalNotificationExtensionService and add the following import:
#import "RCTOneSignalExtensionService.h" Then you need to tell your Xcode project settings what your bridging header is named, like this.
我添加了他们提供的代码,NotificationService.swift
因为那是我项目中存在的两个文件中的唯一一个。因此,我假设我说的是“迅速”。问题是,当他们说时create a separate Objective-C Bridging Header
,我不知道该怎么做。我在网上只能找到的是,当您将Objective-C代码导入到swift项目中时,Xcode应该会自动提示您创建桥接头。Xcode还没有为我做到这一点。
有谁知道我如何创建一个Objective-C桥接头?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句