Skip to content

Commit 19ef5d8

Browse files
committed
enable cocoapods
1 parent 26748eb commit 19ef5d8

File tree

11 files changed

+234
-2
lines changed

11 files changed

+234
-2
lines changed

example/ios/Flutter/Debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"

example/ios/Podfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '12.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', '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 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_ios_podfile_setup
29+
30+
target 'Runner' do
31+
use_frameworks!
32+
33+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
34+
target 'RunnerTests' do
35+
inherit! :search_paths
36+
end
37+
end
38+
39+
post_install do |installer|
40+
installer.pods_project.targets.each do |target|
41+
flutter_additional_ios_build_settings(target)
42+
end
43+
end

example/ios/Podfile.lock

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
PODS:
2+
- advertising_id_flutter (0.0.1):
3+
- Flutter
4+
- Flutter (1.0.0)
5+
- integration_test (0.0.1):
6+
- Flutter
7+
8+
DEPENDENCIES:
9+
- advertising_id_flutter (from `.symlinks/plugins/advertising_id_flutter/ios`)
10+
- Flutter (from `Flutter`)
11+
- integration_test (from `.symlinks/plugins/integration_test/ios`)
12+
13+
EXTERNAL SOURCES:
14+
advertising_id_flutter:
15+
:path: ".symlinks/plugins/advertising_id_flutter/ios"
16+
Flutter:
17+
:path: Flutter
18+
integration_test:
19+
:path: ".symlinks/plugins/integration_test/ios"
20+
21+
SPEC CHECKSUMS:
22+
advertising_id_flutter: 1b8c9a0091c6e7503a32f2eeaa69dc73f4c7c303
23+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
24+
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
25+
26+
PODFILE CHECKSUM: 4305caec6b40dde0ae97be1573c53de1882a07e5
27+
28+
COCOAPODS: 1.16.2

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1616
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1717
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
18+
AE448AFA94F5EE4C6F82D34B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7429FD2B0E327DB301198426 /* Pods_RunnerTests.framework */; };
19+
CA4C44BC4E9DA22196307E57 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85A442E18CCE839283889C9F /* Pods_Runner.framework */; };
1820
/* End PBXBuildFile section */
1921

2022
/* Begin PBXContainerItemProxy section */
@@ -41,21 +43,29 @@
4143
/* End PBXCopyFilesBuildPhase section */
4244

4345
/* Begin PBXFileReference section */
46+
06E812E5999E945B889030F8 /* 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>"; };
47+
0A17324262554E5E55CCA44B /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
4448
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4549
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4650
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
4751
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4852
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
53+
48167121120C709938587188 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
54+
7429FD2B0E327DB301198426 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4955
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
5056
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5157
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
58+
85A442E18CCE839283889C9F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5259
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5360
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
5461
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
5562
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5663
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5764
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5865
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
66+
C11D82B0BB7670B05E2D8675 /* 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>"; };
67+
C9A6FA750D3EA351DECE21C3 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
68+
FACC725DD42A9A2DFC1EE3D8 /* 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>"; };
5969
/* End PBXFileReference section */
6070

