Skip to content

Commit 15d9f86

Browse files
committed
Removed cocoapods and updated Github workflow
1 parent 4d4be64 commit 15d9f86

File tree

12 files changed

+66
-5045
lines changed

12 files changed

+66
-5045
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ jobs:
1313

1414
steps:
1515
- name: Checkout Repository
16-
uses: actions/checkout@v3
17-
- name: Install Utilities
16+
uses: actions/checkout@v4
17+
18+
- name: Build
1819
run: |
19-
brew install automake
20-
brew install libtool
21-
- name: Install
20+
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
21+
if [ -z "$iphone_names" ]; then echo "Error: No iPhone simulators found."; exit 1; fi
22+
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
23+
echo "latest_iphone: $latest_iphone"
24+
xcodebuild build -scheme GeoPackage -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"
25+
26+
- name: Test
2227
run: |
23-
pod repo update
24-
pod install
25-
- name: Build
26-
run: xcodebuild build-for-testing -workspace geopackage-ios.xcworkspace -scheme geopackage-ios -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14'
28+
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
29+
if [ -z "$iphone_names" ]; then echo "Error: No iPhone simulators found."; exit 1; fi
30+
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
31+
echo "latest_iphone: $latest_iphone"
32+
xcodebuild test -scheme GeoPackage -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"

CHANGELOG.md

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

55
---
66

7-
## 8.0.7 (TBD)
7+
## 9.0.0 (5-22-2025)
88

9-
* TBD
9+
* Updated to Swift Package Manager
10+
* Removes Cocoapods (Deprecated)
11+
* Breaking code changes to support exporting C enum values to Swift
12+
* Updated to use SimpleFeatures (5.0.0) to expose missing symbols
1013

1114
## [8.0.6](https://github.com/ngageoint/geopackage-ios/releases/tag/8.0.6) (04-16-2024)
1215

Cartfile

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

Cartfile.resolved

Lines changed: 0 additions & 1 deletion
This file was deleted.

GPKGDataColumnConstraints.m

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

Package.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import PackageDescription
55
/// Swift Package Conversion Notes:
66
/// * Added all the same resources and updated multiple call sites to load from NSBundle to SWIFTPM_MODULE_BUNDLE
77
/// * Tests require UIKit and take a long time to run
8+
/// * Custom build.sh script to make it easy to run tests from command line
9+
///
10+
811
let package = Package(
912
name: "GeoPackage",
1013
defaultLocalization: "en",

Podfile

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

README.md

Lines changed: 27 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,6 @@ Software source code previously released under an open source license and then m
2020

2121
The GeoPackage SDK provides the ability to manage GeoPackage files providing read, write, import, export, share, and open support. Open GeoPackage files provide read and write access to features and tiles. Feature support includes Well-Known Binary and iOS Map shape translations. Tile generation supports creation by URL or features. Tile providers supporting GeoPackage format, standard tile API, and feature tile generation.
2222

23-
### Getting Started ###
24-
25-
**IMPORTANT** -
26-
Be sure your Mac has the `autoconf`, `automake`, and `glibtoolize` utilities. These are required to build
27-
the [PROJ](https://github.com/ngageoint/PROJ) dependency. Without them, `pod install` will fail. The easiest way to get these is to [`brew install`](https://brew.sh/) them:
28-
```
29-
brew install automake
30-
brew install libtool
31-
```
32-
33-
Include this repository by specifying it in a Podfile using a supported option.
34-
35-
Pull from [CocoaPods](https://cocoapods.org/pods/geopackage-ios):
36-
37-
pod 'geopackage-ios', '~> 8.0.6'
38-
39-
If you use `use_modular_headers!` in your Podfile, disable modular headers for the [PROJ](https://github.com/ngageoint/PROJ) dependency:
40-
41-
pod 'geopackage-ios', '~> 8.0.6'
42-
pod 'PROJ', :modular_headers => false
43-
44-
Pull from GitHub via CocoaPods:
45-
46-
pod 'geopackage-ios', :git => 'https://github.com/ngageoint/geopackage-ios.git', :branch => 'master'
47-
pod 'geopackage-ios', :git => 'https://github.com/ngageoint/geopackage-ios.git', :tag => '8.0.6'
48-
49-
Include as local project:
50-
51-
pod 'geopackage-ios', :path => '../geopackage-ios'
52-
5323
### Usage ###
5424

5525
View the latest [Appledoc](http://ngageoint.github.io/geopackage-ios/docs/api/).
@@ -233,10 +203,10 @@ int featureTileCount = [featureTileGenerator generateTiles];
233203
234204
#### Swift Example ####
235205
236-
To use from Swift, import the geopackage-ios bridging header from the Swift project's bridging header
237-
238-
#import "geopackage-ios-Bridging-Header.h"
206+
To use from Swift, import the module:
239207
208+
import GeoPackage
209+
240210
```swift
241211
242212
// let geoPackageFile: String = ...
@@ -403,22 +373,37 @@ manager.close()
403373

404374
### Build ###
405375

406-
[![Build & Test](https://github.com/ngageoint/geopackage-ios/workflows/Build%20&%20Test/badge.svg)](https://github.com/ngageoint/geopackage-ios/actions/workflows/build-test.yml)
376+
[![Build](https://github.com/ngageoint/geopackage-ios/workflows/Build/badge.svg)](https://github.com/ngageoint/geopackage-ios/actions/workflows/build.yml)
377+
378+
Build and Test (Uses UIKit, so we build with xcodebuild instead of SPM).
379+
380+
./build.sh
381+
382+
You can build and test if you open the Package.swift in Xcode.
407383

408-
See the [above note](https://github.com/ngageoint/geopackage-ios#getting-started) about `automake` and `glibtoolize`.
409384

410-
Build this repository using Xcode and/or CocoaPods:
385+
### Include Library ###
411386

412-
pod repo update
413-
pod install
387+
Use this library via SPM in your Package.swift:
414388

415-
Open geopackage-ios.xcworkspace in Xcode or build from command line:
389+
dependencies: [
390+
.package(url: "https://github.com/ngageoint/geopackage-ios.git", branch: "release/9.0.0"),
391+
]
392+
393+
Or as a tagged release:
416394

417-
xcodebuild -workspace 'geopackage-ios.xcworkspace' -scheme geopackage-ios build
395+
dependencies: [
396+
.package(url: "https://github.com/ngageoint/geopackage-ios.git", from: "9.0.0"),
397+
]
418398

419-
Run tests from Xcode or from command line:
399+
Reference it in your Package.swift target:
420400

421-
xcodebuild test -workspace 'geopackage-ios.xcworkspace' -scheme geopackage-ios -destination 'platform=iOS Simulator,name=iPhone 15'
401+
.target(
402+
name: "MyApp",
403+
dependencies: [
404+
.product(name: "GeoPackage", package: "geopackage-ios"),
405+
],
406+
),
422407

423408
### Remote Dependencies ###
424409

build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Find iPhone Simulator
6+
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
7+
if [ -z "$iphone_names" ]; then echo "Error: No iPhone simulators found."; exit 1; fi
8+
9+
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
10+
echo "latest_iphone: $latest_iphone"
11+
12+
# Build
13+
xcodebuild build -scheme GeoPackage -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"
14+
15+
# Test
16+
xcodebuild test -scheme GeoPackage -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"

geopackage-ios.podspec

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

0 commit comments

Comments
 (0)