无法在Notification Service扩展中使用pod [英] Unable to use pod in Notification service extension
问题描述
我正在创建一个通知扩展,按照规范添加了目标并在其中添加了广告连播,如下所示:
第1步:
目标'MyProject'做
#集成-框架
pod'Fabric'
pod'Crashlytics'
pod'MORichNotification'
结束
目标'NotificationServices'执行
pod'MORichNotification'
结束
步骤:2
将 MORichNotification.h导入到我的项目桥头文件。
现在我想在我的 NotificationService <中使用
MORichNotification
类/ code>类,它显示以下错误。
我尝试了Clean项目,重新启动,擦除了DerivedData,但没有任何改变。
首先,MorichNotification仅用于Notification Service扩展,我从您的podfile中可以看到,您也将其包含在应用程序的目标中。
也可以使用MORichNotifications,仅当您使用
- 在Notification Services Extension中使用MORichNotification,如下所示:
让我知道您是否仍然遇到任何问题。
I am creating a Notification extension, added target as per norm and added a pod in it as follows:
Step 1 :
target 'MyProject' do
# Integration - Frameworks
pod 'Fabric'
pod 'Crashlytics'
pod 'MORichNotification'
end
target 'NotificationServices' do
pod 'MORichNotification'
end
Step : 2 Import "MORichNotification.h" into my Project bridge header file.
Now I want to use MORichNotification
class in my NotificationService
class, and it shows below error.
I tried with Clean project, Restarted, Wiped DerivedData, but nothing changed.
First of all MORichNotification is meant only for the Notification Service Extension, I can see from your podfile that you are including it in your app's target too.
And also you can use MORichNotifications, only if you are using MoEngage-iOS-SDK in your app, as it will process only the notifications sent via MoEngage.
Now, follow the below steps to use MORichNotifications :
- Install the MORichNotification pod in your Notification Service Extension. And please make sure that you are using version 1.1.1.
- Add Bridging Header to your Notification Service Extension
- Import MORichNotification in Bridging Header as shown in the image below:
- Use MORichNotification in your Notification Service Extension as shown below : Let me know if still you are facing any issue.
这篇关于无法在Notification Service扩展中使用pod的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!