2

I am using the MapBox sdk version 10.9.1 and I specifically do not want to declare my access token in info.plist I want to declare it programmatically. I have my token defined in AppDelegate.swift as:

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    let myAccessToken = "..."

    ResourceOptionsManager.default.resourceOptions.accessToken = myAccessToken

    return true

}

And whenever I try to access a mapview I can see printed in the console:

2022-11-23 16:23:04.631195-0600 MyApp[1819:977329] [Mapbox] [Info, maps-core]: Using Metal render backend
2022-11-23 16:23:04.642230-0600 MyApp[1819:977728] [Mapbox] [Warning, config_service]: No configuration options found stored on the disk.
2022-11-23 16:22:49.498603-0600 MyApp[1819:977329] [Mapbox] [Warning, maps-ios/ResourceOptions]: Empty access token.

The MapBox documentation seems to say this should not be an issue what I am trying to do.

Is there something I am missing?

ez4nick
  • 9,756
  • 12
  • 37
  • 69
  • Good luck trying to get Mapbox to work. They have really wrecked it and the documentation on Github and their website is all out of date and self contradictory. – user6631314 May 01 '23 at 22:46

0 Answers0