mapbox / DEPRECATED-mapbox-ios-sdk

REPLACED – use https://www.mapbox.com/ios-sdk instead
https://github.com/mapbox/mapbox-gl-native
Other
322 stars 8 forks source link

Could not build Objective-C module 'Mapbox_iOS_SDK' #632

Closed mhergon closed 9 years ago

mhergon commented 9 years ago

Hi,

I'm getting this error, any help for this? Project in Swift with Cocoapods

Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
inhibit_all_warnings!

pod 'Mapbox-iOS-SDK'
pod 'RealmSwift'

And the error... captura de pantalla 2015-05-19 a las 13 27 46

I tried with a Bridge.h file but get the same error...

UPDATE

/Users/mhergon/Desktop/GeohashMapbox/GeohashMapbox/GeohashMapbox-Bridging-Header.h:5:9: note: while building module 'Mapbox_iOS_SDK' imported from /Users/mhergon/Desktop/GeohashMapbox/GeohashMapbox/GeohashMapbox-Bridging-Header.h:5:
#import <Mapbox_iOS_SDK/Mapbox.h>
        ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/mhergon/Library/Developer/Xcode/DerivedData/GeohashMapbox-beaklgmanpobmmghfxmsmlccbprj/Build/Products/Debug-iphoneos/Pods/Mapbox_iOS_SDK.framework/Headers/Pods-Mapbox-iOS-SDK-umbrella.h"
        ^
/Users/mhergon/Library/Developer/Xcode/DerivedData/GeohashMapbox-beaklgmanpobmmghfxmsmlccbprj/Build/Products/Debug-iphoneos/Pods/Mapbox_iOS_SDK.framework/Headers/Pods-Mapbox-iOS-SDK-umbrella.h:3:9: note: in file included from /Users/mhergon/Library/Developer/Xcode/DerivedData/GeohashMapbox-beaklgmanpobmmghfxmsmlccbprj/Build/Products/Debug-iphoneos/Pods/Mapbox_iOS_SDK.framework/Headers/Pods-Mapbox-iOS-SDK-umbrella.h:3:
#import "Mapbox.h"
        ^
/Users/mhergon/Library/Developer/Xcode/DerivedData/GeohashMapbox-beaklgmanpobmmghfxmsmlccbprj/Build/Products/Debug-iphoneos/Pods/Mapbox_iOS_SDK.framework/Headers/Mapbox.h:31:9: note: in file included from /Users/mhergon/Library/Developer/Xcode/DerivedData/GeohashMapbox-beaklgmanpobmmghfxmsmlccbprj/Build/Products/Debug-iphoneos/Pods/Mapbox_iOS_SDK.framework/Headers/Mapbox.h:31:
#import "RMAnnotation.h"
        ^
/Users/mhergon/Library/Developer/Xcode/DerivedData/GeohashMapbox-beaklgmanpobmmghfxmsmlccbprj/Build/Products/Debug-iphoneos/Pods/Mapbox_iOS_SDK.framework/Headers/RMAnnotation.h:29:9: error: 'RMFoundation.h' file not found
#import "RMFoundation.h"
        ^
/Users/mhergon/Desktop/GeohashMapbox/GeohashMapbox/GeohashMapbox-Bridging-Header.h:5:9: error: could not build module 'Mapbox_iOS_SDK'
#import <Mapbox_iOS_SDK/Mapbox.h>
        ^
<unknown>:0: error: failed to import bridging header '/Users/mhergon/Desktop/GeohashMapbox/GeohashMapbox/GeohashMapbox-Bridging-Header.h'

Thanks!

PSTDev commented 9 years ago

All you have to do is create a file named <YourProjectName>-Bridging-Header.h and put there #import <Mapbox.h>

mhergon commented 9 years ago

PSTDev, I already tried, but does not work...

captura de pantalla 2015-05-19 a las 16 11 36

PSTDev commented 9 years ago

Try #import <Mapbox.h>, without Mapbox_iOS_SDK.

mhergon commented 9 years ago

@PSTDev with

#import <Mapbox.h>

or

#import "Mapbox.h"

Error: 'Mapbox.h' file not found

PSTDev commented 9 years ago

Check if you have Mapbox.h in your Pods project in Workspace screen shot 2015-05-19 at 17 18 08

mhergon commented 9 years ago

Yes, it's all right ...

mhergon commented 9 years ago

Finally, it works! I selected all .h from Mapbox-iOS-SDK folder on Pods and I made Public. After this, works fine!

But this procedure is correct?

captura_de_pantalla_2015-05-19_a_las_16_29_43

PSTDev commented 9 years ago

I have Project target for all headers screen shot 2015-05-19 at 17 35 55

mhergon commented 9 years ago

It is a very strange issue...

friedbunny commented 9 years ago

This is the same basic issue as #631.