Skip to content

Update NS_ENUM and Add Swift Package Manager Support#5

Merged
paulsolt-ofsw merged 1 commit into
masterfrom
psolt/Package
Jun 4, 2025
Merged

Update NS_ENUM and Add Swift Package Manager Support#5
paulsolt-ofsw merged 1 commit into
masterfrom
psolt/Package

Conversation

@paulsolt-ofsw
Copy link
Copy Markdown
Contributor

@paulsolt-ofsw paulsolt-ofsw commented Apr 8, 2025

Exposes all enum using NS_ENUM and adds support for Swift Package Manager (SPM). This is a breaking code change.

ngageoint/simple-features-ios#7

  • Updates logic to use NS_ENUM (Simple Features 5.0.0) for all enums for Swift/Objective-C interoperability (breaking changes)
  • Updates header imports to use module style imports with angular brackets
  • Separates Swift and Objective-C unit tests with shared core logic
  • Updates GitHub workflows for SPM

@paulsolt-ofsw paulsolt-ofsw marked this pull request as ready for review May 5, 2025 20:50
@paulsolt-ofsw paulsolt-ofsw changed the title WIP - MVP for Swift Package Integration Update NS_ENUM and Add Swift Package Manager Support May 5, 2025
Copy link
Copy Markdown

@danbenner-vega danbenner-vega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the "bug" you might have found, but I'm also not concerned with that test you commented most of it out. Approved.

Copy link
Copy Markdown

@brentvegafederal brentvegafederal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved but don't forget to update Package.swift

Comment thread Package.swift Outdated
@paulsolt-ofsw
Copy link
Copy Markdown
Contributor Author

@danbenner-vega I left some debug commented code in SFGFeatureCollectionTestCase.m from when I was figuring out bundle loading logic for tests. I've cleaned it up, since I wrote a new method to use SWIFTPM_MODULE_BUNDLE which will convert to a proper path on SPM.

- (NSBundle *)getBundle {
#if SWIFT_PACKAGE
    return SWIFTPM_MODULE_BUNDLE;
#else
    return [NSBundle bundleForClass:[SFGFeatureCollectionTestCase class]];
#endif
}

* Updates all enums to NS_ENUM for Swift interoperability.
* Updates tests and github workflows to use SPM
@paulsolt-ofsw paulsolt-ofsw merged commit 94ab55d into master Jun 4, 2025
1 check passed
@paulsolt-ofsw paulsolt-ofsw deleted the psolt/Package branch June 4, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants