Skip to content
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.

20 changes: 16 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,20 @@ 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 mgrs-ios.xcworkspace -scheme mgrs-ios -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14'
run: |
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
if [ -z "$iphone_names" ]; then echo "Error: No iPhone simulators found."; exit 1; fi
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
echo "latest_iphone: $latest_iphone"
xcodebuild build -scheme MGRS -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"

- name: Test
run: |
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
if [ -z "$iphone_names" ]; then echo "Error: No iPhone simulators found."; exit 1; fi
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
echo "latest_iphone: $latest_iphone"
xcodebuild test -scheme MGRS -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ xcuserdata/
*.swp
Carthage/
build/
.build/
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ Adheres to [Semantic Versioning](http://semver.org/).

---

## 1.1.7 (TBD)
## 2.0.0 (6-6-2025)

* TBD
* Adds Swift Package Manager support and removes Cocoapods (deprecated)
* Updates Github workflow and local build.sh for testing
* New app demo project using SPM
* Builds against new Grid 2.0.0 (grid-ios) and SimpleFeatures 5.0.0 (sf-ios) with new enum symbols exposed to Swift

## [1.1.6](https://github.com/ngageoint/mgrs-ios/releases/tag/1.1.6) (04-08-2024)

Expand Down
33 changes: 33 additions & 0 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// swift-tools-version: 5.10

import PackageDescription

let package = Package(
name: "MGRS",
platforms: [.macOS(.v11), .iOS(.v13)],
products: [
.library(
name: "MGRS",
targets: ["MGRS"])
],
dependencies: [
.package(url: "https://github.com/ngageoint/grid-ios", from: "2.0.0")
],
targets: [
.target(
name: "MGRS",
dependencies: [
.product(name: "Grid", package: "grid-ios")
],
path: "mgrs-ios",
resources: [
.copy("mgrs.plist"),
]
),
.testTarget(
name: "MGRSTests",
dependencies: [
"MGRS"
],
path: "mgrs-iosTests"
)
]
)
15 changes: 0 additions & 15 deletions Podfile

This file was deleted.

43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ View the latest [Appledoc](http://ngageoint.github.io/mgrs-ios/docs/api/)

```swift

import mgrs_ios
import MGRS

```

Expand Down Expand Up @@ -192,7 +192,7 @@ if zoomGrids.hasGrids() {

```objectivec

#import "mgrs_ios-Swift.h"
#import "MGRS-Swift.h"

```

Expand All @@ -205,36 +205,37 @@ MKTileOverlay *tileOverlay = [[MGRSTileOverlay alloc] init];

### Build ###

[![Build & Test](https://github.com/ngageoint/mgrs-ios/workflows/Build%20&%20Test/badge.svg)](https://github.com/ngageoint/mgrs-ios/actions/workflows/build-test.yml)
[![Build](https://github.com/ngageoint/mgrs-ios/workflows/Build/badge.svg)](https://github.com/ngageoint/mgrs-ios/actions/workflows/build.yml)

Build this repository using Xcode and/or CocoaPods:
Build and Test (Uses UIKit, so we build with xcodebuild instead of SPM).

pod install
./build.sh

Open mgrs-ios.xcworkspace in Xcode or build from command line:
You can build and test if you open the Package.swift in Xcode.

xcodebuild -workspace 'mgrs-ios.xcworkspace' -scheme mgrs-ios build

Run tests from Xcode or from command line:

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

### Include Library ###

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

Pull from [CocoaPods](https://cocoapods.org/pods/mgrs-ios):

pod 'mgrs-ios', '~> 1.1.6'
Use this library via SPM in your Package.swift:

Pull from GitHub:
dependencies: [
.package(url: "https://github.com/ngageoint/mgrs-ios.git", branch: "release/2.0.0"),
]

Or as a tagged release:

pod 'mgrs-ios', :git => 'https://github.com/ngageoint/mgrs-ios.git', :branch => 'master'
pod 'mgrs-ios', :git => 'https://github.com/ngageoint/mgrs-ios.git', :tag => '1.1.6'
dependencies: [
.package(url: "https://github.com/ngageoint/mgrs-ios.git", from: "2.0.0"),
]

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

pod 'mgrs-ios', :path => '../mgrs-ios'
.target(
name: "MyApp",
dependencies: [
.product(name: "MGRS", package: "mgrs-ios"),
],
),

### Remote Dependencies ###

Expand Down
Loading