Skip to content

Adds Swift Package Manager support and NS_ENUM updates #1

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 2 commits into
base: master
Choose a base branch
from
Open
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.

8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ 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 ogc-api-features-json-ios.xcworkspace -scheme ogc-api-features-json-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/
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ Adheres to [Semantic Versioning](http://semver.org/).

---

## 4.2.6 (TBD)
## 5.0.0 (5-7-2025)

* Adds Swift Package Manager (SPM) support and removes Cocoapods
* Integrated sf-geojson-ios 5.0.0 (Breaking NS_ENUM Objective-C/Swift Interoperability fixes)

* TBD

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

Expand Down
24 changes: 24 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"originHash" : "f1fe69523c01f3f616889f74e9def3e9cf39e8a371c1a1909068977abd002349",
"pins" : [
{
"identity" : "simple-features-geojson-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ngageoint/simple-features-geojson-ios",
"state" : {
"branch" : "psolt/Package",
"revision" : "79674f41f5d8be1e39922cf77b45362869bb8113"
}
},
{
"identity" : "simple-features-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ngageoint/simple-features-ios",
"state" : {
"branch" : "psolt/v5-NS_ENUM_Package",
"revision" : "0050585703585a94bca5c8530a6c45de10c0293c"
}
}
],
"version" : 3
}
34 changes: 34 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// swift-tools-version: 5.10

import PackageDescription

let package = Package(
name: "OGC_APIFeaturesJSON",
platforms: [
.iOS(.v13), .macOS(.v12)
],
products: [
.library(
name: "OGC_APIFeaturesJSON",
targets: ["OGC_APIFeaturesJSON"])
],
dependencies: [
.package(url: "https://github.com/ngageoint/simple-features-geojson-ios", branch: "psolt/Package"), // FIXME: Update to published release (5.0.0 version)
],
targets: [
.target(
name: "OGC_APIFeaturesJSON",
dependencies: [
.product(name: "SimpleFeaturesGeoJSON", package: "simple-features-geojson-ios")
],
path: "ogc-api-features-json-ios"
),
.testTarget(
name: "OGCAPIFeaturesJSONTests",
dependencies: [
"OGC_APIFeaturesJSON"
],
path: "ogc-api-features-json-iosTests"
)
]
)
10 changes: 0 additions & 10 deletions Podfile

This file was deleted.

48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ View the latest [Appledoc](http://ngageoint.github.io/ogc-api-features-json-ios/
#### Read ####

```objectivec

@import OGC_APIFeaturesJSON;

OAFCollections *collections = [OAFFeaturesConverter jsonToCollections:collectionsContent];
OAFCollection *collection = [OAFFeaturesConverter jsonToCollection:collectionContent];
OAFFeatureCollection *featureCollection = [OAFFeaturesConverter jsonToFeatureCollection:featureCollectionContent];
Expand All @@ -39,43 +40,48 @@ NSString *featureCollectionContent = [OAFFeaturesConverter objectToJSON:featureC

### Build ###

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

Build this repository using Xcode and/or CocoaPods:

pod repo update
pod install
[![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)

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

xcodebuild -workspace 'ogc-api-features-json-ios.xcworkspace' -scheme ogc-api-features-json-ios build
swift build

Run tests from Xcode or from command line:

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

### Include Library ###
Open the Swift Package in Xcode from command line:

Include this repository by specifying it in a Podfile using a supported option.
open Package.swift

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

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

Pull from GitHub:
dependencies: [
.package(url: "https://github.com/ngageoint/ogc-api-features-json-ios.git", branch: "release/5.0.0"),
]

Or as a tagged release:

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

Include as local project:
Reference it in your Package.swift target:

pod 'ogc-api-features-json-ios', :path => '../ogc-api-features-json-ios'
.target(
name: "MyApp",
dependencies: [
.product(name: "OGC_APIFeaturesJSON", package: "ogc-api-features-json-ios"),
],
),

### Swift ###

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

#import "ogc-api-features-json-ios-Bridging-Header.h"
import OGC_APIFeaturesJSON

### Remote Dependencies ###

Expand Down
21 changes: 0 additions & 21 deletions ogc-api-features-json-ios.podspec

This file was deleted.

Loading