Swift 3 中的 Microsoft Azure 远程通知 [英] Microsoft Azure remote notifications in Swift 3

查看:42
本文介绍了Swift 3 中的 Microsoft Azure 远程通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Xcode 8.2.1 中使用 Swift 3.0 开发 iOS 应用程序.我希望此应用程序能够使用 Microsoft Azure 接收远程推送通知.但是,我在实现这一点时遇到了麻烦.我发现的大多数指南都适用于较旧版本的 Swift,不再适用.

I am working on an iOS app in Xcode 8.2.1 using Swift 3.0. I'd like for this app to be able to receive remote push notifications using Microsoft Azure. However, I'm having trouble implementing this. Most guides I've found are for older versions of Swift and don't work anymore.

我唯一能找到的 3.0 版是 这个.但是,这似乎也不起作用.我按照指南操作,但出现以下错误:

The only one I was able to find for version 3.0 is this one. However, this doesn't seem to work either. I followed the guide, but got the following error:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_AEIdfaProvider", referenced from:
      objc-class-ref in libengagement.a(AEDeviceIDManager.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我相信找不到类 AEIdfaProvider,即使它包含在项目中.

I believe the class AEIdfaProvider could not be found, even though it is included in the project.

如果有人可以提供有关如何解决此问题的线索,或者如果有其他指南我可以试一试,我很乐意听到!

If anyone could give a clue as to how to resolve this, or if there is another guide I could give a shot, I'd be happy to hear it!

推荐答案

您正在尝试在 Swift 项目中使用 Objective-C 库.
这就是为什么您应该将该类添加到桥接头文件中.

You are trying to use Objective-C lib in a Swift project.
That's why you should also add that class to a Bridging Header file.

微软有步骤有关如何使用他们的Mobile Engagement SDK 的分步教程,请参阅将您的应用连接到 Mobile Engagement 后端<中的步骤 #6、#7、#8./strong> 文档章节.

Microsoft has step-by-step tutorial of how to use their Mobile Engagement SDK, see steps #6,#7,#8 there from the Connect your app to the Mobile Engagement backend document chapter.

因此请检查您的桥接头文件中是否存在 AEIdfaProvider.
同样重要的是 - 确保链接 libengagement.a 库,同时检查它.

So check your Bridging Header file for AEIdfaProvider existence in it.
Also important - be sure to link libengagement.a library, check it as well.

这篇关于Swift 3 中的 Microsoft Azure 远程通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