Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support installation via Swift Package Manager #209

Merged
merged 7 commits into from
Nov 11, 2020
Merged

Support installation via Swift Package Manager #209

merged 7 commits into from
Nov 11, 2020

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Nov 11, 2020

Added support for Swift Package Manager as a third way to integrate MapboxGeocoder into an application project and a second way to set up a development environment for MapboxGeocoder itself. You can now open Package.swift and use a development environment managed by SPM instead of an Xcode project with Carthage-built dependencies.

Increased the minimum deployment targets to iOS 10.0, macOS 10.12.0, tvOS 10.0, and watchOS 3.0 for consistency with MapboxDirections and MapboxStatic.swift. iOS 8 and 9, macOS 10.10 and 10.11, etc. are no longer supported.

Avoid a future compiler error when building the library on unrecognized operating system, such as Windows.

  • Move MapboxGeocoder/ to Sources/MapboxGeocoder/ and update the MapboxGeocoder/ group’s file path
  • Move MapboxGeocoderTests/ to Tests/MapboxGeocoderTests/ and update the MapboxGeocoderTests/ group’s file path
  • Update each framework target and test bundle target’s INFOPLIST_FILE build setting to point to the current path to Info.plist
  • Adapt Package.swift from MapboxStatic.swift
  • Reimplement MBPlacemarkPrecision in Swift
  • Conditionalize @objc on SWIFT_PACKAGE where necessary
  • Upgrade to OHHTTPStubs v9.0.0
  • Require iOS 10, macOS 10.12, tvOS 10, watchOS 3
  • Add SPM job to CircleCI configuration
  • Document SPM compatibility

Fixes #132 and fixes #208.

/cc @frederoni @Udumft

@1ec5 1ec5 added build backwards-incompatible changes that break backwards compatibility of public API labels Nov 11, 2020
@1ec5 1ec5 requested a review from frederoni November 11, 2020 08:57
@1ec5 1ec5 self-assigned this Nov 11, 2020
Copy link
Contributor

@frederoni frederoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % the incorrect fixture reference

Moved implementation files to the default SPM locations. Adapted a Package.swift from MapboxStatic.swift. Conditionally reimplemented enumerations in Swift. Added missing import statements. Upgraded to OHHTTPStubs v9.0.0.
Increased the minimum deployment targets to iOS 10, macOS 10.12, tvOS 10, and watchOS 3. Removed now-redundant availability attributes.
Added an SPM job to the CI configuration. Updated Xcode and simulator versions. Use the Carthage workaround with Xcode 12.
@1ec5 1ec5 merged commit 215fcb5 into main Nov 11, 2020
@1ec5 1ec5 deleted the 1ec5-spm-132 branch November 11, 2020 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompatible changes that break backwards compatibility of public API build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid compiler error when built on unrecognized architecture Support Swift Package Manager
2 participants