NMAMapView initialization failed HERE iOS SDK bridged

I am trying to build a swift project using the HERE iOS Premium SDK. After a lot of trying I was able to "successfully" bridge the obj-c HERE iOS Premium SDK to my Swift project. My project compiles and builds but fails to initialize the map view at run time. I set up my keys in the app delegate:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    NMAApplicationContext.setAppId(kHelloMapAppID, appCode: kHelloMapAppCode, licenseKey: kHelloMapLicenseKey)
    return true

I have a view controller with an IBOutlet of NMAMapView type:

@IBOutlet weak var mapView: NMAMapView!

override func viewDidLoad() {
    let coordinates: NMAGeoCoordinates = NMAGeoCoordinates(latitude: 37.33233141, longitude: -122.0312186)
    mapView.setGeoCenter(coordinates, withAnimation: .Rocket)
    mapView.zoomLevel = 13.2
    mapView.copyrightLogoPosition = NMALayoutPosition.BottomCenter

When I try to run the app it compiles and builds but when the view controller is used I get the following error message

2015-12-02 22:34:31.045 BridgedHEREMapsSDK[1162:25254] Failed to set up map cache
2015-12-02 22:34:31.046 BridgedHEREMapsSDK[1162:25254] *** NMAKit WARNING: Error: NMAMapView initialization failed

My view still loads but does not show the map. Also, the code from inside my viewDidLoad method runs after the error is printed. Whatever the is seems to happen when creating the outlet:

@IBOutlet weak var mapView: NMAMapView!

Any ideas would be appreciated. Thank you.

***** EDIT ***** I created a brand new project included core data functionality in my project and it seems to be working now.


You have to add the NMABundle.bundle in your "Copy Bundle Resources" in "Build Phases".

NMABundle.bundle is in this path: NMAKit.framework/Versions/A/Resources/NMABundle.bundle

You don't have import NMAMapView in yourproject-bridging-Header.h!!! Try to follow the this website, https://github.com/RYANCOAL/swift-with-AFNetworking But don't need to install the pod and pod search AFNetworking. Choosing yourproject.xcodeproj where opening the project as usual.

This was solved by adding core functionality to the project (see my edit to the original question)

Objective-C and Swift in the Same Project


//  Use this file to import your target's public headers that you would like to expose to Swift.

#import <NMAKit/NMAKit.h>

Need Your Help

chrome.socket UDP API useless on Chromebook?

udp google-chrome-app google-chrome-os

I am working on a Chrome packaged app that requires multicast communication over the local network and is specifically targeting Chromebook users. The 'Network Communication' documentation on the