Skip to content

Commit b55d3f1

Browse files
committed
Fix Obj-C example by forcing it to include Swift frameworks
It was failing to load the Swift version of the Contacts framework, as required by the geocoding library.
1 parent 64754de commit b55d3f1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

MapboxGeocoder.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,7 @@
13981398
DDC2474819A1C60E0054B0C0 /* Debug */ = {
13991399
isa = XCBuildConfiguration;
14001400
buildSettings = {
1401+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
14011402
FRAMEWORK_SEARCH_PATHS = (
14021403
"$(inherited)",
14031404
"$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -1416,6 +1417,7 @@
14161417
DDC2474919A1C60E0054B0C0 /* Release */ = {
14171418
isa = XCBuildConfiguration;
14181419
buildSettings = {
1420+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
14191421
FRAMEWORK_SEARCH_PATHS = (
14201422
"$(inherited)",
14211423
"$(PROJECT_DIR)/Carthage/Build/iOS",

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ pod 'MapboxGeocoder.swift', '~> 0.6'
2727

2828
Then `import MapboxGeocoder` or `@import MapboxGeocoder;`.
2929

30+
For Objective-C targets, it may be necessary to enable the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting.
31+
3032
v0.5.2 is the last release of MapboxGeocoder.swift written in Swift 2.3. The `swift2.3` branch corresponds to this release, plus any critical bug fixes that have been applied since. All subsequent releases will be based on the `master` branch, which is written in Swift 3. The Swift examples below are written in Swift 3; see the `swift2.3` branch’s readme for Swift 2.3 examples.
3133

3234
This repository includes example applications written in both Swift and Objective-C showing use of the framework (as well as a comparison of writing apps in either language). More examples and detailed documentation are available in the [Mapbox API Documentation](https://www.mapbox.com/api-documentation/?language=Swift#geocoding).

0 commit comments

Comments
 (0)