Init max supported H.264 profile at runtime on iOS

Bug: webrtc:9134, webrtc:7992
Change-Id: Id24c570bf3296298901f61ee817a3d7c3f8c6347
Reviewed-on: https://webrtc-review.googlesource.com/71560
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23034}
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index ec69c82..8f8027e 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -372,6 +372,12 @@
         "objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h",
         "objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h",
       ]
+      if (is_ios) {
+        sources += [
+          "objc/Framework/Classes/Video/UIDevice+H264Profile.h",
+          "objc/Framework/Classes/Video/UIDevice+H264Profile.mm",
+        ]
+      }
       if (!build_with_chromium && is_clang) {
         # Suppress warnings from the Chromium Clang plugin
         # (bugs.webrtc.org/163).
@@ -382,6 +388,7 @@
         ":common_objc",
         "../api/video_codecs:video_codecs_api",
         "../common_video",
+        "../media:rtc_h264_profile_id",
         "../media:rtc_media_base",
         "../modules:module_api",
         "../modules/video_coding:video_codec_interface",