-
Notifications
You must be signed in to change notification settings - Fork 62
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
(draft) (feat) Migrate to SPM (Swift Package Manager) #131
Open
fabiomartino
wants to merge
7
commits into
capacitor-community:master
Choose a base branch
from
fabiomartino:update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ec50f03
Migrate to SPM
fabiomartino b44f887
Remove iOS test
fabiomartino 822e6d6
Remove iOS test reference from package.json
fabiomartino 77c9443
Remove .gitignore from iOS folder
fabiomartino a86c1db
Remove test reference in Package.swift
fabiomartino 5c5ce8a
Fix indentation
fabiomartino 25106a4
Remove more indentation tabs
fabiomartino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
require 'json' | ||
|
||
Pod::Spec.new do |s| | ||
s.name = 'CapacitorCommunityBackgroundGeolocation' | ||
s.version = '0.0.1' | ||
s.summary = 'Capacitor plugin which lets you receive geolocation updates even while the app is backgrounded.' | ||
s.license = 'MIT' | ||
s.homepage = 'https://github.com/capacitor-community/background-geolocation' | ||
s.author = 'James Diacono' | ||
s.source = { :git => 'https://github.com/capacitor-community/background-geolocation', :tag => s.version.to_s } | ||
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' | ||
s.ios.deployment_target = '12.0' | ||
s.dependency 'Capacitor' | ||
end | ||
package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) | ||
|
||
Pod::Spec.new do |s| | ||
s.name = 'CapacitorCommunityBackgroundGeolocation' | ||
s.version = package['version'] | ||
s.summary = package['description'] | ||
s.license = package['license'] | ||
s.homepage = package['repository']['url'] | ||
s.author = package['author'] | ||
s.source = { :git => package['repository']['url'], :tag => s.version.to_s } | ||
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}' | ||
s.ios.deployment_target = '14.0' | ||
s.dependency 'Capacitor' | ||
s.swift_version = '5.1' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// swift-tools-version: 5.9 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "CapacitorCommunityBackgroundGeolocation", | ||
platforms: [.iOS(.v14)], | ||
products: [ | ||
.library( | ||
name: "CapacitorCommunityBackgroundGeolocation", | ||
targets: ["BackgroundGeolocationPlugin"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0") | ||
], | ||
targets: [ | ||
.target( | ||
name: "BackgroundGeolocationPlugin", | ||
dependencies: [ | ||
.product(name: "Capacitor", package: "capacitor-swift-pm"), | ||
.product(name: "Cordova", package: "capacitor-swift-pm") | ||
], | ||
path: "ios/Sources/BackgroundGeolocationPlugin"), | ||
.testTarget( | ||
fabiomartino marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: "BackgroundGeolocationPluginTests", | ||
dependencies: ["BackgroundGeolocationPlugin"], | ||
path: "ios/Tests/BackgroundGeolocationPluginTests") | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
.build | ||
/Packages | ||
xcuserdata/ | ||
DerivedData/ | ||
.swiftpm/configuration/registries.json | ||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata | ||
.netrc | ||
fabiomartino marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is it necessary to specify a Swift version?
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.
Probably yes (but not sure) due to the new SPM structure.