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 ?
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){
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.