Skip to content

Commit f75e76e

Browse files
Melsaeed276Copilot
andauthored
Update packages/device_info_plus/device_info_plus/example/ios/Podfile
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a622d1d commit f75e76e

1 file changed

Lines changed: 39 additions & 1 deletion

File tree

  • packages/device_info_plus/device_info_plus/example/ios
Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,39 @@
1-
platform :ios, '15.0'
1+
platform :ios, '15.0'
2+
3+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
4+
5+
project 'Runner', {
6+
'Debug' => :debug,
7+
'Profile' => :release,
8+
'Release' => :release,
9+
}
10+
11+
def flutter_root
12+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
13+
unless File.exist?(generated_xcode_build_settings_path)
14+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
15+
end
16+
17+
File.foreach(generated_xcode_build_settings_path) do |line|
18+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
19+
return matches[1].strip if matches
20+
end
21+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
22+
end
23+
24+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
25+
26+
flutter_ios_podfile_setup
27+
28+
target 'Runner' do
29+
use_frameworks!
30+
use_modular_headers!
31+
32+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
33+
end
34+
35+
post_install do |installer|
36+
installer.pods_project.targets.each do |target|
37+
flutter_additional_ios_build_settings(target)
38+
end
39+
end

0 commit comments

Comments
 (0)