Update outdated platform directories in examples (#91125)

The first of three or four changes to update the platform directories of the packages in the Flutter repo that have out date platform code.

This batch includes updating the flutter_view example, updating the sanity check numbers in analyze.dart, and adding some missing Podfiles in the examples. I also eliminated some trailing whitespace in the templates for Android.
diff --git a/examples/api/ios/Podfile b/examples/api/ios/Podfile
new file mode 100644
index 0000000..1e8c3c9
--- /dev/null
+++ b/examples/api/ios/Podfile
@@ -0,0 +1,41 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# 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', '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 Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+  use_frameworks!
+  use_modular_headers!
+
+  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    flutter_additional_ios_build_settings(target)
+  end
+end
diff --git a/examples/api/macos/Podfile b/examples/api/macos/Podfile
new file mode 100644
index 0000000..dade8df
--- /dev/null
+++ b/examples/api/macos/Podfile
@@ -0,0 +1,40 @@
+platform :osx, '10.11'
+
+# 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__))
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    flutter_additional_macos_build_settings(target)
+  end
+end
diff --git a/examples/flutter_view/.metadata b/examples/flutter_view/.metadata
new file mode 100644
index 0000000..1b06421
--- /dev/null
+++ b/examples/flutter_view/.metadata
@@ -0,0 +1,10 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+  revision: ab51a0260d29d50800ae5c9665ecb01883a9b503
+  channel: master
+
+project_type: app
diff --git a/examples/flutter_view/android/app/src/main/AndroidManifest.xml b/examples/flutter_view/android/app/src/main/AndroidManifest.xml
index 9b105de..d37c4ea 100644
--- a/examples/flutter_view/android/app/src/main/AndroidManifest.xml
+++ b/examples/flutter_view/android/app/src/main/AndroidManifest.xml
@@ -22,5 +22,8 @@
                 <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
     </application>
 </manifest>
diff --git a/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values-night/styles.xml b/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values-night/styles.xml
index 449a9f9..3db14bb 100644
--- a/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values-night/styles.xml
+++ b/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values-night/styles.xml
@@ -10,7 +10,7 @@
          This theme determines the color of the Android Window while your
          Flutter UI initializes, as well as behind your Flutter UI while its
          running.
-         
+
          This Theme is only used starting with V2 of Flutter's Android embedding. -->
     <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
         <item name="android:windowBackground">?android:colorBackground</item>
diff --git a/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values/styles.xml b/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values/styles.xml
index d74aa35..d460d1e 100644
--- a/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values/styles.xml
+++ b/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/res/values/styles.xml
@@ -10,7 +10,7 @@
          This theme determines the color of the Android Window while your
          Flutter UI initializes, as well as behind your Flutter UI while its
          running.
-         
+
          This Theme is only used starting with V2 of Flutter's Android embedding. -->
     <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
         <item name="android:windowBackground">?android:colorBackground</item>