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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
47d59cb
TESTING - Fixes unit test on line testing and precision
paulsolt-ofsw Apr 1, 2025
0649371
TESTING - Fixes precision errors and comments out part of non-passing…
paulsolt-ofsw Apr 1, 2025
18108dd
TESTING - Refactor test logic to test less points and prevent invalid…
paulsolt-ofsw Apr 1, 2025
e770c37
FIX - Code Breaking Change: Refactor C enum SFGeometryType to Objecti…
paulsolt-ofsw Apr 1, 2025
2e48ae7
FIX - Code Breaking Change: Refactor C enum SFEventType to Objective-…
paulsolt-ofsw Apr 1, 2025
2cb9bdb
FIX - Code Breaking Change: Refactor C enum SFFiniteFilterType to Obj…
paulsolt-ofsw Apr 1, 2025
649b84a
Update build.yml for iPhone 16
paulsolt-ofsw Apr 1, 2025
cfa27aa
Update build-test.yml SQUASH
paulsolt-ofsw Apr 1, 2025
5670404
SQUASH - Testing updated for NS_ENUM
paulsolt-ofsw Apr 1, 2025
96b89c7
BUILD - Updated Xcode 16 project recommendations
paulsolt-ofsw Apr 1, 2025
8b7cc38
WIP - MVP Swift Package - planning to remove cococoapods if we can bu…
paulsolt-ofsw Apr 3, 2025
edc4f23
Restructure headers into public folder for SPM
paulsolt-ofsw May 2, 2025
e05d836
Restructure headers into public folder for SPM and remove unused files
paulsolt-ofsw May 2, 2025
78933ce
Updated github workflows for SPM
paulsolt-ofsw May 2, 2025
e2df542
Updated to 5.0.0 version in changelog
paulsolt-ofsw May 2, 2025
53f570a
Removed Cocoapods and carthage
paulsolt-ofsw May 2, 2025
466c1b5
Updated headers to Module header import with angular brackets for Obj…
paulsolt-ofsw May 5, 2025
7672b09
Removed pod install from github workflow
paulsolt-ofsw May 5, 2025
0050585
Updated min version and readme
paulsolt-ofsw May 6, 2025
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 (5-2-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