mapbox / mapbox/MapboxStatic.swift

Snapshot conflicts with MBSnapshot in MobileBackup

Open
#86 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug objective-c
Dominant language
Swift
Stars
192
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in MapboxStatic/Snapshot.swift at the @objc() declaration around lines 77–78 and inspect how Snapshot is exposed to Objective-C. Rename the runtime class as proposed and update any references found in the project; done means the framework no longer declares the conflicting MBSnapshot name.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c, swift
Domain
mobile-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.