No such module 'BMSPush' after SDK installation with cocoapods

为君一笑 提交于 2019-12-13 16:54:24

问题


I've initialized the Bluemix Push SDK for iOS following the online documentation: https://console.ng.bluemix.net/docs/services/mobilepush/t_enable_ios_notifications_install.html

Unfortunately, the "import BMSPush" statement in my AppDelegate.swift raises an error (No such module 'BMSPush').

When building my application (target: iOS 8.0), there are 13 issues raised on BMSPushClient.swift, as detailed in the following screenshot:

My configuration is as following:

XCode 7.0.1
Mac OS X 10.10.5
Cocoapods 0.39.0

Cocoapods reported the following versions of the installed dependencies:

Using BMSAnalyticsAPI (0.0.20)
Using BMSAnalyticsSpec (0.0.16)
Using BMSCore (0.0.44)
Using BMSPush (0.1.06)

Does anybody knows how to solve this issue ?


回答1:


I solved the issue by updating the SDK source code (!), prefixing each ambiguous type with BMSAnalyticsSpec., for example replacing:

internal func sendAnalyticsData (logType:LogLevel, logStringData:String){

with:

internal func sendAnalyticsData (logType:BMSAnalyticsSpec.LogLevel, logStringData:String){



回答2:


The real cause of this issue is due to a name change in the BMS Swift SDK. As you may know, the Swift SDK for Bluemix Mobile Services is still in the pre-release stage. Changes are constantly happening to improve the SDK before the official release.

In this case the project BMSAnalyticsSpec has been changed to BMSAnalyticsAPI which caused issues with the import statements in the BMSPushUtils and BMSPushCore files. The development team has updated the SDK to include the new BMSAnalyticsAPI import statements. I can let you know when it is available.

To fix this problem in your local environment, you could update the import statements in those two files with the new BMSAnalyticsAPI import statement. Again, the SDK should still be used as an experimental SDK until it is officially released.

UPDATE: The BMSPush SDK has been updated to include the name changes described above. Please complete a pod update in order to grab the latest version (0.1.07). This should solve the problem you described above.



来源:https://stackoverflow.com/questions/36448766/no-such-module-bmspush-after-sdk-installation-with-cocoapods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!