Skip to content

Commit 9f10ef1

Browse files
committed
Adds Swift Package Manager and removes Cocoapods.
* Code Breaking Change: Refactor C enum SFGeometryType to Objective-C enum to properly expose the symbols to Swift (in Release mode). It appears these symbols get discarded in Release builds and cause issues with optimizations * Any Swift code downstream will need to use the new symbols like: .POINT instead of SF_POINT. * Updated the Github workflow to use SPM
1 parent 25c564b commit 9f10ef1

File tree

111 files changed

+428
-1513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+428
-1513
lines changed

.github/workflows/build-test.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ jobs:
1313

1414
steps:
1515
- name: Checkout Repository
16-
uses: actions/checkout@v3
17-
- name: Install
18-
run: pod install
16+
uses: actions/checkout@v4
1917
- name: Build
20-
run: xcodebuild build-for-testing -workspace sf-ios.xcworkspace -scheme sf-ios -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14'
18+
run: swift build
19+
- name: Test
20+
run: swift test
21+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Pods
55
xcuserdata/
66
*.swp
77
Carthage/
8+
.build/

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
66

7-
## 4.1.5 (TBD)
7+
## 5.0.0 (6-4-2025)
88

9-
* TBD
9+
* Breaking changes for Swift interopability. Converted C `enum` types to Objective-C `NS_ENUM` for proper visibility in Swift.
10+
* Release builds were failing in [Mage iOS app](https://github.com/ngageoint/mage-ios/) (Cannot find 'SF_POINT' in scope) and optimizations were disabled due to related symbols issues.
11+
* Updated types: `SFGeometryType`, `SFFiniteFilterType`, and `SFEventType` to use `NS_ENUM(NSInteger)`.
12+
* Updated to Swift Package Manager (SPM) since Cocoapods is deprecated
13+
* Updated header imports to use modular framework imports using angular brackets for Objective-C
1014

1115
## [4.1.4](https://github.com/ngageoint/simple-features-ios/releases/tag/4.1.4) (04-08-2024)
1216

Cartfile

Whitespace-only changes.

Cartfile.resolved

Whitespace-only changes.

Package.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// swift-tools-version:5.10
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "SimpleFeatures",
6+
platforms: [.macOS(.v11), .iOS(.v13)],
7+
products: [
8+
.library(
9+
name: "SimpleFeatures",
10+
targets: ["SimpleFeatures"]),
11+
],
12+
targets: [
13+
.target(
14+
name: "SimpleFeatures",
15+
path: "sf-ios",
16+
publicHeadersPath: "include"
17+
),
18+
.testTarget(
19+
name: "SimpleFeaturesTests",
20+
dependencies: [
21+
"SimpleFeatures"
22+
],
23+
path: "sf-iosTests",
24+
cSettings: [
25+
.headerSearchPath(""),
26+
]
27+
)
28+
]
29+
)

Podfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,45 @@ View the latest [Appledoc](http://ngageoint.github.io/simple-features-ios/docs/a
2626

2727
### Build ###
2828

29-
[![Build & Test](https://github.com/ngageoint/simple-features-ios/workflows/Build%20&%20Test/badge.svg)](https://github.com/ngageoint/simple-features-ios/actions/workflows/build-test.yml)
29+
[![Build](https://github.com/ngageoint/simple-features-ios/actions/workflows/build.yml/badge.svg)](https://github.com/ngageoint/simple-features-ios/actions/workflows/build.yml)
3030

31-
Build this repository using Xcode and/or CocoaPods:
31+
Build this repository using SPM:
3232

33-
pod repo update
34-
pod install
33+
swift build
3534

36-
Open sf-ios.xcworkspace in Xcode or build from command line:
35+
Open the Swift Package in Xcode:
3736

38-
xcodebuild -workspace 'sf-ios.xcworkspace' -scheme sf-ios build
37+
open Package.swift
3938

4039
Run tests from Xcode or from command line:
4140

42-
xcodebuild test -workspace 'sf-ios.xcworkspace' -scheme sf-ios -destination 'platform=iOS Simulator,name=iPhone 15'
41+
swift test
4342

4443
### Include Library ###
4544

46-
Include this repository by specifying it in a Podfile using a supported option.
45+
Add a package dependency version:
4746

48-
Pull from [CocoaPods](https://cocoapods.org/pods/sf-ios):
47+
.package(url: "https://github.com/ngageoint/simple-features-ios", from: "5.0.0"),
4948

50-
pod 'sf-ios', '~> 4.1.4'
49+
# Or specific branch:
5150

52-
Pull from GitHub:
51+
.package(url: "https://github.com/ngageoint/simple-features-ios", branch: "release/5.0.0"),
52+
53+
# Or as a local dependency:
5354

54-
pod 'sf-ios', :git => 'https://github.com/ngageoint/simple-features-ios.git', :branch => 'master'
55-
pod 'sf-ios', :git => 'https://github.com/ngageoint/simple-features-ios.git', :tag => '4.1.4'
55+
.package(name: "simple-features-ios", path: "../simple-features-ios"),
5656

57-
Include as local project:
57+
Use it in a target:
5858

59-
pod 'sf-ios', :path => '../simple-features-ios'
59+
.target(
60+
name: "MyLibrary",
61+
dependencies: [
62+
.product(name: "SimpleFeatures", package: "simple-features-ios")
63+
]
64+
)
65+
66+
### Swift ###
67+
68+
To use from Swift, import the framework:
69+
70+
import SimpleFeatures

sf-ios.podspec

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)