-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[file_selector] Add support for SPM (#6672)
Adjusts the structure of the iOS and macOS implementations to match SPM layout conventions, adds the SPM package specifications, and updates the podspecs to reflect the new paths to keep compatibility with Cocoapods. Does not include any Xcode project updates, in order to preserve compatibility with stable. Fixes flutter/flutter#146903
- Loading branch information
1 parent
ca01168
commit 45a4573
Showing
22 changed files
with
88 additions
and
12 deletions.
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,3 +1,7 @@ | ||
## 0.5.2 | ||
|
||
* Adds Swift Package Manager compatibility. | ||
|
||
## 0.5.1+9 | ||
|
||
* Adjusts implementation for testabiity. | ||
|
Empty file.
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 |
---|---|---|
|
@@ -13,11 +13,11 @@ Displays the native iOS document picker. | |
s.license = { :type => 'BSD', :file => '../LICENSE' } | ||
s.author = { 'Flutter Dev Team' => '[email protected]' } | ||
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_ios' } | ||
s.source_files = 'Classes/**/*.{h,m}' | ||
s.module_map = 'Classes/FileSelectorPlugin.modulemap' | ||
s.source_files = 'file_selector_ios/Sources/file_selector_ios/**/*.{h,m}' | ||
s.module_map = 'file_selector_ios/Sources/file_selector_ios/include/cocoapods_file_selector_ios.modulemap' | ||
s.dependency 'Flutter' | ||
s.platform = :ios, '12.0' | ||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } | ||
s.swift_version = '5.0' | ||
s.resource_bundles = {'file_selector_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']} | ||
s.resource_bundles = {'file_selector_ios_privacy' => ['file_selector_ios/Sources/file_selector_ios/Resources/PrivacyInfo.xcprivacy']} | ||
end |
32 changes: 32 additions & 0 deletions
32
packages/file_selector/file_selector_ios/ios/file_selector_ios/Package.swift
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,32 @@ | ||
// swift-tools-version: 5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
// 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: "file_selector_ios", | ||
platforms: [ | ||
.iOS("12.0") | ||
], | ||
products: [ | ||
.library(name: "file-selector-ios", targets: ["file_selector_ios"]) | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.target( | ||
name: "file_selector_ios", | ||
dependencies: [], | ||
exclude: ["include/cocoapods_file_selector_ios.modulemap"], | ||
resources: [ | ||
.process("Resources") | ||
], | ||
cSettings: [ | ||
.headerSearchPath("include/file_selector_ios") | ||
] | ||
) | ||
] | ||
) |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
...ile_selector_ios/ios/file_selector_ios/Sources/file_selector_ios/include/module.modulemap
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,10 @@ | ||
module file_selector_ios { | ||
umbrella header "file_selector_ios/file_selector_ios-umbrella.h" | ||
|
||
export * | ||
module * { export * } | ||
|
||
explicit module Test { | ||
header "file_selector_ios/FFSFileSelectorPlugin_Test.h" | ||
} | ||
} |
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
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
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ Displays native macOS open and save panels. | |
s.homepage = 'https://github.com/flutter/packages/tree/main/packages/file_selector' | ||
s.author = { 'Flutter Dev Team' => '[email protected]' } | ||
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_macos' } | ||
s.source_files = 'Classes/**/*' | ||
s.source_files = 'file_selector_macos/Sources/file_selector_macos/**/*.swift' | ||
s.dependency 'FlutterMacOS' | ||
|
||
s.platform = :osx, '10.14' | ||
|
25 changes: 25 additions & 0 deletions
25
packages/file_selector/file_selector_macos/macos/file_selector_macos/Package.swift
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,25 @@ | ||
// swift-tools-version: 5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
// 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: "file_selector_macos", | ||
platforms: [ | ||
.macOS("10.14") | ||
], | ||
products: [ | ||
.library(name: "file-selector-macos", targets: ["file_selector_macos"]) | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.target( | ||
name: "file_selector_macos", | ||
dependencies: [] | ||
) | ||
] | ||
) |
File renamed without changes.
File renamed without changes.
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