Skip to content

Commit 3348987

Browse files
a-wallenjmagmana-wallen
authored
Add new macos target configured for flavors (#117352)
Co-authored-by: Jenn Magder <[email protected]> Co-authored-by: a-wallen <[email protected]>
1 parent 973cff4 commit 3348987

File tree

19 files changed

+1717
-0
lines changed

19 files changed

+1717
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/dgph
7+
**/xcuserdata/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# platform :osx, '10.14'
2+
3+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5+
6+
project 'Runner', {
7+
'Debug Free' => :debug,
8+
'Debug Paid' => :debug,
9+
'Release Free' => :release,
10+
'Release Paid' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
22+
end
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
24+
end
25+
26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_macos_podfile_setup
29+
30+
target 'Free App' do
31+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
32+
end
33+
34+
target 'Paid App' do
35+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
36+
end
37+
38+
post_install do |installer|
39+
installer.pods_project.targets.each do |target|
40+
flutter_additional_macos_build_settings(target)
41+
end
42+
end

dev/integration_tests/flavors/macos/Runner.xcodeproj/project.pbxproj

+935
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1300"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
18+
BuildableName = "Free App.app"
19+
BlueprintName = "Free App"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug Free"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
34+
BuildableName = "Free App.app"
35+
BlueprintName = "Free App"
36+
ReferencedContainer = "container:Runner.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
39+
<Testables>
40+
</Testables>
41+
</TestAction>
42+
<LaunchAction
43+
buildConfiguration = "Debug Free"
44+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
45+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
46+
launchStyle = "0"
47+
useCustomWorkingDirectory = "NO"
48+
ignoresPersistentStateOnLaunch = "NO"
49+
debugDocumentVersioning = "YES"
50+
debugServiceExtension = "internal"
51+
allowLocationSimulation = "YES">
52+
<BuildableProductRunnable
53+
runnableDebuggingMode = "0">
54+
<BuildableReference
55+
BuildableIdentifier = "primary"
56+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
57+
BuildableName = "Free App.app"
58+
BlueprintName = "Free App"
59+
ReferencedContainer = "container:Runner.xcodeproj">
60+
</BuildableReference>
61+
</BuildableProductRunnable>
62+
</LaunchAction>
63+
<ProfileAction
64+
buildConfiguration = "Debug Free"
65+
shouldUseLaunchSchemeArgsEnv = "YES"
66+
savedToolIdentifier = ""
67+
useCustomWorkingDirectory = "NO"
68+
debugDocumentVersioning = "YES">
69+
<BuildableProductRunnable
70+
runnableDebuggingMode = "0">
71+
<BuildableReference
72+
BuildableIdentifier = "primary"
73+
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
74+
BuildableName = "Free App.app"
75+
BlueprintName = "Free App"
76+
ReferencedContainer = "container:Runner.xcodeproj">
77+
</BuildableReference>
78+
</BuildableProductRunnable>
79+
</ProfileAction>
80+
<AnalyzeAction
81+
buildConfiguration = "Debug Free">
82+
</AnalyzeAction>
83+
<ArchiveAction
84+
buildConfiguration = "Release Free"
85+
revealArchiveInOrganizer = "YES">
86+
</ArchiveAction>
87+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1400"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "F383D4A52938029D00598432"
18+
BuildableName = "Paid App.app"
19+
BlueprintName = "Paid App"
20+
ReferencedContainer = "container:Runner.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug Paid"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug Paid"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "F383D4A52938029D00598432"
48+
BuildableName = "Paid App.app"
49+
BlueprintName = "Paid App"
50+
ReferencedContainer = "container:Runner.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release Paid"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "F383D4A52938029D00598432"
65+
BuildableName = "Paid App.app"
66+
BlueprintName = "Paid App"
67+
ReferencedContainer = "container:Runner.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug Paid">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release Paid"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

dev/integration_tests/flavors/macos/Runner.xcworkspace/contents.xcworkspacedata

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import Cocoa
6+
import FlutterMacOS
7+
8+
@NSApplicationMain
9+
class AppDelegate: FlutterAppDelegate {
10+
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
11+
return true
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "16x16",
5+
"idiom" : "mac",
6+
"filename" : "app_icon_16.png",
7+
"scale" : "1x"
8+
},
9+
{
10+
"size" : "16x16",
11+
"idiom" : "mac",
12+
"filename" : "app_icon_32.png",
13+
"scale" : "2x"
14+
},
15+
{
16+
"size" : "32x32",
17+
"idiom" : "mac",
18+
"filename" : "app_icon_32.png",
19+
"scale" : "1x"
20+
},
21+
{
22+
"size" : "32x32",
23+
"idiom" : "mac",
24+
"filename" : "app_icon_64.png",
25+
"scale" : "2x"
26+
},
27+
{
28+
"size" : "128x128",
29+
"idiom" : "mac",
30+
"filename" : "app_icon_128.png",
31+
"scale" : "1x"
32+
},
33+
{
34+
"size" : "128x128",
35+
"idiom" : "mac",
36+
"filename" : "app_icon_256.png",
37+
"scale" : "2x"
38+
},
39+
{
40+
"size" : "256x256",
41+
"idiom" : "mac",
42+
"filename" : "app_icon_256.png",
43+
"scale" : "1x"
44+
},
45+
{
46+
"size" : "256x256",
47+
"idiom" : "mac",
48+
"filename" : "app_icon_512.png",
49+
"scale" : "2x"
50+
},
51+
{
52+
"size" : "512x512",
53+
"idiom" : "mac",
54+
"filename" : "app_icon_512.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "512x512",
59+
"idiom" : "mac",
60+
"filename" : "app_icon_1024.png",
61+
"scale" : "2x"
62+
}
63+
],
64+
"info" : {
65+
"version" : 1,
66+
"author" : "xcode"
67+
}
68+
}

0 commit comments

Comments
 (0)