6171
/* Begin PBXFrameworksBuildPhase section */
@@ -64,6 +74,15 @@
6474
buildActionMask = 2147483647;
6575
files = (
6676
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
77+
CA4C44BC4E9DA22196307E57 /* Pods_Runner.framework in Frameworks */,
78+
);
79+
runOnlyForDeploymentPostprocessing = 0;
80+
};
81+
E2F416D069E8F00FEE2E81E8 /* Frameworks */ = {
82+
isa = PBXFrameworksBuildPhase;
83+
buildActionMask = 2147483647;
84+
files = (
85+
AE448AFA94F5EE4C6F82D34B /* Pods_RunnerTests.framework in Frameworks */,
6786
);
6887
runOnlyForDeploymentPostprocessing = 0;
6988
};
@@ -78,6 +97,29 @@
7897
path = RunnerTests;
7998
sourceTree = "<group>";
8099
};
100+
796F049E0C905AAE151E9C45 /* Pods */ = {
101+
isa = PBXGroup;
102+
children = (
103+
C11D82B0BB7670B05E2D8675 /* Pods-Runner.debug.xcconfig */,
104+
FACC725DD42A9A2DFC1EE3D8 /* Pods-Runner.release.xcconfig */,
105+
06E812E5999E945B889030F8 /* Pods-Runner.profile.xcconfig */,
106+
48167121120C709938587188 /* Pods-RunnerTests.debug.xcconfig */,
107+
C9A6FA750D3EA351DECE21C3 /* Pods-RunnerTests.release.xcconfig */,
108+
0A17324262554E5E55CCA44B /* Pods-RunnerTests.profile.xcconfig */,
109+
);
110+
name = Pods;
111+
path = Pods;
112+
sourceTree = "<group>";
113+
};
114+
80194CFFCE57E023D0D09EC1 /* Frameworks */ = {
115+
isa = PBXGroup;
116+
children = (
117+
85A442E18CCE839283889C9F /* Pods_Runner.framework */,
118+
7429FD2B0E327DB301198426 /* Pods_RunnerTests.framework */,
119+
);
120+
name = Frameworks;
121+
sourceTree = "<group>";
122+
};
81123
9740EEB11CF90186004384FC /* Flutter */ = {
82124
isa = PBXGroup;
83125
children = (
@@ -96,6 +138,8 @@
96138
97C146F01CF9000F007C117D /* Runner */,
97139
97C146EF1CF9000F007C117D /* Products */,
98140
331C8082294A63A400263BE5 /* RunnerTests */,
141+
796F049E0C905AAE151E9C45 /* Pods */,
142+
80194CFFCE57E023D0D09EC1 /* Frameworks */,
99143
);
100144
sourceTree = "<group>";
101145
};
@@ -130,8 +174,10 @@
130174
isa = PBXNativeTarget;
131175
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
132176
buildPhases = (
177+
7F4F69EE1C5E7DDC060E1581 /* [CP] Check Pods Manifest.lock */,
133178
331C807D294A63A400263BE5 /* Sources */,
134179
331C807F294A63A400263BE5 /* Resources */,
180+
E2F416D069E8F00FEE2E81E8 /* Frameworks */,
135181
);
136182
buildRules = (
137183
);
@@ -147,12 +193,14 @@
147193
isa = PBXNativeTarget;
148194
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
149195
buildPhases = (
196+
0215B816C99362B4662C41E2 /* [CP] Check Pods Manifest.lock */,
150197
9740EEB61CF901F6004384FC /* Run Script */,
151198
97C146EA1CF9000F007C117D /* Sources */,
152199
97C146EB1CF9000F007C117D /* Frameworks */,
153200
97C146EC1CF9000F007C117D /* Resources */,
154201
9705A1C41CF9048500538489 /* Embed Frameworks */,
155202
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
203+
EA159B4EA06EF4ECF50C8E6E /* [CP] Embed Pods Frameworks */,
156204
);
157205
buildRules = (
158206
);
@@ -196,7 +244,7 @@
196244
);
197245
mainGroup = 97C146E51CF9000F007C117D;
198246
packageReferences = (
199-
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
247+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
200248
);
201249
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
202250
projectDirPath = "";
@@ -230,6 +278,28 @@
230278
/* End PBXResourcesBuildPhase section */
231279

