-
Notifications
You must be signed in to change notification settings - Fork 238
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
macOS Support #534
macOS Support #534
Changes from 12 commits
6e4f228
ed514d1
418b200
880cae7
4f5e2b5
435e05e
78105bf
1e5095b
f689bab
f0ac94e
224f5a5
1408971
31e8181
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Flutter-related | ||
**/Flutter/ephemeral/ | ||
**/Pods/ | ||
|
||
# Xcode-related | ||
**/dgph | ||
**/xcuserdata/ |
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 "ephemeral/Flutter-Generated.xcconfig" |
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 "ephemeral/Flutter-Generated.xcconfig" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Generated file. Do not edit. | ||
// | ||
|
||
import FlutterMacOS | ||
import Foundation | ||
|
||
import audioplayers_darwin | ||
import path_provider_foundation | ||
import speech_to_text | ||
|
||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { | ||
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin")) | ||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) | ||
SpeechToTextPlugin.register(with: registry.registrar(forPlugin: "SpeechToTextPlugin")) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
platform :osx, '10.14' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so it is compatible with MacOS 10.14? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The plugin can be built on macOS 10.13 and above but the speech recognition code only works on macOS 10.15 and above. When I generated the macOS project the pod file automatically set the platform as 10.14 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so it's best be at 10.15? |
||
|
||
# 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', 'ephemeral', '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 Flutter-Generated.xcconfig, then run \"flutter pub get\"" | ||
end | ||
|
||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
||
flutter_macos_podfile_setup | ||
|
||
target 'Runner' do | ||
use_frameworks! | ||
use_modular_headers! | ||
|
||
flutter_install_all_macos_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_macos_build_settings(target) | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
PODS: | ||
- audioplayers_darwin (0.0.1): | ||
- FlutterMacOS | ||
- FlutterMacOS (1.0.0) | ||
- path_provider_foundation (0.0.1): | ||
- Flutter | ||
- FlutterMacOS | ||
- speech_to_text (0.0.1): | ||
- Flutter | ||
- FlutterMacOS | ||
- Try | ||
- Try (2.1.1) | ||
|
||
DEPENDENCIES: | ||
- audioplayers_darwin (from `Flutter/ephemeral/.symlinks/plugins/audioplayers_darwin/macos`) | ||
- FlutterMacOS (from `Flutter/ephemeral`) | ||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) | ||
- speech_to_text (from `Flutter/ephemeral/.symlinks/plugins/speech_to_text/darwin`) | ||
|
||
SPEC REPOS: | ||
trunk: | ||
- Try | ||
|
||
EXTERNAL SOURCES: | ||
audioplayers_darwin: | ||
:path: Flutter/ephemeral/.symlinks/plugins/audioplayers_darwin/macos | ||
FlutterMacOS: | ||
:path: Flutter/ephemeral | ||
path_provider_foundation: | ||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin | ||
speech_to_text: | ||
:path: Flutter/ephemeral/.symlinks/plugins/speech_to_text/darwin | ||
|
||
SPEC CHECKSUMS: | ||
audioplayers_darwin: dcad41de4fbd0099cb3749f7ab3b0cb8f70b810c | ||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 | ||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c | ||
speech_to_text: 627d3fd2194770b51abb324ba45c2d39398f24a8 | ||
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96 | ||
|
||
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 | ||
|
||
COCOAPODS: 1.15.2 |
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.
was this iOS upgrade intended?
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.
Probably not. When I generated the macOS project in the example it updated the platform numbers. Do you want me to revert it?
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 personally think it's fine, unless @sowens-csd has reasons not to