Skip to content

Commit

Permalink
added support for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
sirily11 committed Jul 12, 2020
1 parent 663a95c commit c0e0aa6
Show file tree
Hide file tree
Showing 10 changed files with 204 additions and 173 deletions.
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"barcode_scan","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-3.0.0/","dependencies":[]},{"name":"file_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.12.0/","dependencies":[]},{"name":"image_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.5/","dependencies":[]},{"name":"permission_handler","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]}],"android":[{"name":"barcode_scan","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-3.0.0/","dependencies":[]},{"name":"file_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.12.0/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.8/","dependencies":[]},{"name":"image_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.5/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"permission_handler","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"barcode_scan","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"permission_handler","dependencies":[]}],"date_created":"2020-07-11 20:54:43.713320","version":"1.17.5"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"barcode_scan","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-3.0.0/","dependencies":[]},{"name":"file_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.12.0/","dependencies":[]},{"name":"image_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.5/","dependencies":[]},{"name":"permission_handler","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]}],"android":[{"name":"barcode_scan","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-3.0.0/","dependencies":[]},{"name":"file_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.12.0/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.8/","dependencies":[]},{"name":"image_picker","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.5/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"permission_handler","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.0.1+1/","dependencies":[]}],"macos":[{"name":"file_chooser","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/file_chooser-0.1.3/","dependencies":[]}],"linux":[{"name":"file_chooser","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/file_chooser-0.1.3/","dependencies":[]}],"windows":[{"name":"file_chooser","path":"/Users/liqiwei/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/file_chooser-0.1.3/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"barcode_scan","dependencies":[]},{"name":"file_chooser","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"permission_handler","dependencies":[]}],"date_created":"2020-07-11 21:54:48.581735","version":"1.20.0-8.0.pre.57"}
2 changes: 2 additions & 0 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import FlutterMacOS
import Foundation

import file_chooser

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileChooserPlugin.register(with: registry.registrar(forPlugin: "FileChooserPlugin"))
}
6 changes: 6 additions & 0 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
PODS:
- file_chooser (0.0.2):
- FlutterMacOS
- FlutterMacOS (1.0.0)

DEPENDENCIES:
- file_chooser (from `Flutter/ephemeral/.symlinks/plugins/file_chooser/macos`)
- FlutterMacOS (from `Flutter/ephemeral/.symlinks/flutter/darwin-x64`)

EXTERNAL SOURCES:
file_chooser:
:path: Flutter/ephemeral/.symlinks/plugins/file_chooser/macos
FlutterMacOS:
:path: Flutter/ephemeral/.symlinks/flutter/darwin-x64

SPEC CHECKSUMS:
file_chooser: 24432cf5dc836722b05c11c2a0a30d19c3c9b996
FlutterMacOS: 15bea8a44d2fa024068daa0140371c020b4b6ff9

PODFILE CHECKSUM: d8ba9b3e9e93c62c74a660b46c6fcb09f03991a7
Expand Down
72 changes: 36 additions & 36 deletions example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; };
33D1A10522148B93006C7A3E /* FlutterMacOS.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = 33D1A10322148B71006C7A3E /* FlutterMacOS.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
801102F33F967B7C6EF49ED3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C449BF6CCDE2856A94A5D598 /* Pods_Runner.framework */; };
D73912F022F37F9E000D13A0 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; };
D73912F222F3801D000D13A0 /* App.framework in Bundle Framework */ = {isa = PBXBuildFile; fileRef = D73912EF22F37F9E000D13A0 /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
EA9883B69B5AAD51C89DF8DC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A3A5C67F4E76B43B4638D79 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -59,7 +59,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
024F0B45B4DBD6499FFA03CC /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
0635BE7E6D9B0296C4904847 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
1A3A5C67F4E76B43B4638D79 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -75,11 +76,10 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
74B98A30A232918D683AA5AD /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
81D01E68E6E9AB2CC0A2DEA0 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
88695D035A4F1CC7262E6A18 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
C449BF6CCDE2856A94A5D598 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9FE0073F40B21114E2AAF3F0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
D73912EF22F37F9E000D13A0 /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/ephemeral/App.framework; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

Expand All @@ -90,24 +90,13 @@
files = (
D73912F022F37F9E000D13A0 /* App.framework in Frameworks */,
33D1A10422148B71006C7A3E /* FlutterMacOS.framework in Frameworks */,
801102F33F967B7C6EF49ED3 /* Pods_Runner.framework in Frameworks */,
EA9883B69B5AAD51C89DF8DC /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
12EC8426E53B73B092D40185 /* Pods */ = {
isa = PBXGroup;
children = (
88695D035A4F1CC7262E6A18 /* Pods-Runner.debug.xcconfig */,
81D01E68E6E9AB2CC0A2DEA0 /* Pods-Runner.release.xcconfig */,
024F0B45B4DBD6499FFA03CC /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
33BA886A226E78AF003329D5 /* Configs */ = {
isa = PBXGroup;
children = (
Expand All @@ -126,7 +115,7 @@
33CEB47122A05771004F2AC0 /* Flutter */,
33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */,
12EC8426E53B73B092D40185 /* Pods */,
77B8E9EF97F7B42B0AF06862 /* Pods */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -175,10 +164,21 @@
path = Runner;
sourceTree = "<group>";
};
77B8E9EF97F7B42B0AF06862 /* Pods */ = {
isa = PBXGroup;
children = (
0635BE7E6D9B0296C4904847 /* Pods-Runner.debug.xcconfig */,
74B98A30A232918D683AA5AD /* Pods-Runner.release.xcconfig */,
9FE0073F40B21114E2AAF3F0 /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup;
children = (
C449BF6CCDE2856A94A5D598 /* Pods_Runner.framework */,
1A3A5C67F4E76B43B4638D79 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -190,13 +190,13 @@
isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
32B0DBAAA52E5EA43C9AD76F /* [CP] Check Pods Manifest.lock */,
4FDFED7277D7393955EA2D15 /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */,
E7155DE1ABBD3EB2C7FAD145 /* [CP] Embed Pods Frameworks */,
CEF26FE1D6F917C1EA8DB815 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -266,66 +266,66 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
32B0DBAAA52E5EA43C9AD76F /* [CP] Check Pods Manifest.lock */ = {
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename\n";
};
3399D490228B24CF009A79C7 /* ShellScript */ = {
33CC111E2044C6BF0003C045 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
Flutter/ephemeral/FlutterInputs.xcfilelist,
);
inputPaths = (
Flutter/ephemeral/tripwire,
);
outputFileListPaths = (
Flutter/ephemeral/FlutterOutputs.xcfilelist,
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename\n";
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n";
};
33CC111E2044C6BF0003C045 /* ShellScript */ = {
4FDFED7277D7393955EA2D15 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
Flutter/ephemeral/FlutterInputs.xcfilelist,
);
inputPaths = (
Flutter/ephemeral/tripwire,
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
Flutter/ephemeral/FlutterOutputs.xcfilelist,
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E7155DE1ABBD3EB2C7FAD145 /* [CP] Embed Pods Frameworks */ = {
CEF26FE1D6F917C1EA8DB815 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down
16 changes: 8 additions & 8 deletions example/macos/Runner/DebugProfile.entitlements
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?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>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
<dict>
<key>com.apple.security.app-sandbox</key>
<false />
<key>com.apple.security.cs.allow-jit</key>
<true />
<key>com.apple.security.network.server</key>
<true />
</dict>
</plist>
Loading

0 comments on commit c0e0aa6

Please sign in to comment.