-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[file_selector] Add support for SPM #6672
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1b4a2e9
Migrate iOS, untested
stuartmorgan-g bab6f26
Migrate macOS, untested
stuartmorgan-g 741c67d
Fixup
stuartmorgan-g 9e49c1d
Revert project changes
stuartmorgan-g d1db60c
Version bump
stuartmorgan-g f0d99e2
Remove unnecessary comments
stuartmorgan-g 8894bf2
Incude paths
stuartmorgan-g 28b85b2
Autoformat
stuartmorgan-g c3a44aa
Licenses
stuartmorgan-g e8560ba
Update packages/file_selector/file_selector_ios/pigeons/messages.dart
stuartmorgan-g be979da
Update packages/file_selector/file_selector_ios/pigeons/messages.dart
stuartmorgan-g 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Why was adding the relative path to the
#import
necessary, if it's in the header search path?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.
So for most of the headers, include paths is sufficient. However,
messages.g.h
is a problem when there's multiple plugins that also have amessages.g.h
. Seems like it can't resolve which to use. This appeared to also be a problem with CocoaPods, more context here: flutter/flutter#147587 (comment)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.
Should this instead wait until #6600 is done then?
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'm fine with manually doing include path fixup in advance of the fix landing, since we know the generator will catch up with it and it's not changing anything that could have runtime effects.