This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[file_selector] Basic iOS implementation #5448
Merged
Merged
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6e7f572
Basic iOS implementation
spesholized b4e8697
Merge branch 'flutter:main' into main
spesholized 75a1bdc
[file_selector] Basic iOS implementation
spesholized 15f2741
Merge branch 'main' of https://github.com/spesholized/plugins
spesholized 62c60cb
Fix formatting and update environment sdk version
spesholized 696cb78
Basic native unit test for plugin
spesholized 11504f4
Update packages/file_selector/file_selector_ios/example/ios/Runner.xc…
spesholized 252e110
Add placeholder integration test
spesholized cb76a80
Remove unused overrides in file_selector_ios.dart, update pubspec
spesholized ecfad9a
Use pigeon, fix Obj-C prefix typo
spesholized 4ecda0e
Add native unit tests
spesholized 2a69911
Update tests to use pigeon, change prefix to FFS, update wildcard typ…
spesholized 38742a3
Use non-null properties in messages.dart, use objc associated for the…
spesholized ec291b6
Merge branch 'main' into file_selector_ios
stuartmorgan-g f0bbcf1
Remove local analysis options
stuartmorgan-g edc2881
Resync examples and tweak UTIs
stuartmorgan-g e521edc
Analysis fixes
stuartmorgan-g eabcce5
Autoformat
stuartmorgan-g d39d953
Missing copyright header
stuartmorgan-g 170c260
Supress deprecation warning on legacy codepath
stuartmorgan-g 129a097
Review comments
stuartmorgan-g 0cfa61c
Format
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 |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Miscellaneous | ||
| *.class | ||
| *.log | ||
| *.pyc | ||
| *.swp | ||
| .DS_Store | ||
| .atom/ | ||
| .buildlog/ | ||
| .history | ||
| .svn/ | ||
|
|
||
| # IntelliJ related | ||
| *.iml | ||
| *.ipr | ||
| *.iws | ||
| .idea/ | ||
|
|
||
| # The .vscode folder contains launch configuration and tasks you configure in | ||
| # VS Code which you may wish to be included in version control, so this line | ||
| # is commented out by default. | ||
| #.vscode/ | ||
|
|
||
| # Flutter/Dart/Pub related | ||
| # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
| /pubspec.lock | ||
| **/doc/api/ | ||
| .dart_tool/ | ||
| .packages | ||
| build/ |
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 @@ | ||
| # This file tracks properties of this Flutter project. | ||
| # Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
| # | ||
| # This file should be version controlled and should not be manually edited. | ||
|
|
||
| version: | ||
| revision: 5464c5bac742001448fe4fc0597be939379f88ea | ||
| channel: stable | ||
|
|
||
| project_type: plugin |
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,6 @@ | ||
| # Below is a list of people and organizations that have contributed | ||
| # to the Flutter project. Names should be added to the list like so: | ||
| # | ||
| # Name/Organization <email address> | ||
|
|
||
| Google Inc. | ||
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,3 @@ | ||
| ## 0.5.0 | ||
|
|
||
| * Initial iOS implementation of `file_selector`. |
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 @@ | ||
| Copyright 2013 The Flutter Authors. All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without modification, | ||
| are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright | ||
| notice, this list of conditions and the following disclaimer. | ||
| * Redistributions in binary form must reproduce the above | ||
| copyright notice, this list of conditions and the following | ||
| disclaimer in the documentation and/or other materials provided | ||
| with the distribution. | ||
| * Neither the name of Google Inc. nor the names of its | ||
| contributors may be used to endorse or promote products derived | ||
| from this software without specific prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
| ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
| ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,19 @@ | ||
| # file\_selector\_ios | ||
|
|
||
| The iOS implementation of [`file_selector`][1]. | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Importing the package | ||
|
|
||
| This implementation has not yet been endorsed, meaning that you need to | ||
| [depend on `file_selector_ios`][2] in addition to | ||
| [depending on `file_selector`][3]. | ||
|
|
||
| Once your pubspec includes the ios implementation, you can use the | ||
| `file_selector` APIs normally. You should not use the `file_selector_ios` | ||
| APIs directly. | ||
|
|
||
| [1]: https://pub.dev/packages/file_selector | ||
| [2]: https://pub.dev/packages/file_selector_ios/install | ||
| [3]: https://pub.dev/packages/file_selector/install |
46 changes: 46 additions & 0 deletions
46
packages/file_selector/file_selector_ios/example/.gitignore
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,46 @@ | ||
| # Miscellaneous | ||
| *.class | ||
| *.log | ||
| *.pyc | ||
| *.swp | ||
| .DS_Store | ||
| .atom/ | ||
| .buildlog/ | ||
| .history | ||
| .svn/ | ||
|
|
||
| # IntelliJ related | ||
| *.iml | ||
| *.ipr | ||
| *.iws | ||
| .idea/ | ||
|
|
||
| # The .vscode folder contains launch configuration and tasks you configure in | ||
| # VS Code which you may wish to be included in version control, so this line | ||
| # is commented out by default. | ||
| #.vscode/ | ||
|
|
||
| # Flutter/Dart/Pub related | ||
| **/doc/api/ | ||
| **/ios/Flutter/.last_build_id | ||
| .dart_tool/ | ||
| .flutter-plugins | ||
| .flutter-plugins-dependencies | ||
| .packages | ||
| .pub-cache/ | ||
| .pub/ | ||
| /build/ | ||
|
|
||
| # Web related | ||
| lib/generated_plugin_registrant.dart | ||
|
|
||
| # Symbolication related | ||
| app.*.symbols | ||
|
|
||
| # Obfuscation related | ||
| app.*.map.json | ||
|
|
||
| # Android Studio will place build artifacts here | ||
| /android/app/debug | ||
| /android/app/profile | ||
| /android/app/release |
10 changes: 10 additions & 0 deletions
10
packages/file_selector/file_selector_ios/example/.metadata
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 @@ | ||
| # This file tracks properties of this Flutter project. | ||
| # Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
| # | ||
| # This file should be version controlled and should not be manually edited. | ||
|
|
||
| version: | ||
| revision: 5464c5bac742001448fe4fc0597be939379f88ea | ||
| channel: stable | ||
|
|
||
| project_type: app |
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,4 @@ | ||
| # `file_selector_ios` example | ||
|
|
||
| Demonstrates iOS implementation of the | ||
| [`file_selector` plugin](https://pub.dev/packages/file_selector). |
34 changes: 34 additions & 0 deletions
34
packages/file_selector/file_selector_ios/example/ios/.gitignore
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,34 @@ | ||
| **/dgph | ||
| *.mode1v3 | ||
| *.mode2v3 | ||
| *.moved-aside | ||
| *.pbxuser | ||
| *.perspectivev3 | ||
| **/*sync/ | ||
| .sconsign.dblite | ||
| .tags* | ||
| **/.vagrant/ | ||
| **/DerivedData/ | ||
| Icon? | ||
| **/Pods/ | ||
| **/.symlinks/ | ||
| profile | ||
| xcuserdata | ||
| **/.generated/ | ||
| Flutter/App.framework | ||
| Flutter/Flutter.framework | ||
| Flutter/Flutter.podspec | ||
| Flutter/Generated.xcconfig | ||
| Flutter/ephemeral/ | ||
| Flutter/app.flx | ||
| Flutter/app.zip | ||
| Flutter/flutter_assets/ | ||
| Flutter/flutter_export_environment.sh | ||
| ServiceDefinitions.json | ||
| Runner/GeneratedPluginRegistrant.* | ||
|
|
||
| # Exceptions to above rules. | ||
| !default.mode1v3 | ||
| !default.mode2v3 | ||
| !default.pbxuser | ||
| !default.perspectivev3 |
26 changes: 26 additions & 0 deletions
26
packages/file_selector/file_selector_ios/example/ios/Flutter/AppFrameworkInfo.plist
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,26 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>CFBundleDevelopmentRegion</key> | ||
| <string>en</string> | ||
| <key>CFBundleExecutable</key> | ||
| <string>App</string> | ||
| <key>CFBundleIdentifier</key> | ||
| <string>io.flutter.flutter.app</string> | ||
| <key>CFBundleInfoDictionaryVersion</key> | ||
| <string>6.0</string> | ||
| <key>CFBundleName</key> | ||
| <string>App</string> | ||
| <key>CFBundlePackageType</key> | ||
| <string>FMWK</string> | ||
| <key>CFBundleShortVersionString</key> | ||
| <string>1.0</string> | ||
| <key>CFBundleSignature</key> | ||
| <string>????</string> | ||
| <key>CFBundleVersion</key> | ||
| <string>1.0</string> | ||
| <key>MinimumOSVersion</key> | ||
| <string>9.0</string> | ||
| </dict> | ||
| </plist> |
2 changes: 2 additions & 0 deletions
2
packages/file_selector/file_selector_ios/example/ios/Flutter/Debug.xcconfig
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,2 @@ | ||
| #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
| #include "Generated.xcconfig" |
2 changes: 2 additions & 0 deletions
2
packages/file_selector/file_selector_ios/example/ios/Flutter/Release.xcconfig
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,2 @@ | ||
| #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
| #include "Generated.xcconfig" |
44 changes: 44 additions & 0 deletions
44
packages/file_selector/file_selector_ios/example/ios/Podfile
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,44 @@ | ||
| # Uncomment this line to define a global platform for your project | ||
| # platform :ios, '9.0' | ||
|
|
||
| # CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
| ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
|
|
||
| project 'Runner', { | ||
| 'Debug' => :debug, | ||
| 'Profile' => :release, | ||
| 'Release' => :release, | ||
| } | ||
|
|
||
| def flutter_root | ||
| generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) | ||
| unless File.exist?(generated_xcode_build_settings_path) | ||
| raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
| end | ||
|
|
||
| File.foreach(generated_xcode_build_settings_path) do |line| | ||
| matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
| return matches[1].strip if matches | ||
| end | ||
| raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" | ||
| end | ||
|
|
||
| require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
|
||
| flutter_ios_podfile_setup | ||
|
|
||
| target 'Runner' do | ||
| use_frameworks! | ||
| use_modular_headers! | ||
|
|
||
| flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) | ||
| target 'RunnerTests' do | ||
| inherit! :search_paths | ||
| end | ||
| end | ||
|
|
||
| post_install do |installer| | ||
| installer.pods_project.targets.each do |target| | ||
| flutter_additional_ios_build_settings(target) | ||
| end | ||
| end |
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.
Uh oh!
There was an error while loading. Please reload this page.