Skip to content

Commit

Permalink
[path_provider] Add Swift Package Manager support (flutter#6680)
Browse files Browse the repository at this point in the history
Adds SPM support for iOS and macOS.

No Xcode project changes are included, to maintain compatibility with `stable`.

Fixes flutter/flutter#146913
  • Loading branch information
stuartmorgan committed May 7, 2024
1 parent 4595c41 commit 8de142d
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/path_provider/path_provider_foundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.4.0

* Adds Swift Package Manager compatibility.
* Updates minimum iOS version to 12.0 and minimum Flutter version to 3.16.6.

## 2.3.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.license = { :type => 'BSD', :file => '../LICENSE' }
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_foundation' }
s.source_files = 'Classes/**/*'
s.source_files = 'path_provider_foundation/Sources/path_provider_foundation/**/*.swift'
s.ios.dependency 'Flutter'
s.osx.dependency 'FlutterMacOS'
s.ios.deployment_target = '12.0'
Expand All @@ -22,5 +22,5 @@ Pod::Spec.new do |s|
'LD_RUNPATH_SEARCH_PATHS' => '/usr/lib/swift',
}
s.swift_version = '5.0'
s.resource_bundles = {'path_provider_foundation_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
s.resource_bundles = {'path_provider_foundation_privacy' => ['path_provider_foundation/Sources/path_provider_foundation/Resources/PrivacyInfo.xcprivacy']}
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version: 5.9

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import PackageDescription

let package = Package(
name: "path_provider_foundation",
platforms: [
.iOS("12.0"),
.macOS("10.14"),
],
products: [
.library(name: "path-provider-foundation", targets: ["path_provider_foundation"])
],
dependencies: [],
targets: [
.target(
name: "path_provider_foundation",
dependencies: [],
resources: [
.process("Resources")
]
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import 'package:pigeon/pigeon.dart';

@ConfigurePigeon(PigeonOptions(
input: 'pigeons/messages.dart',
swiftOut: 'macos/Classes/messages.g.swift',
swiftOut:
'darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift',
dartOut: 'lib/messages.g.dart',
dartTestOut: 'test/messages_test.g.dart',
copyrightHeader: 'pigeons/copyright.txt',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: path_provider_foundation
description: iOS and macOS implementation of the path_provider plugin
repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_foundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22
version: 2.3.2
version: 2.4.0

environment:
sdk: ^3.2.3
Expand Down

0 comments on commit 8de142d

Please sign in to comment.