0

I'm currently following this tutorial:https://www.mapbox.com/help/first-steps-ios-sdk/ and It all works up until I should use the

   import Mapbox

command. Then i get an error saying: Could not build objective-C module 'Mapbox'.

I just follow the steps and even tried it using cocoapods.

dosmath
  • 41
  • 3
  • This isn’t a lot of information to go on. Give http://stackoverflow.com/q/26834293/2094275 a try and/or update your post with more details. – friedbunny May 06 '16 at 16:27
  • I found that the problem is in the mapbox.h header file. The #import "MGLOfflineStorage.h" line is causing the error. This is a new function and when this line is commented the framework does load according to the tutorial – dosmath May 09 '16 at 13:33

1 Answers1

0

I'm using Xcode 6.4 and faced the same problem. I suppose it's caused by a too old version of Swift compiler and some 'new' Swift language features used in the latest version of Mapbox iOS SDK.

So, I just sorted through older versions of Mapbox iOS SDK using CocoaPods. The latest release version which appeared to be compatible with my old Xcode is 3.1.0.

That's my Podfile:

platform :ios, "8.0"
inhibit_all_warnings!
use_frameworks!

target "%APP%" do
    pod 'Mapbox-iOS-SDK', '= 3.1.0'
end

I hope this was helpful for someone.

shelbalart
  • 43
  • 6