mapbox / MapboxStatic.swift

Static map snapshots with overlays in Swift or Objective-C on iOS, macOS, tvOS, and watchOS
https://www.mapbox.com/api-documentation/?language=Swift#static
Other
189 stars 31 forks source link

Snapshot conflicts with MBSnapshot in MobileBackup #86

Open 1ec5 opened 5 years ago

1ec5 commented 5 years ago

The Snapshot class has an Objective-C name of MBSnapshot, which conflicts with an identically named class in the private MobileBackup framework:

https://github.com/mapbox/MapboxStatic.swift/blob/172af20c470da5272c16252ed7685e4658bf5597/MapboxStatic/Snapshot.swift#L77-L78

The following message appeared at launch in a Swift application. The application’s implementation language didn’t matter, because @objc() affects the runtime class name in both languages.

objc[1573]: Class MBSnapshot is implemented in both /System/Library/PrivateFrameworks/MobileBackup.framework/MobileBackup (0x2411118a0) and /private/var/containers/Bundle/Application/5378C9A6-3281-4848-AED1-E0388600151B/….app/Frameworks/MapboxStatic.framework/MapboxStatic (0x1094c53c0). One of the two will be used. Which one is undefined.

Looks like we’ll need to give Snapshot a different name, such as MapSnapshot.

/cc @friedbunny @captainbarbosa @frederoni

rawillk commented 5 years ago

Any progress on this one? Is MapboxStatic.swift still supported by developers?