Add an example app for iOS native API.

Demonstrates how to use the iOS native API to wrap components into
C++ classes.

This CL also introduces a native API wrapper for the capturer.

The C++ code is forked from the corresponding CL for Android at
https://webrtc-review.googlesource.com/c/src/+/60540

Bug: webrtc:8832
Change-Id: I12d9f30e701c0222628e329218f6d5bfca26e6e0
Reviewed-on: https://webrtc-review.googlesource.com/61422
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22484}
diff --git a/examples/BUILD.gn b/examples/BUILD.gn
index e3d1079..1fd9168 100644
--- a/examples/BUILD.gn
+++ b/examples/BUILD.gn
@@ -392,6 +392,66 @@
         "{{bundle_resources_dir}}/{{source_file_part}}",
       ]
     }
+
+    rtc_static_library("ObjCNativeAPIDemo_lib") {
+      testonly = true
+      sources = [
+        "objcnativeapi/objc/NADAppDelegate.h",
+        "objcnativeapi/objc/NADAppDelegate.m",
+        "objcnativeapi/objc/NADViewController.h",
+        "objcnativeapi/objc/NADViewController.mm",
+        "objcnativeapi/objc/objccallclient.h",
+        "objcnativeapi/objc/objccallclient.mm",
+      ]
+
+      if (!build_with_chromium && is_clang) {
+        # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
+        suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+      }
+
+      deps = [
+        "../api:libjingle_peerconnection_api",
+        "../api/audio_codecs:builtin_audio_decoder_factory",
+        "../api/audio_codecs:builtin_audio_encoder_factory",
+        "../logging:rtc_event_log_impl_base",
+        "../media:rtc_audio_video",
+        "../modules/audio_processing:audio_processing",
+        "../pc:libjingle_peerconnection",
+        "../rtc_base:rtc_base",
+        "../sdk:default_codec_factory_objc",
+        "../sdk:framework_objc",
+        "../sdk:native_api",
+        "../sdk:ui_objc",
+        "../sdk:videotoolbox_objc",
+        "../system_wrappers:field_trial_default",
+        "../system_wrappers:metrics_default",
+        "../system_wrappers:runtime_enabled_features_default",
+      ]
+
+      if (current_cpu == "arm64") {
+        deps += [ "../sdk:metal_objc" ]
+      }
+    }
+
+    ios_app_bundle("ObjCNativeAPIDemo") {
+      testonly = true
+      sources = [
+        "objcnativeapi/objc/main.m",
+      ]
+
+      info_plist = "objcnativeapi/Info.plist"
+
+      configs += [ "..:common_config" ]
+      public_configs = [ "..:common_inherited_config" ]
+
+      deps = [
+        ":ObjCNativeAPIDemo_lib",
+      ]
+
+      if (target_cpu == "x86") {
+        deps += [ "//testing/iossim:iossim" ]
+      }
+    }
   }
 
   if (is_mac) {