我正在构建一个使用 ADAL 连接到 Office365 的 Swift 应用程序。几个月前,在 Podfile 中,我只有一行:
pod 'ADALiOS', '~> 1.0.1'
当我定义一个包含以下内容的桥接头时,一切正常:
#import "ADALiOS/ADAuthenticationContext.h"
最后,在我的 Swift 代码中,我只需要添加
import ADALiOS
但我也想开始使用 SwiftyJSON,它是一个 Swift 框架,所以我在 Podfile 中添加了几行代码:
pod 'ADALiOS', '~> 1.2.4'
pod 'SwiftyJSON'
use_frameworks!
更新到 CocoaPods V0.38 允许使用带有 Objective-C 库 (ADALiOS) 的框架。根据文档,不再需要桥接头,所以我删除了它。
现在,一切编译正常,但是当我调用 ADAL 代码时,它失败并出现以下错误:
ADALiOS [2015-08-09 13:01:07 - C621BB01-686A-4064-9455-A4B55C11E0E8]
ERROR: Error raised: 18. Additional Information:
Domain: ADAuthenticationErrorDomain
ProtocolCode:(null)
Details:The required resource bundle could not be loaded. Please read the ADALiOS readme on how to build your application with ADAL provided authentication UI resources..
ErrorCode: 18.
我假设因为它可以很好地编译/链接,所以这与桥接头无关,而是与其他东西有关。
有什么线索吗?