[英]How do I create an Objective-C bridging header?
我正在关注将 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
因为这是我的项目中存在的两个文件中唯一的一个。 所以我假设我正在“使用 swift”,正如他们所说的那样。 问题是,当他们说要create a separate Objective-C Bridging Header
时,我不知道该怎么做。 All I've been able to find online is that when you import Objective-C code into your swift project, Xcode should automatically prompt you to create a bridging header. Xcode 并没有为我做到这一点。
有谁知道我如何创建一个 Objective-C 桥接 header?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.