-
Notifications
You must be signed in to change notification settings - Fork 140
Add Support for Swift Package Manager #85
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| Pod::Spec.new do |s| | ||
| s.name = "LetsMove" | ||
| s.version = "1.25" | ||
| s.version = "1.26" | ||
| s.summary = "Moves a running Mac application to the /Applications directory." | ||
| s.homepage = "https://github.com/potionfactory/LetsMove/" | ||
| s.license = 'Public Domain' | ||
|
|
@@ -10,14 +10,14 @@ Pod::Spec.new do |s| | |
|
|
||
| s.source = { | ||
| :git => "https://github.com/potionfactory/LetsMove.git", | ||
| :tag => "v1.25" | ||
| :tag => "v1.26" | ||
| } | ||
|
|
||
| s.source_files = '*.{h,m}' | ||
| s.exclude_files = 'main.m', 'LetsMoveAppDelegate.{h,m}' | ||
| s.public_header_files = 'PFMoveApplication.h' | ||
|
|
||
| s.resources = '*.lproj' | ||
| s.resources = 'Resources/*.lproj' | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the Podfile to account for the relocated resources and to bump the version number. |
||
| s.requires_arc = false | ||
| end | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,11 @@ @interface LetsMove : NSObject | |
|
|
||
| @implementation LetsMove | ||
| + (NSBundle *)bundle { | ||
| #ifdef SWIFT_PACKAGE | ||
| return SWIFTPM_MODULE_BUNDLE; | ||
| #else | ||
|
Comment on lines
+21
to
+23
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure the resources can be located when building with SPM. |
||
| return [NSBundle bundleForClass:self]; | ||
| #endif | ||
| } | ||
| @end | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // swift-tools-version:5.4 | ||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "LetsMove", | ||
| defaultLocalization: "en", | ||
| platforms: [ | ||
| .macOS(.v10_10), | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the lowest macOS version that can be specified in |
||
| ], | ||
| products: [ | ||
| .library(name: "LetsMove", | ||
| targets: ["LetsMove"]) | ||
| ], | ||
| targets: [ | ||
| .target( | ||
| name: "LetsMove", | ||
| path: ".", | ||
| exclude: [ | ||
| "main.m", | ||
| "LetsMoveAppDelegate.m", | ||
| "LetsMoveAppDelegate.h", | ||
| "Resources/LetsMove-Info.plist", | ||
| "Resources/LetsMove-Test-Info.plist", | ||
| "LetsMove.modulemap", | ||
| "LetsMove_Prefix.pch" | ||
| ], | ||
| resources: [ | ||
| .process("Resources") | ||
| ], | ||
| publicHeadersPath: "include", | ||
| cSettings: [.unsafeFlags(["-fno-objc-arc"])] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disable ARC. |
||
| ) | ||
| ], | ||
| swiftLanguageVersions: [.v5] | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../LetsMove.h |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../PFMoveApplication.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to make this a local #import to keep SPM happy.