Skip to content

Update NS_ENUM and Add Swift Package Manager Support #7

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

Merged
merged 2 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/build-test.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:

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

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Pods
xcuserdata/
*.swp
Carthage/
.build/
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ Adheres to [Semantic Versioning](http://semver.org/).

---

## 4.1.5 (TBD)
## 5.0.0 (6-4-2025)

* TBD
* Breaking changes for Swift interopability. Converted C `enum` types to Objective-C `NS_ENUM` for proper visibility in Swift.
* 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.
* Updated types: `SFGeometryType`, `SFFiniteFilterType`, and `SFEventType` to use `NS_ENUM(NSInteger)`.
* Updated to Swift Package Manager (SPM) since Cocoapods is deprecated
* Updated header imports to use modular framework imports using angular brackets for Objective-C

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

Expand Down
Empty file removed Cartfile
Empty file.
Empty file removed Cartfile.resolved
Empty file.
29 changes: 29 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version:5.10
import PackageDescription

let package = Package(
name: "SimpleFeatures",
platforms: [.macOS(.v11), .iOS(.v13)],
products: [
.library(
name: "SimpleFeatures",
targets: ["SimpleFeatures"]),
],
targets: [
.target(
name: "SimpleFeatures",
path: "sf-ios",
publicHeadersPath: "include"
),
.testTarget(
name: "SimpleFeaturesTests",
dependencies: [
"SimpleFeatures"
],
path: "sf-iosTests",
cSettings: [
.headerSearchPath(""),
]
)
]
)
6 changes: 0 additions & 6 deletions Podfile

This file was deleted.

41 changes: 26 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,45 @@ View the latest [Appledoc](http://ngageoint.github.io/simple-features-ios/docs/a

### Build ###

[![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)
[![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)

Build this repository using Xcode and/or CocoaPods:
Build this repository using SPM:

pod repo update
pod install
swift build

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

xcodebuild -workspace 'sf-ios.xcworkspace' -scheme sf-ios build
open Package.swift

Run tests from Xcode or from command line:

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

### Include Library ###

Include this repository by specifying it in a Podfile using a supported option.
Add a package dependency version:

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

pod 'sf-ios', '~> 4.1.4'
# Or specific branch:

Pull from GitHub:
.package(url: "https://github.com/ngageoint/simple-features-ios", branch: "release/5.0.0"),

# Or as a local dependency:

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

Include as local project:
Use it in a target:

pod 'sf-ios', :path => '../simple-features-ios'
.target(
name: "MyLibrary",
dependencies: [
.product(name: "SimpleFeatures", package: "simple-features-ios")
]
)

### Swift ###

To use from Swift, import the framework:

import SimpleFeatures
19 changes: 0 additions & 19 deletions sf-ios.podspec

This file was deleted.

Loading