Skip to content

Commit fb7c085

Browse files
Merge pull request #1 from ngageoint/psolt/package
Adds Swift Package Manager support and NS_ENUM updates
2 parents ef7beb4 + 2f3992a commit fb7c085

39 files changed

+150
-977
lines changed

.github/workflows/build-test.yml

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

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ 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 ogc-api-features-json-ios.xcworkspace -scheme ogc-api-features-json-ios -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14'
18+
run: swift build
19+
- name: Test
20+
run: swift test

.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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
66

7-
## 4.2.6 (TBD)
7+
## 5.0.0 (6-5-2025)
8+
9+
* Adds Swift Package Manager (SPM) support and removes Cocoapods
10+
* Integrated sf-geojson-ios 5.0.0 (Breaking NS_ENUM Objective-C/Swift Interoperability fixes)
811

9-
* TBD
1012

1113
## [4.2.5](https://github.com/ngageoint/ogc-api-features-json-ios/releases/tag/4.2.5) (04-08-2024)
1214

Package.resolved

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// swift-tools-version: 5.10
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "OGC_APIFeaturesJSON",
7+
platforms: [
8+
.iOS(.v13), .macOS(.v12)
9+
],
10+
products: [
11+
.library(
12+
name: "OGC_APIFeaturesJSON",
13+
targets: ["OGC_APIFeaturesJSON"])
14+
],
15+
dependencies: [
16+
.package(url: "https://github.com/ngageoint/simple-features-geojson-ios", from: "5.0.0"),
17+
],
18+
targets: [
19+
.target(
20+
name: "OGC_APIFeaturesJSON",
21+
dependencies: [
22+
.product(name: "SimpleFeaturesGeoJSON", package: "simple-features-geojson-ios")
23+
],
24+
path: "ogc-api-features-json-ios"
25+
),
26+
.testTarget(
27+
name: "OGCAPIFeaturesJSONTests",
28+
dependencies: [
29+
"OGC_APIFeaturesJSON"
30+
],
31+
path: "ogc-api-features-json-iosTests"
32+
)
33+
]
34+
)

Podfile

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

README.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ View the latest [Appledoc](http://ngageoint.github.io/ogc-api-features-json-ios/
2020
#### Read ####
2121

2222
```objectivec
23-
23+
@import OGC_APIFeaturesJSON;
24+
2425
OAFCollections *collections = [OAFFeaturesConverter jsonToCollections:collectionsContent];
2526
OAFCollection *collection = [OAFFeaturesConverter jsonToCollection:collectionContent];
2627
OAFFeatureCollection *featureCollection = [OAFFeaturesConverter jsonToFeatureCollection:featureCollectionContent];
@@ -39,43 +40,48 @@ NSString *featureCollectionContent = [OAFFeaturesConverter objectToJSON:featureC
3940

4041
### Build ###
4142

42-
[![Build & Test](https://github.com/ngageoint/ogc-api-features-json-ios/workflows/Build%20&%20Test/badge.svg)](https://github.com/ngageoint/ogc-api-features-json-ios/actions/workflows/build-test.yml)
43-
44-
Build this repository using Xcode and/or CocoaPods:
45-
46-
pod repo update
47-
pod install
43+
[![Build](https://github.com/ngageoint/ogc-api-features-json-ios/workflows/Build/badge.svg)](https://github.com/ngageoint/ogc-api-features-json-ios/actions/workflows/build.yml)
4844

49-
Open ogc-api-features-json-ios.xcworkspace in Xcode or build from command line:
45+
Build this repository using Swift Package Manager:
5046

51-
xcodebuild -workspace 'ogc-api-features-json-ios.xcworkspace' -scheme ogc-api-features-json-ios build
47+
swift build
5248

5349
Run tests from Xcode or from command line:
5450

55-
xcodebuild test -workspace 'ogc-api-features-json-ios.xcworkspace' -scheme ogc-api-features-json-ios -destination 'platform=iOS Simulator,name=iPhone 15'
51+
swift test
5652

57-
### Include Library ###
53+
Open the Swift Package in Xcode from command line:
5854

59-
Include this repository by specifying it in a Podfile using a supported option.
55+
open Package.swift
6056

61-
Pull from [CocoaPods](https://cocoapods.org/pods/ogc-api-features-json-ios):
57+
### Include Library ###
6258

63-
pod 'ogc-api-features-json-ios', '~> 4.2.5'
59+
Use this library via SPM in your Package.swift:
6460

65-
Pull from GitHub:
61+
dependencies: [
62+
.package(url: "https://github.com/ngageoint/ogc-api-features-json-ios.git", branch: "release/5.0.0"),
63+
]
64+
65+
Or as a tagged release:
6666

67-
pod 'ogc-api-features-json-ios', :git => 'https://github.com/ngageoint/ogc-api-features-json-ios.git', :branch => 'master'
68-
pod 'ogc-api-features-json-ios', :git => 'https://github.com/ngageoint/ogc-api-features-json-ios.git', :tag => '4.2.5'
67+
dependencies: [
68+
.package(url: "https://github.com/ngageoint/ogc-api-features-json-ios.git", from: "5.0.0"),
69+
]
6970

70-
Include as local project:
71+
Reference it in your Package.swift target:
7172

72-
pod 'ogc-api-features-json-ios', :path => '../ogc-api-features-json-ios'
73+
.target(
74+
name: "MyApp",
75+
dependencies: [
76+
.product(name: "OGC_APIFeaturesJSON", package: "ogc-api-features-json-ios"),
77+
],
78+
),
7379

7480
### Swift ###
7581

76-
To use from Swift, import the ogc-api-features-json-ios bridging header from the Swift project's bridging header
82+
To use from Swift:
7783

78-
#import "ogc-api-features-json-ios-Bridging-Header.h"
84+
import OGC_APIFeaturesJSON
7985

8086
### Remote Dependencies ###
8187

ogc-api-features-json-ios.podspec

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

0 commit comments

Comments
 (0)