232280
/* Begin PBXShellScriptBuildPhase section */
281+
0215B816C99362B4662C41E2 /* [CP] Check Pods Manifest.lock */ = {
282+
isa = PBXShellScriptBuildPhase;
283+
buildActionMask = 2147483647;
284+
files = (
285+
);
286+
inputFileListPaths = (
287+
);
288+
inputPaths = (
289+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
290+
"${PODS_ROOT}/Manifest.lock",
291+
);
292+
name = "[CP] Check Pods Manifest.lock";
293+
outputFileListPaths = (
294+
);
295+
outputPaths = (
296+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
297+
);
298+
runOnlyForDeploymentPostprocessing = 0;
299+
shellPath = /bin/sh;
300+
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";
301+
showEnvVarsInLog = 0;
302+
};
233303
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
234304
isa = PBXShellScriptBuildPhase;
235305
alwaysOutOfDate = 1;
@@ -246,6 +316,28 @@
246316
shellPath = /bin/sh;
247317
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
248318
};
319+
7F4F69EE1C5E7DDC060E1581 /* [CP] Check Pods Manifest.lock */ = {
320+
isa = PBXShellScriptBuildPhase;
321+
buildActionMask = 2147483647;
322+
files = (
323+
);
324+
inputFileListPaths = (
325+
);
326+
inputPaths = (
327+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
328+
"${PODS_ROOT}/Manifest.lock",
329+
);
330+
name = "[CP] Check Pods Manifest.lock";
331+
outputFileListPaths = (
332+
);
333+
outputPaths = (
334+
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
335+
);
336+
runOnlyForDeploymentPostprocessing = 0;
337+
shellPath = /bin/sh;
338+
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";
339+
showEnvVarsInLog = 0;
340+
};
249341
9740EEB61CF901F6004384FC /* Run Script */ = {
250342
isa = PBXShellScriptBuildPhase;
251343
alwaysOutOfDate = 1;
@@ -261,6 +353,23 @@
261353
shellPath = /bin/sh;
262354
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
263355
};
356+
EA159B4EA06EF4ECF50C8E6E /* [CP] Embed Pods Frameworks */ = {
357+
isa = PBXShellScriptBuildPhase;
358+
buildActionMask = 2147483647;
359+
files = (
360+
);
361+
inputFileListPaths = (
362+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
363+
);
364+
name = "[CP] Embed Pods Frameworks";
365+
outputFileListPaths = (
366+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
367+
);
368+
runOnlyForDeploymentPostprocessing = 0;
369+
shellPath = /bin/sh;
370+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
371+
showEnvVarsInLog = 0;
372+
};
264373
/* End PBXShellScriptBuildPhase section */
265374

266375
/* Begin PBXSourcesBuildPhase section */
@@ -388,6 +497,7 @@
388497
};
389498
331C8088294A63A400263BE5 /* Debug */ = {
390499
isa = XCBuildConfiguration;
500+
baseConfigurationReference = 48167121120C709938587188 /* Pods-RunnerTests.debug.xcconfig */;
391501
buildSettings = {
392502
BUNDLE_LOADER = "$(TEST_HOST)";
393503
CODE_SIGN_STYLE = Automatic;
@@ -405,6 +515,7 @@
405515
};
406516
331C8089294A63A400263BE5 /* Release */ = {
407517
isa = XCBuildConfiguration;
518+
baseConfigurationReference = C9A6FA750D3EA351DECE21C3 /* Pods-RunnerTests.release.xcconfig */;
408519
buildSettings = {
409520
BUNDLE_LOADER = "$(TEST_HOST)";
410521
CODE_SIGN_STYLE = Automatic;
@@ -420,6 +531,7 @@
420531
};
421532
331C808A294A63A400263BE5 /* Profile */ = {
422533
isa = XCBuildConfiguration;
534+
baseConfigurationReference = 0A17324262554E5E55CCA44B /* Pods-RunnerTests.profile.xcconfig */;
423535
buildSettings = {
424536
BUNDLE_LOADER = "$(TEST_HOST)";
425537
CODE_SIGN_STYLE = Automatic;
@@ -627,7 +739,7 @@
627739
/* End XCConfigurationList section */
628740

629741
/* Begin XCLocalSwiftPackageReference section */
630-
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
742+
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
631743
isa = XCLocalSwiftPackageReference;
632744
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
633745
};

example/ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"

example/macos/Podfile

Lines changed: 42 additions & 0 deletions
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' => :debug,
8+
'Profile' => :release,
9+
'Release' => :release,
10+
}
11+
12+
def flutter_root
13+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14+
unless File.exist?(generated_xcode_build_settings_path)
15+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16+
end
17+
18+
File.foreach(generated_xcode_build_settings_path) do |line|
19+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
20+
return matches[1].strip if matches
21+
end
22+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23+
end
24+
25+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26+
27+
flutter_macos_podfile_setup
28+
29+
target 'Runner' do
30+
use_frameworks!
31+
32+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
33+
target 'RunnerTests' do
34+
inherit! :search_paths
35+
end
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

0 commit comments

Comments
 (0)