[
  {
    "path": ".github/workflows/main.yml",
    "content": "name: Close new issues with template\n\non:\n  issues:\n    types: [opened]\n\njobs:\n    close-new-issues:\n        runs-on: ubuntu-latest\n        steps:\n        - uses: actions/checkout@v2\n        - uses: actions/github-script@v3\n          with:\n            github-token: ${{secrets.GITHUB_TOKEN}}\n            script: |\n              msg = `Dear developers. You will not be able to create new bug reports on GitHub after 28 April, and existing tickets will be automatically closed.\\n\n              Instead, please use the bug report (https://developers.facebook.com/support/bugs/) tool to report a bug on Audience Network. Our engineers will get back to you as soon as possible.\\n\n              If you have any other questions or suggestions relating to Facebook Audience Network, please use the online publisher support portal (https://www.facebook.com/business/publishersupport?hc_location=ufi) to submit a request.`\n              issue = await github.issues.get({\n                owner: context.issue.owner,\n                repo: context.issue.repo,\n                issue_number: context.issue.number,\n              });\n              await github.issues.createComment({\n                owner: context.issue.owner,\n                repo: context.issue.repo,\n                issue_number: context.issue.number,\n                body: msg,\n              });\n              await github.issues.update({\n                owner: context.issue.owner,\n                repo: context.issue.repo,\n                issue_number: context.issue.number,\n                state: \"closed\"\n              });\n\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\nxcuserdata/\n*.xcuserdatad\n*.xcuserstate\n*.hmap\n*.ipa\n*.dSYM.zip\n*.dSYM\n\nPods/\nbuild/\nDerivedData/\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "<H1>Contributing to audience-network-support</H1>\nWe want to make contributing to this project as easy and transparent as possible.\n\n<h2>Pull Requests</h2>\n\nWe actively welcome your pull requests.\n\n<ul>\n<li>Fork the repo and create your branch from master.</li>\n<li>If you've changed APIs, update the documentation.</li>\n<li>If you haven't already, complete the Contributor License Agreement (\"CLA\").</li>\n</ul>\n\n<h2>Contributor License Agreement (\"CLA\")</h2>\n\nIn order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.\n\nComplete your CLA here: <a href=\"https://code.facebook.com/cla\">https://code.facebook.com/cla</a>\n\n<h2>Issues</h2>\n\nWe use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.\n\nFacebook has a <a href=\"https://www.facebook.com/whitehat\">bounty program</a> for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2016-present, Facebook, Inc. All rights reserved.\n\nYou are hereby granted a non-exclusive, worldwide, royalty-free license to use,\ncopy, modify, and distribute this software in source code or binary form for use\nin connection with the web services and APIs provided by Facebook.\n\nAs with any software that integrates with the Facebook platform, your use of\nthis software is subject to the Facebook Developer Principles and Policies\n[http://developers.facebook.com/policy/]. This copyright notice shall be\nincluded in all copies or substantial portions of the software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Audience Network Samples\n\nIn this repository there are sample code that demonstrates how to use Facebook [Audience Network](https://developers.facebook.com/docs/audience-network).\n\n## Samples\n\n* [Android](./samples/android)\n* [iOS](./samples/ios)\n* [Facebook Audience Reporting API Samples](./samples/python)\n\n## Support\n\nYou can see our [developers' site][1] for documentation on using the SDK.\n\nFrom 28 April 2021, if you are having technical issues or experiencing bugs, please use the [bug report][2] tool to report a bug on  `Audience Network`. Our engineers will get back to you as soon as possible.\n\nIf you have any other questions or suggestions relating to Facebook Audience Network, please use the online [publisher support portal][3] to submit a request.\n\n[1]: https://developers.facebook.com/docs/audience-network\n[2]: https://developers.facebook.com/support/bugs/\n[3]: https://www.facebook.com/business/publishersupport?hc_location=ufi\n"
  },
  {
    "path": "samples/android/.gitignore",
    "content": "admob.xml\n\n# Built application files\n*.apk\n*.ap_\n\n# Files for the ART/Dalvik VM\n*.dex\n\n# Java class files\n*.class\n\n# Generated files\nbin/\ngen/\nout/\n\n# Gradle files\n.gradle/\ngradle/\nbuild/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Proguard folder generated by Eclipse\nproguard/\n\n# Log Files\n*.log\n\n# Android Studio Navigation editor temp files\n.navigation/\n\n# Android Studio captures folder\ncaptures/\n\n# Intellij\n*.iml\n.idea\n\n# Keystore files\n*.jks\n\n# External native build folder generated in Android Studio 2.2 and later\n.externalNativeBuild\n\ngoogle-services.json\n"
  },
  {
    "path": "samples/android/AdUnitsSample/.gitignore",
    "content": "BUCK\n*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor.xml\n/.idea/assetWizardSettings.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": "samples/android/AdUnitsSample/LICENSE",
    "content": "Copyright (c) Meta Platforms, Inc. and affiliates.\nAll rights reserved.\n\nYou are hereby granted a non-exclusive, worldwide, royalty-free license to use,\ncopy, modify, and distribute this software in source code or binary form for use\nin connection with the web services and APIs provided by Facebook.\n\nAs with any software that integrates with the Facebook platform, your use of\nthis software is subject to the Facebook Platform Policy\n[http://developers.facebook.com/policy/]. This copyright notice shall be\nincluded in all copies or substantial portions of the software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "samples/android/AdUnitsSample/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nrepositories {\n  flatDir {\n    dirs 'libs'\n  }\n}\n\ndependencies {\n    implementation(name: 'AudienceNetwork', ext: 'aar')\n    implementation(name: 'DebugSettings', ext: 'aar')\n\n    implementation \"androidx.legacy:legacy-support-v4:$project.ANDROIDX_VERSION\"\n    implementation \"androidx.recyclerview:recyclerview:$project.ANDROIDX_VERSION\"\n    implementation \"androidx.appcompat:appcompat:$project.ANDROIDX_VERSION\"\n    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'\n    implementation \"com.google.android.gms:play-services-basement:$project.ANDROID_GOOGLE_PLAY_SERVICES_VERSION\"\n}\n\nandroid {\n    compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)\n    buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION\n    useLibrary 'org.apache.http.legacy'\n    defaultConfig {\n        applicationId 'com.facebook.samples.AdUnitsSample'\n        minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)\n        targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)\n        versionCode 1\n        versionName '1.0'\n        rootProject.ext.variantRelease = false\n    }\n    lintOptions {\n        abortOnError false\n    }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/songqian/android-sdk-macosx/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest package=\"com.facebook.samples.AdUnitsSample\"\n          xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\n    <uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\n\n    <application\n        android:name=\".AdUnitsSampleApplication\"\n        android:icon=\"@drawable/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:supportsRtl=\"true\"\n        android:networkSecurityConfig=\"@xml/network_security_config\"\n        android:localeConfig=\"@xml/locales_config\"\n        >\n        <activity\n            android:name=\".AdUnitsSampleActivity\"\n            android:label=\"@string/app_name\"\n            android:exported=\"false\"\n            />\n        <activity\n            android:name=\".SampleListActivity\"\n            android:exported=\"false\"\n            />\n        <activity\n            android:name=\".SplashActivity\"\n            android:noHistory=\"true\"\n            android:exported=\"true\"\n            >\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity\n            android:name=\"com.facebook.samples.ads.debugsettings.DebugSettingsActivity\"\n            android:exported=\"false\"\n            />\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/AndroidManifestVariables.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.facebook.samples.AdUnitsSample\">\n    <!-- Fake manifest file to define list of BUCK variables -->\n\n    <uses-sdk\n        android:minSdkVersion=\"21\"\n        android:targetSdkVersion=\"36\" />\n\n</manifest>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/AdUnitsSampleActivity.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.view.Menu;\nimport android.view.MenuInflater;\nimport android.view.MenuItem;\nimport android.widget.LinearLayout;\nimport androidx.fragment.app.Fragment;\nimport androidx.fragment.app.FragmentActivity;\nimport com.facebook.common.preconditions.Preconditions;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.fragments.BannerFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.InterstitialFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.MultiLoadInterstitialFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.NativeAdHScrollFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.NativeAdRecyclerFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.NativeAdSampleFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.NativeAdTemplateFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.NativeBannerAdFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.NativeBannerAdTemplateFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.RectangleFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.RewardedInterstitialFragment;\nimport com.facebook.samples.AdUnitsSample.fragments.RewardedVideoFragment;\nimport com.facebook.samples.ads.debugsettings.DebugSettingsActivity;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class AdUnitsSampleActivity extends FragmentActivity {\n\n  public static final String SAMPLE_TYPE = \"SAMPLE_TYPE\";\n\n  @Override\n  public void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\n    // If you call AudienceNetworkAds.buildInitSettings(Context).initialize()\n    // in Application.onCreate() this call is not really necessary.\n    // Otherwise call initialize() onCreate() of all Activities that contain ads or\n    // from onCreate() of your Splash Activity.\n    AudienceNetworkInitializeHelper.initialize(this);\n\n    setContentView(R.layout.activity_ad_sample);\n    LinearLayout rootLayout = findViewById(R.id.activity_ad_sample);\n    // added check for Android 35 to fix system toolbar issue\n    // used hard coded value, as VANILLA_ICE_CREAM won't be available for older versions\n    if (rootLayout != null && android.os.Build.VERSION.SDK_INT >= 35) {\n      rootLayout.setFitsSystemWindows(true);\n    }\n    if (savedInstanceState != null) {\n      return;\n    }\n\n    Intent intent = getIntent();\n    String sampleType = intent.getStringExtra(SAMPLE_TYPE);\n    Fragment fragment = null;\n\n    if (sampleType == null) {\n      return;\n    }\n\n    // Basic ad unit sample types\n    AdUnitsSampleType type = AdUnitsSampleType.getSampleTypeFromName(sampleType);\n    if (type != null) {\n      switch (type) {\n        case BANNER:\n          fragment = new BannerFragment();\n          break;\n        case RECTANGLE:\n          fragment = new RectangleFragment();\n          break;\n        case INTERSTITIAL:\n          fragment = new InterstitialFragment();\n          break;\n        case MULTI_LOAD_INTERSTITIAL:\n          fragment = new MultiLoadInterstitialFragment();\n          break;\n        case REWARDED_VIDEO:\n          fragment = new RewardedVideoFragment();\n          break;\n        case REWARDED_INTERSTITIAL:\n          fragment = new RewardedInterstitialFragment();\n          break;\n        case NATIVE:\n          fragment = new NativeAdSampleFragment();\n          break;\n        case NATIVE_BANNER:\n          fragment = NativeBannerAdFragment.newInstance(false);\n          break;\n        case NATIVE_BANNER_WITH_IMAGE_VIEW:\n          fragment = NativeBannerAdFragment.newInstance(true);\n          break;\n        case RECYCLERVIEW:\n          fragment = new NativeAdRecyclerFragment();\n          break;\n        case HSCROLL:\n          fragment = new NativeAdHScrollFragment();\n          break;\n        case TEMPLATE:\n          fragment = new NativeAdTemplateFragment();\n          break;\n        case BANNER_TEMPLATE:\n          fragment = new NativeBannerAdTemplateFragment();\n          break;\n      }\n      Preconditions.checkNotNull(fragment).setRetainInstance(true);\n      setTitle(type.getName());\n      getSupportFragmentManager()\n          .beginTransaction()\n          .add(R.id.fragment_container, fragment)\n          .commit();\n    }\n  }\n\n  @Override\n  public boolean onCreateOptionsMenu(Menu menu) {\n    MenuInflater inflater = getMenuInflater();\n    inflater.inflate(R.menu.ad_units_sample_menu, menu);\n    return true;\n  }\n\n  @Override\n  public boolean onOptionsItemSelected(MenuItem item) {\n    int i = item.getItemId();\n    if (i == R.id.debug_settings) {\n      startActivity(new Intent(getApplicationContext(), DebugSettingsActivity.class));\n      return true;\n    }\n\n    return super.onOptionsItemSelected(item);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/AdUnitsSampleApplication.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample;\n\nimport android.app.Application;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.ads.debugsettings.DebugSettings;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class AdUnitsSampleApplication extends Application {\n\n  @Override\n  public void onCreate() {\n    super.onCreate();\n\n    DebugSettings.initialize(this);\n\n    AudienceNetworkInitializeHelper.initialize(this);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/AdUnitsSampleType.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample;\n\nimport androidx.annotation.Nullable;\nimport com.facebook.infer.annotation.Nullsafe;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic enum AdUnitsSampleType {\n  BANNER(\"Banner\"),\n  RECTANGLE(\"Rectangle\"),\n  INTERSTITIAL(\"Interstitial\"),\n  MULTI_LOAD_INTERSTITIAL(\"Multiple Interstitials\"),\n  REWARDED_VIDEO(\"Rewarded Video\"),\n  REWARDED_INTERSTITIAL(\"Rewarded Interstitial\"),\n  NATIVE(\"Native Ad\"),\n  NATIVE_BANNER(\"Native Banner Ad\"),\n  RECYCLERVIEW(\"Native Ad in RecyclerView\"),\n  HSCROLL(\"Native Ad in H-Scroll\"),\n  TEMPLATE(\"Native Ad Template\"),\n  BANNER_TEMPLATE(\"Native Banner Ad Template\"),\n  NATIVE_BANNER_WITH_IMAGE_VIEW(\"Native Banner Ad With ImageView\");\n\n  private final String mName;\n\n  AdUnitsSampleType(String mName) {\n    this.mName = mName;\n  }\n\n  public String getName() {\n    return this.mName;\n  }\n\n  public static @Nullable AdUnitsSampleType getSampleTypeFromName(String name) {\n    for (AdUnitsSampleType type : AdUnitsSampleType.values()) {\n      if (type.getName().contentEquals(name)) {\n        return type;\n      }\n    }\n    return null;\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/AudienceNetworkInitializeHelper.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample;\n\nimport static com.facebook.ads.BuildConfig.DEBUG;\n\nimport android.content.Context;\nimport android.util.Log;\nimport com.facebook.ads.AdSettings;\nimport com.facebook.ads.AudienceNetworkAds;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.ads.debugsettings.DebugSettings;\n\n/** Sample class that shows how to call initialize() method of Audience Network SDK. */\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class AudienceNetworkInitializeHelper implements AudienceNetworkAds.InitListener {\n\n  private final Context mContext;\n\n  private AudienceNetworkInitializeHelper(Context context) {\n    mContext = context;\n  }\n\n  /**\n   * It's recommended to call this method from Application.onCreate(). Otherwise you can call it\n   * from all Activity.onCreate() methods for Activities that contain ads.\n   *\n   * @param context Application or Activity.\n   */\n  static void initialize(Context context) {\n    if (!AudienceNetworkAds.isInitialized(context)) {\n      if (DEBUG) {\n        AdSettings.turnOnSDKDebugger(context);\n      }\n\n      AudienceNetworkAds.buildInitSettings(context)\n          .withInitListener(new AudienceNetworkInitializeHelper(context))\n          .initialize();\n    }\n  }\n\n  @Override\n  public void onInitialized(AudienceNetworkAds.InitResult result) {\n    Log.d(AudienceNetworkAds.TAG, result.getMessage());\n    DebugSettings.onSDKInitialized(mContext);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/SampleListActivity.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample;\n\nimport android.app.ListActivity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.Menu;\nimport android.view.MenuInflater;\nimport android.view.MenuItem;\nimport android.view.View;\nimport android.widget.AdapterView;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.adapters.SampleAdapter;\nimport com.facebook.samples.ads.debugsettings.DebugSettingsActivity;\n\n/** A simple {@link Fragment} subclass. */\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class SampleListActivity extends ListActivity {\n\n  private static final String TAG = SampleListActivity.class.getSimpleName();\n\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\n    setTitle(R.string.select_sample);\n\n    final SampleAdapter adapter = new SampleAdapter(SampleListActivity.this);\n\n    // Bind to our new adapter.\n    setListAdapter(adapter);\n\n    // added check for Android 35 to fix system toolbar issue\n    // used hard coded value, as VANILLA_ICE_CREAM won't be available for older versions\n    if (android.os.Build.VERSION.SDK_INT >= 35) {\n      getListView().setFitsSystemWindows(true);\n    }\n\n    getListView()\n        .setOnItemClickListener(\n            new AdapterView.OnItemClickListener() {\n              @Override\n              public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n                Log.e(TAG, \"List item clicked: \" + position);\n                SampleAdapter.Item item = (SampleAdapter.Item) adapter.getItem(position);\n\n                // NULLSAFE_FIXME[Nullable Dereference]\n                String sampleName = item.getTitle();\n                AdUnitsSampleType type = AdUnitsSampleType.getSampleTypeFromName(sampleName);\n                if (type != null) {\n                  Intent intent = new Intent(SampleListActivity.this, AdUnitsSampleActivity.class);\n                  intent.putExtra(AdUnitsSampleActivity.SAMPLE_TYPE, type.getName());\n                  startActivity(intent);\n                }\n              }\n            });\n  }\n\n  @Override\n  public boolean onCreateOptionsMenu(Menu menu) {\n    MenuInflater inflater = getMenuInflater();\n    inflater.inflate(R.menu.ad_units_sample_menu, menu);\n    return true;\n  }\n\n  @Override\n  public boolean onOptionsItemSelected(MenuItem item) {\n    int i = item.getItemId();\n    if (i == R.id.debug_settings) {\n      startActivity(new Intent(getApplicationContext(), DebugSettingsActivity.class));\n      return true;\n    }\n\n    return super.onOptionsItemSelected(item);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/SplashActivity.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.os.Handler;\nimport android.os.Looper;\nimport android.view.Window;\nimport android.view.WindowManager;\nimport com.facebook.infer.annotation.Nullsafe;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class SplashActivity extends Activity {\n\n  private static final int SPLASH_TIME = 2000;\n\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\n    // If you call AudienceNetworkAds.buildInitSettings(Context).initialize()\n    // in Application.onCreate() this call is not really necessary.\n    // Otherwise call initialize() onCreate() of all Activities that contain ads or\n    // from onCreate() of your Splash Activity.\n    AudienceNetworkInitializeHelper.initialize(this);\n\n    // Hide title and nav bar, must be done before setContentView.\n    requestWindowFeature(Window.FEATURE_NO_TITLE);\n    getWindow()\n        // NULLSAFE_FIXME[Nullable Dereference]\n        .setFlags(\n            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n\n    setContentView(R.layout.activity_splash);\n\n    final Handler handler = new Handler(Looper.getMainLooper());\n    handler.postDelayed(\n        new Runnable() {\n          @Override\n          public void run() {\n            Intent intent = new Intent(SplashActivity.this, SampleListActivity.class);\n            startActivity(intent);\n          }\n        },\n        SPLASH_TIME);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/adapters/NativeAdRecyclerAdapter.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.adapters;\n\nimport android.app.Activity;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport androidx.recyclerview.widget.RecyclerView;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.AdOptionsView;\nimport com.facebook.ads.MediaView;\nimport com.facebook.ads.NativeAd;\nimport com.facebook.ads.NativeAdLayout;\nimport com.facebook.ads.NativeAdListener;\nimport com.facebook.ads.NativeAdsManager;\nimport com.facebook.common.preconditions.Preconditions;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.AdUnitsSample.models.RecyclerPostItem;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class NativeAdRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n  private List<RecyclerPostItem> mPostItems;\n  private List<NativeAd> mAdItems;\n  private NativeAdsManager mNativeAdsManager;\n  private Activity mActivity;\n\n  private static final int AD_DISPLAY_FREQUENCY = 5;\n  private static final int POST_TYPE = 0;\n  private static final int AD_TYPE = 1;\n\n  private static final String TAG = \"NativeAdsManager\";\n\n  public NativeAdRecyclerAdapter(\n      Activity activity, List<RecyclerPostItem> postItems, NativeAdsManager nativeAdsManager) {\n    mNativeAdsManager = nativeAdsManager;\n    mPostItems = postItems;\n    mAdItems = new ArrayList<>();\n    mActivity = activity;\n  }\n\n  @Override\n  public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n    if (viewType == AD_TYPE) {\n      NativeAdLayout inflatedView =\n          (NativeAdLayout)\n              LayoutInflater.from(parent.getContext())\n                  .inflate(R.layout.native_ad_unit, parent, false);\n      return new AdHolder(inflatedView);\n    } else {\n      View inflatedView =\n          LayoutInflater.from(parent.getContext())\n              .inflate(R.layout.recycler_post_item, parent, false);\n      return new PostHolder(inflatedView);\n    }\n  }\n\n  @Override\n  public int getItemViewType(int position) {\n    return position % AD_DISPLAY_FREQUENCY == 0 ? AD_TYPE : POST_TYPE;\n  }\n\n  @Override\n  public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {\n    if (holder.getItemViewType() == AD_TYPE) {\n      NativeAd ad;\n\n      if (mAdItems.size() > position / AD_DISPLAY_FREQUENCY) {\n        ad = mAdItems.get(position / AD_DISPLAY_FREQUENCY);\n      } else {\n        ad =\n            mNativeAdsManager.nextNativeAd(\n                new NativeAdListener() {\n                  @Override\n                  public void onMediaDownloaded(Ad ad) {\n                    // ignore\n                  }\n\n                  @Override\n                  public void onError(Ad ad, AdError error) {\n                    // ignore\n                  }\n\n                  @Override\n                  public void onAdLoaded(Ad ad) {\n                    // ignore\n                  }\n\n                  @Override\n                  public void onAdClicked(Ad ad) {\n                    Log.i(TAG, ((NativeAd) ad).getAdvertiserName() + \" Ad Clicked\");\n                  }\n\n                  @Override\n                  public void onLoggingImpression(Ad ad) {\n                    Log.i(TAG, ((NativeAd) ad).getAdvertiserName() + \" Ad Impression\");\n                  }\n                });\n        if (!Preconditions.checkNotNull(ad).isAdInvalidated()) {\n          mAdItems.add(ad);\n        } else {\n          Log.w(NativeAdRecyclerAdapter.class.getSimpleName(), \"Ad is invalidated!\");\n        }\n      }\n\n      AdHolder adHolder = (AdHolder) holder;\n      adHolder.adChoicesContainer.removeAllViews();\n\n      if (ad != null) {\n\n        adHolder.tvAdTitle.setText(ad.getAdvertiserName());\n        adHolder.tvAdBody.setText(ad.getAdBodyText());\n        adHolder.tvAdSocialContext.setText(ad.getAdSocialContext());\n        adHolder.tvAdSponsoredLabel.setText(R.string.sponsored);\n        adHolder.btnAdCallToAction.setText(ad.getAdCallToAction());\n        adHolder.btnAdCallToAction.setVisibility(\n            ad.hasCallToAction() ? View.VISIBLE : View.INVISIBLE);\n        AdOptionsView adOptionsView = new AdOptionsView(mActivity, ad, adHolder.nativeAdLayout);\n        adHolder.adChoicesContainer.addView(adOptionsView, 0);\n\n        List<View> clickableViews = new ArrayList<>();\n        clickableViews.add(adHolder.ivAdIcon);\n        clickableViews.add(adHolder.mvAdMedia);\n        clickableViews.add(adHolder.btnAdCallToAction);\n        ad.registerViewForInteraction(\n            adHolder.nativeAdLayout, adHolder.mvAdMedia, adHolder.ivAdIcon, clickableViews);\n      }\n    } else {\n      PostHolder postHolder = (PostHolder) holder;\n\n      // Calculate where the next postItem index is by subtracting ads we've shown.\n      int index = position - (position / AD_DISPLAY_FREQUENCY) - 1;\n\n      RecyclerPostItem postItem = mPostItems.get(index);\n      postHolder.tvPostContent.setText(postItem.getPostContent());\n    }\n  }\n\n  @Override\n  public int getItemCount() {\n    return mPostItems.size() + mAdItems.size();\n  }\n\n  private static class PostHolder extends RecyclerView.ViewHolder {\n\n    TextView tvPostContent;\n\n    PostHolder(View view) {\n      super(view);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      tvPostContent = view.findViewById(R.id.tvPostContent);\n    }\n  }\n\n  private static class AdHolder extends RecyclerView.ViewHolder {\n\n    NativeAdLayout nativeAdLayout;\n    MediaView mvAdMedia;\n    MediaView ivAdIcon;\n    TextView tvAdTitle;\n    TextView tvAdBody;\n    TextView tvAdSocialContext;\n    TextView tvAdSponsoredLabel;\n    Button btnAdCallToAction;\n    LinearLayout adChoicesContainer;\n\n    AdHolder(NativeAdLayout adLayout) {\n      super(adLayout);\n\n      nativeAdLayout = adLayout;\n      // NULLSAFE_FIXME[Field Not Nullable]\n      mvAdMedia = adLayout.findViewById(R.id.native_ad_media);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      tvAdTitle = adLayout.findViewById(R.id.native_ad_title);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      tvAdBody = adLayout.findViewById(R.id.native_ad_body);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      tvAdSocialContext = adLayout.findViewById(R.id.native_ad_social_context);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      tvAdSponsoredLabel = adLayout.findViewById(R.id.native_ad_sponsored_label);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      btnAdCallToAction = adLayout.findViewById(R.id.native_ad_call_to_action);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      ivAdIcon = adLayout.findViewById(R.id.native_ad_icon);\n      // NULLSAFE_FIXME[Field Not Nullable]\n      adChoicesContainer = adLayout.findViewById(R.id.ad_choices_container);\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/adapters/SampleAdapter.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.adapters;\n\nimport android.content.Context;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ArrayAdapter;\nimport android.widget.TextView;\nimport com.facebook.common.preconditions.Preconditions;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.AdUnitsSampleType;\nimport com.facebook.samples.AdUnitsSample.R;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class SampleAdapter extends ArrayAdapter<SampleAdapter.Item> {\n\n  public static class Item {\n    private String title;\n    private boolean isSection;\n\n    public Item(String title, boolean isSection) {\n      this.title = title;\n      this.isSection = isSection;\n    }\n\n    public Item(String title) {\n      this(title, false);\n    }\n\n    public String getTitle() {\n      return title;\n    }\n  }\n\n  private Context context;\n  private LayoutInflater inflater;\n\n  public SampleAdapter(Context context) {\n    super(context, 0);\n\n    this.context = context;\n\n    // Add the samples and section headers\n    add(new Item(\"Basic Samples\", true));\n    add(new Item(AdUnitsSampleType.BANNER.getName()));\n    add(new Item(AdUnitsSampleType.RECTANGLE.getName()));\n    add(new Item(AdUnitsSampleType.INTERSTITIAL.getName()));\n    add(new Item(AdUnitsSampleType.MULTI_LOAD_INTERSTITIAL.getName()));\n    add(new Item(AdUnitsSampleType.REWARDED_VIDEO.getName()));\n    add(new Item(AdUnitsSampleType.REWARDED_INTERSTITIAL.getName()));\n\n    // Native ad samples\n    add(new Item(\"Native Ad Samples\", true));\n    add(new Item(AdUnitsSampleType.NATIVE.getName()));\n    add(new Item(AdUnitsSampleType.NATIVE_BANNER.getName()));\n    add(new Item(AdUnitsSampleType.RECYCLERVIEW.getName()));\n    add(new Item(AdUnitsSampleType.HSCROLL.getName()));\n    add(new Item(AdUnitsSampleType.TEMPLATE.getName()));\n    add(new Item(AdUnitsSampleType.BANNER_TEMPLATE.getName()));\n    add(new Item(AdUnitsSampleType.NATIVE_BANNER_WITH_IMAGE_VIEW.getName()));\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    this.inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n  }\n\n  @Override\n  public View getView(int position, View convertView, ViewGroup parent) {\n    View v = convertView;\n    final Item item = (Item) getItem(position);\n    if (item != null) {\n      if (item.isSection) {\n        v = inflater.inflate(R.layout.list_item_section, parent, false);\n        v.setOnClickListener(null);\n        v.setOnLongClickListener(null);\n        v.setLongClickable(false);\n\n        final TextView title = (TextView) v.findViewById(R.id.list_item_section_text);\n        Preconditions.checkNotNull(title).setText(item.title);\n      } else {\n        v = inflater.inflate(android.R.layout.simple_list_item_1, parent, false);\n        final TextView title = (TextView) v.findViewById(android.R.id.text1);\n        Preconditions.checkNotNull(title).setText(item.title);\n      }\n    }\n    return v;\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/BannerFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.AdListener;\nimport com.facebook.ads.AdSize;\nimport com.facebook.ads.AdView;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\n\npublic class BannerFragment extends Fragment implements AdListener {\n\n  private static final String TAG = BannerFragment.class.getSimpleName();\n\n  private RelativeLayout bannerAdContainer;\n  private Button refreshBannerButton;\n  private TextView bannerStatusLabel;\n  private @Nullable AdView bannerAdView;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n    View view = inflater.inflate(R.layout.fragment_banner, container, false);\n\n    bannerStatusLabel = (TextView) view.findViewById(R.id.bannerStatusLabel);\n    bannerAdContainer = (RelativeLayout) view.findViewById(R.id.bannerAdContainer);\n    refreshBannerButton = (Button) view.findViewById(R.id.refreshBannerButton);\n    refreshBannerButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            loadAdView();\n          }\n        });\n    loadAdView();\n    return view;\n  }\n\n  @Override\n  public void onDestroyView() {\n    bannerAdContainer.removeView(bannerAdView);\n    super.onDestroyView();\n  }\n\n  @Override\n  public void onDestroy() {\n    if (bannerAdView != null) {\n      bannerAdView.destroy();\n      bannerAdView = null;\n    }\n    super.onDestroy();\n  }\n\n  private void loadAdView() {\n    if (bannerAdView != null) {\n      bannerAdView.destroy();\n      bannerAdView = null;\n    }\n\n    // Update progress message\n    setLabel(getString(R.string.loading_status));\n\n    // Create a banner's ad view with a unique placement ID (generate your own on the Facebook\n    // app settings). Use different ID for each ad placement in your app.\n    boolean isTablet = getResources().getBoolean(R.bool.is_tablet);\n    bannerAdView =\n        new AdView(\n            this.getActivity(),\n            \"YOUR_PLACEMENT_ID\",\n            isTablet ? AdSize.BANNER_HEIGHT_90 : AdSize.BANNER_HEIGHT_50);\n\n    // Reposition the ad and add it to the view hierarchy.\n    bannerAdContainer.addView(bannerAdView);\n\n    // Initiate a request to load an ad.\n    bannerAdView.loadAd(bannerAdView.buildLoadAdConfig().withAdListener(this).build());\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    if (ad == bannerAdView) {\n      setLabel(\"Ad failed to load: \" + error.getErrorMessage());\n    }\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (ad == bannerAdView) {\n      setLabel(\"\");\n    }\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    DebugToast.show(requireActivity(), \"Ad Clicked\", Toast.LENGTH_SHORT);\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    Log.d(TAG, \"onLoggingImpression\");\n  }\n\n  private void setLabel(String status) {\n    bannerStatusLabel.setText(status);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/InterstitialFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.CacheFlag;\nimport com.facebook.ads.InterstitialAd;\nimport com.facebook.ads.InterstitialAdExtendedListener;\nimport com.facebook.ads.RewardData;\nimport com.facebook.common.preconditions.Preconditions;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\nimport java.util.EnumSet;\nimport javax.annotation.Nullable;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class InterstitialFragment extends Fragment implements InterstitialAdExtendedListener {\n\n  private static final String TAG = InterstitialFragment.class.getSimpleName();\n\n  private TextView interstitialAdStatusLabel;\n  private Button loadInterstitialButton;\n  private Button showInterstitialButton;\n  @Nullable private InterstitialAd interstitialAd;\n\n  private String statusLabel = \"\";\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n    View view = inflater.inflate(R.layout.fragment_interstitial, container, false);\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    interstitialAdStatusLabel = (TextView) view.findViewById(R.id.interstitialAdStatusLabel);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    loadInterstitialButton = (Button) view.findViewById(R.id.loadInterstitialButton);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    showInterstitialButton = (Button) view.findViewById(R.id.showInterstitialButton);\n\n    loadInterstitialButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (interstitialAd != null) {\n              interstitialAd.destroy();\n              interstitialAd = null;\n            }\n            setLabel(\"Loading interstitial ad...\");\n\n            // Create the interstitial unit with a placement ID (generate your own on the Facebook\n            // app settings).\n            // Use different ID for each ad placement in your app.\n            interstitialAd =\n                // NULLSAFE_FIXME[Parameter Not Nullable]\n                new InterstitialAd(InterstitialFragment.this.getActivity(), \"YOUR_PLACEMENT_ID\");\n\n            // Load a new interstitial.\n            InterstitialAd.InterstitialLoadAdConfig loadAdConfig =\n                interstitialAd\n                    .buildLoadAdConfig()\n                    // Set a listener to get notified on changes\n                    // or when the user interact with the ad.\n                    .withAdListener(InterstitialFragment.this)\n                    .withCacheFlags(EnumSet.of(CacheFlag.VIDEO))\n                    .withRewardData(new RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\", 10))\n                    .build();\n            interstitialAd.loadAd(loadAdConfig);\n          }\n        });\n\n    showInterstitialButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (interstitialAd == null\n                || !interstitialAd.isAdLoaded()\n                || interstitialAd.isAdInvalidated()) {\n              // Ad not ready to show.\n              setLabel(\"Ad not loaded. Click load to request an ad.\");\n            } else {\n              // Ad was loaded, show it!\n              setLabel(\"\");\n              interstitialAd.show();\n            }\n          }\n        });\n    return view;\n  }\n\n  @Override\n  public void onDestroy() {\n    if (interstitialAd != null) {\n      interstitialAd.destroy();\n      interstitialAd = null;\n    }\n    super.onDestroy();\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    if (ad == interstitialAd) {\n      setLabel(\"Interstitial ad failed to load: \" + error.getErrorMessage());\n    }\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (ad == interstitialAd) {\n      setLabel(\"Ad loaded. Click show to present!\");\n    }\n  }\n\n  @Override\n  public void onInterstitialDisplayed(Ad ad) {\n    showToast(\"Interstitial Displayed\");\n  }\n\n  @Override\n  public void onInterstitialDismissed(Ad ad) {\n    showToast(\"Interstitial Dismissed\");\n\n    // Cleanup.\n    Preconditions.checkNotNull(interstitialAd).destroy();\n    interstitialAd = null;\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    showToast(\"Interstitial Clicked\");\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    Log.d(TAG, \"onLoggingImpression\");\n    showToast(\"Interstitial Impression\");\n  }\n\n  private void setLabel(String label) {\n    statusLabel = label;\n    if (interstitialAdStatusLabel != null) {\n      interstitialAdStatusLabel.setText(statusLabel);\n    }\n  }\n\n  @Override\n  public void onRewardedAdCompleted() {\n    showToast(\"Reward Received\");\n  }\n\n  @Override\n  public void onRewardedAdServerSucceeded() {\n    showToast(\"Server success!\");\n  }\n\n  @Override\n  public void onRewardedAdServerFailed() {\n    showToast(\"Server failure\");\n  }\n\n  @Override\n  public void onInterstitialActivityDestroyed() {\n    showToast(\"Activity destroyed\");\n  }\n\n  private void showToast(String message) {\n    Log.d(TAG, message);\n    if (isAdded()) {\n      DebugToast.show(requireActivity(), message, Toast.LENGTH_SHORT);\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/MultiLoadInterstitialFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.CacheFlag;\nimport com.facebook.ads.InterstitialAd;\nimport com.facebook.ads.InterstitialAdExtendedListener;\nimport com.facebook.ads.RewardData;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\nimport java.util.EnumSet;\n\npublic class MultiLoadInterstitialFragment extends Fragment\n    implements InterstitialAdExtendedListener {\n\n  private static final String TAG = MultiLoadInterstitialFragment.class.getSimpleName();\n\n  @Nullable private TextView mInterstitialAdStatusLabel;\n  @Nullable private Button mLoadInterstitialButton;\n  @Nullable private Button mShowInterstitialButton;\n  @Nullable private InterstitialAd mInterstitialAd;\n\n  @Nullable private TextView mInterstitialAdStatusLabel2;\n  @Nullable private Button mLoadInterstitialButton2;\n  @Nullable private Button mShowInterstitialButton2;\n  @Nullable private InterstitialAd mInterstitialAd2;\n\n  @Nullable private TextView mInterstitialAdStatusLabel3;\n  @Nullable private Button mLoadInterstitialButton3;\n  @Nullable private Button mShowInterstitialButton3;\n  @Nullable private InterstitialAd mInterstitialAd3;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n    View view = inflater.inflate(R.layout.fragment_multi_load_interstitial, container, false);\n\n    mInterstitialAdStatusLabel = (TextView) view.findViewById(R.id.interstitialAdStatusLabel);\n    mLoadInterstitialButton = (Button) view.findViewById(R.id.loadInterstitialButton);\n    mShowInterstitialButton = (Button) view.findViewById(R.id.showInterstitialButton);\n\n    if (mInterstitialAdStatusLabel == null\n        || mLoadInterstitialButton == null\n        || mShowInterstitialButton == null) {\n      return view;\n    }\n    mLoadInterstitialButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (mInterstitialAd != null) {\n              mInterstitialAd.destroy();\n              mInterstitialAd = null;\n            }\n            setLabel(mInterstitialAdStatusLabel, \"Loading interstitial ad...\");\n            // Create the interstitial unit with a placement ID (generate your own on the Facebook\n            // app settings).\n            // Use different ID for each ad placement in your app.\n            mInterstitialAd =\n                new InterstitialAd(\n                    MultiLoadInterstitialFragment.this.requireActivity(), \"YOUR_PLACEMENT_ID\");\n\n            // Load a new interstitial.\n            InterstitialAd.InterstitialLoadAdConfig loadAdConfig =\n                mInterstitialAd\n                    .buildLoadAdConfig()\n                    // Set a listener to get notified on changes\n                    // or when the user interact with the ad.\n                    .withAdListener(MultiLoadInterstitialFragment.this)\n                    .withCacheFlags(EnumSet.of(CacheFlag.VIDEO))\n                    .withRewardData(new RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\", 10))\n                    .build();\n            mInterstitialAd.loadAd(loadAdConfig);\n          }\n        });\n\n    mShowInterstitialButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (mInterstitialAd == null\n                || !mInterstitialAd.isAdLoaded()\n                || mInterstitialAd.isAdInvalidated()) {\n              // Ad not ready to show.\n              setLabel(mInterstitialAdStatusLabel, \"Ad not loaded. Click load to request an ad.\");\n            } else {\n              // Ad was loaded, show it!\n              mInterstitialAd.show();\n              setLabel(mInterstitialAdStatusLabel, \"\");\n            }\n          }\n        });\n\n    mInterstitialAdStatusLabel2 = (TextView) view.findViewById(R.id.interstitialAdStatusLabel2);\n    mLoadInterstitialButton2 = (Button) view.findViewById(R.id.loadInterstitialButton2);\n    mShowInterstitialButton2 = (Button) view.findViewById(R.id.showInterstitialButton2);\n\n    if (mInterstitialAdStatusLabel2 == null\n        || mLoadInterstitialButton2 == null\n        || mShowInterstitialButton2 == null) {\n      return view;\n    }\n\n    mLoadInterstitialButton2.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (mInterstitialAd2 != null) {\n              mInterstitialAd2.destroy();\n              mInterstitialAd2 = null;\n            }\n            setLabel(mInterstitialAdStatusLabel2, \"Loading interstitial ad...\");\n            // Create the interstitial unit with a placement ID (generate your own on the Facebook\n            // app settings).\n            // Use different ID for each ad placement in your app.\n            mInterstitialAd2 =\n                new InterstitialAd(\n                    MultiLoadInterstitialFragment.this.requireActivity(), \"YOUR_PLACEMENT_ID\");\n\n            // Load a new interstitial.\n            InterstitialAd.InterstitialLoadAdConfig loadAdConfig =\n                mInterstitialAd2\n                    .buildLoadAdConfig()\n                    // Set a listener to get notified on changes\n                    // or when the user interact with the ad.\n                    .withAdListener(MultiLoadInterstitialFragment.this)\n                    .withCacheFlags(EnumSet.of(CacheFlag.VIDEO))\n                    .withRewardData(new RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\", 10))\n                    .build();\n            mInterstitialAd2.loadAd(loadAdConfig);\n          }\n        });\n\n    mShowInterstitialButton2.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (mInterstitialAd2 == null\n                || !mInterstitialAd2.isAdLoaded()\n                || mInterstitialAd2.isAdInvalidated()) {\n              // Ad not ready to show.\n              setLabel(mInterstitialAdStatusLabel2, \"Ad not loaded. Click load to request an ad.\");\n\n            } else {\n              // Ad was loaded, show it!\n              mInterstitialAd2.show();\n              setLabel(mInterstitialAdStatusLabel2, \"\");\n            }\n          }\n        });\n\n    mInterstitialAdStatusLabel3 = (TextView) view.findViewById(R.id.interstitialAdStatusLabel3);\n    mLoadInterstitialButton3 = (Button) view.findViewById(R.id.loadInterstitialButton3);\n    mShowInterstitialButton3 = (Button) view.findViewById(R.id.showInterstitialButton3);\n\n    if (mInterstitialAdStatusLabel3 == null\n        || mLoadInterstitialButton3 == null\n        || mShowInterstitialButton3 == null) {\n      return view;\n    }\n\n    mLoadInterstitialButton3.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (mInterstitialAd3 != null) {\n              mInterstitialAd3.destroy();\n              mInterstitialAd3 = null;\n            }\n            setLabel(mInterstitialAdStatusLabel3, \"Loading interstitial ad...\");\n            // Create the interstitial unit with a placement ID (generate your own on the Facebook\n            // app settings).\n            // Use different ID for each ad placement in your app.\n            mInterstitialAd3 =\n                new InterstitialAd(\n                    MultiLoadInterstitialFragment.this.requireActivity(), \"YOUR_PLACEMENT_ID\");\n\n            // Load a new interstitial.\n            InterstitialAd.InterstitialLoadAdConfig loadAdConfig =\n                mInterstitialAd3\n                    .buildLoadAdConfig()\n                    // Set a listener to get notified on changes\n                    // or when the user interact with the ad.\n                    .withAdListener(MultiLoadInterstitialFragment.this)\n                    .withCacheFlags(EnumSet.of(CacheFlag.VIDEO))\n                    .withRewardData(new RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\", 10))\n                    .build();\n            mInterstitialAd3.loadAd(loadAdConfig);\n          }\n        });\n\n    mShowInterstitialButton3.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View view) {\n            if (mInterstitialAd3 == null\n                || !mInterstitialAd3.isAdLoaded()\n                || mInterstitialAd3.isAdInvalidated()) {\n              // Ad not ready to show.\n              setLabel(mInterstitialAdStatusLabel3, \"Ad not loaded. Click load to request an ad.\");\n            } else {\n              // Ad was loaded, show it!\n              mInterstitialAd3.show();\n              setLabel(mInterstitialAdStatusLabel3, \"\");\n            }\n          }\n        });\n\n    return view;\n  }\n\n  private void destroy(@Nullable InterstitialAd interstitialAd) {\n    if (interstitialAd != null) {\n      interstitialAd.destroy();\n      interstitialAd = null;\n    }\n  }\n\n  @Override\n  public void onDestroy() {\n    super.onDestroy();\n  }\n\n  @Override\n  public void onDestroyView() {\n    super.onDestroyView();\n\n    destroy(mInterstitialAd);\n    destroy(mInterstitialAd2);\n    destroy(mInterstitialAd3);\n    mInterstitialAdStatusLabel = null;\n    mInterstitialAdStatusLabel2 = null;\n    mInterstitialAdStatusLabel3 = null;\n    mLoadInterstitialButton = null;\n    mLoadInterstitialButton2 = null;\n    mLoadInterstitialButton3 = null;\n    mShowInterstitialButton = null;\n    mShowInterstitialButton2 = null;\n    mShowInterstitialButton3 = null;\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    if (ad == mInterstitialAd) {\n      setLabel(\n          mInterstitialAdStatusLabel, \"Interstitial ad failed to load: \" + error.getErrorMessage());\n    } else if (ad == mInterstitialAd2) {\n\n      setLabel(\n          mInterstitialAdStatusLabel2,\n          \"Interstitial ad failed to load: \" + error.getErrorMessage());\n    } else if (ad == mInterstitialAd3) {\n\n      setLabel(\n          mInterstitialAdStatusLabel3,\n          \"Interstitial ad failed to load: \" + error.getErrorMessage());\n    }\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (ad == mInterstitialAd) {\n      setLabel(mInterstitialAdStatusLabel, \"Ad loaded. Click show to present!\");\n    } else if (ad == mInterstitialAd2) {\n\n      setLabel(mInterstitialAdStatusLabel2, \"Ad loaded. Click show to present!\");\n    } else if (ad == mInterstitialAd3) {\n\n      setLabel(mInterstitialAdStatusLabel3, \"Ad loaded. Click show to present!\");\n    }\n  }\n\n  @Override\n  public void onInterstitialDisplayed(Ad ad) {\n    showToast(\"Interstitial Displayed\");\n  }\n\n  @Override\n  public void onInterstitialDismissed(Ad ad) {\n    showToast(\"Interstitial Dismissed\");\n\n    // Cleanup.\n    if (ad == mInterstitialAd) {\n      destroy(mInterstitialAd);\n    } else if (ad == mInterstitialAd2) {\n\n      destroy(mInterstitialAd2);\n    } else if (ad == mInterstitialAd3) {\n\n      destroy(mInterstitialAd3);\n    }\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    showToast(\"Interstitial Clicked\");\n  }\n\n  /** showing toast for tracking impression for manual testing */\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    Log.d(TAG, \"onLoggingImpression\");\n    showToast(\"Interstitial Impression\");\n  }\n\n  private void setLabel(@Nullable TextView interstitialAdStatusLabel, String label) {\n    if (interstitialAdStatusLabel != null) {\n      interstitialAdStatusLabel.setText(label);\n    }\n  }\n\n  @Override\n  public void onRewardedAdCompleted() {}\n\n  @Override\n  public void onRewardedAdServerSucceeded() {}\n\n  @Override\n  public void onRewardedAdServerFailed() {}\n\n  @Override\n  public void onInterstitialActivityDestroyed() {\n    showToast(\"Activity destroyed\");\n  }\n\n  private void showToast(String message) {\n    Log.d(TAG, message);\n    if (isAdded()) {\n      DebugToast.show(requireActivity(), message, Toast.LENGTH_SHORT);\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/NativeAdHScrollFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.LinearLayout;\nimport android.widget.Toast;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.NativeAd;\nimport com.facebook.ads.NativeAdScrollView;\nimport com.facebook.ads.NativeAdsManager;\nimport com.facebook.common.preconditions.Preconditions;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class NativeAdHScrollFragment extends Fragment implements NativeAdsManager.Listener {\n\n  private static final int NATIVE_AD_VIEW_HEIGHT_DP = 300;\n\n  private NativeAdsManager manager;\n  private @Nullable NativeAdScrollView scrollView;\n  private LinearLayout scrollViewContainer;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n    // Inflate the layout for this fragment\n    View view = inflater.inflate(R.layout.fragment_native_ad_hscroll, container, false);\n\n    // Create native options to enable or disable the different options on media\n    NativeAd.NativeOptions nativeOptions =\n        new NativeAd.NativeOptions()\n            .setDisableFullScreen(false)\n            .setHideMediaControls(false)\n            .setUnMuteVolume(false);\n\n    manager = new NativeAdsManager(requireActivity(), \"YOUR_PLACEMENT_ID\", 5, nativeOptions);\n    manager.setListener(this);\n    manager.loadAds(NativeAd.MediaCacheFlag.ALL);\n\n    Button reloadButton = (Button) view.findViewById(R.id.reload_hscroll);\n    Preconditions.checkNotNull(reloadButton)\n        .setOnClickListener(\n            new View.OnClickListener() {\n              @Override\n              public void onClick(View v) {\n                manager.loadAds();\n              }\n            });\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    scrollViewContainer = (LinearLayout) view.findViewById(R.id.hscroll_container);\n\n    return view;\n  }\n\n  @Override\n  public void onAdsLoaded() {\n    if (getActivity() == null) {\n      return;\n    }\n\n    DebugToast.show(getActivity(), \"Ads loaded\", Toast.LENGTH_SHORT);\n\n    if (scrollView != null) {\n      scrollViewContainer.removeView(scrollView);\n    }\n\n    scrollView = new NativeAdScrollView(getActivity(), manager, NATIVE_AD_VIEW_HEIGHT_DP);\n\n    scrollViewContainer.addView(scrollView);\n  }\n\n  @Override\n  public void onAdError(AdError error) {\n    DebugToast.show(requireActivity(), \"Ad error: \" + error.getErrorMessage(), Toast.LENGTH_SHORT);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/NativeAdRecyclerFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport androidx.recyclerview.widget.LinearLayoutManager;\nimport androidx.recyclerview.widget.RecyclerView;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.NativeAd;\nimport com.facebook.ads.NativeAdsManager;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.AdUnitsSample.adapters.NativeAdRecyclerAdapter;\nimport com.facebook.samples.AdUnitsSample.models.RecyclerPostItem;\nimport com.facebook.samples.AdUnitsSample.thirdparty.DividerItemDecoration.DividerItemDecoration;\nimport java.util.ArrayList;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class NativeAdRecyclerFragment extends Fragment implements NativeAdsManager.Listener {\n\n  private ArrayList<RecyclerPostItem> mPostItemList;\n  private NativeAdsManager mNativeAdsManager;\n  private RecyclerView mRecyclerView;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n    // Create some dummy post items\n    mPostItemList = new ArrayList<>();\n    for (int i = 1; i <= 100; i++) {\n      mPostItemList.add(new RecyclerPostItem(\"RecyclerView Item #\" + i));\n    }\n\n    String placement_id = \"YOUR_PLACEMENT_ID\";\n    // Create native options to enable or disable the different options on media\n    NativeAd.NativeOptions nativeOptions =\n        new NativeAd.NativeOptions()\n            .setDisableFullScreen(false)\n            .setHideMediaControls(false)\n            .setUnMuteVolume(false);\n    mNativeAdsManager = new NativeAdsManager(requireActivity(), placement_id, 5, nativeOptions);\n    mNativeAdsManager.loadAds();\n    mNativeAdsManager.setListener(this);\n\n    // Inflate the layout for this fragment\n    View view = inflater.inflate(R.layout.fragment_native_ad_recycler, container, false);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);\n    return view;\n  }\n\n  @Override\n  public void onAdsLoaded() {\n    if (getActivity() == null) {\n      return;\n    }\n\n    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n    RecyclerView.ItemDecoration itemDecoration =\n        new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST);\n    mRecyclerView.addItemDecoration(itemDecoration);\n    NativeAdRecyclerAdapter adapter =\n        new NativeAdRecyclerAdapter(getActivity(), mPostItemList, mNativeAdsManager);\n    mRecyclerView.setAdapter(adapter);\n  }\n\n  @Override\n  public void onAdError(AdError error) {}\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/NativeAdSampleFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.LinearLayout;\nimport android.widget.Switch;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdClosedListener;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.AdOptionsView;\nimport com.facebook.ads.MediaView;\nimport com.facebook.ads.MediaViewListener;\nimport com.facebook.ads.NativeAd;\nimport com.facebook.ads.NativeAdBase.NativeComponentTag;\nimport com.facebook.ads.NativeAdLayout;\nimport com.facebook.ads.NativeAdListener;\nimport com.facebook.common.preconditions.Preconditions;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class NativeAdSampleFragment extends Fragment implements NativeAdListener {\n\n  protected static final String TAG = NativeAdSampleFragment.class.getSimpleName();\n\n  private @Nullable TextView nativeAdStatus;\n  private @Nullable LinearLayout adChoicesContainer;\n\n  private @Nullable NativeAdLayout nativeAdLayout;\n  private @Nullable NativeAd nativeAd;\n  private @Nullable AdOptionsView adOptionsView;\n  // NULLSAFE_FIXME[Field Not Initialized]\n  private MediaView nativeAdMedia;\n  private NativeAd.NativeOptions mNativeOptions;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n    View view = inflater.inflate(R.layout.fragment_native_ad_sample, container, false);\n    nativeAdLayout = view.findViewById(R.id.native_ad_container);\n\n    nativeAdStatus = view.findViewById(R.id.native_ad_status);\n    adChoicesContainer = view.findViewById(R.id.ad_choices_container);\n\n    // Create native options to enable or disable the different options on media\n    mNativeOptions = new NativeAd.NativeOptions();\n\n    Switch disableFullScreenSwitch = view.findViewById(R.id.switch_fullscreen);\n    if (disableFullScreenSwitch != null) {\n      disableFullScreenSwitch.setOnCheckedChangeListener(\n          (compoundButton, isChecked) -> mNativeOptions.setDisableFullScreen(isChecked));\n    }\n\n    Switch unMuteSwitch = view.findViewById(R.id.switch_unmute);\n    if (unMuteSwitch != null) {\n      unMuteSwitch.setOnCheckedChangeListener(\n          (compoundButton, isChecked) -> mNativeOptions.setUnMuteVolume(isChecked));\n    }\n\n    Switch hideMediaControlsSwitch = view.findViewById(R.id.switch_hide_media_controls);\n    if (hideMediaControlsSwitch != null) {\n      hideMediaControlsSwitch.setOnCheckedChangeListener(\n          (compoundButton, isChecked) -> mNativeOptions.setHideMediaControls(isChecked));\n    }\n\n    Button showNativeAdButton = view.findViewById(R.id.load_native_ad_button);\n    Preconditions.checkNotNull(showNativeAdButton)\n        .setOnClickListener(\n            new View.OnClickListener() {\n              @Override\n              public void onClick(View view) {\n                if (nativeAdStatus != null) {\n                  nativeAdStatus.setText(R.string.loading_status);\n                }\n                if (nativeAd != null) {\n                  nativeAd.destroy();\n                }\n\n                // Create a native ad request with a unique placement ID (generate your own on the\n                // Facebook app settings). Use different ID for each ad placement in your app.\n                nativeAd = new NativeAd(requireActivity(), \"YOUR_PLACEMENT_ID\", mNativeOptions);\n\n                // When testing on a device, add its hashed ID to force test ads.\n                // The hash ID is printed to log cat when running on a device and loading an ad.\n                // AdSettings.addTestDevice(\"THE HASHED ID AS PRINTED TO LOG CAT\");\n\n                // Initiate a request to load an ad.\n                nativeAd.loadAd(\n                    nativeAd\n                        .buildLoadAdConfig()\n                        .withAdListener(NativeAdSampleFragment.this)\n                        .build());\n              }\n            });\n\n    // if we already have loaded ad, render it\n    if (nativeAd != null) {\n      onAdLoaded(nativeAd);\n    }\n\n    return view;\n  }\n\n  @Override\n  public void onDestroyView() {\n    adChoicesContainer = null;\n    nativeAdLayout = null;\n    adOptionsView = null;\n    nativeAdStatus = null;\n    super.onDestroyView();\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    if (nativeAdStatus != null) {\n      nativeAdStatus.setText(\"Ad failed to load: \" + error.getErrorMessage());\n    }\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    showToast(\"Ad Clicked\");\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    showToast(\"Native Impression\");\n  }\n\n  @Override\n  public void onMediaDownloaded(Ad ad) {\n    if (nativeAd == ad) {\n      Log.d(TAG, \"onMediaDownloaded\");\n    }\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (nativeAd == null || nativeAd != ad) {\n      // Race condition, load() called again before last ad was displayed\n      return;\n    }\n\n    if (nativeAdLayout == null) {\n      return;\n    }\n\n    // Unregister last ad\n    nativeAd.unregisterView();\n\n    if (nativeAdStatus != null) {\n      nativeAdStatus.setText(\"\");\n    }\n\n    if (!nativeAd.isAdLoaded() || nativeAd.isAdInvalidated()) {\n      if (nativeAdStatus != null) {\n        nativeAdStatus.setText(\"Ad is not loaded or invalidated.\");\n      }\n      return;\n    }\n\n    if (adChoicesContainer != null) {\n      // NULLSAFE_FIXME[Parameter Not Nullable]\n      adOptionsView = new AdOptionsView(getActivity(), nativeAd, nativeAdLayout);\n      adOptionsView.setOnAdClosedListener(\n          new AdClosedListener() {\n            @Override\n            public void onAdClosed() {\n              // Ad closed by user move to next ad\n              showToast(\"Ad closed by user!\");\n            }\n          });\n      adChoicesContainer.removeAllViews();\n      adChoicesContainer.addView(adOptionsView, 0);\n    }\n\n    inflateAd(nativeAd, nativeAdLayout);\n\n    // Registering a touch listener to log which ad component receives the touch event.\n    // We always return false from onTouch so that we don't swallow the touch event (which\n    // would prevent click events from reaching the NativeAd control).\n    // The touch listener could be used to do animations.\n    nativeAd.setOnTouchListener(\n        new View.OnTouchListener() {\n          @Override\n          public boolean onTouch(View view, MotionEvent event) {\n            if (event.getAction() == MotionEvent.ACTION_DOWN) {\n              int i = view.getId();\n              if (i == R.id.native_ad_call_to_action) {\n                Log.d(TAG, \"Call to action button clicked\");\n              } else if (i == R.id.native_ad_media) {\n                Log.d(TAG, \"Main image clicked\");\n              } else {\n                Log.d(TAG, \"Other ad component clicked\");\n              }\n            }\n            return false;\n          }\n        });\n  }\n\n  private void inflateAd(NativeAd nativeAd, View adView) {\n    Log.d(TAG, \"Aspect ratio of ad: \" + nativeAd.getAspectRatio());\n\n    // Create native UI using the ad metadata.\n    MediaView nativeAdIcon = adView.findViewById(R.id.native_ad_icon);\n    TextView nativeAdTitle = adView.findViewById(R.id.native_ad_title);\n    TextView nativeAdBody = adView.findViewById(R.id.native_ad_body);\n    TextView sponsoredLabel = adView.findViewById(R.id.native_ad_sponsored_label);\n    TextView nativeAdSocialContext = adView.findViewById(R.id.native_ad_social_context);\n    Button nativeAdCallToAction = adView.findViewById(R.id.native_ad_call_to_action);\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    nativeAdMedia = adView.findViewById(R.id.native_ad_media);\n    nativeAdMedia.setListener(getMediaViewListener());\n\n    // Setting the Text\n    Preconditions.checkNotNull(nativeAdSocialContext).setText(nativeAd.getAdSocialContext());\n    // NULLSAFE_FIXME[Nullable Dereference]\n    nativeAdCallToAction.setText(nativeAd.getAdCallToAction());\n    // NULLSAFE_FIXME[Nullable Dereference]\n    nativeAdCallToAction.setVisibility(nativeAd.hasCallToAction() ? View.VISIBLE : View.INVISIBLE);\n    // NULLSAFE_FIXME[Nullable Dereference]\n    nativeAdTitle.setText(nativeAd.getAdvertiserName());\n    // NULLSAFE_FIXME[Nullable Dereference]\n    nativeAdBody.setText(nativeAd.getAdBodyText());\n    // NULLSAFE_FIXME[Nullable Dereference]\n    sponsoredLabel.setText(R.string.sponsored);\n\n    // You can use the following to specify the clickable areas.\n    List<View> clickableViews = new ArrayList<>();\n    clickableViews.add(nativeAdIcon);\n    clickableViews.add(nativeAdMedia);\n    clickableViews.add(nativeAdCallToAction);\n    nativeAd.registerViewForInteraction(\n        // NULLSAFE_FIXME[Parameter Not Nullable]\n        nativeAdLayout, nativeAdMedia, nativeAdIcon, clickableViews);\n\n    if (nativeAdMedia.isVideoContent()) {\n      showToast(\"This is video content!!!\");\n      showToast(\"Video duration: \" + nativeAdMedia.getVideoDuration());\n    }\n\n    // Optional: tag views\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    NativeComponentTag.tagView(nativeAdIcon, NativeComponentTag.AD_ICON);\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    NativeComponentTag.tagView(nativeAdTitle, NativeComponentTag.AD_TITLE);\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    NativeComponentTag.tagView(nativeAdBody, NativeComponentTag.AD_BODY);\n    NativeComponentTag.tagView(nativeAdSocialContext, NativeComponentTag.AD_SOCIAL_CONTEXT);\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    NativeComponentTag.tagView(nativeAdCallToAction, NativeComponentTag.AD_CALL_TO_ACTION);\n  }\n\n  @Override\n  public void onDestroy() {\n    if (nativeAdMedia != null) {\n      nativeAdMedia.destroy();\n    }\n\n    if (nativeAd != null) {\n      nativeAd.unregisterView();\n      nativeAd.destroy();\n    }\n\n    super.onDestroy();\n  }\n\n  private static MediaViewListener getMediaViewListener() {\n    return new MediaViewListener() {\n      @Override\n      public void onVolumeChange(MediaView mediaView, float volume) {\n        Log.i(TAG, \"MediaViewEvent: Volume \" + volume);\n      }\n\n      @Override\n      public void onPause(MediaView mediaView) {\n        Log.i(TAG, \"MediaViewEvent: Paused\");\n      }\n\n      @Override\n      public void onPlay(MediaView mediaView) {\n        Log.i(TAG, \"MediaViewEvent: Play\");\n      }\n\n      @Override\n      public void onFullscreenBackground(MediaView mediaView) {\n        Log.i(TAG, \"MediaViewEvent: FullscreenBackground\");\n      }\n\n      @Override\n      public void onFullscreenForeground(MediaView mediaView) {\n        Log.i(TAG, \"MediaViewEvent: FullscreenForeground\");\n      }\n\n      @Override\n      public void onExitFullscreen(MediaView mediaView) {\n        Log.i(TAG, \"MediaViewEvent: ExitFullscreen\");\n      }\n\n      @Override\n      public void onEnterFullscreen(MediaView mediaView) {\n        Log.i(TAG, \"MediaViewEvent: EnterFullscreen\");\n      }\n\n      @Override\n      public void onComplete(MediaView mediaView) {\n        Log.i(TAG, \"MediaViewEvent: Completed\");\n      }\n    };\n  }\n\n  private void showToast(String message) {\n    if (isAdded()) {\n      DebugToast.show(requireActivity(), message, Toast.LENGTH_SHORT);\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/NativeAdTemplateFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport static android.view.ViewGroup.LayoutParams.MATCH_PARENT;\n\nimport android.app.Activity;\nimport android.content.res.Resources;\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.SeekBar;\nimport android.widget.Spinner;\nimport android.widget.TextView;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.NativeAd;\nimport com.facebook.ads.NativeAdListener;\nimport com.facebook.ads.NativeAdView;\nimport com.facebook.ads.NativeAdViewAttributes;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class NativeAdTemplateFragment extends Fragment implements NativeAdListener {\n\n  private static final String TAG = NativeAdTemplateFragment.class.getSimpleName();\n\n  private static final int COLOR_LIGHT_GRAY = 0xff90949c;\n  private static final int COLOR_DARK_GRAY = 0xff4e5665;\n  private static final int COLOR_CTA_BLUE_BG = 0xff4080ff;\n\n  private static final int MIN_HEIGHT_DP = 200;\n  private static final int MAX_HEIGHT_DP = 500;\n  private static final int DEFAULT_HEIGHT_DP = 350;\n  private static final int DEFAULT_PROGRESS_DP = 50;\n\n  private @Nullable NativeAd mNativeAd;\n  private int mLayoutHeightDp = DEFAULT_HEIGHT_DP;\n\n  private int mAdBackgroundColor, mTitleColor, mCtaTextColor, mContentColor, mCtaBgColor;\n\n  private TextView mStatusText;\n  private ViewGroup mNativeAdContainer;\n  private Spinner mBackgroundColorSpinner;\n  private Button mShowCodeButton, mReloadButton;\n  private SeekBar mSeekBar;\n  @Nullable private View mAdView;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n    View view = inflater.inflate(R.layout.fragment_native_ad_template, container, false);\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mStatusText = view.findViewById(R.id.status);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mNativeAdContainer = view.findViewById(R.id.templateContainer);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mShowCodeButton = view.findViewById(R.id.showCodeButton);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mReloadButton = view.findViewById(R.id.reloadAdButton);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mBackgroundColorSpinner = view.findViewById(R.id.backgroundColorSpinner);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mSeekBar = view.findViewById(R.id.seekBar);\n\n    setUpLayoutBuilders();\n    setUpButtons();\n\n    createAndLoadNativeAd();\n\n    return view;\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (mNativeAd == null || mNativeAd != ad) {\n      // Race condition, load() called again before last ad was displayed\n      return;\n    }\n\n    mStatusText.setText(R.string.ad_loaded);\n    reloadAdContainer();\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    String msg = getResources().getString(R.string.ad_load_failed, error.getErrorMessage());\n    mStatusText.setText(msg);\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    mStatusText.setText(R.string.ad_clicked);\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    Log.d(TAG, \"onLoggingImpression\");\n  }\n\n  @Override\n  public void onMediaDownloaded(Ad ad) {\n    Log.d(TAG, \"onMediaDownloaded\");\n  }\n\n  @Override\n  public void onDestroy() {\n    mNativeAd = null;\n    super.onDestroy();\n  }\n\n  private void createAndLoadNativeAd() {\n    // Create a native ad request with a unique placement ID\n    // (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    mNativeAd = new NativeAd(getActivity(), \"YOUR_PLACEMENT_ID\");\n\n    // Initiate a request to load an ad.\n    mNativeAd.loadAd(mNativeAd.buildLoadAdConfig().withAdListener(this).build());\n\n    mStatusText.setText(R.string.ad_loading);\n  }\n\n  private void reloadAdContainer() {\n    Activity activity = getActivity();\n    if (activity != null\n        && mNativeAd != null\n        && mNativeAd.isAdLoaded()\n        && !mNativeAd.isAdInvalidated()) {\n      mNativeAdContainer.removeAllViews();\n\n      // Create a NativeAdViewAttributes object and set the attributes\n      NativeAdViewAttributes attributes =\n          new NativeAdViewAttributes()\n              .setBackgroundColor(mAdBackgroundColor)\n              .setTitleTextColor(mTitleColor)\n              .setDescriptionTextColor(mContentColor)\n              .setButtonBorderColor(mCtaTextColor)\n              .setButtonTextColor(mCtaTextColor)\n              .setButtonColor(mCtaBgColor);\n\n      // Use NativeAdView.render to generate the ad View\n      mAdView = NativeAdView.render(activity, mNativeAd, attributes);\n\n      mNativeAdContainer.addView(mAdView, new ViewGroup.LayoutParams(MATCH_PARENT, 0));\n      updateAdViewParams();\n\n      mShowCodeButton.setText(R.string.show_code);\n    }\n  }\n\n  private void setUpLayoutBuilders() {\n    ArrayAdapter<CharSequence> backgroundColorSpinnerAdapter =\n        ArrayAdapter.createFromResource(\n            // NULLSAFE_FIXME[Parameter Not Nullable]\n            getActivity(), R.array.background_color_array, android.R.layout.simple_spinner_item);\n    backgroundColorSpinnerAdapter.setDropDownViewResource(\n        android.R.layout.simple_spinner_dropdown_item);\n    mBackgroundColorSpinner.setAdapter(backgroundColorSpinnerAdapter);\n\n    mBackgroundColorSpinner.setOnItemSelectedListener(\n        new android.widget.AdapterView.OnItemSelectedListener() {\n          @Override\n          public void onItemSelected(AdapterView<?> arg0, View view, int position, long id) {\n            int item = mBackgroundColorSpinner.getSelectedItemPosition();\n            switch (item) {\n              case 0:\n                mAdBackgroundColor = Color.WHITE;\n                mTitleColor = COLOR_DARK_GRAY;\n                mCtaTextColor = COLOR_CTA_BLUE_BG;\n                mContentColor = COLOR_LIGHT_GRAY;\n                mCtaBgColor = Color.WHITE;\n                break;\n              case 1:\n                mAdBackgroundColor = Color.BLACK;\n                mTitleColor = Color.WHITE;\n                mContentColor = Color.LTGRAY;\n                mCtaTextColor = Color.BLACK;\n                mCtaBgColor = Color.WHITE;\n                break;\n            }\n            reloadAdContainer();\n          }\n\n          @Override\n          public void onNothingSelected(AdapterView<?> parent) {}\n        });\n\n    mSeekBar.setProgress(DEFAULT_PROGRESS_DP);\n    mSeekBar.setOnSeekBarChangeListener(\n        new SeekBar.OnSeekBarChangeListener() {\n          @Override\n          public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n            mLayoutHeightDp = progress * ((MAX_HEIGHT_DP - MIN_HEIGHT_DP) / 100) + MIN_HEIGHT_DP;\n            updateAdViewParams();\n          }\n\n          @Override\n          public void onStartTrackingTouch(SeekBar seekBar) {}\n\n          @Override\n          public void onStopTrackingTouch(SeekBar seekBar) {}\n        });\n  }\n\n  private void updateAdViewParams() {\n    if (mAdView == null) {\n      return;\n    }\n    ViewGroup.LayoutParams params = mAdView.getLayoutParams();\n    params.height = (int) (Resources.getSystem().getDisplayMetrics().density * mLayoutHeightDp);\n    mAdView.setLayoutParams(params);\n    mAdView.requestLayout();\n  }\n\n  private void setUpButtons() {\n    mShowCodeButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            if (mShowCodeButton.getText() == getResources().getString(R.string.show_ad)) {\n              reloadAdContainer();\n            } else {\n              showCodeInAdContainer();\n            }\n          }\n        });\n\n    mReloadButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            createAndLoadNativeAd();\n          }\n        });\n  }\n\n  private void showCodeInAdContainer() {\n    String[] lines = getResources().getStringArray(R.array.code_snippet_mediumrect_template);\n    StringBuilder codeSnippet = new StringBuilder();\n    for (String line : lines) {\n      codeSnippet.append(line).append(\"\\r\\n\");\n    }\n    mNativeAdContainer.removeAllViews();\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    TextView code = new TextView(getActivity());\n    code.setText(codeSnippet);\n    code.setBackgroundColor(Color.WHITE);\n    code.setTextColor(Color.BLACK);\n    mNativeAdContainer.addView(code, 0);\n\n    mShowCodeButton.setText(R.string.show_ad);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/NativeBannerAdFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.FrameLayout;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.AdOptionsView;\nimport com.facebook.ads.MediaView;\nimport com.facebook.ads.NativeAdBase;\nimport com.facebook.ads.NativeAdLayout;\nimport com.facebook.ads.NativeAdListener;\nimport com.facebook.ads.NativeBannerAd;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class NativeBannerAdFragment extends Fragment implements NativeAdListener {\n  public static final String USE_IMAGE_VIEW = \"useImageView\";\n\n  private static final String TAG = NativeBannerAdFragment.class.getSimpleName();\n\n  private LinearLayout mAdView;\n  private FrameLayout mAdChoicesContainer;\n  private NativeAdLayout mNativeBannerAdContainer;\n  private @Nullable NativeBannerAd mNativeBannerAd;\n\n  private TextView mNativeBannerAdStatusLabel;\n\n  private boolean isAdViewAdded;\n\n  private boolean mUseImageView;\n\n  public static NativeBannerAdFragment newInstance(boolean useImageView) {\n    NativeBannerAdFragment myFragment = new NativeBannerAdFragment();\n\n    Bundle args = new Bundle();\n    args.putBoolean(USE_IMAGE_VIEW, useImageView);\n    myFragment.setArguments(args);\n\n    return myFragment;\n  }\n\n  @Override\n  public void onCreate(@Nullable Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\n    Bundle arguments = getArguments();\n    if (arguments != null) {\n      mUseImageView = arguments.getBoolean(USE_IMAGE_VIEW, false);\n    }\n  }\n\n  @Nullable\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n    View view = inflater.inflate(R.layout.fragment_native_banner_ad, container, false);\n    mNativeBannerAdContainer = view.findViewById(R.id.native_banner_ad_container);\n    mNativeBannerAdStatusLabel = view.findViewById(R.id.native_banner_status_label);\n\n    mAdView =\n        (LinearLayout)\n            inflater.inflate(R.layout.native_banner_ad_unit, mNativeBannerAdContainer, false);\n\n    mAdChoicesContainer = mAdView.findViewById(R.id.ad_choices_container);\n\n    Button showNativeBannerAdButton = view.findViewById(R.id.refresh_native_banner_button);\n    showNativeBannerAdButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            mNativeBannerAdStatusLabel.setText(getString(R.string.loading_status));\n\n            // Create a native ad request with a unique placement ID (generate your own on the\n            // Facebook app settings). Use different ID for each ad placement in your app.\n            mNativeBannerAd = new NativeBannerAd(getContext(), \"YOUR_PLACEMENT_ID\");\n\n            // When testing on a device, add its hashed ID to force test ads.\n            // The hash ID is printed to log cat when running on a device and loading an ad.\n            // AdSettings.addTestDevice(\"THE HASHED ID AS PRINTED TO LOG CAT\");\n\n            // Initiate a request to load an ad.\n            mNativeBannerAd.loadAd(\n                mNativeBannerAd\n                    .buildLoadAdConfig()\n                    .withMediaCacheFlag(NativeAdBase.MediaCacheFlag.ALL)\n                    .withAdListener(NativeBannerAdFragment.this)\n                    .build());\n          }\n        });\n    //  load the Native Banner when this fragment is created\n    //  as the Banner in BannerFragment does.\n    showNativeBannerAdButton.performClick();\n\n    return view;\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    mNativeBannerAdStatusLabel.setText(\"Ad Failed to Load: \" + error.getErrorMessage());\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (mNativeBannerAd == null || mNativeBannerAd != ad) {\n      // Race condition, load() called again before last ad was displayed\n      return;\n    }\n    if (!isAdViewAdded) {\n      isAdViewAdded = true;\n      mNativeBannerAdContainer.addView(mAdView);\n    }\n    // Unregister last ad\n    mNativeBannerAd.unregisterView();\n\n    mNativeBannerAdStatusLabel.setText(\"\");\n\n    if (!mNativeBannerAd.isAdLoaded() || mNativeBannerAd.isAdInvalidated()) {\n      mNativeBannerAdStatusLabel.setText(\"Ad is not loaded or invalidated.\");\n      return;\n    }\n\n    // Using the AdOptionsView is optional, but your native ad unit should\n    // be clearly delineated from the rest of your app content. See\n    // https://developers.facebook.com/docs/audience-network/guidelines/native-ads#native\n    // for details. We recommend using the AdOptionsView.\n    AdOptionsView adOptionsView =\n        new AdOptionsView(\n            getActivity(),\n            mNativeBannerAd,\n            mNativeBannerAdContainer,\n            AdOptionsView.Orientation.HORIZONTAL,\n            20);\n    mAdChoicesContainer.removeAllViews();\n    mAdChoicesContainer.addView(adOptionsView);\n\n    inflateAd(mNativeBannerAd, mAdView);\n\n    // Registering a touch listener to log which ad component receives the touch event.\n    // We always return false from onTouch so that we don't swallow the touch event (which\n    // would prevent click events from reaching the NativeAd control).\n    // The touch listener could be used to do animations.\n    mNativeBannerAd.setOnTouchListener(\n        new View.OnTouchListener() {\n          @Override\n          public boolean onTouch(View view, MotionEvent event) {\n            if (event.getAction() == MotionEvent.ACTION_DOWN) {\n              int i = view.getId();\n              if (i == R.id.native_ad_call_to_action) {\n                Log.d(TAG, \"Call to action button clicked\");\n              } else if (i == R.id.native_icon_view) {\n                Log.d(TAG, \"Main image clicked\");\n              } else {\n                Log.d(TAG, \"Other ad component clicked\");\n              }\n            }\n            return false;\n          }\n        });\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    DebugToast.show(requireActivity(), \"Ad Clicked\", Toast.LENGTH_SHORT);\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    Log.d(TAG, \"onLoggingImpression\");\n  }\n\n  @Override\n  public void onMediaDownloaded(Ad ad) {\n    Log.d(TAG, \"onMediaDownloaded\");\n  }\n\n  private void inflateAd(NativeBannerAd nativeBannerAd, View adView) {\n    // Create native UI using the ad metadata.\n    TextView nativeAdTitle = adView.findViewById(R.id.native_ad_title);\n    TextView nativeAdSocialContext = adView.findViewById(R.id.native_ad_social_context);\n    TextView sponsoredLabel = adView.findViewById(R.id.native_ad_sponsored_label);\n    Button nativeAdCallToAction = adView.findViewById(R.id.native_ad_call_to_action);\n\n    // Setting the Text\n    nativeAdCallToAction.setText(nativeBannerAd.getAdCallToAction());\n    nativeAdCallToAction.setVisibility(\n        nativeBannerAd.hasCallToAction() ? View.VISIBLE : View.INVISIBLE);\n    nativeAdTitle.setText(nativeBannerAd.getAdvertiserName());\n    nativeAdSocialContext.setText(nativeBannerAd.getAdSocialContext());\n\n    // You can use the following to specify the clickable areas.\n    List<View> clickableViews = new ArrayList<>();\n    clickableViews.add(nativeAdCallToAction);\n\n    MediaView nativeAdIconView = adView.findViewById(R.id.native_icon_view);\n    ImageView nativeImageViewAdIconView = adView.findViewById(R.id.image_view_icon_view);\n    if (mUseImageView) {\n      nativeAdIconView.setVisibility(View.GONE);\n      nativeImageViewAdIconView.setVisibility(View.VISIBLE);\n      nativeBannerAd.registerViewForInteraction(\n          mNativeBannerAdContainer, nativeImageViewAdIconView, clickableViews);\n    } else { // use MediaView\n      nativeAdIconView.setVisibility(View.VISIBLE);\n      nativeImageViewAdIconView.setVisibility(View.GONE);\n      nativeBannerAd.registerViewForInteraction(\n          mNativeBannerAdContainer, nativeAdIconView, clickableViews);\n    }\n\n    sponsoredLabel.setText(R.string.sponsored);\n  }\n\n  @Override\n  public void onDestroy() {\n    if (mNativeBannerAd != null) {\n      mNativeBannerAd.unregisterView();\n      mNativeBannerAd = null;\n    }\n    super.onDestroy();\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/NativeBannerAdTemplateFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.app.Activity;\nimport android.graphics.Color;\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.AdapterView;\nimport android.widget.ArrayAdapter;\nimport android.widget.Button;\nimport android.widget.Spinner;\nimport android.widget.TextView;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.NativeAdListener;\nimport com.facebook.ads.NativeAdViewAttributes;\nimport com.facebook.ads.NativeBannerAd;\nimport com.facebook.ads.NativeBannerAdView;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class NativeBannerAdTemplateFragment extends Fragment implements NativeAdListener {\n\n  private static final String TAG = NativeBannerAdTemplateFragment.class.getSimpleName();\n\n  private static final int COLOR_LIGHT_GRAY = 0xff90949c;\n  private static final int COLOR_DARK_GRAY = 0xff4e5665;\n  private static final int COLOR_CTA_BLUE_BG = 0xff4080ff;\n\n  private @Nullable NativeBannerAd mNativeBannerAd;\n  private NativeBannerAdView.Type mViewType = NativeBannerAdView.Type.HEIGHT_100;\n\n  private int mAdBackgroundColor, mTitleColor, mLinkColor, mContentColor, mCtaBgColor;\n\n  private TextView mStatusText;\n  private ViewGroup mNativeAdContainer;\n  private Spinner mBackgroundColorSpinner;\n  private Spinner mAdViewTypeSpinner;\n  private Button mShowCodeButton;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n    View view = inflater.inflate(R.layout.fragment_native_banner_ad_template, container, false);\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mStatusText = view.findViewById(R.id.status);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mNativeAdContainer = view.findViewById(R.id.templateContainer);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mShowCodeButton = view.findViewById(R.id.showCodeButton);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mBackgroundColorSpinner = view.findViewById(R.id.backgroundColorSpinner);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mAdViewTypeSpinner = view.findViewById(R.id.adViewTypeSpinner);\n\n    ArrayAdapter<CharSequence> backgroundColorSpinnerAdapter =\n        ArrayAdapter.createFromResource(\n            // NULLSAFE_FIXME[Parameter Not Nullable]\n            getActivity(), R.array.background_color_array, android.R.layout.simple_spinner_item);\n    backgroundColorSpinnerAdapter.setDropDownViewResource(\n        android.R.layout.simple_spinner_dropdown_item);\n    mBackgroundColorSpinner.setAdapter(backgroundColorSpinnerAdapter);\n\n    ArrayAdapter<CharSequence> adViewTypeSpinnerAdapter =\n        ArrayAdapter.createFromResource(\n            // NULLSAFE_FIXME[Parameter Not Nullable]\n            getActivity(), R.array.ad_bannerview_type_array, android.R.layout.simple_spinner_item);\n    adViewTypeSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n    mAdViewTypeSpinner.setAdapter(adViewTypeSpinnerAdapter);\n\n    setSpinnerListeners();\n    setButtonListeners();\n\n    createAndLoadNativeAd();\n\n    return view;\n  }\n\n  protected void createAndLoadNativeAd() {\n    // Create a native banner ad request with a unique placement ID\n    // (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    mNativeBannerAd = new NativeBannerAd(getContext(), \"YOUR_PLACEMENT_ID\");\n\n    // Initiate a request to load an ad.\n    mNativeBannerAd.loadAd(mNativeBannerAd.buildLoadAdConfig().withAdListener(this).build());\n\n    mStatusText.setText(R.string.ad_loading);\n  }\n\n  private void reloadAdContainer() {\n    Activity activity = getActivity();\n    if (activity != null\n        && mNativeBannerAd != null\n        && mNativeBannerAd.isAdLoaded()\n        && !mNativeBannerAd.isAdInvalidated()) {\n      mNativeAdContainer.removeAllViews();\n\n      // Create a NativeAdViewAttributes object and set the attributes\n      NativeAdViewAttributes attributes =\n          new NativeAdViewAttributes(activity)\n              .setBackgroundColor(mAdBackgroundColor)\n              .setTitleTextColor(mTitleColor)\n              .setDescriptionTextColor(mContentColor)\n              .setButtonBorderColor(mCtaBgColor)\n              .setButtonTextColor(mLinkColor)\n              .setButtonColor(mCtaBgColor);\n\n      // Use NativeAdView.render to generate the ad View\n      View adView = NativeBannerAdView.render(activity, mNativeBannerAd, mViewType, attributes);\n\n      // Add adView to the container showing Ads\n      mNativeAdContainer.addView(adView, 0);\n      mNativeAdContainer.setBackgroundColor(Color.TRANSPARENT);\n\n      mShowCodeButton.setText(R.string.show_code);\n    }\n  }\n\n  private void setSpinnerListeners() {\n    mBackgroundColorSpinner.setOnItemSelectedListener(\n        new android.widget.AdapterView.OnItemSelectedListener() {\n          @Override\n          public void onItemSelected(AdapterView<?> arg0, View view, int position, long id) {\n            int item = mBackgroundColorSpinner.getSelectedItemPosition();\n            switch (item) {\n              case 0:\n                mAdBackgroundColor = Color.WHITE;\n                mTitleColor = COLOR_DARK_GRAY;\n                mLinkColor = Color.WHITE;\n                mContentColor = COLOR_LIGHT_GRAY;\n                mCtaBgColor = COLOR_CTA_BLUE_BG;\n                break;\n              case 1:\n                mAdBackgroundColor = Color.BLACK;\n                mTitleColor = Color.WHITE;\n                mContentColor = Color.LTGRAY;\n                mLinkColor = Color.BLACK;\n                mCtaBgColor = Color.WHITE;\n                break;\n            }\n            reloadAdContainer();\n          }\n\n          @Override\n          public void onNothingSelected(AdapterView<?> parent) {}\n        });\n\n    mAdViewTypeSpinner.setOnItemSelectedListener(\n        new android.widget.AdapterView.OnItemSelectedListener() {\n          public void onItemSelected(AdapterView<?> arg0, View view, int position, long id) {\n            int item = mAdViewTypeSpinner.getSelectedItemPosition();\n            if (item == 0) {\n              mViewType = NativeBannerAdView.Type.HEIGHT_50;\n            } else if (item == 1) {\n              mViewType = NativeBannerAdView.Type.HEIGHT_100;\n            } else if (item == 2) {\n              mViewType = NativeBannerAdView.Type.HEIGHT_120;\n            }\n            reloadAdContainer();\n          }\n\n          @Override\n          public void onNothingSelected(AdapterView<?> parent) {}\n        });\n  }\n\n  private void setButtonListeners() {\n    mShowCodeButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            if (mShowCodeButton.getText() == getResources().getString(R.string.show_ad)) {\n              reloadAdContainer();\n            } else {\n              showCodeInAdContainer();\n            }\n          }\n        });\n  }\n\n  private void showCodeInAdContainer() {\n    String[] lines = getResources().getStringArray(R.array.code_snippet_banner_template);\n    StringBuilder codeSnippet = new StringBuilder();\n    for (String line : lines) {\n      codeSnippet.append(line).append(\"\\r\\n\");\n    }\n    mNativeAdContainer.removeAllViews();\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    TextView code = new TextView(getActivity());\n    code.setText(codeSnippet);\n    code.setBackgroundColor(Color.WHITE);\n    code.setTextColor(Color.BLACK);\n    mNativeAdContainer.addView(code, 0);\n\n    mShowCodeButton.setText(R.string.show_ad);\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (mNativeBannerAd == null || mNativeBannerAd != ad) {\n      // Race condition, load() called again before last ad was displayed\n      return;\n    }\n\n    mStatusText.setText(R.string.ad_loaded);\n    reloadAdContainer();\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    String msg = getResources().getString(R.string.ad_load_failed, error.getErrorMessage());\n    mStatusText.setText(msg);\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    mStatusText.setText(R.string.ad_clicked);\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    Log.d(TAG, \"onLoggingImpression\");\n  }\n\n  @Override\n  public void onMediaDownloaded(Ad ad) {\n    Log.d(TAG, \"onMediaDownloaded\");\n  }\n\n  @Override\n  public void onDestroy() {\n    mNativeBannerAd = null;\n    super.onDestroy();\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/RectangleFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.annotation.Nullable;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.AdListener;\nimport com.facebook.ads.AdSize;\nimport com.facebook.ads.AdView;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class RectangleFragment extends Fragment implements AdListener {\n\n  private static final String TAG = RectangleFragment.class.getSimpleName();\n\n  private RelativeLayout rectangleAdContainer;\n  private Button refreshRectangleButton;\n  private TextView rectangleStatusLabel;\n  private @Nullable AdView rectangleAdView;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n    View view = inflater.inflate(R.layout.fragment_rectangle, container, false);\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    rectangleStatusLabel = (TextView) view.findViewById(R.id.rectangleStatusLabel);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    rectangleAdContainer = (RelativeLayout) view.findViewById(R.id.rectangleAdContainer);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    refreshRectangleButton = (Button) view.findViewById(R.id.refreshRectangleButton);\n    refreshRectangleButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            loadAdView();\n          }\n        });\n    loadAdView();\n    return view;\n  }\n\n  @Override\n  public void onDestroyView() {\n    rectangleAdContainer.removeView(rectangleAdView);\n    super.onDestroyView();\n  }\n\n  @Override\n  public void onDestroy() {\n    if (rectangleAdView != null) {\n      rectangleAdView.destroy();\n      rectangleAdView = null;\n    }\n    super.onDestroy();\n  }\n\n  private void loadAdView() {\n    if (rectangleAdView != null) {\n      rectangleAdView.destroy();\n      rectangleAdView = null;\n    }\n\n    // Update progress message\n    setLabel(getString(R.string.loading_status));\n\n    // Create a banner's ad view with a unique placement ID (generate your own on the Facebook\n    // app settings). Use different ID for each ad placement in your app.\n    // NULLSAFE_FIXME[Parameter Not Nullable]\n    rectangleAdView = new AdView(getActivity(), \"YOUR_PLACEMENT_ID\", AdSize.RECTANGLE_HEIGHT_250);\n\n    // Reposition the ad and add it to the view hierarchy.\n    rectangleAdContainer.addView(rectangleAdView);\n\n    // Initiate a request to load an ad.\n    rectangleAdView.loadAd(rectangleAdView.buildLoadAdConfig().withAdListener(this).build());\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    if (ad == rectangleAdView) {\n      setLabel(\"Ad failed to load: \" + error.getErrorMessage());\n    }\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (ad == rectangleAdView) {\n      setLabel(\"\");\n    }\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    DebugToast.show(requireActivity(), \"Ad Clicked\", Toast.LENGTH_SHORT);\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    Log.d(TAG, \"onLoggingImpression\");\n  }\n\n  private void setLabel(String status) {\n    rectangleStatusLabel.setText(status);\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/RewardedInterstitialFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.RewardData;\nimport com.facebook.ads.RewardedInterstitialAd;\nimport com.facebook.ads.S2SRewardedInterstitialAdListener;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\nimport javax.annotation.Nullable;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class RewardedInterstitialFragment extends Fragment\n    implements S2SRewardedInterstitialAdListener {\n\n  private TextView rewardedInterstitialAdStatusLabel;\n  private Button loadRewardedInterstitialButton;\n  private Button showRewardedInterstitialButton;\n\n  @Nullable private RewardedInterstitialAd rewardedInterstitialAd;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n    View view = inflater.inflate(R.layout.fragment_rewarded_interstitial, container, false);\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    rewardedInterstitialAdStatusLabel =\n        (TextView) view.findViewById(R.id.rewardedInterstitialAdStatusLabel);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    loadRewardedInterstitialButton =\n        (Button) view.findViewById(R.id.loadRewardedInterstitialButton);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    showRewardedInterstitialButton =\n        (Button) view.findViewById(R.id.showRewardedInterstitialButton);\n\n    loadRewardedInterstitialButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            if (rewardedInterstitialAd != null) {\n              rewardedInterstitialAd.destroy();\n              rewardedInterstitialAd = null;\n            }\n            rewardedInterstitialAd =\n                new RewardedInterstitialAd(\n                    // NULLSAFE_FIXME[Parameter Not Nullable]\n                    RewardedInterstitialFragment.this.getActivity(), \"YOUR_PLACEMENT_ID\");\n            RewardedInterstitialAd.RewardedInterstitialLoadAdConfig loadAdConfig =\n                rewardedInterstitialAd\n                    .buildLoadAdConfig()\n                    .withAdListener(RewardedInterstitialFragment.this)\n                    .withFailOnCacheFailureEnabled(true)\n                    .withRewardData(new RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\", 10))\n                    .build();\n            rewardedInterstitialAd.loadAd(loadAdConfig);\n            setStatusLabelText(\"Loading rewarded interstitial ad...\");\n          }\n        });\n\n    showRewardedInterstitialButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            if (rewardedInterstitialAd == null\n                || !rewardedInterstitialAd.isAdLoaded()\n                || rewardedInterstitialAd.isAdInvalidated()) {\n              setStatusLabelText(\"Ad not loaded. Click load to request an ad.\");\n            } else {\n              rewardedInterstitialAd.show();\n              setStatusLabelText(\"\");\n            }\n          }\n        });\n\n    return view;\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    if (ad == rewardedInterstitialAd) {\n      setStatusLabelText(\"Rewarded interstitial ad failed to load: \" + error.getErrorMessage());\n    }\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (ad == rewardedInterstitialAd) {\n      setStatusLabelText(\"Ad loaded. Click show to present!\");\n    }\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    showToast(\"Rewarded Interstitial Clicked\");\n  }\n\n  private void setStatusLabelText(String label) {\n    if (rewardedInterstitialAdStatusLabel != null) {\n      rewardedInterstitialAdStatusLabel.setText(label);\n    }\n  }\n\n  private void showToast(String message) {\n    if (isAdded()) {\n      DebugToast.show(requireActivity(), message, Toast.LENGTH_SHORT);\n    }\n  }\n\n  @Override\n  public void onRewardedInterstitialCompleted() {\n    showToast(\"Rewarded Interstitial View Complete\");\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    showToast(\"Rewarded Interstitial Impression\");\n  }\n\n  @Override\n  public void onRewardedInterstitialClosed() {\n    showToast(\"Rewarded Interstitial Closed\");\n  }\n\n  @Override\n  public void onRewardServerFailed() {\n    showToast(\"Reward Video Server Failed\");\n  }\n\n  @Override\n  public void onRewardServerSuccess() {\n    showToast(\"Reward Video Server Succeeded\");\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/fragments/RewardedVideoFragment.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.fragments;\n\nimport android.os.Bundle;\nimport android.util.Log;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.Button;\nimport android.widget.TextView;\nimport android.widget.Toast;\nimport androidx.fragment.app.Fragment;\nimport com.facebook.ads.Ad;\nimport com.facebook.ads.AdError;\nimport com.facebook.ads.RewardData;\nimport com.facebook.ads.RewardedVideoAd;\nimport com.facebook.ads.S2SRewardedVideoAdListener;\nimport com.facebook.infer.annotation.Nullsafe;\nimport com.facebook.samples.AdUnitsSample.R;\nimport com.facebook.samples.ads.debugsettings.DebugToast;\nimport javax.annotation.Nullable;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class RewardedVideoFragment extends Fragment implements S2SRewardedVideoAdListener {\n\n  private static final String TAG = \"RewardedVideoFragment\";\n  private TextView rewardedVideoAdStatusLabel;\n  private Button loadRewardedVideoButton;\n  private Button showRewardedVideoButton;\n\n  @Nullable private RewardedVideoAd rewardedVideoAd;\n\n  @Override\n  public View onCreateView(\n      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n    View view = inflater.inflate(R.layout.fragment_rewarded_video, container, false);\n\n    // NULLSAFE_FIXME[Field Not Nullable]\n    rewardedVideoAdStatusLabel = (TextView) view.findViewById(R.id.rewardedVideoAdStatusLabel);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    loadRewardedVideoButton = (Button) view.findViewById(R.id.loadRewardedVideoButton);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    showRewardedVideoButton = (Button) view.findViewById(R.id.showRewardedVideoButton);\n\n    loadRewardedVideoButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            if (rewardedVideoAd != null) {\n              rewardedVideoAd.destroy();\n              rewardedVideoAd = null;\n            }\n            rewardedVideoAd =\n                // NULLSAFE_FIXME[Parameter Not Nullable]\n                new RewardedVideoAd(RewardedVideoFragment.this.getActivity(), \"YOUR_PLACEMENT_ID\");\n            RewardedVideoAd.RewardedVideoLoadAdConfig loadAdConfig =\n                rewardedVideoAd\n                    .buildLoadAdConfig()\n                    .withAdListener(RewardedVideoFragment.this)\n                    .withFailOnCacheFailureEnabled(true)\n                    .withRewardData(new RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\", 10))\n                    .build();\n            rewardedVideoAd.loadAd(loadAdConfig);\n            setStatusLabelText(\"Loading rewarded video ad...\");\n          }\n        });\n\n    showRewardedVideoButton.setOnClickListener(\n        new View.OnClickListener() {\n          @Override\n          public void onClick(View v) {\n            if (rewardedVideoAd == null\n                || !rewardedVideoAd.isAdLoaded()\n                || rewardedVideoAd.isAdInvalidated()) {\n              setStatusLabelText(\"Ad not loaded. Click load to request an ad.\");\n            } else {\n              setStatusLabelText(\"\");\n              rewardedVideoAd.show();\n            }\n          }\n        });\n\n    return view;\n  }\n\n  @Override\n  public void onError(Ad ad, AdError error) {\n    if (ad == rewardedVideoAd) {\n      setStatusLabelText(\"Rewarded video ad failed to load: \" + error.getErrorMessage());\n    }\n  }\n\n  @Override\n  public void onAdLoaded(Ad ad) {\n    if (ad == rewardedVideoAd) {\n      setStatusLabelText(\"Ad loaded. Click show to present!\");\n    }\n  }\n\n  @Override\n  public void onAdClicked(Ad ad) {\n    showToast(\"Rewarded Video Clicked\");\n  }\n\n  private void setStatusLabelText(String label) {\n    if (rewardedVideoAdStatusLabel != null) {\n      rewardedVideoAdStatusLabel.setText(label);\n    }\n  }\n\n  private void showToast(String message) {\n    Log.d(TAG, message);\n    if (isAdded()) {\n      DebugToast.show(requireActivity(), message, Toast.LENGTH_SHORT);\n    }\n  }\n\n  @Override\n  public void onRewardedVideoCompleted() {\n    showToast(\"Rewarded Video View Complete\");\n  }\n\n  @Override\n  public void onLoggingImpression(Ad ad) {\n    showToast(\"Rewarded Video Impression\");\n  }\n\n  @Override\n  public void onRewardedVideoClosed() {\n    showToast(\"Rewarded Video Closed\");\n  }\n\n  @Override\n  public void onRewardServerFailed() {\n    showToast(\"Reward Video Server Failed\");\n  }\n\n  @Override\n  public void onRewardServerSuccess() {\n    showToast(\"Reward Video Server Succeeded\");\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/models/RecyclerPostItem.java",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.AdUnitsSample.models;\n\nimport com.facebook.infer.annotation.Nullsafe;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class RecyclerPostItem {\n\n  // NULLSAFE_FIXME[Field Not Initialized]\n  private String postContent;\n\n  public RecyclerPostItem(String postContent) {\n    setPostContent(postContent);\n  }\n\n  public String getPostContent() {\n    return postContent;\n  }\n\n  public void setPostContent(String postContent) {\n    this.postContent = postContent;\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/java/com/facebook/samples/AdUnitsSample/thirdparty/DividerItemDecoration/DividerItemDecoration.java",
    "content": "/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.facebook.samples.AdUnitsSample.thirdparty.DividerItemDecoration;\n\nimport android.content.Context;\nimport android.content.res.TypedArray;\nimport android.graphics.Canvas;\nimport android.graphics.Rect;\nimport android.graphics.drawable.Drawable;\nimport android.view.View;\nimport androidx.recyclerview.widget.LinearLayoutManager;\nimport androidx.recyclerview.widget.RecyclerView;\nimport com.facebook.infer.annotation.Nullsafe;\n\n@Nullsafe(Nullsafe.Mode.LOCAL)\npublic class DividerItemDecoration extends RecyclerView.ItemDecoration {\n\n  private static final int[] ATTRS = new int[] {android.R.attr.listDivider};\n\n  public static final int HORIZONTAL_LIST = LinearLayoutManager.HORIZONTAL;\n\n  public static final int VERTICAL_LIST = LinearLayoutManager.VERTICAL;\n\n  private Drawable mDivider;\n\n  private int mOrientation;\n\n  public DividerItemDecoration(Context context, int orientation) {\n    final TypedArray a = context.obtainStyledAttributes(ATTRS);\n    // NULLSAFE_FIXME[Field Not Nullable]\n    mDivider = a.getDrawable(0);\n    a.recycle();\n    setOrientation(orientation);\n  }\n\n  public void setOrientation(int orientation) {\n    if (orientation != HORIZONTAL_LIST && orientation != VERTICAL_LIST) {\n      throw new IllegalArgumentException(\"invalid orientation\");\n    }\n    mOrientation = orientation;\n  }\n\n  @Override\n  public void onDraw(Canvas c, RecyclerView parent) {\n    if (mOrientation == VERTICAL_LIST) {\n      drawVertical(c, parent);\n    } else {\n      drawHorizontal(c, parent);\n    }\n  }\n\n  public void drawVertical(Canvas c, RecyclerView parent) {\n    final int left = parent.getPaddingLeft();\n    final int right = parent.getWidth() - parent.getPaddingRight();\n\n    final int childCount = parent.getChildCount();\n    for (int i = 0; i < childCount; i++) {\n      final View child = parent.getChildAt(i);\n      final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();\n      final int top = child.getBottom() + params.bottomMargin;\n      final int bottom = top + mDivider.getIntrinsicHeight();\n      mDivider.setBounds(left, top, right, bottom);\n      mDivider.draw(c);\n    }\n  }\n\n  public void drawHorizontal(Canvas c, RecyclerView parent) {\n    final int top = parent.getPaddingTop();\n    final int bottom = parent.getHeight() - parent.getPaddingBottom();\n\n    final int childCount = parent.getChildCount();\n    for (int i = 0; i < childCount; i++) {\n      final View child = parent.getChildAt(i);\n      final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();\n      final int left = child.getRight() + params.rightMargin;\n      final int right = left + mDivider.getIntrinsicHeight();\n      mDivider.setBounds(left, top, right, bottom);\n      mDivider.draw(c);\n    }\n  }\n\n  @Override\n  public void getItemOffsets(Rect outRect, int itemPosition, RecyclerView parent) {\n    if (mOrientation == VERTICAL_LIST) {\n      outRect.set(0, 0, 0, mDivider.getIntrinsicHeight());\n    } else {\n      outRect.set(0, 0, mDivider.getIntrinsicWidth(), 0);\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/activity_ad_sample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\nCopyright 2010-present Facebook.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/activity_ad_sample\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#E4E5E8\"\n    >\n\n    <LinearLayout\n        android:id=\"@+id/fragment_container\"\n        android:layout_height=\"match_parent\"\n        android:layout_width=\"match_parent\"\n        android:orientation=\"vertical\"\n        >\n    </LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/activity_sample_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:id=\"@+id/activity_sample_list\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#E4E5E8\"\n    android:orientation=\"vertical\"\n    >\n\n    <TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/select_sample\"\n        android:textColor=\"?android:attr/textColorPrimary\"\n        android:textSize=\"24sp\"\n        />\n\n    <ListView\n        android:id=\"@android:id/list\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        />\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/activity_splash.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/activity_splash\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#3B5998\"\n    tools:context=\"com.facebook.samples.AdUnitsSample.SplashActivity\"\n    >\n\n    <TextView\n        android:id=\"@+id/app_name\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:text=\"@string/app_name\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"36sp\"\n        android:gravity=\"center\"\n        />\n\n    <TextView\n        android:id=\"@+id/copy_right\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"@string/copy_right\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"12sp\"\n        />\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_banner.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\">\n\n    <RelativeLayout\n        android:id=\"@+id/bannerAdContainer\"\n        android:layout_height=\"wrap_content\"\n        android:layout_width=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        />\n\n    <Button\n        android:id=\"@+id/refreshBannerButton\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"@string/refresh_now\"\n        android:textSize=\"15sp\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_above=\"@id/bannerAdContainer\"\n        android:layout_centerHorizontal=\"true\"\n        />\n\n    <TextView\n        android:id=\"@+id/bannerStatusLabel\"\n        android:gravity=\"center\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:layout_width=\"match_parent\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        android:layout_above=\"@id/refreshBannerButton\"\n        tools:text=\"@string/loading_status\"\n        />\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_interstitial.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:gravity=\"center_vertical\">\n\n    <TextView\n            android:id=\"@+id/interstitialAdStatusLabel\"\n            android:gravity=\"center\"\n            android:layout_height=\"wrap_content\"\n            android:layout_width=\"match_parent\"\n            android:textColor=\"@android:color/darker_gray\"\n            android:textSize=\"15sp\"\n            />\n\n\n    <LinearLayout\n            android:id=\"@+id/interstitialAdControls\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentTop=\"true\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center\"\n            android:layout_marginTop=\"50dp\">\n\n        <Button\n                android:id=\"@+id/loadInterstitialButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/load_interstitial\"\n                android:textSize=\"15sp\"\n                />\n\n        <Button\n                android:id=\"@+id/showInterstitialButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/show_ad\"\n                android:textSize=\"15sp\"\n                />\n\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_multi_load_interstitial.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n              android:orientation=\"vertical\"\n                android:gravity=\"center_vertical\"\n                >\n\n    <TextView\n        android:id=\"@+id/interstitialAdStatusLabel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n\n    <LinearLayout\n            android:id=\"@+id/interstitialAdControls\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"50dp\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center\"\n            >\n\n        <Button\n                android:id=\"@+id/loadInterstitialButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/load_interstitial\"\n                android:textSize=\"15sp\"\n            />\n\n        <Button\n                android:id=\"@+id/showInterstitialButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/show_ad\"\n                android:textSize=\"15sp\"\n            />\n\n    </LinearLayout>\n\n    <TextView\n        android:id=\"@+id/interstitialAdStatusLabel2\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n\n\n    <LinearLayout\n        android:id=\"@+id/interstitialAdControls2\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"50dp\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        >\n\n        <Button\n            android:id=\"@+id/loadInterstitialButton2\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/load_interstitial\"\n            android:textSize=\"15sp\"\n            />\n\n        <Button\n            android:id=\"@+id/showInterstitialButton2\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/show_ad\"\n            android:textSize=\"15sp\"\n            />\n\n    </LinearLayout>\n\n    <TextView\n        android:id=\"@+id/interstitialAdStatusLabel3\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n\n\n    <LinearLayout\n        android:id=\"@+id/interstitialAdControls3\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"50dp\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        >\n\n        <Button\n            android:id=\"@+id/loadInterstitialButton3\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/load_interstitial\"\n            android:textSize=\"15sp\"\n            />\n\n        <Button\n            android:id=\"@+id/showInterstitialButton3\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/show_ad\"\n            android:textSize=\"15sp\"\n            />\n\n    </LinearLayout>\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_native_ad_hscroll.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:gravity=\"center\"\n    >\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:paddingBottom=\"50dp\"\n        >\n        <LinearLayout\n            android:id=\"@+id/hscroll_container\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            >\n        </LinearLayout>\n    </ScrollView>\n\n    <Button\n        android:id=\"@+id/reload_hscroll\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_margin=\"2dp\"\n        android:gravity=\"center\"\n        android:text=\"@string/reload_native_ads_hscroll\"\n        android:textSize=\"15sp\"\n        />\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_native_ad_recycler.xml",
    "content": "<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    tools:context=\"com.facebook.samples.AdUnitsSample.fragments.NativeAdRecyclerFragment\"\n    >\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/recyclerView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:paddingLeft=\"8dp\"\n        android:paddingRight=\"8dp\"\n        />\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_native_ad_sample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:layout_margin=\"8dp\"\n    android:background=\"@android:color/white\"\n    >\n\n  <LinearLayout\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"match_parent\"\n      android:layout_above=\"@+id/bottom_container\">\n        <ScrollView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:paddingBottom=\"10dp\"\n            >\n\n            <include layout=\"@layout/native_ad_unit\"\n                 android:id=\"@+id/native_ad_container\"\n                 android:layout_width=\"match_parent\"\n                 android:layout_height=\"wrap_content\"\n                 android:background=\"@android:color/white\"\n                 android:paddingBottom=\"5dp\"/>\n\n        </ScrollView>\n  </LinearLayout>\n\n  <LinearLayout\n      android:id=\"@+id/bottom_container\"\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"wrap_content\"\n      android:layout_alignParentBottom=\"true\"\n      android:background=\"@android:color/background_light\"\n      android:orientation=\"vertical\"\n      android:paddingBottom=\"2dp\"\n      >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\"\n        >\n\n      <Button\n          android:id=\"@+id/load_native_ad_button\"\n          android:layout_width=\"wrap_content\"\n          android:layout_height=\"wrap_content\"\n          android:text=\"@string/load_native_ad\"\n          android:textSize=\"12sp\"\n          />\n\n      <TextView\n          android:id=\"@+id/native_ad_status\"\n          android:layout_width=\"0dp\"\n          android:layout_height=\"match_parent\"\n          android:layout_weight=\"1\"\n          android:gravity=\"center\"\n          android:textColor=\"@android:color/darker_gray\"\n          />\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"vertical\"\n        >\n\n      <Switch\n          android:id=\"@+id/switch_fullscreen\"\n          android:layout_width=\"wrap_content\"\n          android:layout_height=\"wrap_content\"\n          android:layout_marginStart=\"8dp\"\n          android:text=\"Disable fullscreen\"\n          android:textSize=\"12sp\"\n          />\n\n      <Switch\n          android:id=\"@+id/switch_unmute\"\n          android:layout_width=\"wrap_content\"\n          android:layout_height=\"wrap_content\"\n          android:layout_marginStart=\"8dp\"\n          android:text=\"Unmute video\"\n          android:textSize=\"12sp\"\n          />\n\n      <Switch\n          android:id=\"@+id/switch_hide_media_controls\"\n          android:layout_width=\"wrap_content\"\n          android:layout_height=\"wrap_content\"\n          android:layout_marginStart=\"8dp\"\n          android:text=\"Hide media controls\"\n          android:textSize=\"12sp\"\n          />\n\n    </LinearLayout>\n  </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_native_ad_template.xml",
    "content": "<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/nativeAdTemplateContainer\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:ignore=\"MergeRootFrame\"\n    android:clickable=\"true\"\n    android:gravity=\"end\"\n    >\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_above=\"@+id/footer\"\n        android:background=\"@android:color/transparent\"\n        android:padding=\"8dp\"\n        >\n        <LinearLayout\n            android:id=\"@+id/templateContainer\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:background=\"@android:color/transparent\"\n            />\n    </ScrollView>\n\n    <LinearLayout\n        android:id=\"@+id/footer\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:orientation=\"vertical\"\n        >\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\">\n            <TextView\n                android:layout_width=\"0dp\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:padding=\"2dp\"\n                android:text=\"@string/style\"\n                android:gravity=\"center_horizontal\"\n                />\n            <TextView\n                android:layout_width=\"0dp\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:padding=\"2dp\"\n                android:text=\"@string/adview_type\"\n                android:gravity=\"center_horizontal\"\n                />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\">\n            <Spinner\n                android:id=\"@+id/backgroundColorSpinner\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                />\n            <SeekBar\n                android:id=\"@+id/seekBar\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingTop=\"8dp\">\n            <Button\n                android:id=\"@+id/reloadAdButton\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:text=\"@string/refresh_now\"\n                android:padding=\"8dp\"\n                />\n            <Button\n                android:id=\"@+id/showCodeButton\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:text=\"@string/show_code\"\n                android:padding=\"8dp\"\n                />\n        </LinearLayout>\n\n        <TextView\n            android:id=\"@+id/status\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:textAlignment=\"center\"\n            android:gravity=\"start\"\n            />\n    </LinearLayout>\n</RelativeLayout>\n\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_native_banner_ad.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    >\n\n\n    <com.facebook.ads.NativeAdLayout\n        android:id=\"@+id/native_banner_ad_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        />\n\n    <Button\n        android:id=\"@+id/refresh_native_banner_button\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_above=\"@id/native_banner_ad_container\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"@string/refresh_now\"\n        android:textSize=\"15sp\"\n        />\n\n    <TextView\n        android:id=\"@+id/native_banner_status_label\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:layout_above=\"@id/refresh_native_banner_button\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_native_banner_ad_template.xml",
    "content": "<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/nativeAdTemplateContainer\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:ignore=\"MergeRootFrame\"\n    android:clickable=\"true\"\n    android:gravity=\"end\"\n    >\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_above=\"@+id/bottomBarDes\"\n        android:background=\"@android:color/transparent\"\n        android:padding=\"8dp\"\n        >\n        <LinearLayout\n            android:id=\"@+id/templateContainer\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:gravity=\"top\"\n            android:orientation=\"vertical\"\n            android:background=\"@android:color/transparent\"\n            />\n    </ScrollView>\n\n    <LinearLayout\n        android:id=\"@+id/bottomBarDes\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"25dp\"\n        android:layout_above=\"@+id/bottomBar\"\n        android:orientation=\"horizontal\"\n        >\n        <TextView\n            android:layout_width=\"120dp\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:text=\"@string/style\"\n            android:gravity=\"center_horizontal\"\n            />\n        <TextView\n            android:layout_width=\"120dp\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:text=\"@string/adview_type\"\n            android:textAlignment=\"center\"\n            android:gravity=\"center_horizontal\"\n            />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/bottomBar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_above=\"@+id/statusBar\"\n        android:orientation=\"horizontal\"\n        android:paddingBottom=\"0dp\"\n        android:paddingTop=\"0dp\"\n        android:minHeight=\"30dp\"\n        android:gravity=\"center_vertical\"\n        >\n        <Spinner\n            android:id=\"@+id/backgroundColorSpinner\"\n            android:layout_width=\"120dp\"\n            android:layout_height=\"wrap_content\"\n            />\n        <Spinner\n            android:id=\"@+id/adViewTypeSpinner\"\n            android:layout_width=\"120dp\"\n            android:layout_height=\"wrap_content\"\n            />\n        <Button\n            android:id=\"@+id/showCodeButton\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"end\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_marginStart=\"10dp\"\n            android:text=\"@string/show_code\"\n            android:padding=\"8dp\"\n            />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/statusBar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:orientation=\"horizontal\"\n        >\n        <TextView\n            android:id=\"@+id/status\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:textAlignment=\"center\"\n            android:gravity=\"start\"\n            />\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_rectangle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<ScrollView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    >\n\n  <LinearLayout\n      android:layout_width=\"match_parent\"\n      android:layout_height=\"1500dp\"\n      android:orientation=\"vertical\"\n      android:paddingTop=\"16dp\"\n      >\n\n    <RelativeLayout\n        android:id=\"@+id/rectangleAdContainer\"\n        android:layout_width=\"300dp\"\n        android:layout_height=\"250dp\"\n        android:layout_gravity=\"center_horizontal\"\n        android:background=\"#000000\"\n        />\n\n    <Button\n        android:id=\"@+id/refreshRectangleButton\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_horizontal\"\n        android:layout_marginTop=\"16dp\"\n        android:text=\"@string/refresh_now\"\n        android:textSize=\"15sp\"\n        />\n\n    <TextView\n        android:id=\"@+id/rectangleStatusLabel\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_horizontal\"\n        android:layout_marginTop=\"16dp\"\n        android:layout_marginBottom=\"1500dp\"\n        android:textSize=\"15sp\"\n        tools:text=\"@string/loading_status\"\n        />\n  </LinearLayout>\n</ScrollView>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_rewarded_interstitial.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:gravity=\"center_vertical\"\n                >\n\n    <TextView\n            android:id=\"@+id/rewardedInterstitialAdStatusLabel\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            android:textColor=\"@android:color/darker_gray\"\n            android:textSize=\"15sp\"\n            />\n\n\n    <LinearLayout\n            android:id=\"@+id/rewardedInterstitialAdControls\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"50dp\"\n            android:layout_alignParentTop=\"true\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center\"\n            >\n\n        <Button\n                android:id=\"@+id/loadRewardedInterstitialButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/load_rewarded_interstitial\"\n                android:textSize=\"15sp\"\n                />\n\n        <Button\n                android:id=\"@+id/showRewardedInterstitialButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/show_ad\"\n                android:textSize=\"15sp\"\n                />\n\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/fragment_rewarded_video.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:gravity=\"center_vertical\">\n\n    <TextView\n            android:id=\"@+id/rewardedVideoAdStatusLabel\"\n            android:gravity=\"center\"\n            android:layout_height=\"wrap_content\"\n            android:layout_width=\"match_parent\"\n            android:textColor=\"@android:color/darker_gray\"\n            android:textSize=\"15sp\"\n            />\n\n\n    <LinearLayout\n            android:id=\"@+id/rewardedVideoAdControls\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_alignParentTop=\"true\"\n            android:orientation=\"horizontal\"\n            android:gravity=\"center\"\n            android:layout_marginTop=\"50dp\">\n\n        <Button\n                android:id=\"@+id/loadRewardedVideoButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/load_rewarded_video\"\n                android:textSize=\"15sp\"\n                />\n\n        <Button\n                android:id=\"@+id/showRewardedVideoButton\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:text=\"@string/show_ad\"\n                android:textSize=\"15sp\"\n                />\n\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/list_item_section.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    >\n\n    <include\n        android:id=\"@+id/list_item_section_text\"\n        layout=\"@android:layout/preference_category\"\n        />\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/native_ad_unit.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.facebook.ads.NativeAdLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\">\n\n    <LinearLayout\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"@android:color/white\"\n        android:orientation=\"vertical\"\n        android:paddingLeft=\"10dp\"\n        android:paddingRight=\"10dp\"\n        >\n\n        <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:paddingTop=\"10dp\"\n                android:paddingBottom=\"10dp\"\n                android:orientation=\"horizontal\"\n                android:weightSum=\"1\"\n                >\n\n            <com.facebook.ads.MediaView\n                android:id=\"@+id/native_ad_icon\"\n                android:layout_width=\"35dp\"\n                android:layout_height=\"35dp\"\n                android:contentDescription=\"@string/icon_desc\"\n                />\n\n            <LinearLayout\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:paddingLeft=\"5dp\"\n                    android:paddingRight=\"5dp\"\n                    android:orientation=\"vertical\"\n                    android:layout_weight=\"0.7\"\n                    >\n\n                <TextView\n                        android:id=\"@+id/native_ad_title\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:ellipsize=\"end\"\n                        android:lines=\"1\"\n                        android:textColor=\"@android:color/black\"\n                        android:textSize=\"15sp\"\n                        />\n\n                <TextView\n                    android:id=\"@+id/native_ad_sponsored_label\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:ellipsize=\"end\"\n                    android:lines=\"1\"\n                    android:textColor=\"@android:color/darker_gray\"\n                    android:textSize=\"12sp\"\n                    />\n\n            </LinearLayout>\n\n            <LinearLayout\n                android:id=\"@+id/ad_choices_container\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:gravity=\"end\"\n                android:orientation=\"horizontal\"\n                android:layout_weight=\"0.3\"\n                />\n\n        </LinearLayout>\n\n        <com.facebook.ads.MediaView\n                android:id=\"@+id/native_ad_media\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:contentDescription=\"@string/image_desc\"\n                android:gravity=\"center\"\n                />\n\n        <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\"\n                android:padding=\"5dp\"\n                >\n\n            <LinearLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"3\"\n                android:orientation=\"vertical\"\n                >\n\n                <TextView\n                    android:id=\"@+id/native_ad_social_context\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:ellipsize=\"end\"\n                    android:lines=\"1\"\n                    android:textColor=\"@android:color/darker_gray\"\n                    android:textSize=\"12sp\"\n                    />\n\n                <TextView\n                    android:id=\"@+id/native_ad_body\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:ellipsize=\"end\"\n                    android:gravity=\"center_vertical\"\n                    android:lines=\"2\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"12sp\"\n                    />\n\n            </LinearLayout>\n\n            <Button\n                android:id=\"@+id/native_ad_call_to_action\"\n                android:layout_width=\"100dp\"\n                android:layout_height=\"30dp\"\n                android:layout_weight=\"1\"\n                android:layout_gravity=\"center_vertical\"\n                android:background=\"#4286F4\"\n                android:textSize=\"12sp\"\n                android:textColor=\"@android:color/white\"\n                android:paddingLeft=\"3dp\"\n                android:paddingRight=\"3dp\"\n                android:visibility=\"gone\"\n                />\n\n        </LinearLayout>\n\n    </LinearLayout>\n</com.facebook.ads.NativeAdLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/native_banner_ad_unit.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright 2004-present Facebook. All Rights Reserved. -->\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\"\n    >\n\n    <TextView\n        android:id=\"@+id/native_ad_sponsored_label\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:padding=\"2dp\"\n        android:ellipsize=\"end\"\n        android:lines=\"1\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"12sp\"\n        />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:background=\"@android:color/white\"\n        android:orientation=\"horizontal\"\n        >\n\n        <com.facebook.ads.MediaView\n            android:id=\"@+id/native_icon_view\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            />\n\n        <ImageView\n            android:id=\"@+id/image_view_icon_view\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            android:visibility=\"gone\"\n            />\n\n        <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"50dp\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\"\n            android:gravity=\"center_vertical\"\n            android:padding=\"4dp\"\n            >\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\"\n                android:gravity=\"center_vertical\"\n                >\n\n                <TextView\n                    android:id=\"@+id/native_ad_title\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"15sp\"\n                    android:textStyle=\"bold\"\n                    android:ellipsize=\"end\"\n                    android:lines=\"1\"\n                    />\n\n                <FrameLayout\n                    android:id=\"@+id/ad_choices_container\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:padding=\"2dp\"\n                    />\n\n            </LinearLayout>\n\n            <TextView\n                android:id=\"@+id/native_ad_social_context\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:textSize=\"12sp\"\n                android:ellipsize=\"end\"\n                android:lines=\"1\"\n                />\n\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/native_ad_call_to_action\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"50dp\"\n            android:gravity=\"center\"\n            android:background=\"#4286F4\"\n            android:textSize=\"12sp\"\n            android:textColor=\"@android:color/white\"\n            android:paddingLeft=\"3dp\"\n            android:paddingRight=\"3dp\"\n            android:visibility=\"gone\"\n            />\n\n    </LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout/recycler_post_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"100dp\"\n    android:background=\"@android:color/white\"\n    android:orientation=\"vertical\"\n    >\n\n    <TextView\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:id=\"@+id/tvPostContent\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"100dp\"\n        android:background=\"@android:color/white\"\n        android:gravity=\"start|center\"\n        android:padding=\"10dp\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"18sp\"\n        />\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/layout-land/fragment_rectangle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<ScrollView\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:fillViewport=\"true\"\n    >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\"\n        >\n\n        <TextView\n            android:id=\"@+id/rectangleStatusLabel\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"10dp\"\n            android:gravity=\"center\"\n            android:textColor=\"@android:color/darker_gray\"\n            android:textSize=\"15sp\"\n            tools:text=\"@string/loading_status\"\n            />\n\n        <Button\n            android:id=\"@+id/refreshRectangleButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"16dp\"\n            android:text=\"@string/refresh_now\"\n            android:textSize=\"15sp\"\n            />\n\n        <RelativeLayout\n            android:id=\"@+id/rectangleAdContainer\"\n            android:layout_width=\"300dp\"\n            android:layout_height=\"wrap_content\"\n            />\n\n    </LinearLayout>\n</ScrollView>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/menu/ad_units_sample_menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item\n            android:id=\"@+id/debug_settings\"\n            android:title=\"@string/debug_settings\"\n            />\n</menu>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/values/layouts.xml",
    "content": "<resources>\n    <item name=\"main\" type=\"layout\">@layout/activity_ad_sample</item>\n    <bool name=\"is_tablet\">false</bool>\n</resources>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\nCopyright 2010-present Facebook.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\n<resources>\n    <string name=\"copy_right\">Copyright © Meta Platforms, Inc. and affiliates. All rights reserved.</string>\n    <string name=\"app_name\">Ad Units Sample</string>\n    <string name=\"select_sample\">Select an option</string>\n    <string name=\"debug_settings\">Debug Settings</string>\n    <string name=\"loading_status\">Requesting an ad…</string>\n    <string name=\"load_interstitial\">Load Interstitial</string>\n    <string name=\"refresh_now\">Refresh Now</string>\n    <string name=\"show_ad\">Show!</string>\n    <string name=\"destroy_ad\">Destroy Ad</string>\n    <string name=\"load_rewarded_video\">Load Rewarded Video</string>\n    <string name=\"load_rewarded_interstitial\">Load Rewarded Interstitial</string>\n    <string name=\"enable_rewarded_interstitial\">Enable Rewarded Interstitial</string>\n\n    <!-- Native samples -->\n    <string name=\"load_native_ad\">Load Native Ad</string>\n    <string name=\"load_other_native_ads\">Check out more Native Ads examples in </string>\n    <string name=\"load_native_ads_hscroll\">hScroll</string>\n    <string name=\"load_native_ads_template\">Template</string>\n    <string name=\"load_native_ads_recycler\">RecyclerView</string>\n    <string name=\"icon_desc\">Ad icon</string>\n    <string name=\"image_desc\">Ad image</string>\n    <string name=\"sponsored\">Sponsored</string>\n    <string name=\"reload_native_ads_hscroll\">Reload ads</string>\n\n    <string name=\"ad_loading\">Loading an ad…</string>\n    <string name=\"ad_loaded\">Ad loaded</string>\n    <string name=\"ad_load_failed\">Ad failed to load: %s</string>\n    <string name=\"ad_clicked\">Ad clicked</string>\n\n    <string name=\"style\">Style</string>\n    <string name=\"adview_type\">Height</string>\n    <string name=\"show_code\">Show Code</string>\n\n    <string-array name=\"code_snippet_mediumrect_template\">\n        <item>protected void onCreate(Bundle savedInstanceState) {</item>\n        <item>\\t…</item>\n        <item>\\tnativeAdContainer = (LinearLayout) findViewById(R.id.nativeAdContainer);</item>\n        <item>\\tnativeAd = new NativeAd(NativeTemplateActivity.this, \"YOUR_PLACEMENT_ID\");</item>\n        <item>\\tnativeAd.setAdListener(NativeTemplateActivity.this);</item>\n        <item>\\tnativeAd.loadAd();</item>\n        <item>\\t…</item>\n        <item>}</item>\n        <item> </item>\n        <item>public void onAdLoaded(Ad ad) {</item>\n        <item>\\t…</item>\n        <item>\\tNativeAdViewAttributes adViewAttributes = new NativeAdViewAttributes();</item>\n        <item>\\tadViewAttributes.setBackgroundColor(adBackgroundColor);</item>\n        <item>\\tadViewAttributes.setTitleTextColor(adTitleColor);</item>\n        <item>\\t…</item>\n        <item>\\tView adView = NativeAdView.render(this, nativeAd, adViewAttributes);</item>\n        <item>\\tnativeAdContainer.addView(adView, 0);</item>\n        <item>\\t…</item>\n        <item>}</item>\n    </string-array>\n\n    <string-array name=\"code_snippet_banner_template\">\n        <item>protected void onCreate(Bundle savedInstanceState) {</item>\n        <item>\\t…</item>\n        <item>\\tnativeAdContainer = (LinearLayout) findViewById(R.id.nativeAdContainer);</item>\n        <item>\\tnativeBannerAd = new NativeBannerAd(getContext(), \"YOUR_PLACEMENT_ID\");</item>\n        <item>\\tnativeBannerAd.setAdListener(this);</item>\n        <item>\\tnativeBannerAd.loadAd();</item>\n        <item>\\t…</item>\n        <item>}</item>\n        <item> </item>\n        <item>public void onAdLoaded(Ad ad) {</item>\n        <item>\\t…</item>\n        <item>\\tNativeAdViewAttributes adViewAttributes = new NativeAdViewAttributes();</item>\n        <item>\\tadViewAttributes.setBackgroundColor(adBackgroundColor);</item>\n        <item>\\tadViewAttributes.setTitleTextColor(adTitleColor);</item>\n        <item>\\t…</item>\n        <item>\\tNativeBannerAdView.Type viewType = NativeBannerAdView.Type.HEIGHT_100;</item>\n        <item>\\tView adView = NativeBannerAdView.render(this, nativeBannerAd, viewType, adViewAttributes);</item>\n        <item>\\tnativeAdContainer.addView(adView, 0);</item>\n        <item>\\t…</item>\n        <item>}</item>\n    </string-array>\n\n    <string-array name=\"background_color_array\">\n        <item>White</item>\n        <item>Black</item>\n    </string-array>\n\n    <string-array name=\"ad_bannerview_type_array\">\n        <item>50 DP</item>\n        <item>100 DP</item>\n        <item>120 DP</item>\n    </string-array>\n</resources>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/values-large/layout.xml",
    "content": "<resources>\n    <item name=\"main\" type=\"layout\">@layout/activity_ad_sample</item>\n    <bool name=\"is_tablet\">true</bool>\n</resources>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/values-sw600dp/layout.xml",
    "content": "<resources>\n    <item name=\"main\" type=\"layout\">@layout/activity_ad_sample</item>\n    <bool name=\"is_tablet\">true</bool>\n</resources>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/xml/locales_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<locale-config xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <locale android:name=\"af\"/> <!-- Afrikaans -->\n    <locale android:name=\"am\"/> <!-- Amharic -->\n    <locale android:name=\"ar\"/> <!-- Arabic -->\n    <locale android:name=\"as\"/> <!-- Assamese -->\n    <locale android:name=\"az\"/> <!-- Azerbaijani -->\n    <locale android:name=\"be\"/> <!-- Belarusian -->\n    <locale android:name=\"bg\"/> <!-- Bulgarian -->\n    <locale android:name=\"bn\"/> <!-- Bengali -->\n    <locale android:name=\"bs\"/> <!-- Bosnian -->\n    <locale android:name=\"ca\"/> <!-- Catalan -->\n    <locale android:name=\"cs\"/> <!-- Czech -->\n    <locale android:name=\"da\"/> <!-- Danish -->\n    <locale android:name=\"de\"/> <!-- German -->\n    <locale android:name=\"el\"/> <!-- Greek -->\n    <locale android:name=\"en-AU\"/> <!-- English (Australia) -->\n    <locale android:name=\"en-CA\"/> <!-- English (Canada) -->\n    <locale android:name=\"en-GB\"/> <!-- English (United Kingdom) -->\n    <locale android:name=\"en-IN\"/> <!-- English (India) -->\n    <locale android:name=\"en-US\"/> <!-- English (United States) -->\n    <locale android:name=\"en-XA\"/> <!-- English (Pseudo-Accents) -->\n    <locale android:name=\"es\"/> <!-- Spanish (Spain) -->\n    <locale android:name=\"es-US\"/> <!-- Spanish (United States) -->\n    <locale android:name=\"et\"/> <!-- Estonian -->\n    <locale android:name=\"eu\"/> <!-- Basque -->\n    <locale android:name=\"fa\"/> <!-- Farsi -->\n    <locale android:name=\"fi\"/> <!-- Finnish -->\n    <locale android:name=\"fr\"/> <!-- French (France) -->\n    <locale android:name=\"fr-CA\"/> <!-- French (Canada) -->\n    <locale android:name=\"gl\"/> <!-- Galician -->\n    <locale android:name=\"gu\"/> <!-- Gujarati -->\n    <locale android:name=\"hi\"/> <!-- Hindi -->\n    <locale android:name=\"hr\"/> <!-- Croatian -->\n    <locale android:name=\"hu\"/> <!-- Hungarian -->\n    <locale android:name=\"hy\"/> <!-- Armenian -->\n    <locale android:name=\"in\"/> <!-- Indonesian -->\n    <locale android:name=\"is\"/> <!-- Icelandic -->\n    <locale android:name=\"it\"/> <!-- Italian -->\n    <locale android:name=\"iw\"/> <!-- Hebrew -->\n    <locale android:name=\"ja\"/> <!-- Japanese -->\n    <locale android:name=\"ka\"/> <!-- Georgian -->\n    <locale android:name=\"kk\"/> <!-- Kazakh -->\n    <locale android:name=\"km\"/> <!-- Khmer -->\n    <locale android:name=\"kn\"/> <!-- Kannada -->\n    <locale android:name=\"ko\"/> <!-- Korean -->\n    <locale android:name=\"ky\"/> <!-- Kyrgyz -->\n    <locale android:name=\"lo\"/> <!-- Lao -->\n    <locale android:name=\"lt\"/> <!-- Lithuanian -->\n    <locale android:name=\"lv\"/> <!-- Latvian -->\n    <locale android:name=\"mk\"/> <!-- Macedonian -->\n    <locale android:name=\"ml\"/> <!-- Malayalam -->\n    <locale android:name=\"mn\"/> <!-- Mongolian -->\n    <locale android:name=\"mr\"/> <!-- Marathi -->\n    <locale android:name=\"ms\"/> <!-- Malay -->\n    <locale android:name=\"my\"/> <!-- Burmese -->\n    <locale android:name=\"my-MM\"/> <!-- Burmese (Myanmar) -->\n    <locale android:name=\"nb\"/> <!-- Norwegian -->\n    <locale android:name=\"ne\"/> <!-- Nepali -->\n    <locale android:name=\"nl\"/> <!-- Dutch -->\n    <locale android:name=\"or\"/> <!-- Odia -->\n    <locale android:name=\"pa\"/> <!-- Punjabi -->\n    <locale android:name=\"pl\"/> <!-- Polish -->\n    <locale android:name=\"pt-BR\"/> <!-- Portuguese (Brazil) -->\n    <locale android:name=\"pt-PT\"/> <!-- Portuguese (Portugal) -->\n    <locale android:name=\"ro\"/> <!-- Romanian -->\n    <locale android:name=\"ru\"/> <!-- Russian -->\n    <locale android:name=\"si\"/> <!-- Sinhala -->\n    <locale android:name=\"sk\"/> <!-- Slovak -->\n    <locale android:name=\"sl\"/> <!-- Slovenian -->\n    <locale android:name=\"sq\"/> <!-- Albanian -->\n    <locale android:name=\"sr\"/> <!-- Serbian (Cyrillic) -->\n    <locale android:name=\"sr-Latn\"/> <!-- Serbian (Latin) -->\n    <locale android:name=\"sv\"/> <!-- Swedish -->\n    <locale android:name=\"sw\"/> <!-- Swahili -->\n    <locale android:name=\"ta\"/> <!-- Tamil -->\n    <locale android:name=\"te\"/> <!-- Telugu -->\n    <locale android:name=\"th\"/> <!-- Thai -->\n    <locale android:name=\"tl\"/> <!-- Filipino -->\n    <locale android:name=\"tr\"/> <!-- Turkish -->\n    <locale android:name=\"uk\"/> <!-- Ukrainian -->\n    <locale android:name=\"ur\"/> <!-- Urdu -->\n    <locale android:name=\"uz\"/> <!-- Uzbek -->\n    <locale android:name=\"vi\"/> <!-- Vietnamese -->\n    <locale android:name=\"zh-CN\"/> <!-- Chinese (Simplified) -->\n    <locale android:name=\"zh-HK\"/> <!-- Chinese (Hong Kong) -->\n    <locale android:name=\"zh-TW\"/> <!-- Chinese (Traditional) -->\n    <locale android:name=\"zu\"/> <!-- Zulu -->\n</locale-config>\n"
  },
  {
    "path": "samples/android/AdUnitsSample/src/main/res/xml/network_security_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<network-security-config>\n    <!-- Must be included for proper work of the cache. -->\n    <domain-config cleartextTrafficPermitted=\"true\">\n        <domain includeSubdomains=\"true\">127.0.0.1</domain>\n    </domain-config>\n\n    <!-- For internal use only. -->\n    <domain-config>\n        <domain includeSubdomains=\"true\">facebook.com</domain>\n        <trust-anchors>\n            <certificates src=\"system\"/>\n            <certificates src=\"user\"/>\n        </trust-anchors>\n    </domain-config>\n</network-security-config>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/KotlinAdUnitsSample/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/LICENSE",
    "content": "Copyright (c) Meta Platforms, Inc. and affiliates.\nAll rights reserved.\n\nYou are hereby granted a non-exclusive, worldwide, royalty-free license to use,\ncopy, modify, and distribute this software in source code or binary form for use\nin connection with the web services and APIs provided by Facebook.\n\nAs with any software that integrates with the Facebook platform, your use of\nthis software is subject to the Facebook Platform Policy\n[http://developers.facebook.com/policy/]. This copyright notice shall be\nincluded in all copies or substantial portions of the software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/build.gradle",
    "content": "apply plugin: 'com.android.application'\napply plugin: 'kotlin-android'\n\nrepositories {\n  flatDir {\n    dirs 'libs'\n  }\n}\n\ndependencies {\n    implementation(name: 'AudienceNetwork', ext: 'aar')\n    implementation(name: 'DebugSettings', ext: 'aar')\n\n    implementation \"androidx.legacy:legacy-support-v4:$project.ANDROIDX_VERSION\"\n    implementation \"androidx.recyclerview:recyclerview:$project.ANDROIDX_VERSION\"\n    implementation \"androidx.appcompat:appcompat:$project.ANDROIDX_VERSION\"\n    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'\n    implementation \"com.google.android.gms:play-services-basement:$project.ANDROID_GOOGLE_PLAY_SERVICES_VERSION\"\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$project.KOTLIN_VERSION\"\n}\n\nandroid {\n    compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)\n    buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION\n    useLibrary 'org.apache.http.legacy'\n    defaultConfig {\n        applicationId 'com.facebook.samples.AdUnitsSample'\n        minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)\n        targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)\n        versionCode 1\n        versionName '1.0'\n        rootProject.ext.variantRelease = false\n    }\n    lintOptions {\n        abortOnError false\n    }\n    buildFeatures {\n        viewBinding true\n    }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/AndroidManifest.xml",
    "content": "<manifest package=\"com.facebook.samples.adunitssamplekotlin\"\n          xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <application\n            android:icon=\"@drawable/ic_launcher\"\n            android:label=\"@string/app_name\"\n            android:theme=\"@style/AppTheme\"\n            android:name=\"com.facebook.samples.adunitssamplekotlin.AdUnitsSampleApplication\"\n            >\n\n        <activity android:name=\"com.facebook.samples.adunitssamplekotlin.SplashActivity\"\n            android:exported=\"true\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity android:name=\"com.facebook.samples.adunitssamplekotlin.SampleListActivity\" />\n        <activity android:name=\"com.facebook.samples.adunitssamplekotlin.AdUnitsSampleActivity\" />\n    </application>\n</manifest>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/AdUnitsSampleActivity.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.view.Menu\nimport android.view.MenuItem\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.fragment.app.Fragment\nimport com.facebook.samples.ads.debugsettings.DebugSettingsActivity\nimport com.facebook.samples.adunitssamplekotlin.fragments.*\n\nclass AdUnitsSampleActivity : AppCompatActivity() {\n  companion object {\n    val TAG: String = AdUnitsSampleActivity::class.java.simpleName\n    const val SAMPLE_TYPE: String = \"SAMPLE_TYPE\"\n  }\n\n  override fun onCreate(savedInstanceState: Bundle?) {\n    super.onCreate(savedInstanceState)\n\n    setContentView(R.layout.activity_ad_sample)\n\n    if (savedInstanceState != null) {\n      return\n    }\n\n    val sampleType = intent.getStringExtra(SAMPLE_TYPE)\n    if (sampleType != null) {\n      val type: AdUnitsSampleType? = AdUnitsSampleType.getSampleTypeFromName(sampleType)\n      if (type != null) {\n        val fragment: Fragment? =\n            when (type) {\n              AdUnitsSampleType.BANNER -> BannerFragment()\n              AdUnitsSampleType.INTERSTITIAL -> InterstitialFragment()\n              AdUnitsSampleType.RECTANGLE -> RectangleFragment()\n              AdUnitsSampleType.REWARDED_VIDEO -> RewardedVideoFragment()\n              AdUnitsSampleType.REWARDED_INTERSTITIAL -> RewardedInterstitialFragment()\n              AdUnitsSampleType.NATIVE -> NativeAdSampleFragment()\n              AdUnitsSampleType.NATIVE_BANNER -> NativeBannerAdFragment()\n              AdUnitsSampleType.RECYCLERVIEW -> NativeAdRecyclerFragment()\n              AdUnitsSampleType.HSCROLL -> NativeAdHScrollFragment()\n              AdUnitsSampleType.TEMPLATE -> NativeAdTemplateFragment()\n              AdUnitsSampleType.BANNER_TEMPLATE -> NativeBannerAdTemplateFragment()\n            }\n        if (fragment != null) {\n          fragment.setRetainInstance(true)\n          title = type.sampleType\n          supportFragmentManager.beginTransaction().add(R.id.fragment_container, fragment).commit()\n        }\n      }\n    }\n  }\n\n  override fun onCreateOptionsMenu(menu: Menu): Boolean {\n    val inflater = menuInflater\n    inflater.inflate(R.menu.ad_units_sample_menu, menu)\n    return true\n  }\n\n  override fun onOptionsItemSelected(item: MenuItem): Boolean {\n    val i = item.itemId\n    if (i == R.id.debug_settings) {\n      startActivity(Intent(applicationContext, DebugSettingsActivity::class.java))\n      return true\n    }\n\n    return super.onOptionsItemSelected(item)\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/AdUnitsSampleApplication.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin\n\nimport android.app.Application\nimport android.os.StrictMode\nimport com.facebook.samples.ads.debugsettings.DebugSettings\nimport com.facebook.samples.adunitssamplekotlin.BuildConfig.DEBUG\n\nclass AdUnitsSampleApplication : Application() {\n\n  override fun onCreate() {\n    super.onCreate()\n\n    DebugSettings.initialize(this)\n\n    AudienceNetworkInitializeHelper.initialize(this)\n\n    if (DEBUG) {\n      StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build())\n      StrictMode.setVmPolicy(StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build())\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/AdUnitsSampleType.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin\n\nenum class AdUnitsSampleType(val sampleType: String) {\n  BANNER(\"Banner\"),\n  RECTANGLE(\"Rectangle\"),\n  INTERSTITIAL(\"Interstitial\"),\n  REWARDED_VIDEO(\"Rewarded Video\"),\n  REWARDED_INTERSTITIAL(\"Rewarded Interstitial\"),\n  NATIVE(\"Native Ad\"),\n  NATIVE_BANNER(\"Native Banner Ad\"),\n  RECYCLERVIEW(\"Native Ad in RecyclerView\"),\n  HSCROLL(\"Native Ad in H-Scroll\"),\n  TEMPLATE(\"Native Ad Template\"),\n  BANNER_TEMPLATE(\"Native Banner Ad Template\");\n\n  companion object {\n    fun getSampleTypeFromName(name: String): AdUnitsSampleType? {\n      for (type in values()) {\n        if (type.sampleType.contentEquals(name)) {\n          return type\n        }\n      }\n\n      return null\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/AudienceNetworkInitializeHelper.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin\n\nimport android.content.Context\nimport android.util.Log\nimport com.facebook.ads.AdSettings\nimport com.facebook.ads.AudienceNetworkAds\nimport com.facebook.samples.adunitssamplekotlin.BuildConfig.DEBUG\n\n/** Sample class that shows how to call initialize() method of Audience Network SDK. */\nclass AudienceNetworkInitializeHelper : AudienceNetworkAds.InitListener {\n\n  override fun onInitialized(result: AudienceNetworkAds.InitResult) {\n    Log.d(AudienceNetworkAds.TAG, result.message)\n  }\n\n  companion object {\n\n    /**\n     * It's recommended to call this method from Application.onCreate(). Otherwise you can call it\n     * from all Activity.onCreate() methods for Activities that contain ads.\n     *\n     * @param context Application or Activity.\n     */\n    internal fun initialize(context: Context) {\n      if (!AudienceNetworkAds.isInitialized(context)) {\n        if (DEBUG) {\n          AdSettings.turnOnSDKDebugger(context)\n        }\n\n        AudienceNetworkAds.buildInitSettings(context)\n            .withInitListener(AudienceNetworkInitializeHelper())\n            .initialize()\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/SampleListActivity.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.view.Menu\nimport android.view.MenuItem\nimport androidx.appcompat.app.AppCompatActivity\nimport com.facebook.samples.ads.debugsettings.DebugSettingsActivity\nimport com.facebook.samples.adunitssamplekotlin.fragments.SampleListFragment\n\nclass SampleListActivity : AppCompatActivity() {\n\n  companion object {\n    val TAG = SampleListActivity::class.java.simpleName\n  }\n\n  override fun onCreate(savedInstanceState: Bundle?) {\n    super.onCreate(savedInstanceState)\n\n    setContentView(R.layout.activity_sample_list)\n\n    supportFragmentManager\n        .beginTransaction()\n        .add(R.id.list_fragment_container, SampleListFragment())\n        .commit()\n  }\n\n  override fun onCreateOptionsMenu(menu: Menu): Boolean {\n    menuInflater.inflate(R.menu.ad_units_sample_menu, menu)\n    return true\n  }\n\n  override fun onOptionsItemSelected(item: MenuItem): Boolean {\n    if (item.itemId == R.id.debug_settings) {\n      // Start debug settings\n      startActivity(Intent(this, DebugSettingsActivity::class.java))\n      return true\n    }\n\n    return super.onOptionsItemSelected(item)\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/SplashActivity.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.os.Bundle\nimport android.os.Handler\nimport android.os.Looper\nimport android.view.Window\nimport android.view.WindowManager\n\nclass SplashActivity : Activity() {\n\n  override fun onCreate(savedInstanceState: Bundle?) {\n    super.onCreate(savedInstanceState)\n\n    // If you call AudienceNetworkAds.buildInitSettings(Context).initialize()\n    // in Application.onCreate() this call is not really necessary.\n    // Otherwise call initialize() onCreate() of all Activities that contain ads or\n    // from onCreate() of your Splash Activity.\n    AudienceNetworkInitializeHelper.initialize(this)\n\n    // Hide title and nav bar, must be done before setContentView.\n    requestWindowFeature(Window.FEATURE_NO_TITLE)\n    window.setFlags(\n        WindowManager.LayoutParams.FLAG_FULLSCREEN,\n        WindowManager.LayoutParams.FLAG_FULLSCREEN,\n    )\n\n    setContentView(R.layout.activity_splash)\n\n    val handler = Handler(Looper.getMainLooper())\n    handler.postDelayed(\n        {\n          val intent = Intent(this@SplashActivity, SampleListActivity::class.java)\n          startActivity(intent)\n        },\n        SPLASH_TIME.toLong(),\n    )\n  }\n\n  companion object {\n    private const val SPLASH_TIME = 2000\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/adapters/NativeAdRecyclerAdapter.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.adapters\n\nimport android.app.Activity\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\nimport com.facebook.samples.adunitssamplekotlin.models.RecyclerPostItem\nimport java.util.ArrayList\n\nclass NativeAdRecyclerAdapter(\n    private val activity: Activity,\n    private val postItems: List<RecyclerPostItem>,\n    private val nativeAdsManager: NativeAdsManager,\n) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {\n  private val adItems: MutableList<NativeAd>\n\n  init {\n    adItems = ArrayList()\n  }\n\n  override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {\n    return if (viewType == AD_TYPE) {\n      val inflatedView =\n          LayoutInflater.from(parent.context).inflate(R.layout.native_ad_unit, parent, false)\n              as NativeAdLayout\n      AdHolder(inflatedView)\n    } else {\n      val inflatedView =\n          LayoutInflater.from(parent.context).inflate(R.layout.recycler_post_item, parent, false)\n      PostHolder(inflatedView)\n    }\n  }\n\n  override fun getItemViewType(position: Int): Int {\n    return if (position % AD_DISPLAY_FREQUENCY == 0) AD_TYPE else POST_TYPE\n  }\n\n  override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {\n    if (holder.itemViewType == AD_TYPE) {\n      val ad: NativeAd?\n\n      if (adItems.size > position / AD_DISPLAY_FREQUENCY) {\n        ad = adItems[position / AD_DISPLAY_FREQUENCY]\n      } else {\n        ad = nativeAdsManager.nextNativeAd()\n        if (ad != null && !ad.isAdInvalidated) {\n          adItems.add(ad)\n        } else {\n          Log.w(NativeAdRecyclerAdapter::class.java.simpleName, \"Ad is invalidated!\")\n        }\n      }\n\n      val adHolder = holder as AdHolder\n      adHolder.adChoicesContainer.removeAllViews()\n\n      ad?.let { nonNullAd ->\n        adHolder.tvAdTitle.text = nonNullAd.advertiserName\n        adHolder.tvAdBody.text = nonNullAd.adBodyText\n        adHolder.tvAdSocialContext.text = nonNullAd.adSocialContext\n        adHolder.tvAdSponsoredLabel.setText(R.string.sponsored)\n        adHolder.btnAdCallToAction.text = nonNullAd.adCallToAction\n        adHolder.btnAdCallToAction.visibility =\n            if (nonNullAd.hasCallToAction()) View.VISIBLE else View.INVISIBLE\n        val adOptionsView = AdOptionsView(activity, nonNullAd, adHolder.nativeAdLayout)\n        adHolder.adChoicesContainer.addView(adOptionsView, 0)\n\n        val clickableViews = ArrayList<View>()\n        clickableViews.add(adHolder.ivAdIcon)\n        clickableViews.add(adHolder.mvAdMedia)\n        clickableViews.add(adHolder.btnAdCallToAction)\n        nonNullAd.registerViewForInteraction(\n            adHolder.nativeAdLayout,\n            adHolder.mvAdMedia,\n            adHolder.ivAdIcon,\n            clickableViews,\n        )\n      }\n    } else {\n      val postHolder = holder as PostHolder\n\n      // Calculate where the next postItem index is by subtracting ads we've shown.\n      val index = position - position / AD_DISPLAY_FREQUENCY - 1\n\n      val postItem = postItems[index]\n      postHolder.tvPostContent.text = postItem.postContent\n    }\n  }\n\n  override fun getItemCount(): Int {\n    return postItems.size + adItems.size\n  }\n\n  private class PostHolder internal constructor(view: View) : RecyclerView.ViewHolder(view) {\n    internal var tvPostContent: TextView = view.findViewById(R.id.tvPostContent)\n  }\n\n  private class AdHolder internal constructor(internal var nativeAdLayout: NativeAdLayout) :\n      RecyclerView.ViewHolder(nativeAdLayout) {\n    internal var mvAdMedia: MediaView = nativeAdLayout.findViewById(R.id.native_ad_media)\n    internal var ivAdIcon: MediaView = nativeAdLayout.findViewById(R.id.native_ad_icon)\n    internal var tvAdTitle: TextView = nativeAdLayout.findViewById(R.id.native_ad_title)\n    internal var tvAdBody: TextView = nativeAdLayout.findViewById(R.id.native_ad_body)\n    internal var tvAdSocialContext: TextView =\n        nativeAdLayout.findViewById(R.id.native_ad_social_context)\n    internal var tvAdSponsoredLabel: TextView =\n        nativeAdLayout.findViewById(R.id.native_ad_sponsored_label)\n    internal var btnAdCallToAction: Button =\n        nativeAdLayout.findViewById(R.id.native_ad_call_to_action)\n    internal var adChoicesContainer: LinearLayout =\n        nativeAdLayout.findViewById(R.id.ad_choices_container)\n  }\n\n  companion object {\n\n    private const val AD_DISPLAY_FREQUENCY = 5\n    private const val POST_TYPE = 0\n    private const val AD_TYPE = 1\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/adapters/SampleAdapter.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.adapters\n\nimport android.content.Context\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ArrayAdapter\nimport android.widget.TextView\nimport com.facebook.samples.adunitssamplekotlin.AdUnitsSampleType\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass SampleAdapter(context: Context, resource: Int) :\n    ArrayAdapter<SampleAdapter.Item>(context, resource) {\n  class Item(val title: String, val isSection: Boolean = false)\n\n  private val inflater: LayoutInflater = LayoutInflater.from(this.context)\n\n  init {\n    add(Item(\"Basic Samples\", true))\n    add(Item(AdUnitsSampleType.BANNER.sampleType))\n    add(Item(AdUnitsSampleType.RECTANGLE.sampleType))\n    add(Item(AdUnitsSampleType.INTERSTITIAL.sampleType))\n    add(Item(AdUnitsSampleType.REWARDED_VIDEO.sampleType))\n    add(Item(AdUnitsSampleType.REWARDED_INTERSTITIAL.sampleType))\n\n    add(Item(\"Native Ad Samples\", true))\n    add(Item(AdUnitsSampleType.NATIVE.sampleType))\n    add(Item(AdUnitsSampleType.NATIVE_BANNER.sampleType))\n    add(Item(AdUnitsSampleType.RECYCLERVIEW.sampleType))\n    add(Item(AdUnitsSampleType.HSCROLL.sampleType))\n    add(Item(AdUnitsSampleType.TEMPLATE.sampleType))\n    add(Item(AdUnitsSampleType.BANNER_TEMPLATE.sampleType))\n  }\n\n  constructor(context: Context) : this(context, 0)\n\n  override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {\n    val v: View\n    val item = getItem(position)\n    if (item.isSection) {\n      v = inflater.inflate(R.layout.list_item_section, parent, false)\n      v.findViewById<TextView>(R.id.list_item_title).text = item.title\n    } else {\n      v = inflater.inflate(android.R.layout.simple_list_item_1, parent, false)\n      v.findViewById<TextView>(android.R.id.text1).text = item.title\n    }\n    return v\n  }\n\n  override fun getItem(position: Int): Item {\n    return checkNotNull(super.getItem(position)) {\n      \"Only add non-null SampleAdapter.Item to the adapter\"\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/BannerFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.RelativeLayout\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass BannerFragment : Fragment(), AdListener {\n  companion object {\n    val TAG = BannerFragment::class.java.simpleName\n  }\n\n  private var bannerAdView: AdView? = null\n  private var bannerStatusLabel: TextView? = null\n  private var bannerAdContainer: RelativeLayout? = null\n  private var refreshBannerButton: Button? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n    val view = inflater.inflate(R.layout.fragment_banner, container, false)\n\n    bannerStatusLabel = view.findViewById(R.id.bannerStatusLabel)\n    bannerAdContainer = view.findViewById(R.id.bannerAdContainer)\n    refreshBannerButton = view.findViewById(R.id.refreshBannerButton)\n    refreshBannerButton?.setOnClickListener { loadAdView() }\n    loadAdView()\n    return view\n  }\n\n  override fun onError(ad: Ad?, error: AdError?) {\n    if (ad == bannerAdView) {\n      Log.e(TAG, \"Banner failed to load: \" + error?.errorMessage)\n    }\n  }\n\n  override fun onAdLoaded(ad: Ad?) {\n    if (ad == bannerAdView) {\n      setLabel(\"\")\n    }\n  }\n\n  override fun onAdClicked(ad: Ad?) {\n    Toast.makeText(this.activity, \"Ad clicked!\", Toast.LENGTH_SHORT).show()\n  }\n\n  override fun onLoggingImpression(ad: Ad?) {\n    Log.d(TAG, \"onLoggingImpression\")\n  }\n\n  private fun setLabel(status: String) {\n    bannerStatusLabel?.text = status\n  }\n\n  private fun loadAdView() {\n    bannerAdView?.destroy()\n    bannerAdView = null\n\n    setLabel(getString(R.string.loading_status))\n\n    bannerAdView = AdView(this.activity, \"YOUR_PLACEMENT_ID\", AdSize.BANNER_HEIGHT_50)\n    bannerAdView?.let { nonNullBannerAdView ->\n      bannerAdContainer?.addView(nonNullBannerAdView)\n      nonNullBannerAdView.loadAd(\n          nonNullBannerAdView.buildLoadAdConfig().withAdListener(this).build()\n      )\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/InterstitialFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\nimport java.util.*\n\nclass InterstitialFragment : Fragment(), InterstitialAdListener {\n\n  companion object {\n    val TAG = InterstitialFragment::class.java.simpleName\n  }\n\n  private var interstitialAd: InterstitialAd? = null\n\n  private var interstitialAdStatusLabel: TextView? = null\n  private var loadInterstitialButton: Button? = null\n  private var showInterstitialButton: Button? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n    val view = inflater.inflate(R.layout.fragment_interstitial, container, false)\n    interstitialAdStatusLabel = view?.findViewById(R.id.interstitialAdStatusLabel)\n    loadInterstitialButton = view?.findViewById(R.id.loadInterstitialButton)\n    showInterstitialButton = view?.findViewById(R.id.showInterstitialButton)\n\n    loadInterstitialButton?.setOnClickListener {\n      if (interstitialAd != null) {\n        interstitialAd?.destroy()\n        interstitialAd = null\n      }\n      setLabel(\"Loading interstitial ad...\")\n\n      interstitialAd = InterstitialAd(this.activity, \"YOUR_PLACEMENT_ID\")\n      interstitialAd?.loadAd(\n          interstitialAd!!\n              .buildLoadAdConfig()\n              .withAdListener(this)\n              .withCacheFlags(EnumSet.of(CacheFlag.VIDEO))\n              .build()\n      )\n    }\n\n    showInterstitialButton?.setOnClickListener {\n      if (interstitialAd == null || !interstitialAd!!.isAdLoaded) {\n        setLabel(\"Ad not loaded. Click load to request an ad.\")\n      } else {\n        interstitialAd?.show()\n        setLabel(\"\")\n      }\n    }\n    return view\n  }\n\n  override fun onDestroy() {\n    interstitialAd?.destroy()\n    interstitialAd = null\n\n    super.onDestroy()\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    if (ad === interstitialAd) {\n      setLabel(\"Interstitial ad failed to load: \" + error.errorMessage)\n    }\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (ad === interstitialAd) {\n      setLabel(\"Ad loaded. Click show to present!\")\n    }\n  }\n\n  override fun onInterstitialDisplayed(ad: Ad) {\n    if (isAdded) {\n      Toast.makeText(activity, \"Interstitial Displayed\", Toast.LENGTH_SHORT).show()\n    }\n  }\n\n  override fun onInterstitialDismissed(ad: Ad) {\n    if (isAdded) {\n      Toast.makeText(activity, \"Interstitial Dismissed\", Toast.LENGTH_SHORT).show()\n    }\n\n    // Cleanup.\n    interstitialAd?.destroy()\n    interstitialAd = null\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    if (isAdded) {\n      Toast.makeText(activity, \"Interstitial Clicked\", Toast.LENGTH_SHORT).show()\n    }\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    Log.d(TAG, \"onLoggingImpression\")\n  }\n\n  private fun setLabel(label: String) {\n    interstitialAdStatusLabel?.text = label\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/NativeAdHScrollFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.LinearLayout\nimport android.widget.Toast\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.AdError\nimport com.facebook.ads.NativeAdBase\nimport com.facebook.ads.NativeAdScrollView\nimport com.facebook.ads.NativeAdsManager\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass NativeAdHScrollFragment : Fragment(), NativeAdsManager.Listener {\n\n  private var manager: NativeAdsManager? = null\n  private var scrollView: NativeAdScrollView? = null\n  private var scrollViewContainer: LinearLayout? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n    // Inflate the layout for this fragment\n    val view = inflater.inflate(R.layout.fragment_native_ad_hscroll, container, false)\n\n    manager = NativeAdsManager(activity, \"YOUR_PLACEMENT_ID\", 5)\n    manager!!.setListener(this)\n    manager!!.loadAds(NativeAdBase.MediaCacheFlag.ALL)\n\n    val reloadButton = view.findViewById(R.id.reload_hscroll) as Button\n    reloadButton.setOnClickListener { manager!!.loadAds() }\n\n    scrollViewContainer = view.findViewById(R.id.hscroll_container)\n\n    return view\n  }\n\n  override fun onAdsLoaded() {\n    if (activity == null) {\n      return\n    }\n\n    Toast.makeText(activity, \"Ads loaded\", Toast.LENGTH_SHORT).show()\n\n    if (scrollView != null) {\n      scrollViewContainer?.removeView(scrollView)\n    }\n\n    scrollView = NativeAdScrollView(activity, manager, NATIVE_AD_VIEW_HEIGHT_DP)\n\n    scrollViewContainer?.addView(scrollView)\n  }\n\n  override fun onAdError(error: AdError) {\n    if (activity != null) {\n      Toast.makeText(activity, \"Ad error: \" + error.errorMessage, Toast.LENGTH_SHORT).show()\n    }\n  }\n\n  companion object {\n\n    private const val NATIVE_AD_VIEW_HEIGHT_DP = 300\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/NativeAdRecyclerFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport androidx.fragment.app.Fragment\nimport androidx.recyclerview.widget.DividerItemDecoration\nimport androidx.recyclerview.widget.LinearLayoutManager\nimport androidx.recyclerview.widget.RecyclerView\nimport com.facebook.ads.AdError\nimport com.facebook.ads.NativeAdsManager\nimport com.facebook.samples.adunitssamplekotlin.R\nimport com.facebook.samples.adunitssamplekotlin.adapters.NativeAdRecyclerAdapter\nimport com.facebook.samples.adunitssamplekotlin.models.RecyclerPostItem\nimport java.util.ArrayList\n\nclass NativeAdRecyclerFragment : Fragment(), NativeAdsManager.Listener {\n\n  private var postItemList: ArrayList<RecyclerPostItem>? = null\n  private var nativeAdsManager: NativeAdsManager? = null\n  private var recyclerView: RecyclerView? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n\n    // Create some dummy post items\n    postItemList = ArrayList()\n    for (i in 1..100) {\n      postItemList!!.add(RecyclerPostItem(\"RecyclerView Item #$i\"))\n    }\n\n    val placementId = \"YOUR_PLACEMENT_ID\"\n    nativeAdsManager = NativeAdsManager(activity, placementId, 5)\n    nativeAdsManager!!.loadAds()\n    nativeAdsManager!!.setListener(this)\n\n    // Inflate the layout for this fragment\n    val view = inflater.inflate(R.layout.fragment_native_ad_recycler, container, false)\n    recyclerView = view.findViewById(R.id.recyclerView)\n    return view\n  }\n\n  override fun onAdsLoaded() {\n    if (activity == null) {\n      return\n    }\n\n    recyclerView!!.layoutManager = LinearLayoutManager(activity)\n    val itemDecoration = DividerItemDecoration(activity, DividerItemDecoration.VERTICAL)\n    recyclerView!!.addItemDecoration(itemDecoration)\n    val adapter = NativeAdRecyclerAdapter(activity!!, postItemList!!, nativeAdsManager!!)\n    recyclerView!!.adapter = adapter\n  }\n\n  override fun onAdError(error: AdError) = Unit\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/NativeAdSampleFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.MotionEvent\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\nimport java.util.ArrayList\n\nclass NativeAdSampleFragment : Fragment(), NativeAdListener {\n\n  private var nativeAdStatus: TextView? = null\n  private var adChoicesContainer: LinearLayout? = null\n\n  private var nativeAdLayout: NativeAdLayout? = null\n  private var nativeAd: NativeAd? = null\n  private var adOptionsView: AdOptionsView? = null\n  private var nativeAdMedia: MediaView? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n    val view = inflater.inflate(R.layout.fragment_native_ad_sample, container, false)\n    nativeAdLayout = view.findViewById(R.id.native_ad_container)\n\n    nativeAdStatus = view.findViewById(R.id.native_ad_status)\n    adChoicesContainer = view.findViewById(R.id.ad_choices_container)\n\n    val showNativeAdButton = view.findViewById<Button>(R.id.load_native_ad_button)\n    showNativeAdButton.setOnClickListener {\n      nativeAdStatus?.setText(R.string.loading_status)\n\n      // Create a native ad request with a unique placement ID (generate your own on the\n      // Facebook app settings). Use different ID for each ad placement in your app.\n      nativeAd = NativeAd(activity, \"YOUR_PLACEMENT_ID\")\n\n      // When testing on a device, add its hashed ID to force test ads.\n      // The hash ID is printed to log cat when running on a device and loading an ad.\n      // AdSettings.addTestDevice(\"THE HASHED ID AS PRINTED TO LOG CAT\");\n\n      // Initiate a request to load an ad.\n      nativeAd?.loadAd(\n          nativeAd!!\n              .buildLoadAdConfig()\n              // Set a listener to get notified when the ad was loaded.\n              .withAdListener(this@NativeAdSampleFragment)\n              .build()\n      )\n    }\n\n    // if we already have loaded ad, render it\n    nativeAd?.let { onAdLoaded(it) }\n\n    return view\n  }\n\n  override fun onDestroyView() {\n    adChoicesContainer = null\n    nativeAdLayout = null\n    adOptionsView = null\n    nativeAdStatus = null\n    super.onDestroyView()\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    nativeAdStatus?.text = \"Ad failed to load: \" + error.errorMessage\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    Toast.makeText(activity, \"Ad Clicked\", Toast.LENGTH_SHORT).show()\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    Log.d(TAG, \"onLoggingImpression\")\n  }\n\n  override fun onMediaDownloaded(ad: Ad) {\n    if (nativeAd === ad) {\n      Log.d(TAG, \"onMediaDownloaded\")\n    }\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (nativeAd == null || nativeAd !== ad) {\n      // Race condition, load() called again before last ad was displayed\n      return\n    }\n\n    if (nativeAdLayout == null) {\n      return\n    }\n\n    // Unregister last ad\n    nativeAd!!.unregisterView()\n    nativeAdStatus?.text = \"\"\n\n    if (adChoicesContainer != null) {\n      adOptionsView = AdOptionsView(activity, nativeAd, nativeAdLayout)\n      adChoicesContainer?.removeAllViews()\n      adChoicesContainer?.addView(adOptionsView, 0)\n    }\n\n    inflateAd(nativeAd!!, nativeAdLayout!!)\n\n    // Registering a touch listener to log which ad component receives the touch event.\n    // We always return false from onTouch so that we don't swallow the touch event (which\n    // would prevent click events from reaching the NativeAd control).\n    // The touch listener could be used to do animations.\n    nativeAd!!.setOnTouchListener { view, event ->\n      if (event.action == MotionEvent.ACTION_DOWN) {\n        when (view.id) {\n          R.id.native_ad_call_to_action -> Log.d(TAG, \"Call to action button clicked\")\n          R.id.native_ad_media -> Log.d(TAG, \"Main image clicked\")\n          else -> Log.d(TAG, \"Other ad component clicked\")\n        }\n      }\n      false\n    }\n  }\n\n  private fun inflateAd(nativeAd: NativeAd, adView: View) {\n    // Create native UI using the ad metadata.\n    val nativeAdIcon = adView.findViewById<MediaView>(R.id.native_ad_icon)\n    val nativeAdTitle = adView.findViewById<TextView>(R.id.native_ad_title)\n    val nativeAdBody = adView.findViewById<TextView>(R.id.native_ad_body)\n    val sponsoredLabel = adView.findViewById<TextView>(R.id.native_ad_sponsored_label)\n    val nativeAdSocialContext = adView.findViewById<TextView>(R.id.native_ad_social_context)\n    val nativeAdCallToAction = adView.findViewById<Button>(R.id.native_ad_call_to_action)\n\n    nativeAdMedia = adView.findViewById(R.id.native_ad_media)\n    nativeAdMedia?.setListener(mediaViewListener)\n\n    // Setting the Text\n    nativeAdSocialContext.text = nativeAd.adSocialContext\n    nativeAdCallToAction.text = nativeAd.adCallToAction\n    nativeAdCallToAction.visibility =\n        if (nativeAd.hasCallToAction()) View.VISIBLE else View.INVISIBLE\n    nativeAdTitle.text = nativeAd.advertiserName\n    nativeAdBody.text = nativeAd.adBodyText\n    sponsoredLabel.setText(R.string.sponsored)\n\n    // You can use the following to specify the clickable areas.\n    val clickableViews = ArrayList<View>()\n    clickableViews.add(nativeAdIcon)\n    clickableViews.add(nativeAdMedia!!)\n    clickableViews.add(nativeAdCallToAction)\n    nativeAd.registerViewForInteraction(nativeAdLayout, nativeAdMedia, nativeAdIcon, clickableViews)\n\n    // Optional: tag views\n    NativeAdBase.NativeComponentTag.tagView(nativeAdIcon, NativeAdBase.NativeComponentTag.AD_ICON)\n    NativeAdBase.NativeComponentTag.tagView(nativeAdTitle, NativeAdBase.NativeComponentTag.AD_TITLE)\n    NativeAdBase.NativeComponentTag.tagView(nativeAdBody, NativeAdBase.NativeComponentTag.AD_BODY)\n    NativeAdBase.NativeComponentTag.tagView(\n        nativeAdSocialContext,\n        NativeAdBase.NativeComponentTag.AD_SOCIAL_CONTEXT,\n    )\n    NativeAdBase.NativeComponentTag.tagView(\n        nativeAdCallToAction,\n        NativeAdBase.NativeComponentTag.AD_CALL_TO_ACTION,\n    )\n  }\n\n  override fun onDestroy() {\n    nativeAdMedia?.destroy()\n    nativeAd?.unregisterView()\n    nativeAd?.destroy()\n\n    super.onDestroy()\n  }\n\n  companion object {\n\n    private val TAG = NativeAdSampleFragment::class.java.simpleName\n\n    private val mediaViewListener: MediaViewListener\n      get() =\n          object : MediaViewListener {\n            override fun onVolumeChange(mediaView: MediaView, volume: Float) {\n              Log.i(TAG, \"MediaViewEvent: Volume $volume\")\n            }\n\n            override fun onPause(mediaView: MediaView) {\n              Log.i(TAG, \"MediaViewEvent: Paused\")\n            }\n\n            override fun onPlay(mediaView: MediaView) {\n              Log.i(TAG, \"MediaViewEvent: Play\")\n            }\n\n            override fun onFullscreenBackground(mediaView: MediaView) {\n              Log.i(TAG, \"MediaViewEvent: FullscreenBackground\")\n            }\n\n            override fun onFullscreenForeground(mediaView: MediaView) {\n              Log.i(TAG, \"MediaViewEvent: FullscreenForeground\")\n            }\n\n            override fun onExitFullscreen(mediaView: MediaView) {\n              Log.i(TAG, \"MediaViewEvent: ExitFullscreen\")\n            }\n\n            override fun onEnterFullscreen(mediaView: MediaView) {\n              Log.i(TAG, \"MediaViewEvent: EnterFullscreen\")\n            }\n\n            override fun onComplete(mediaView: MediaView) {\n              Log.i(TAG, \"MediaViewEvent: Completed\")\n            }\n          }\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/NativeAdTemplateFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.content.Context\nimport android.content.res.Resources\nimport android.graphics.Color\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.*\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass NativeAdTemplateFragment : Fragment(), NativeAdListener {\n\n  private var nativeAd: NativeAd? = null\n  private var layoutHeightDp = DEFAULT_HEIGHT_DP\n\n  private var adBackgroundColor: Int = 0\n  private var titleColor: Int = 0\n  private var ctaTextColor: Int = 0\n  private var contentColor: Int = 0\n  private var ctaBgColor: Int = 0\n\n  private var statusText: TextView? = null\n  private var nativeAdContainer: ViewGroup? = null\n  private var backgroundColorSpinner: Spinner? = null\n  private var showCodeButton: Button? = null\n  private var reloadButton: Button? = null\n  private var seekBar: SeekBar? = null\n  private var adView: View? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n\n    val view = inflater.inflate(R.layout.fragment_native_ad_template, container, false)\n\n    statusText = view.findViewById(R.id.status)\n    nativeAdContainer = view.findViewById(R.id.templateContainer)\n    showCodeButton = view.findViewById(R.id.showCodeButton)\n    reloadButton = view.findViewById(R.id.reloadAdButton)\n    backgroundColorSpinner = view.findViewById(R.id.backgroundColorSpinner)\n    seekBar = view.findViewById(R.id.seekBar)\n\n    setUpLayoutBuilders(inflater.context)\n    setUpButtons()\n\n    createAndLoadNativeAd()\n\n    return view\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (nativeAd == null || nativeAd !== ad) {\n      // Race condition, load() called again before last ad was displayed\n      return\n    }\n\n    statusText?.setText(R.string.ad_loaded)\n    reloadAdContainer()\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    val msg = resources.getString(R.string.ad_load_failed, error.errorMessage)\n    statusText?.text = msg\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    statusText?.setText(R.string.ad_clicked)\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    Log.d(TAG, \"onLoggingImpression\")\n  }\n\n  override fun onMediaDownloaded(ad: Ad) {\n    Log.d(TAG, \"onMediaDownloaded\")\n  }\n\n  override fun onDestroy() {\n    nativeAd = null\n    super.onDestroy()\n  }\n\n  private fun createAndLoadNativeAd() {\n    // Create a native ad request with a unique placement ID\n    // (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    nativeAd = NativeAd(activity, \"YOUR_PLACEMENT_ID\")\n\n    // Initiate a request to load an ad.\n    nativeAd!!.loadAd(\n        nativeAd!!\n            .buildLoadAdConfig()\n            // Set a listener to get notified when the ad was loaded.\n            .withAdListener(this)\n            .build()\n    )\n\n    statusText?.setText(R.string.ad_loading)\n  }\n\n  private fun reloadAdContainer() {\n    val activity = activity\n    if (activity != null && nativeAd != null && nativeAd!!.isAdLoaded) {\n      nativeAdContainer!!.removeAllViews()\n\n      // Create a NativeAdViewAttributes object and set the attributes\n      val attributes =\n          NativeAdViewAttributes(context)\n              .setBackgroundColor(adBackgroundColor)\n              .setTitleTextColor(titleColor)\n              .setDescriptionTextColor(contentColor)\n              .setButtonBorderColor(ctaTextColor)\n              .setButtonTextColor(ctaTextColor)\n              .setButtonColor(ctaBgColor)\n\n      // Use NativeAdView.render to generate the ad View\n      adView = NativeAdView.render(activity, nativeAd!!, attributes)\n\n      nativeAdContainer!!.addView(\n          adView,\n          ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0),\n      )\n      updateAdViewParams()\n\n      showCodeButton!!.setText(R.string.show_code)\n    }\n  }\n\n  private fun setUpLayoutBuilders(context: Context) {\n    val backgroundColorSpinnerAdapter =\n        ArrayAdapter.createFromResource(\n            context,\n            R.array.background_color_array,\n            android.R.layout.simple_spinner_item,\n        )\n    backgroundColorSpinnerAdapter.setDropDownViewResource(\n        android.R.layout.simple_spinner_dropdown_item\n    )\n    backgroundColorSpinner!!.adapter = backgroundColorSpinnerAdapter\n\n    backgroundColorSpinner!!.onItemSelectedListener =\n        object : AdapterView.OnItemSelectedListener {\n          override fun onItemSelected(arg0: AdapterView<*>, view: View, position: Int, id: Long) {\n            when (backgroundColorSpinner!!.selectedItemPosition) {\n              0 -> {\n                adBackgroundColor = Color.WHITE\n                titleColor = COLOR_DARK_GRAY\n                ctaTextColor = COLOR_CTA_BLUE_BG\n                contentColor = COLOR_LIGHT_GRAY\n                ctaBgColor = Color.WHITE\n              }\n              1 -> {\n                adBackgroundColor = Color.BLACK\n                titleColor = Color.WHITE\n                contentColor = Color.LTGRAY\n                ctaTextColor = Color.BLACK\n                ctaBgColor = Color.WHITE\n              }\n            }\n            reloadAdContainer()\n          }\n\n          override fun onNothingSelected(parent: AdapterView<*>) = Unit\n        }\n\n    seekBar!!.progress = DEFAULT_PROGRESS_DP\n    seekBar!!.setOnSeekBarChangeListener(\n        object : SeekBar.OnSeekBarChangeListener {\n          override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {\n            layoutHeightDp = progress * ((MAX_HEIGHT_DP - MIN_HEIGHT_DP) / 100) + MIN_HEIGHT_DP\n            updateAdViewParams()\n          }\n\n          override fun onStartTrackingTouch(seekBar: SeekBar) = Unit\n\n          override fun onStopTrackingTouch(seekBar: SeekBar) = Unit\n        }\n    )\n  }\n\n  private fun updateAdViewParams() {\n    if (adView == null) {\n      return\n    }\n    val params = adView!!.layoutParams\n    params.height = (Resources.getSystem().displayMetrics.density * layoutHeightDp).toInt()\n    adView!!.layoutParams = params\n    adView!!.requestLayout()\n  }\n\n  private fun setUpButtons() {\n    showCodeButton!!.setOnClickListener {\n      if (showCodeButton!!.text === resources.getString(R.string.show_ad)) {\n        reloadAdContainer()\n      } else {\n        showCodeInAdContainer()\n      }\n    }\n\n    reloadButton!!.setOnClickListener { createAndLoadNativeAd() }\n  }\n\n  private fun showCodeInAdContainer() {\n    val lines = resources.getStringArray(R.array.code_snippet_mediumrect_template)\n    val codeSnippet = StringBuilder()\n    for (line in lines) {\n      codeSnippet.append(line).append(\"\\r\\n\")\n    }\n    nativeAdContainer!!.removeAllViews()\n    val code = TextView(activity)\n    code.text = codeSnippet\n    code.setBackgroundColor(Color.WHITE)\n    code.setTextColor(Color.BLACK)\n    nativeAdContainer!!.addView(code, 0)\n\n    showCodeButton!!.setText(R.string.show_ad)\n  }\n\n  companion object {\n\n    private val TAG = NativeAdTemplateFragment::class.java.simpleName\n\n    private const val COLOR_LIGHT_GRAY = -0x6f6b64\n    private const val COLOR_DARK_GRAY = -0xb1a99b\n    private const val COLOR_CTA_BLUE_BG = -0xbf7f01\n\n    private const val MIN_HEIGHT_DP = 200\n    private const val MAX_HEIGHT_DP = 500\n    private const val DEFAULT_HEIGHT_DP = 350\n    private const val DEFAULT_PROGRESS_DP = 50\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/NativeBannerAdFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.MotionEvent\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.*\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\nimport java.util.*\n\nclass NativeBannerAdFragment : Fragment(), NativeAdListener {\n\n  private var adView: LinearLayout? = null\n  private var adChoicesContainer: FrameLayout? = null\n  private var nativeBannerAdContainer: NativeAdLayout? = null\n  private var nativeBannerAd: NativeBannerAd? = null\n\n  private var nativeBannerAdStatusLabel: TextView? = null\n\n  private var isAdViewAdded: Boolean = false\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n\n    val view = inflater.inflate(R.layout.fragment_native_banner_ad, container, false)\n    nativeBannerAdContainer = view.findViewById(R.id.native_banner_ad_container)\n    nativeBannerAdStatusLabel = view.findViewById(R.id.native_banner_status_label)\n\n    adView =\n        inflater.inflate(R.layout.native_banner_ad_unit, nativeBannerAdContainer, false)\n            as LinearLayout\n\n    adChoicesContainer = adView!!.findViewById(R.id.ad_choices_container)\n\n    val showNativeBannerAdButton = view.findViewById<Button>(R.id.refresh_native_banner_button)\n    showNativeBannerAdButton.setOnClickListener {\n      nativeBannerAdStatusLabel!!.text = getString(R.string.loading_status)\n\n      // Create a native ad request with a unique placement ID (generate your own on the\n      // Facebook app settings). Use different ID for each ad placement in your app.\n      nativeBannerAd = NativeBannerAd(context, \"YOUR_PLACEMENT_ID\")\n\n      // When testing on a device, add its hashed ID to force test ads.\n      // The hash ID is printed to log cat when running on a device and loading an ad.\n      // AdSettings.addTestDevice(\"THE HASHED ID AS PRINTED TO LOG CAT\");\n\n      // Initiate a request to load an ad.\n      nativeBannerAd!!.loadAd(\n          nativeBannerAd!!\n              .buildLoadAdConfig()\n              // Set a listener to get notified when the ad was loaded.\n              .withAdListener(this)\n              .withMediaCacheFlag(NativeAdBase.MediaCacheFlag.ALL)\n              .build()\n      )\n    }\n    //  load the Native Banner when this fragment is created\n    //  as the Banner in BannerFragment does.\n    showNativeBannerAdButton.performClick()\n\n    return view\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    nativeBannerAdStatusLabel?.text = \"Ad Failed to Load: \" + error.errorMessage\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (nativeBannerAd == null || nativeBannerAd !== ad) {\n      // Race condition, load() called again before last ad was displayed\n      return\n    }\n    if (!isAdViewAdded) {\n      isAdViewAdded = true\n      nativeBannerAdContainer!!.addView(adView)\n    }\n    // Unregister last ad\n    nativeBannerAd!!.unregisterView()\n\n    nativeBannerAdStatusLabel?.text = \"\"\n\n    // Using the AdOptionsView is optional, but your native ad unit should\n    // be clearly delineated from the rest of your app content. See\n    // https://developers.facebook.com/docs/audience-network/guidelines/native-ads#native\n    // for details. We recommend using the AdOptionsView.\n    val adOptionsView =\n        AdOptionsView(\n            activity,\n            nativeBannerAd,\n            nativeBannerAdContainer,\n            AdOptionsView.Orientation.HORIZONTAL,\n            20,\n        )\n    adChoicesContainer?.removeAllViews()\n    adChoicesContainer?.addView(adOptionsView)\n\n    inflateAd(nativeBannerAd!!, adView!!)\n\n    // Registering a touch listener to log which ad component receives the touch event.\n    // We always return false from onTouch so that we don't swallow the touch event (which\n    // would prevent click events from reaching the NativeAd control).\n    // The touch listener could be used to do animations.\n    nativeBannerAd!!.setOnTouchListener { view, event ->\n      if (event.action == MotionEvent.ACTION_DOWN) {\n        when (view.id) {\n          R.id.native_ad_call_to_action -> Log.d(TAG, \"Call to action button clicked\")\n          R.id.native_icon_view -> Log.d(TAG, \"Main image clicked\")\n          else -> Log.d(TAG, \"Other ad component clicked\")\n        }\n      }\n      false\n    }\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    Toast.makeText(activity, \"Ad Clicked\", Toast.LENGTH_SHORT).show()\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    Log.d(TAG, \"onLoggingImpression\")\n  }\n\n  override fun onMediaDownloaded(ad: Ad) {\n    Log.d(TAG, \"onMediaDownloaded\")\n  }\n\n  private fun inflateAd(nativeBannerAd: NativeBannerAd, adView: View) {\n    // Create native UI using the ad metadata.\n    val nativeAdTitle = adView.findViewById<TextView>(R.id.native_ad_title)\n    val nativeAdSocialContext = adView.findViewById<TextView>(R.id.native_ad_social_context)\n    val sponsoredLabel = adView.findViewById<TextView>(R.id.native_ad_sponsored_label)\n    val nativeAdIconView = adView.findViewById<MediaView>(R.id.native_icon_view)\n    val nativeAdCallToAction = adView.findViewById<Button>(R.id.native_ad_call_to_action)\n\n    // Setting the Text\n    nativeAdCallToAction.text = nativeBannerAd.adCallToAction\n    nativeAdCallToAction.visibility =\n        if (nativeBannerAd.hasCallToAction()) View.VISIBLE else View.INVISIBLE\n\n    nativeAdTitle.text = nativeBannerAd.advertiserName\n    nativeAdSocialContext.text = nativeBannerAd.adSocialContext\n\n    // You can use the following to specify the clickable areas.\n    val clickableViews = ArrayList<View>()\n    clickableViews.add(nativeAdCallToAction)\n    nativeBannerAd.registerViewForInteraction(\n        nativeBannerAdContainer,\n        nativeAdIconView,\n        clickableViews,\n    )\n\n    sponsoredLabel.setText(R.string.sponsored)\n  }\n\n  override fun onDestroy() {\n    if (nativeBannerAd != null) {\n      nativeBannerAd!!.unregisterView()\n      nativeBannerAd = null\n    }\n    super.onDestroy()\n  }\n\n  companion object {\n    private val TAG = NativeBannerAdFragment::class.java.simpleName\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/NativeBannerAdTemplateFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.graphics.Color\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.*\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass NativeBannerAdTemplateFragment : Fragment(), NativeAdListener {\n\n  private var nativeBannerAd: NativeBannerAd? = null\n  private var viewType: NativeBannerAdView.Type = NativeBannerAdView.Type.HEIGHT_100\n\n  private var adBackgroundColor: Int = 0\n  private var titleColor: Int = 0\n  private var linkColor: Int = 0\n  private var contentColor: Int = 0\n  private var ctaBgColor: Int = 0\n\n  private var statusText: TextView? = null\n  private var nativeAdContainer: ViewGroup? = null\n  private var backgroundColorSpinner: Spinner? = null\n  private var adViewTypeSpinner: Spinner? = null\n  private var showCodeButton: Button? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n\n    val view = inflater.inflate(R.layout.fragment_native_banner_ad_template, container, false)\n\n    statusText = view.findViewById(R.id.status)\n    nativeAdContainer = view.findViewById(R.id.templateContainer)\n    showCodeButton = view.findViewById(R.id.showCodeButton)\n    backgroundColorSpinner = view.findViewById(R.id.backgroundColorSpinner)\n    adViewTypeSpinner = view.findViewById(R.id.adViewTypeSpinner)\n\n    val backgroundColorSpinnerAdapter =\n        ArrayAdapter.createFromResource(\n            inflater.context,\n            R.array.background_color_array,\n            android.R.layout.simple_spinner_item,\n        )\n    backgroundColorSpinnerAdapter.setDropDownViewResource(\n        android.R.layout.simple_spinner_dropdown_item\n    )\n    backgroundColorSpinner!!.adapter = backgroundColorSpinnerAdapter\n\n    val adViewTypeSpinnerAdapter =\n        ArrayAdapter.createFromResource(\n            inflater.context,\n            R.array.ad_bannerview_type_array,\n            android.R.layout.simple_spinner_item,\n        )\n    adViewTypeSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)\n    adViewTypeSpinner!!.adapter = adViewTypeSpinnerAdapter\n\n    setSpinnerListeners()\n    setButtonListeners()\n\n    createAndLoadNativeAd()\n\n    return view\n  }\n\n  private fun createAndLoadNativeAd() {\n    // Create a native banner ad request with a unique placement ID\n    // (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    nativeBannerAd = NativeBannerAd(context, \"YOUR_PLACEMENT_ID\")\n\n    // Initiate a request to load an ad.\n    nativeBannerAd!!.loadAd(\n        nativeBannerAd!!\n            .buildLoadAdConfig()\n            // Set a listener to get notified when the ad was loaded.\n            .withAdListener(this)\n            .build()\n    )\n\n    statusText?.setText(R.string.ad_loading)\n  }\n\n  private fun reloadAdContainer() {\n    val activity = activity\n    if (activity != null && nativeBannerAd != null && nativeBannerAd!!.isAdLoaded) {\n      nativeAdContainer!!.removeAllViews()\n\n      // Create a NativeAdViewAttributes object and set the attributes\n      val attributes =\n          NativeAdViewAttributes(context)\n              .setBackgroundColor(adBackgroundColor)\n              .setTitleTextColor(titleColor)\n              .setDescriptionTextColor(contentColor)\n              .setButtonBorderColor(ctaBgColor)\n              .setButtonTextColor(linkColor)\n              .setButtonColor(ctaBgColor)\n\n      // Use NativeAdView.render to generate the ad View\n      val adView = NativeBannerAdView.render(activity, nativeBannerAd!!, viewType, attributes)\n\n      // Add adView to the container showing Ads\n      nativeAdContainer!!.addView(adView, 0)\n      nativeAdContainer!!.setBackgroundColor(Color.TRANSPARENT)\n\n      showCodeButton!!.setText(R.string.show_code)\n    }\n  }\n\n  private fun setSpinnerListeners() {\n    backgroundColorSpinner!!.onItemSelectedListener =\n        object : AdapterView.OnItemSelectedListener {\n          override fun onItemSelected(arg0: AdapterView<*>, view: View, position: Int, id: Long) {\n            when (backgroundColorSpinner!!.selectedItemPosition) {\n              0 -> {\n                adBackgroundColor = Color.WHITE\n                titleColor = COLOR_DARK_GRAY\n                linkColor = Color.WHITE\n                contentColor = COLOR_LIGHT_GRAY\n                ctaBgColor = COLOR_CTA_BLUE_BG\n              }\n              1 -> {\n                adBackgroundColor = Color.BLACK\n                titleColor = Color.WHITE\n                contentColor = Color.LTGRAY\n                linkColor = Color.BLACK\n                ctaBgColor = Color.WHITE\n              }\n            }\n            reloadAdContainer()\n          }\n\n          override fun onNothingSelected(parent: AdapterView<*>) = Unit\n        }\n\n    adViewTypeSpinner!!.onItemSelectedListener =\n        object : android.widget.AdapterView.OnItemSelectedListener {\n          override fun onItemSelected(arg0: AdapterView<*>, view: View, position: Int, id: Long) {\n            when (adViewTypeSpinner!!.selectedItemPosition) {\n              0 -> viewType = NativeBannerAdView.Type.HEIGHT_50\n              1 -> viewType = NativeBannerAdView.Type.HEIGHT_100\n              2 -> viewType = NativeBannerAdView.Type.HEIGHT_120\n            }\n            reloadAdContainer()\n          }\n\n          override fun onNothingSelected(parent: AdapterView<*>) = Unit\n        }\n  }\n\n  private fun setButtonListeners() {\n    showCodeButton!!.setOnClickListener {\n      if (showCodeButton!!.text === resources.getString(R.string.show_ad)) {\n        reloadAdContainer()\n      } else {\n        showCodeInAdContainer()\n      }\n    }\n  }\n\n  private fun showCodeInAdContainer() {\n    val lines = resources.getStringArray(R.array.code_snippet_banner_template)\n    val codeSnippet = StringBuilder()\n    for (line in lines) {\n      codeSnippet.append(line).append(\"\\r\\n\")\n    }\n    nativeAdContainer!!.removeAllViews()\n    val code = TextView(activity)\n    code.text = codeSnippet\n    code.setBackgroundColor(Color.WHITE)\n    code.setTextColor(Color.BLACK)\n    nativeAdContainer!!.addView(code, 0)\n\n    showCodeButton!!.setText(R.string.show_ad)\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (nativeBannerAd == null || nativeBannerAd !== ad) {\n      // Race condition, load() called again before last ad was displayed\n      return\n    }\n\n    statusText?.setText(R.string.ad_loaded)\n    reloadAdContainer()\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    val msg = resources.getString(R.string.ad_load_failed, error.errorMessage)\n    statusText?.text = msg\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    statusText?.setText(R.string.ad_clicked)\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    Log.d(TAG, \"onLoggingImpression\")\n  }\n\n  override fun onMediaDownloaded(ad: Ad) {\n    Log.d(TAG, \"onMediaDownloaded\")\n  }\n\n  override fun onDestroy() {\n    nativeBannerAd = null\n    super.onDestroy()\n  }\n\n  companion object {\n\n    private val TAG = NativeBannerAdTemplateFragment::class.java.simpleName\n\n    private const val COLOR_LIGHT_GRAY = -0x6f6b64\n    private const val COLOR_DARK_GRAY = -0xb1a99b\n    private const val COLOR_CTA_BLUE_BG = -0xbf7f01\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/RectangleFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.RelativeLayout\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass RectangleFragment : Fragment(), AdListener {\n\n  private var rectangleAdContainer: RelativeLayout? = null\n  private var refreshRectangleButton: Button? = null\n  private var rectangleStatusLabel: TextView? = null\n  private var rectangleAdView: AdView? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n    val view = inflater.inflate(R.layout.fragment_rectangle, container, false)\n\n    rectangleStatusLabel = view.findViewById(R.id.rectangleStatusLabel)\n    rectangleAdContainer = view.findViewById(R.id.rectangleAdContainer)\n    refreshRectangleButton = view.findViewById(R.id.refreshRectangleButton)\n    refreshRectangleButton?.setOnClickListener { loadAdView() }\n    loadAdView()\n    return view\n  }\n\n  override fun onDestroyView() {\n    rectangleAdContainer?.removeView(rectangleAdView)\n    super.onDestroyView()\n  }\n\n  override fun onDestroy() {\n    rectangleAdView?.destroy()\n    rectangleAdView = null\n\n    super.onDestroy()\n  }\n\n  private fun loadAdView() {\n    rectangleAdView?.destroy()\n    rectangleAdView = null\n\n    // Update progress message\n    setLabel(getString(R.string.loading_status))\n\n    // Create a banner's ad view with a unique placement ID (generate your own on the Facebook\n    // app settings). Use different ID for each ad placement in your app.\n    rectangleAdView = AdView(activity, \"YOUR_PLACEMENT_ID\", AdSize.RECTANGLE_HEIGHT_250)\n\n    // Reposition the ad and add it to the view hierarchy.\n    rectangleAdContainer?.addView(rectangleAdView)\n\n    // Initiate a request to load an ad.\n    rectangleAdView?.buildLoadAdConfig()?.withAdListener(this)?.build()\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    if (ad === rectangleAdView) {\n      setLabel(\"Ad failed to load: \" + error.errorMessage)\n    }\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (ad === rectangleAdView) {\n      setLabel(\"\")\n    }\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    Toast.makeText(this.activity, \"Ad Clicked\", Toast.LENGTH_SHORT).show()\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    Log.d(TAG, \"onLoggingImpression\")\n  }\n\n  private fun setLabel(status: String) {\n    rectangleStatusLabel?.text = status\n    if (status.isEmpty()) {\n      rectangleStatusLabel?.visibility = View.GONE\n    } else {\n      rectangleStatusLabel?.visibility = View.VISIBLE\n    }\n  }\n\n  companion object {\n    private val TAG = RectangleFragment::class.java.simpleName\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/RewardedInterstitialFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.Ad\nimport com.facebook.ads.AdError\nimport com.facebook.ads.RewardData\nimport com.facebook.ads.RewardedInterstitialAd\nimport com.facebook.ads.S2SRewardedInterstitialAdListener\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass RewardedInterstitialFragment : Fragment(), S2SRewardedInterstitialAdListener {\n\n  private lateinit var rewardedInterstitialAdStatusLabel: TextView\n  private lateinit var loadRewardedInterstitialButton: Button\n  private lateinit var showRewardedInterstitialButton: Button\n\n  private var rewardedInterstitialAd: RewardedInterstitialAd? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n\n    val view = inflater.inflate(R.layout.fragment_rewarded_interstitial, container, false)\n\n    rewardedInterstitialAdStatusLabel = view.findViewById(R.id.rewardedInterstitialAdStatusLabel)\n    loadRewardedInterstitialButton = view.findViewById(R.id.loadRewardedInterstitialButton)\n    showRewardedInterstitialButton = view.findViewById(R.id.showRewardedInterstitialButton)\n\n    loadRewardedInterstitialButton.setOnClickListener {\n      rewardedInterstitialAd?.destroy()\n      rewardedInterstitialAd = null\n\n      rewardedInterstitialAd =\n          RewardedInterstitialAd(this@RewardedInterstitialFragment.activity, \"YOUR_PLACEMENT_ID\")\n\n      rewardedInterstitialAd?.let { rewardedInterstitialAd ->\n        setStatusLabelText(\"Loading rewarded interstitial ad...\")\n        rewardedInterstitialAd.loadAd(\n            rewardedInterstitialAd\n                .buildLoadAdConfig()\n                .withAdListener(this)\n                .withFailOnCacheFailureEnabled(true)\n                .withRewardData(RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\"))\n                .build()\n        )\n      }\n    }\n\n    showRewardedInterstitialButton.setOnClickListener {\n      if (rewardedInterstitialAd?.isAdLoaded == true) {\n        rewardedInterstitialAd?.show()\n        setStatusLabelText(\"\")\n      } else {\n        setStatusLabelText(\"Ad not loaded. Click load to request an ad.\")\n      }\n    }\n\n    return view\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    if (ad === rewardedInterstitialAd) {\n      setStatusLabelText(\"Rewarded interstitial ad failed to load: \" + error.errorMessage)\n    }\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (ad === rewardedInterstitialAd) {\n      setStatusLabelText(\"Ad loaded. Click show to present!\")\n    }\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    showToast(\"Rewarded Interstitial Clicked\")\n  }\n\n  private fun setStatusLabelText(label: String) {\n    rewardedInterstitialAdStatusLabel.text = label\n  }\n\n  private fun showToast(message: String) {\n    if (isAdded) {\n      Toast.makeText(activity, message, Toast.LENGTH_SHORT).show()\n    }\n  }\n\n  override fun onRewardedInterstitialCompleted() {\n    showToast(\"Rewarded Interstitial View Complete\")\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    showToast(\"Rewarded Interstitial Impression\")\n  }\n\n  override fun onRewardedInterstitialClosed() {\n    showToast(\"Rewarded Interstitial Closed\")\n  }\n\n  override fun onRewardServerFailed() {\n    showToast(\"Rewarded Interstitial Server Failed\")\n  }\n\n  override fun onRewardServerSuccess() {\n    showToast(\"Rewarded Interstitial Server Succeeded\")\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/RewardedVideoFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.fragment.app.Fragment\nimport com.facebook.ads.*\nimport com.facebook.samples.adunitssamplekotlin.R\n\nclass RewardedVideoFragment : Fragment(), S2SRewardedVideoAdListener {\n\n  private var rewardedVideoAdStatusLabel: TextView? = null\n  private var loadRewardedVideoButton: Button? = null\n  private var showRewardedVideoButton: Button? = null\n\n  private var rewardedVideoAd: RewardedVideoAd? = null\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n\n    val view = inflater.inflate(R.layout.fragment_rewarded_video, container, false)\n\n    rewardedVideoAdStatusLabel = view.findViewById(R.id.rewardedVideoAdStatusLabel)\n    loadRewardedVideoButton = view.findViewById(R.id.loadRewardedVideoButton)\n    showRewardedVideoButton = view.findViewById(R.id.showRewardedVideoButton)\n\n    loadRewardedVideoButton?.setOnClickListener {\n      rewardedVideoAd?.destroy()\n      rewardedVideoAd = null\n\n      rewardedVideoAd = RewardedVideoAd(this@RewardedVideoFragment.activity, \"YOUR_PLACEMENT_ID\")\n      setStatusLabelText(\"Loading rewarded video ad...\")\n      rewardedVideoAd?.loadAd(\n          rewardedVideoAd!!\n              .buildLoadAdConfig()\n              .withAdListener(this)\n              .withFailOnCacheFailureEnabled(true)\n              .withRewardData(RewardData(\"YOUR_USER_ID\", \"YOUR_REWARD\"))\n              .build()\n      )\n    }\n\n    showRewardedVideoButton?.setOnClickListener {\n      if (rewardedVideoAd == null || !rewardedVideoAd!!.isAdLoaded) {\n        setStatusLabelText(\"Ad not loaded. Click load to request an ad.\")\n      } else {\n        rewardedVideoAd!!.show()\n        setStatusLabelText(\"\")\n      }\n    }\n\n    return view\n  }\n\n  override fun onError(ad: Ad, error: AdError) {\n    if (ad === rewardedVideoAd) {\n      setStatusLabelText(\"Rewarded video ad failed to load: \" + error.errorMessage)\n    }\n  }\n\n  override fun onAdLoaded(ad: Ad) {\n    if (ad === rewardedVideoAd) {\n      setStatusLabelText(\"Ad loaded. Click show to present!\")\n    }\n  }\n\n  override fun onAdClicked(ad: Ad) {\n    showToast(\"Rewarded Video Clicked\")\n  }\n\n  private fun setStatusLabelText(label: String) {\n    rewardedVideoAdStatusLabel?.text = label\n  }\n\n  private fun showToast(message: String) {\n    if (isAdded) {\n      Toast.makeText(activity, message, Toast.LENGTH_SHORT).show()\n    }\n  }\n\n  override fun onRewardedVideoCompleted() {\n    showToast(\"Rewarded Video View Complete\")\n  }\n\n  override fun onLoggingImpression(ad: Ad) {\n    showToast(\"Rewarded Video Impression\")\n  }\n\n  override fun onRewardedVideoClosed() {\n    showToast(\"Rewarded Video Closed\")\n  }\n\n  override fun onRewardServerFailed() {\n    showToast(\"Reward Video Server Failed\")\n  }\n\n  override fun onRewardServerSuccess() {\n    showToast(\"Reward Video Server Succeeded\")\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/fragments/SampleListFragment.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.fragments\n\nimport android.content.Intent\nimport android.os.Bundle\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ListView\nimport androidx.fragment.app.ListFragment\nimport com.facebook.samples.adunitssamplekotlin.AdUnitsSampleActivity\nimport com.facebook.samples.adunitssamplekotlin.AdUnitsSampleType\nimport com.facebook.samples.adunitssamplekotlin.adapters.SampleAdapter\n\nclass SampleListFragment : ListFragment() {\n\n  override fun onCreateView(\n      inflater: LayoutInflater,\n      container: ViewGroup?,\n      savedInstanceState: Bundle?,\n  ): View? {\n    listAdapter = SampleAdapter(inflater.context)\n    return super.onCreateView(inflater, container, savedInstanceState)\n  }\n\n  override fun onListItemClick(parent: ListView?, view: View?, position: Int, id: Long) {\n    val item: SampleAdapter.Item = listAdapter.getItem(position) as SampleAdapter.Item\n    val sampleName = item.title\n    val type = AdUnitsSampleType.getSampleTypeFromName(sampleName)\n\n    if (type != null) {\n      // Start sample activity\n      val intent = Intent(context, AdUnitsSampleActivity::class.java)\n      intent.putExtra(AdUnitsSampleActivity.SAMPLE_TYPE, type.sampleType)\n      startActivity(intent)\n    }\n  }\n}\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/java/com/facebook/samples/adunitssamplekotlin/models/RecyclerPostItem.kt",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\npackage com.facebook.samples.adunitssamplekotlin.models\n\nclass RecyclerPostItem(val postContent: String)\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/activity_ad_sample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:id=\"@+id/activity_ad_sample\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\"\n              android:background=\"#E4E5E8\"\n    >\n\n    <LinearLayout\n        android:id=\"@+id/fragment_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\"\n        >\n    </LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/activity_sample_list.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:id=\"@+id/activity_sample_list\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\"\n              android:background=\"#E4E5E8\"\n    >\n\n    <LinearLayout\n        android:id=\"@+id/list_fragment_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\"\n        >\n    </LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/activity_splash.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/activity_splash\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#3B5998\"\n    tools:context=\"com.facebook.samples.AdUnitsSample.SplashActivity\"\n    >\n\n    <TextView\n        android:id=\"@+id/app_name\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_centerInParent=\"true\"\n        android:text=\"@string/app_name\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"36sp\"\n        android:gravity=\"center\"\n        />\n\n    <TextView\n        android:id=\"@+id/copy_right\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"@string/copy_right\"\n        android:textColor=\"@android:color/white\"\n        android:textSize=\"12sp\"\n        />\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_banner.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                xmlns:tools=\"http://schemas.android.com/tools\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n    >\n\n    <RelativeLayout\n        android:id=\"@+id/bannerAdContainer\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        />\n\n    <Button\n        android:id=\"@+id/refreshBannerButton\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_above=\"@id/bannerAdContainer\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"@string/refresh_now\"\n        android:textSize=\"15sp\"\n        />\n\n    <TextView\n        android:id=\"@+id/bannerStatusLabel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:layout_above=\"@id/refreshBannerButton\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        tools:text=\"@string/loading_status\"\n        />\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_interstitial.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:gravity=\"center_vertical\"\n    >\n\n    <TextView\n        android:id=\"@+id/interstitialAdStatusLabel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n\n    <LinearLayout\n        android:id=\"@+id/interstitialAdControls\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_marginTop=\"50dp\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        >\n\n        <Button\n            android:id=\"@+id/loadInterstitialButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/load_interstitial\"\n            android:textSize=\"15sp\"\n            />\n\n        <Button\n            android:id=\"@+id/showInterstitialButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/show_ad\"\n            android:textSize=\"15sp\"\n            />\n\n    </LinearLayout>\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_native_ad_hscroll.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    android:gravity=\"center\"\n    >\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:paddingBottom=\"50dp\"\n        >\n        <LinearLayout\n            android:id=\"@+id/hscroll_container\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            >\n        </LinearLayout>\n    </ScrollView>\n    <Button\n        android:id=\"@+id/reload_hscroll\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_margin=\"2dp\"\n        android:gravity=\"center\"\n        android:text=\"@string/reload_native_ads_hscroll\"\n        android:textSize=\"15sp\"\n        />\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_native_ad_recycler.xml",
    "content": "<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    >\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/recyclerView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:paddingLeft=\"8dp\"\n        android:paddingRight=\"8dp\"\n        />\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_native_ad_sample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:layout_margin=\"8dp\"\n    android:background=\"@android:color/white\"\n    >\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:paddingBottom=\"50dp\"\n        >\n\n        <include\n            android:id=\"@+id/native_ad_container\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"@android:color/white\"\n            android:paddingBottom=\"5dp\"\n            layout=\"@layout/native_ad_unit\"\n            />\n\n    </ScrollView>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"@android:color/background_light\"\n        android:paddingBottom=\"2dp\"\n        >\n\n        <Button\n            android:id=\"@+id/load_native_ad_button\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/load_native_ad\"\n            android:textSize=\"12sp\"\n            />\n\n        <TextView\n            android:id=\"@+id/native_ad_status\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:gravity=\"center\"\n            android:textColor=\"@android:color/darker_gray\"\n            />\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_native_ad_template.xml",
    "content": "<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/nativeAdTemplateContainer\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:ignore=\"MergeRootFrame\"\n    android:clickable=\"true\"\n    android:gravity=\"end\"\n    >\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_above=\"@+id/footer\"\n        android:background=\"@android:color/transparent\"\n        android:padding=\"8dp\"\n        >\n        <LinearLayout\n            android:id=\"@+id/templateContainer\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:background=\"@android:color/transparent\"\n            />\n    </ScrollView>\n\n    <LinearLayout\n        android:id=\"@+id/footer\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:orientation=\"vertical\"\n        >\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            >\n            <TextView\n                android:layout_width=\"0dp\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:padding=\"2dp\"\n                android:text=\"@string/style\"\n                android:gravity=\"center_horizontal\"\n                />\n            <TextView\n                android:layout_width=\"0dp\"\n                android:layout_height=\"match_parent\"\n                android:layout_weight=\"1\"\n                android:padding=\"2dp\"\n                android:text=\"@string/adview_type\"\n                android:gravity=\"center_horizontal\"\n                />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            >\n            <Spinner\n                android:id=\"@+id/backgroundColorSpinner\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                />\n            <SeekBar\n                android:id=\"@+id/seekBar\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                />\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingTop=\"8dp\"\n            >\n            <Button\n                android:id=\"@+id/reloadAdButton\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:text=\"@string/refresh_now\"\n                android:padding=\"8dp\"\n                />\n            <Button\n                android:id=\"@+id/showCodeButton\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:text=\"@string/show_code\"\n                android:padding=\"8dp\"\n                />\n        </LinearLayout>\n\n        <TextView\n            android:id=\"@+id/status\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:textAlignment=\"center\"\n            android:gravity=\"start\"\n            />\n    </LinearLayout>\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_native_banner_ad.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    >\n\n    <com.facebook.ads.NativeAdLayout\n        android:id=\"@+id/native_banner_ad_container\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        />\n\n    <Button\n        android:id=\"@+id/refresh_native_banner_button\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_above=\"@id/native_banner_ad_container\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"@string/refresh_now\"\n        android:textSize=\"15sp\"\n        />\n\n    <TextView\n        android:id=\"@+id/native_banner_status_label\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:layout_above=\"@id/refresh_native_banner_button\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_native_banner_ad_template.xml",
    "content": "<RelativeLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/nativeAdTemplateContainer\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:ignore=\"MergeRootFrame\"\n    android:clickable=\"true\"\n    android:gravity=\"end\"\n    >\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_above=\"@+id/bottomBarDes\"\n        android:background=\"@android:color/transparent\"\n        android:padding=\"8dp\"\n        >\n        <LinearLayout\n            android:id=\"@+id/templateContainer\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"top\"\n            android:orientation=\"vertical\"\n            android:background=\"@android:color/transparent\"\n            />\n    </ScrollView>\n\n    <LinearLayout\n        android:id=\"@+id/bottomBarDes\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"25dp\"\n        android:layout_above=\"@+id/bottomBar\"\n        android:orientation=\"horizontal\"\n        >\n        <TextView\n            android:layout_width=\"120dp\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:text=\"@string/style\"\n            android:gravity=\"center_horizontal\"\n            />\n        <TextView\n            android:layout_width=\"120dp\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:text=\"@string/adview_type\"\n            android:textAlignment=\"center\"\n            android:gravity=\"center_horizontal\"\n            />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/bottomBar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_above=\"@+id/statusBar\"\n        android:orientation=\"horizontal\"\n        android:paddingBottom=\"0dp\"\n        android:paddingTop=\"0dp\"\n        android:minHeight=\"30dp\"\n        android:gravity=\"center_vertical\"\n        >\n        <Spinner\n            android:id=\"@+id/backgroundColorSpinner\"\n            android:layout_width=\"120dp\"\n            android:layout_height=\"wrap_content\"\n            />\n        <Spinner\n            android:id=\"@+id/adViewTypeSpinner\"\n            android:layout_width=\"120dp\"\n            android:layout_height=\"wrap_content\"\n            />\n        <Button\n            android:id=\"@+id/showCodeButton\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:layout_gravity=\"end\"\n            android:layout_marginLeft=\"10dp\"\n            android:layout_marginStart=\"10dp\"\n            android:text=\"@string/show_code\"\n            android:padding=\"8dp\"\n            />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/statusBar\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:orientation=\"horizontal\"\n        >\n        <TextView\n            android:id=\"@+id/status\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:padding=\"2dp\"\n            android:textAlignment=\"center\"\n            android:gravity=\"start\"\n            />\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_rectangle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n    >\n\n    <RelativeLayout\n        android:id=\"@+id/rectangleAdContainer\"\n        android:layout_width=\"300dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_centerHorizontal=\"true\"\n        />\n\n    <Button\n        android:id=\"@+id/refreshRectangleButton\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_above=\"@id/rectangleAdContainer\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"@string/refresh_now\"\n        android:textSize=\"15sp\"\n        />\n\n    <TextView\n        android:id=\"@+id/rectangleStatusLabel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"10dp\"\n        android:layout_above=\"@id/refreshRectangleButton\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        android:text=\"@string/loading_status\"\n        />\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_rewarded_interstitial.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:gravity=\"center_vertical\"\n    >\n\n    <TextView\n        android:id=\"@+id/rewardedInterstitialAdStatusLabel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n\n    <LinearLayout\n        android:id=\"@+id/rewardedInterstitialAdControls\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_marginTop=\"50dp\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        >\n\n        <Button\n            android:id=\"@+id/loadRewardedInterstitialButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/load_rewarded_interstitial\"\n            android:textSize=\"15sp\"\n            />\n\n        <Button\n            android:id=\"@+id/showRewardedInterstitialButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/show_ad\"\n            android:textSize=\"15sp\"\n            />\n\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/fragment_rewarded_video.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:gravity=\"center_vertical\"\n    >\n\n    <TextView\n        android:id=\"@+id/rewardedVideoAdStatusLabel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"15sp\"\n        />\n\n    <LinearLayout\n        android:id=\"@+id/rewardedVideoAdControls\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentTop=\"true\"\n        android:layout_marginTop=\"50dp\"\n        android:orientation=\"horizontal\"\n        android:gravity=\"center\"\n        >\n\n        <Button\n            android:id=\"@+id/loadRewardedVideoButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/load_rewarded_video\"\n            android:textSize=\"15sp\"\n            />\n\n        <Button\n            android:id=\"@+id/showRewardedVideoButton\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/show_ad\"\n            android:textSize=\"15sp\"\n            />\n\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/list_item_section.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    >\n\n    <TextView\n        android:id=\"@+id/list_item_title\"\n        style=\"?android:attr/listSeparatorTextViewStyle\"\n        />\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/native_ad_unit.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.facebook.ads.NativeAdLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    >\n\n    <LinearLayout\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"@android:color/white\"\n        android:orientation=\"vertical\"\n        android:paddingLeft=\"10dp\"\n        android:paddingRight=\"10dp\"\n        >\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingTop=\"10dp\"\n            android:paddingBottom=\"10dp\"\n            android:orientation=\"horizontal\"\n            android:weightSum=\"1\"\n            >\n\n            <com.facebook.ads.MediaView\n                android:id=\"@+id/native_ad_icon\"\n                android:layout_width=\"35dp\"\n                android:layout_height=\"35dp\"\n                />\n\n            <LinearLayout\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"0.7\"\n                android:paddingLeft=\"5dp\"\n                android:paddingRight=\"5dp\"\n                android:orientation=\"vertical\"\n                >\n\n                <TextView\n                    android:id=\"@+id/native_ad_title\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:ellipsize=\"end\"\n                    android:lines=\"1\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"15sp\"\n                    />\n\n                <TextView\n                    android:id=\"@+id/native_ad_sponsored_label\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:ellipsize=\"end\"\n                    android:lines=\"1\"\n                    android:textColor=\"@android:color/darker_gray\"\n                    android:textSize=\"12sp\"\n                    />\n\n            </LinearLayout>\n\n            <LinearLayout\n                android:id=\"@+id/ad_choices_container\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"0.3\"\n                android:gravity=\"end\"\n                android:orientation=\"horizontal\"\n                />\n\n        </LinearLayout>\n\n        <com.facebook.ads.MediaView\n            android:id=\"@+id/native_ad_media\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center\"\n            />\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\"\n            android:padding=\"5dp\"\n            >\n\n            <LinearLayout\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"3\"\n                android:orientation=\"vertical\"\n                >\n\n                <TextView\n                    android:id=\"@+id/native_ad_social_context\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:ellipsize=\"end\"\n                    android:lines=\"1\"\n                    android:textColor=\"@android:color/darker_gray\"\n                    android:textSize=\"12sp\"\n                    />\n\n                <TextView\n                    android:id=\"@+id/native_ad_body\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:ellipsize=\"end\"\n                    android:gravity=\"center_vertical\"\n                    android:lines=\"2\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"12sp\"\n                    />\n\n            </LinearLayout>\n\n            <Button\n                android:id=\"@+id/native_ad_call_to_action\"\n                android:layout_width=\"100dp\"\n                android:layout_height=\"30dp\"\n                android:layout_weight=\"1\"\n                android:layout_gravity=\"center_vertical\"\n                android:background=\"#4286F4\"\n                android:textSize=\"12sp\"\n                android:textColor=\"@android:color/white\"\n                android:paddingLeft=\"3dp\"\n                android:paddingRight=\"3dp\"\n                android:visibility=\"gone\"\n                />\n\n        </LinearLayout>\n\n    </LinearLayout>\n</com.facebook.ads.NativeAdLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/native_banner_ad_unit.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright 2004-present Facebook. All Rights Reserved. -->\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\"\n    >\n\n    <TextView\n        android:id=\"@+id/native_ad_sponsored_label\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:padding=\"2dp\"\n        android:ellipsize=\"end\"\n        android:lines=\"1\"\n        android:textColor=\"@android:color/darker_gray\"\n        android:textSize=\"12sp\"\n        />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"50dp\"\n        android:background=\"@android:color/white\"\n        android:orientation=\"horizontal\"\n        >\n\n        <com.facebook.ads.MediaView\n            android:id=\"@+id/native_icon_view\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"50dp\"\n            />\n\n        <LinearLayout\n            android:layout_width=\"0dp\"\n            android:layout_height=\"50dp\"\n            android:layout_weight=\"1\"\n            android:orientation=\"vertical\"\n            android:gravity=\"center_vertical\"\n            android:padding=\"4dp\"\n            >\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\"\n                android:gravity=\"center_vertical\"\n                >\n\n                <TextView\n                    android:id=\"@+id/native_ad_title\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:textColor=\"@android:color/black\"\n                    android:textSize=\"15sp\"\n                    android:textStyle=\"bold\"\n                    android:ellipsize=\"end\"\n                    android:lines=\"1\"\n                    />\n\n                <FrameLayout\n                    android:id=\"@+id/ad_choices_container\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:padding=\"2dp\"\n                    />\n\n            </LinearLayout>\n\n            <TextView\n                android:id=\"@+id/native_ad_social_context\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:textSize=\"12sp\"\n                android:ellipsize=\"end\"\n                android:lines=\"1\"\n                />\n\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/native_ad_call_to_action\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"50dp\"\n            android:gravity=\"center\"\n            android:background=\"#4286F4\"\n            android:textSize=\"12sp\"\n            android:textColor=\"@android:color/white\"\n            android:paddingLeft=\"3dp\"\n            android:paddingRight=\"3dp\"\n            android:visibility=\"gone\"\n            />\n\n    </LinearLayout>\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/layout/recycler_post_item.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"100dp\"\n    android:background=\"@android:color/white\"\n    android:orientation=\"vertical\"\n    >\n\n    <TextView\n        android:id=\"@+id/tvPostContent\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"100dp\"\n        android:background=\"@android:color/white\"\n        android:gravity=\"start|center\"\n        android:padding=\"10dp\"\n        android:textColor=\"@android:color/black\"\n        android:textSize=\"18sp\"\n        />\n\n</LinearLayout>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/menu/ad_units_sample_menu.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item\n        android:id=\"@+id/debug_settings\"\n        android:title=\"@string/debug_settings\"\n        />\n</menu>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"colorPrimaryDark\">#00574B</color>\n    <color name=\"colorAccent\">#D81B60</color>\n</resources>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/values/strings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\nCopyright 2010-present Facebook.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n\n<resources>\n    <string name=\"copy_right\">Copyright © Meta Platforms, Inc. and affiliates. All rights reserved.</string>\n    <string name=\"app_name\">Kotlin Ad Units Sample</string>\n    <string name=\"select_sample\">Select an option</string>\n    <string name=\"debug_settings\">Debug Settings</string>\n    <string name=\"loading_status\">Requesting an ad…</string>\n    <string name=\"load_interstitial\">Load Interstitial</string>\n    <string name=\"refresh_now\">Refresh Now</string>\n    <string name=\"show_ad\">Show!</string>\n    <string name=\"destroy_ad\">Destroy Ad</string>\n    <string name=\"load_rewarded_video\">Load Rewarded Video</string>\n    <string name=\"load_rewarded_interstitial\">Load Rewarded Interstitial</string>\n\n    <!-- Native samples -->\n    <string name=\"load_native_ad\">Load Native Ad</string>\n    <string name=\"load_other_native_ads\">Check out more Native Ads examples in </string>\n    <string name=\"load_native_ads_hscroll\">hScroll</string>\n    <string name=\"load_native_ads_template\">Template</string>\n    <string name=\"load_native_ads_recycler\">RecyclerView</string>\n    <string name=\"icon_desc\">Ad icon</string>\n    <string name=\"image_desc\">Ad image</string>\n    <string name=\"sponsored\">Sponsored</string>\n    <string name=\"reload_native_ads_hscroll\">Reload ads</string>\n\n    <string name=\"ad_loading\">Loading an ad…</string>\n    <string name=\"ad_loaded\">Ad loaded</string>\n    <string name=\"ad_load_failed\">Ad failed to load: %s</string>\n    <string name=\"ad_clicked\">Ad clicked</string>\n\n    <string name=\"style\">Style</string>\n    <string name=\"adview_type\">Height</string>\n    <string name=\"show_code\">Show Code</string>\n\n    <string-array name=\"code_snippet_mediumrect_template\">\n        <item>protected void onCreate(Bundle savedInstanceState) {</item>\n        <item>\\t…</item>\n        <item>\\tnativeAdContainer = (LinearLayout) findViewById(R.id.nativeAdContainer);</item>\n        <item>\\tnativeAd = new NativeAd(NativeTemplateActivity.this, \"YOUR_PLACEMENT_ID\");</item>\n        <item>\\tnativeAd.setAdListener(NativeTemplateActivity.this);</item>\n        <item>\\tnativeAd.loadAd();</item>\n        <item>\\t…</item>\n        <item>}</item>\n        <item> </item>\n        <item>public void onAdLoaded(Ad ad) {</item>\n        <item>\\t…</item>\n        <item>\\tNativeAdViewAttributes adViewAttributes = new NativeAdViewAttributes();</item>\n        <item>\\tadViewAttributes.setBackgroundColor(adBackgroundColor);</item>\n        <item>\\tadViewAttributes.setTitleTextColor(adTitleColor);</item>\n        <item>\\t…</item>\n        <item>\\tView adView = NativeAdView.render(this, nativeAd, adViewAttributes);</item>\n        <item>\\tnativeAdContainer.addView(adView, 0);</item>\n        <item>\\t…</item>\n        <item>}</item>\n    </string-array>\n\n    <string-array name=\"code_snippet_banner_template\">\n        <item>protected void onCreate(Bundle savedInstanceState) {</item>\n        <item>\\t…</item>\n        <item>\\tnativeAdContainer = (LinearLayout) findViewById(R.id.nativeAdContainer);</item>\n        <item>\\tnativeBannerAd = new NativeBannerAd(getContext(), \"YOUR_PLACEMENT_ID\");</item>\n        <item>\\tnativeBannerAd.setAdListener(this);</item>\n        <item>\\tnativeBannerAd.loadAd();</item>\n        <item>\\t…</item>\n        <item>}</item>\n        <item> </item>\n        <item>public void onAdLoaded(Ad ad) {</item>\n        <item>\\t…</item>\n        <item>\\tNativeAdViewAttributes adViewAttributes = new NativeAdViewAttributes();</item>\n        <item>\\tadViewAttributes.setBackgroundColor(adBackgroundColor);</item>\n        <item>\\tadViewAttributes.setTitleTextColor(adTitleColor);</item>\n        <item>\\t…</item>\n        <item>\\tNativeBannerAdView.Type viewType = NativeBannerAdView.Type.HEIGHT_100;</item>\n        <item>\\tView adView = NativeBannerAdView.render(this, nativeBannerAd, viewType, adViewAttributes);</item>\n        <item>\\tnativeAdContainer.addView(adView, 0);</item>\n        <item>\\t…</item>\n        <item>}</item>\n    </string-array>\n\n    <string-array name=\"background_color_array\">\n        <item>White</item>\n        <item>Black</item>\n    </string-array>\n\n    <string-array name=\"ad_bannerview_type_array\">\n        <item>50 DP</item>\n        <item>100 DP</item>\n        <item>120 DP</item>\n    </string-array>\n</resources>\n"
  },
  {
    "path": "samples/android/KotlinAdUnitsSample/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "samples/android/README.md",
    "content": "Samples for Android Platform\n============================\n\nFacebook Audience Network allows you to monetize your Android apps with Facebook ads. Here we have a list of sample apps that implements different ad placements for your reference.\n\nPlease make sure that you have completed the [Audience Network Getting Started][1] and [Android Getting Started][2] guides before you proceed.\n\nSample list\n-----------\n\n### [AdUnitsSample](./AdUnitsSample)\nThis sample app demonstrates the implementation of<br/>\n[Banners][3], [Rectangle Ad][3], [Interstitials][4] and [Rewarded Videos][8].<br/>\n[Native Ads][5], [Native Ads Template][9], [Native Banner Ads][10] and [Native Banner Ads Template][9].<br/>\n[Native Ad Horizontal Scroll][7] and [Native Ads in Recycler View][7].<br/>\n\n### [KotlinAdUnitsSample](./KotlinAdUnitsSample)\nKotlin version of the `AdUnitsSample`, demonstrating the usage of Audience Network SDK with [Kotlin](11).\n\n\n\n[1]: https://developers.facebook.com/docs/audience-network/getting-started\n[2]: https://developers.facebook.com/docs/audience-network/android\n[3]: https://developers.facebook.com/docs/audience-network/android-banners\n[4]: https://developers.facebook.com/docs/audience-network/android-interstitial\n[5]: https://developers.facebook.com/docs/audience-network/android-native\n[7]: https://developers.facebook.com/docs/audience-network/android/nativeadsmanager\n[8]: https://developers.facebook.com/docs/audience-network/android/rewarded-video\n[9]: https://developers.facebook.com/docs/audience-network/android/nativeadtemplate\n[10]: https://developers.facebook.com/docs/audience-network/android-native-banner\n[11]: https://developer.android.com/kotlin\n"
  },
  {
    "path": "samples/android/build.gradle",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nbuildscript {\n    repositories {\n        mavenCentral()\n        google()\n    }\n\n    dependencies {\n        classpath \"com.android.tools.build:gradle:${project.GRADLE_VERSION}\"\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:${project.KOTLIN_VERSION}\"\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        mavenCentral()\n        google()\n    }\n}\n"
  },
  {
    "path": "samples/android/gradle.properties",
    "content": "# Ensure you update the following if making changes here:\n#   - samples/common/build.gradle.template\n\nGRADLE_VERSION=7.0.2\nLINT_VERSION=26.1.2\nANDROID_BUILD_MIN_SDK_VERSION=16\nANDROID_BUILD_TARGET_SDK_VERSION=33\nANDROID_BUILD_TOOLS_VERSION=30.0.2\nANDROID_BUILD_SDK_VERSION=33\nANDROIDX_VERSION=1.0.0\nANDROID_GOOGLE_PLAY_SERVICES_VERSION=15.0.1\nKOTLIN_VERSION=1.3.40\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "samples/android/gradlew",
    "content": "#!/usr/bin/env bash\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn ( ) {\n    echo \"$*\"\n}\n\ndie ( ) {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\nesac\n\n# For Cygwin, ensure paths are in UNIX format before anything is touched.\nif $cygwin ; then\n    [ -n \"$JAVA_HOME\" ] && JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\nfi\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >&-\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >&-\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules\nfunction splitJvmOpts() {\n    JVM_OPTS=(\"$@\")\n}\neval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\nJVM_OPTS[${#JVM_OPTS[*]}]=\"-Dorg.gradle.appname=$APP_BASE_NAME\"\n\nexec \"$JAVACMD\" \"${JVM_OPTS[@]}\" -classpath \"$CLASSPATH\" org.gradle.wrapper.GradleWrapperMain \"$@\"\n"
  },
  {
    "path": "samples/android/gradlew.bat",
    "content": "@REM Copyright (c) Meta Platforms, Inc. and affiliates.\r\n@REM All rights reserved.\r\n@REM\r\n@REM This source code is licensed under the license found in the\r\n@REM LICENSE file in the root directory of this source tree.\r\n\r\n@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif \"%ERRORLEVEL%\" == \"0\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto init\r\n\r\necho.\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r\necho.\r\necho Please set the JAVA_HOME variable in your environment to match the\r\necho location of your Java installation.\r\n\r\ngoto fail\r\n\r\n:init\r\n@rem Get command-line arguments, handling Windowz variants\r\n\r\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\r\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\r\n\r\n:win9xME_args\r\n@rem Slurp the command line arguments.\r\nset CMD_LINE_ARGS=\r\nset _SKIP=2\r\n\r\n:win9xME_args_slurp\r\nif \"x%~1\" == \"x\" goto execute\r\n\r\nset CMD_LINE_ARGS=%*\r\ngoto execute\r\n\r\n:4NT_args\r\n@rem Get arguments from the 4NT Shell from JP Software\r\nset CMD_LINE_ARGS=%$\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\r\nexit /b 1\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "samples/android/settings.gradle",
    "content": "/*\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\ninclude ':AdUnitsSample'\ninclude ':KotlinAdUnitsSample'\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/.gitignore",
    "content": "# Xcode\n\n## Build generated\nbuild/\nDerivedData/\n\n## Various settings\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata/\n\n## Other\n*.moved-aside\n*.xccheckout\n*.xcscmblueprint\n\n# CocoaPods\nPods/\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/AdUnitsSample-Prefix.pch",
    "content": "//\n//  Prefix header\n//\n//  The contents of this file are implicitly included at the beginning of every source file.\n//\n\n#import <Availability.h>\n\n#ifndef __IPHONE_3_0\n#warning \"This project uses features only available in iOS SDK 3.0 and later.\"\n#endif\n\n#ifdef __OBJC__\n  #import <UIKit/UIKit.h>\n  #import <Foundation/Foundation.h>\n#endif\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/AdUnitsSample.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>keychain-access-groups</key>\n\t<array>\n\t\t<string>$(AppIdentifierPrefix)com.facebook.audiencenetwork.AdUnitsSample</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/AdUnitsSampleStoryboard.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"14490.70\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"hHo-Rh-R82\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14490.49\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--Navigation Controller-->\n        <scene sceneID=\"YOr-x9-OVH\">\n            <objects>\n                <navigationController id=\"hHo-Rh-R82\" customClass=\"NavigationController\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" id=\"mEA-mf-dg5\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                        <color key=\"tintColor\" red=\"0.21960784310000001\" green=\"0.3294117647\" blue=\"0.52941176469999995\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <color key=\"barTintColor\" red=\"0.80000000000000004\" green=\"0.80000000000000004\" blue=\"0.80000000000000004\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                        <textAttributes key=\"titleTextAttributes\">\n                            <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                        </textAttributes>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"KVl-WL-add\" kind=\"relationship\" relationship=\"rootViewController\" id=\"y2X-Ed-kZ0\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"klo-YW-lWX\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-4105\" y=\"-449\"/>\n        </scene>\n        <!--Settings-->\n        <scene sceneID=\"vS6-HO-zc1\">\n            <objects>\n                <tableViewController id=\"rYe-iJ-Hk4\" customClass=\"SettingsTableViewController\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"-1\" estimatedRowHeight=\"-1\" sectionHeaderHeight=\"18\" sectionFooterHeight=\"18\" id=\"EZN-rO-HsM\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" cocoaTouchSystemColor=\"groupTableViewBackgroundColor\"/>\n                        <prototypes>\n                            <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" selectionStyle=\"none\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"SettingsSandboxCell\" id=\"AC2-45-WOK\" customClass=\"SettingsSandboxCell\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"AC2-45-WOK\" id=\"ntO-17-jH4\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <subviews>\n                                        <textField opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" placeholder=\"Production\" textAlignment=\"right\" minimumFontSize=\"17\" clearButtonMode=\"whileEditing\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"VgB-0c-3xa\">\n                                            <rect key=\"frame\" x=\"97\" y=\"7\" width=\"263\" height=\"30\"/>\n                                            <constraints>\n                                                <constraint firstAttribute=\"height\" constant=\"30\" id=\"AvR-Mr-Aon\"/>\n                                            </constraints>\n                                            <nil key=\"textColor\"/>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <textInputTraits key=\"textInputTraits\" autocorrectionType=\"no\" spellCheckingType=\"no\"/>\n                                        </textField>\n                                        <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Sandbox\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"W3e-Gz-XGS\">\n                                            <rect key=\"frame\" x=\"15\" y=\"11.5\" width=\"67\" height=\"21\"/>\n                                            <constraints>\n                                                <constraint firstAttribute=\"height\" constant=\"21\" id=\"M1i-uL-P9y\"/>\n                                            </constraints>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <nil key=\"textColor\"/>\n                                            <nil key=\"highlightedColor\"/>\n                                        </label>\n                                    </subviews>\n                                    <constraints>\n                                        <constraint firstAttribute=\"trailing\" secondItem=\"VgB-0c-3xa\" secondAttribute=\"trailing\" constant=\"15\" id=\"VGY-5o-AAa\"/>\n                                        <constraint firstItem=\"VgB-0c-3xa\" firstAttribute=\"centerY\" secondItem=\"ntO-17-jH4\" secondAttribute=\"centerY\" id=\"Xa0-fP-7xi\"/>\n                                        <constraint firstItem=\"VgB-0c-3xa\" firstAttribute=\"leading\" secondItem=\"W3e-Gz-XGS\" secondAttribute=\"trailing\" constant=\"15\" id=\"ZAz-KY-QRR\"/>\n                                        <constraint firstItem=\"W3e-Gz-XGS\" firstAttribute=\"leading\" secondItem=\"ntO-17-jH4\" secondAttribute=\"leading\" constant=\"15\" id=\"xxq-gL-U3S\"/>\n                                        <constraint firstItem=\"W3e-Gz-XGS\" firstAttribute=\"centerY\" secondItem=\"ntO-17-jH4\" secondAttribute=\"centerY\" id=\"zmC-UE-Gmg\"/>\n                                    </constraints>\n                                </tableViewCellContentView>\n                                <connections>\n                                    <outlet property=\"sandboxTextField\" destination=\"VgB-0c-3xa\" id=\"vlJ-Df-ub5\"/>\n                                </connections>\n                            </tableViewCell>\n                            <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" selectionStyle=\"none\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"SettingsLogLevelCell\" textLabel=\"3BY-3k-HsV\" detailTextLabel=\"cju-5e-plq\" style=\"IBUITableViewCellStyleValue1\" id=\"f0z-fk-7cD\" customClass=\"SettingsLogLevelCell\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"99.5\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"f0z-fk-7cD\" id=\"2K1-KC-N9y\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <subviews>\n                                        <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Log Level\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"3BY-3k-HsV\">\n                                            <rect key=\"frame\" x=\"16\" y=\"12\" width=\"73\" height=\"20.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <nil key=\"textColor\"/>\n                                            <nil key=\"highlightedColor\"/>\n                                        </label>\n                                        <stepper opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" ambiguous=\"YES\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" maximumValue=\"6\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"V47-ba-cdg\">\n                                            <rect key=\"frame\" x=\"140\" y=\"7\" width=\"94\" height=\"29\"/>\n                                            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                            <connections>\n                                                <action selector=\"logValueDidChange:\" destination=\"f0z-fk-7cD\" eventType=\"valueChanged\" id=\"4IO-pn-knB\"/>\n                                            </connections>\n                                        </stepper>\n                                        <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"None\" textAlignment=\"right\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"cju-5e-plq\">\n                                            <rect key=\"frame\" x=\"318\" y=\"12\" width=\"41\" height=\"20.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <nil key=\"textColor\"/>\n                                            <nil key=\"highlightedColor\"/>\n                                        </label>\n                                    </subviews>\n                                </tableViewCellContentView>\n                                <connections>\n                                    <outlet property=\"logLevelLabel\" destination=\"cju-5e-plq\" id=\"wD0-vL-43q\"/>\n                                    <outlet property=\"stepper\" destination=\"V47-ba-cdg\" id=\"mCd-0m-wP2\"/>\n                                </connections>\n                            </tableViewCell>\n                            <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" selectionStyle=\"none\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"SettingsDebugEventCell\" id=\"iZe-eo-0mx\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"143.5\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"iZe-eo-0mx\" id=\"dnI-kv-aTe\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <subviews>\n                                        <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Log Debug Event\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"dpD-2F-tmK\">\n                                            <rect key=\"frame\" x=\"15\" y=\"12\" width=\"131\" height=\"20\"/>\n                                            <constraints>\n                                                <constraint firstAttribute=\"height\" constant=\"20\" id=\"2jQ-AD-UOX\"/>\n                                            </constraints>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <nil key=\"textColor\"/>\n                                            <nil key=\"highlightedColor\"/>\n                                        </label>\n                                    </subviews>\n                                    <constraints>\n                                        <constraint firstItem=\"dpD-2F-tmK\" firstAttribute=\"leading\" secondItem=\"dnI-kv-aTe\" secondAttribute=\"leading\" constant=\"15\" id=\"z9C-kw-Wtd\"/>\n                                        <constraint firstItem=\"dpD-2F-tmK\" firstAttribute=\"centerY\" secondItem=\"dnI-kv-aTe\" secondAttribute=\"centerY\" id=\"zBR-vG-st6\"/>\n                                    </constraints>\n                                </tableViewCellContentView>\n                                <connections>\n                                    <segue destination=\"xn4-J1-axs\" kind=\"show\" id=\"A1T-My-4f5\"/>\n                                </connections>\n                            </tableViewCell>\n                            <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" selectionStyle=\"none\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"SettingsTestModeCell\" id=\"faL-L8-yFU\" customClass=\"SettingsTestModeCell\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"187.5\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"right\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"faL-L8-yFU\" id=\"Wao-5V-wO8\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <subviews>\n                                        <switch opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" on=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"olD-Q4-ukr\">\n                                            <rect key=\"frame\" x=\"313\" y=\"6.5\" width=\"49\" height=\"31\"/>\n                                            <constraints>\n                                                <constraint firstAttribute=\"height\" constant=\"31\" id=\"Fjy-Rl-foj\"/>\n                                                <constraint firstAttribute=\"width\" constant=\"47\" id=\"gmv-UN-X16\"/>\n                                            </constraints>\n                                            <connections>\n                                                <action selector=\"switcherValueChanged:\" destination=\"faL-L8-yFU\" eventType=\"valueChanged\" id=\"ODh-wv-h4J\"/>\n                                            </connections>\n                                        </switch>\n                                        <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Test Mode\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"haw-y1-x2y\">\n                                            <rect key=\"frame\" x=\"15\" y=\"12\" width=\"283\" height=\"20\"/>\n                                            <constraints>\n                                                <constraint firstAttribute=\"height\" constant=\"20\" id=\"7u0-zG-PXW\"/>\n                                            </constraints>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <nil key=\"textColor\"/>\n                                            <nil key=\"highlightedColor\"/>\n                                        </label>\n                                    </subviews>\n                                    <constraints>\n                                        <constraint firstItem=\"olD-Q4-ukr\" firstAttribute=\"centerY\" secondItem=\"Wao-5V-wO8\" secondAttribute=\"centerY\" id=\"Cac-xH-Pd8\"/>\n                                        <constraint firstItem=\"haw-y1-x2y\" firstAttribute=\"centerY\" secondItem=\"Wao-5V-wO8\" secondAttribute=\"centerY\" id=\"UbE-Mf-Z0m\"/>\n                                        <constraint firstItem=\"haw-y1-x2y\" firstAttribute=\"leading\" secondItem=\"Wao-5V-wO8\" secondAttribute=\"leading\" constant=\"15\" id=\"qQa-bg-GdM\"/>\n                                        <constraint firstAttribute=\"trailing\" secondItem=\"olD-Q4-ukr\" secondAttribute=\"trailing\" constant=\"15\" id=\"yUy-tX-zoO\"/>\n                                        <constraint firstItem=\"olD-Q4-ukr\" firstAttribute=\"leading\" secondItem=\"haw-y1-x2y\" secondAttribute=\"trailing\" constant=\"15\" id=\"zbo-X6-kEZ\"/>\n                                    </constraints>\n                                </tableViewCellContentView>\n                                <connections>\n                                    <outlet property=\"switcher\" destination=\"olD-Q4-ukr\" id=\"XZc-sD-QP0\"/>\n                                </connections>\n                            </tableViewCell>\n                            <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" selectionStyle=\"none\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"SettingsTestAdCell\" id=\"z55-Qz-YbG\" customClass=\"SettingsTestAdCell\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"231.5\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"z55-Qz-YbG\" id=\"V6o-lZ-eIE\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <subviews>\n                                        <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Test Ad\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"qAA-ki-HgN\">\n                                            <rect key=\"frame\" x=\"15\" y=\"12\" width=\"90\" height=\"20\"/>\n                                            <constraints>\n                                                <constraint firstAttribute=\"width\" constant=\"90\" id=\"ZpO-AO-e2Z\"/>\n                                                <constraint firstAttribute=\"height\" constant=\"20\" id=\"fpv-z9-dKE\"/>\n                                            </constraints>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <nil key=\"textColor\"/>\n                                            <nil key=\"highlightedColor\"/>\n                                        </label>\n                                        <textField opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" placeholder=\"None\" textAlignment=\"right\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"M9r-JA-sef\">\n                                            <rect key=\"frame\" x=\"120\" y=\"7\" width=\"240\" height=\"30\"/>\n                                            <constraints>\n                                                <constraint firstAttribute=\"height\" constant=\"30\" id=\"lL8-rf-6J9\"/>\n                                            </constraints>\n                                            <nil key=\"textColor\"/>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                            <textInputTraits key=\"textInputTraits\" autocorrectionType=\"no\" spellCheckingType=\"no\"/>\n                                        </textField>\n                                    </subviews>\n                                    <constraints>\n                                        <constraint firstItem=\"M9r-JA-sef\" firstAttribute=\"centerY\" secondItem=\"V6o-lZ-eIE\" secondAttribute=\"centerY\" id=\"7dT-7o-vbg\"/>\n                                        <constraint firstAttribute=\"trailing\" secondItem=\"M9r-JA-sef\" secondAttribute=\"trailing\" constant=\"15\" id=\"8ZS-FU-Py3\"/>\n                                        <constraint firstItem=\"qAA-ki-HgN\" firstAttribute=\"centerY\" secondItem=\"V6o-lZ-eIE\" secondAttribute=\"centerY\" id=\"IGi-J9-Yq0\"/>\n                                        <constraint firstItem=\"M9r-JA-sef\" firstAttribute=\"leading\" secondItem=\"qAA-ki-HgN\" secondAttribute=\"trailing\" constant=\"15\" id=\"Zl0-0F-rV2\"/>\n                                        <constraint firstItem=\"qAA-ki-HgN\" firstAttribute=\"leading\" secondItem=\"V6o-lZ-eIE\" secondAttribute=\"leading\" constant=\"15\" id=\"hg9-FY-zDh\"/>\n                                    </constraints>\n                                </tableViewCellContentView>\n                                <connections>\n                                    <outlet property=\"testAdTextField\" destination=\"M9r-JA-sef\" id=\"0Wz-Wf-0Qo\"/>\n                                </connections>\n                            </tableViewCell>\n                        </prototypes>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"rYe-iJ-Hk4\" id=\"7UG-CY-5Eo\"/>\n                            <outlet property=\"delegate\" destination=\"rYe-iJ-Hk4\" id=\"KJD-c7-lKq\"/>\n                        </connections>\n                    </tableView>\n                    <navigationItem key=\"navigationItem\" title=\"Settings\" id=\"zqL-Rl-LKf\"/>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"vob-tM-dtO\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1732\" y=\"-1174\"/>\n        </scene>\n        <!--Native Ad-->\n        <scene sceneID=\"qG8-Gl-1Lt\">\n            <objects>\n                <viewController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"h3A-xj-Pwg\" customClass=\"NativeViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Nnl-4J-G6v\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"Rwv-mE-itj\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"vjb-ix-F79\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"603\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Select one of the options below\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"tmk-vm-vf2\">\n                                <rect key=\"frame\" x=\"48\" y=\"313\" width=\"279\" height=\"40\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"999\" constant=\"40\" id=\"CzY-Ol-NC0\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"QvH-VV-AcG\">\n                                <rect key=\"frame\" x=\"29.5\" y=\"10\" width=\"316\" height=\"295\"/>\n                                <subviews>\n                                    <view contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1qO-97-dE8\" customClass=\"FBMediaView\">\n                                        <rect key=\"frame\" x=\"8\" y=\"8\" width=\"38\" height=\"38\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" secondItem=\"1qO-97-dE8\" secondAttribute=\"height\" multiplier=\"1:1\" id=\"QTk-C6-Pq4\"/>\n                                        </constraints>\n                                    </view>\n                                    <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" preferredMaxLayoutWidth=\"256\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"IXj-hk-GDc\">\n                                        <rect key=\"frame\" x=\"52\" y=\"8\" width=\"0.0\" height=\"22\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" relation=\"lessThanOrEqual\" constant=\"187\" id=\"HQy-91-04d\"/>\n                                            <constraint firstAttribute=\"height\" constant=\"22\" id=\"thx-zo-qCu\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"16\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <view userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Xgo-9X-Tov\" customClass=\"FBMediaView\">\n                                        <rect key=\"frame\" x=\"8\" y=\"53\" width=\"300\" height=\"157\"/>\n                                    </view>\n                                    <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" numberOfLines=\"3\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" preferredMaxLayoutWidth=\"191\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"CN1-eA-jyj\">\n                                        <rect key=\"frame\" x=\"8\" y=\"235\" width=\"191\" height=\"50\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                        <color key=\"textColor\" red=\"0.33333333329999998\" green=\"0.33333333329999998\" blue=\"0.33333333329999998\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"TD4-vT-TIf\">\n                                        <rect key=\"frame\" x=\"8\" y=\"218\" width=\"0.0\" height=\"15\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"15\" id=\"htN-od-1aa\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"10\"/>\n                                        <color key=\"textColor\" red=\"0.33333333329999998\" green=\"0.33333333329999998\" blue=\"0.33333333329999998\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"uNB-p0-YO1\">\n                                        <rect key=\"frame\" x=\"52\" y=\"30\" width=\"0.0\" height=\"16\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"16\" id=\"6FT-i0-Ai5\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"10\"/>\n                                        <color key=\"textColor\" red=\"0.40000000000000002\" green=\"0.40000000000000002\" blue=\"0.40000000000000002\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"klZ-qf-OmP\">\n                                        <rect key=\"frame\" x=\"208\" y=\"235\" width=\"100\" height=\"28\"/>\n                                        <color key=\"backgroundColor\" red=\"0.35686274509999999\" green=\"0.57647058819999997\" blue=\"0.98823529409999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"28\" id=\"bLy-ui-ecN\"/>\n                                            <constraint firstAttribute=\"width\" constant=\"100\" id=\"xDy-Vq-S25\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"12\"/>\n                                        <state key=\"normal\">\n                                            <color key=\"titleColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        </state>\n                                    </button>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"L0J-Ar-2A6\" customClass=\"FBAdOptionsView\">\n                                        <rect key=\"frame\" x=\"265\" y=\"8\" width=\"43\" height=\"18\"/>\n                                        <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"18\" id=\"cms-Ub-J3W\"/>\n                                            <constraint firstAttribute=\"width\" constant=\"43\" id=\"t4B-rk-cTr\"/>\n                                        </constraints>\n                                    </view>\n                                </subviews>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"klZ-qf-OmP\" secondAttribute=\"trailing\" constant=\"8\" id=\"0sU-3I-N2X\"/>\n                                    <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"TD4-vT-TIf\" secondAttribute=\"trailing\" constant=\"8\" id=\"28x-Oa-iEr\"/>\n                                    <constraint firstItem=\"Xgo-9X-Tov\" firstAttribute=\"top\" secondItem=\"uNB-p0-YO1\" secondAttribute=\"bottom\" constant=\"7\" id=\"5ek-He-gUH\"/>\n                                    <constraint firstItem=\"klZ-qf-OmP\" firstAttribute=\"leading\" secondItem=\"CN1-eA-jyj\" secondAttribute=\"trailing\" constant=\"9\" id=\"6Hj-ip-LSF\"/>\n                                    <constraint firstItem=\"Xgo-9X-Tov\" firstAttribute=\"top\" secondItem=\"1qO-97-dE8\" secondAttribute=\"bottom\" constant=\"7\" id=\"7A7-Uv-FWJ\"/>\n                                    <constraint firstItem=\"Xgo-9X-Tov\" firstAttribute=\"leading\" secondItem=\"TD4-vT-TIf\" secondAttribute=\"leading\" id=\"95S-Ks-m5t\"/>\n                                    <constraint firstAttribute=\"width\" secondItem=\"QvH-VV-AcG\" secondAttribute=\"height\" multiplier=\"316:295\" priority=\"999\" id=\"9Rd-Ij-2yw\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"klZ-qf-OmP\" secondAttribute=\"bottom\" constant=\"32\" id=\"GHP-dZ-EVG\"/>\n                                    <constraint firstItem=\"1qO-97-dE8\" firstAttribute=\"top\" secondItem=\"IXj-hk-GDc\" secondAttribute=\"top\" id=\"Qje-ew-tEy\"/>\n                                    <constraint firstItem=\"TD4-vT-TIf\" firstAttribute=\"leading\" secondItem=\"CN1-eA-jyj\" secondAttribute=\"leading\" id=\"S2X-3t-Cks\"/>\n                                    <constraint firstItem=\"uNB-p0-YO1\" firstAttribute=\"leading\" secondItem=\"1qO-97-dE8\" secondAttribute=\"trailing\" constant=\"6\" id=\"S3Q-mK-dQ9\"/>\n                                    <constraint firstItem=\"TD4-vT-TIf\" firstAttribute=\"top\" secondItem=\"Xgo-9X-Tov\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"TAO-Eg-PXK\"/>\n                                    <constraint firstItem=\"1qO-97-dE8\" firstAttribute=\"leading\" secondItem=\"Xgo-9X-Tov\" secondAttribute=\"leading\" id=\"UF5-Fp-9QN\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"Xgo-9X-Tov\" secondAttribute=\"trailing\" constant=\"8\" id=\"VKi-wU-LCA\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"CN1-eA-jyj\" secondAttribute=\"bottom\" constant=\"10\" id=\"Ve4-d7-0i6\"/>\n                                    <constraint firstItem=\"L0J-Ar-2A6\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"IXj-hk-GDc\" secondAttribute=\"trailing\" constant=\"10\" id=\"Xqx-Py-rgy\"/>\n                                    <constraint firstItem=\"uNB-p0-YO1\" firstAttribute=\"top\" secondItem=\"IXj-hk-GDc\" secondAttribute=\"bottom\" id=\"alo-Gf-NbG\"/>\n                                    <constraint firstItem=\"1qO-97-dE8\" firstAttribute=\"top\" secondItem=\"QvH-VV-AcG\" secondAttribute=\"top\" constant=\"8\" id=\"bsP-GZ-f3e\"/>\n                                    <constraint firstItem=\"1qO-97-dE8\" firstAttribute=\"leading\" secondItem=\"QvH-VV-AcG\" secondAttribute=\"leading\" constant=\"8\" id=\"i7Z-lI-tHQ\"/>\n                                    <constraint firstItem=\"klZ-qf-OmP\" firstAttribute=\"top\" secondItem=\"TD4-vT-TIf\" secondAttribute=\"bottom\" constant=\"2\" id=\"iMj-K8-Loq\"/>\n                                    <constraint firstItem=\"IXj-hk-GDc\" firstAttribute=\"leading\" secondItem=\"uNB-p0-YO1\" secondAttribute=\"leading\" id=\"kWx-gR-J1W\"/>\n                                    <constraint firstItem=\"CN1-eA-jyj\" firstAttribute=\"top\" secondItem=\"klZ-qf-OmP\" secondAttribute=\"top\" id=\"meV-Nt-rHX\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"L0J-Ar-2A6\" secondAttribute=\"trailing\" constant=\"8\" id=\"mpw-wJ-MM2\"/>\n                                    <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"uNB-p0-YO1\" secondAttribute=\"trailing\" constant=\"8\" id=\"tRu-Xz-CTG\"/>\n                                    <constraint firstItem=\"L0J-Ar-2A6\" firstAttribute=\"top\" secondItem=\"IXj-hk-GDc\" secondAttribute=\"top\" id=\"tsJ-xl-heS\"/>\n                                    <constraint firstAttribute=\"height\" priority=\"999\" constant=\"295\" id=\"wGC-oh-Gih\"/>\n                                </constraints>\n                            </view>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"plain\" separatorStyle=\"default\" rowHeight=\"-1\" estimatedRowHeight=\"-1\" sectionHeaderHeight=\"28\" sectionFooterHeight=\"28\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wo0-zb-8YA\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"353\" width=\"375\" height=\"250\"/>\n                                <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"125\" id=\"x0W-48-XvT\"/>\n                                </constraints>\n                                <color key=\"sectionIndexBackgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"calibratedWhite\"/>\n                                <prototypes>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"none\" indentationWidth=\"10\" reuseIdentifier=\"menuCell\" textLabel=\"hT7-ZG-wMg\" style=\"IBUITableViewCellStyleDefault\" id=\"qnv-2m-vEu\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"28\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"qnv-2m-vEu\" id=\"2vK-ld-QYZ\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Load Native Ad\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"hT7-ZG-wMg\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"345\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" name=\".AppleSystemUIFont\" family=\".AppleSystemUIFont\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" accessoryType=\"disclosureIndicator\" indentationWidth=\"10\" reuseIdentifier=\"NativeAdTemplate\" textLabel=\"qIt-jQ-EVo\" style=\"IBUITableViewCellStyleDefault\" id=\"niH-Y0-rKr\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"72\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"niH-Y0-rKr\" id=\"pIo-XD-xyZ\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"342\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Load Native Ad using Template\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"qIt-jQ-EVo\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"325\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <segue destination=\"sQQ-YB-bv1\" kind=\"show\" identifier=\"showTemplate\" id=\"fDr-8X-uRz\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"NativeTableViewAdCell\" textLabel=\"fsn-8x-xiS\" style=\"IBUITableViewCellStyleDefault\" id=\"RJp-bm-c16\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"116\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"RJp-bm-c16\" id=\"NC9-Z5-hW1\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Load Native Ad in TableView\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"fsn-8x-xiS\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"345\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <segue destination=\"tvO-xh-a3q\" kind=\"show\" identifier=\"showTableView\" id=\"EIU-Hi-uz1\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"NativeScrollViewAdCell\" textLabel=\"PdM-lc-CLK\" style=\"IBUITableViewCellStyleDefault\" id=\"9KK-g1-ksW\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"160\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"9KK-g1-ksW\" id=\"4sy-7n-ZVg\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Load Native Ad in ScrollView\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"PdM-lc-CLK\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"345\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <segue destination=\"Eeu-oS-oqg\" kind=\"show\" identifier=\"showScrollView\" id=\"0RV-st-pby\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"NativeCollectionViewAdCell\" textLabel=\"thy-ya-GrR\" style=\"IBUITableViewCellStyleDefault\" id=\"ttJ-gq-JfG\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"204\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"ttJ-gq-JfG\" id=\"3d2-CR-ijJ\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Load Native Ad in CollectionView\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"thy-ya-GrR\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"345\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <segue destination=\"IyT-mt-azy\" kind=\"show\" identifier=\"showCollectionView\" id=\"4kB-pS-l6N\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"NativeBannerAdCell\" textLabel=\"kOk-cD-J71\" style=\"IBUITableViewCellStyleDefault\" id=\"uep-q3-rxP\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"248\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"uep-q3-rxP\" id=\"JS5-cK-QZc\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Load Native Banner Ad\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"kOk-cD-J71\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"345\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <segue destination=\"SlD-I8-jEL\" kind=\"show\" identifier=\"showNativeBanner\" id=\"53U-H3-3ai\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" preservesSuperviewLayoutMargins=\"YES\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"NativeBannerAdTemplateCell\" textLabel=\"Met-Pa-2Lh\" style=\"IBUITableViewCellStyleDefault\" id=\"J8l-P4-thM\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"292\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" preservesSuperviewLayoutMargins=\"YES\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"J8l-P4-thM\" id=\"SMO-8x-SCo\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" insetsLayoutMarginsFromSafeArea=\"NO\" text=\"Load Native Banner Ad using Template\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"Met-Pa-2Lh\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"345\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <segue destination=\"IDg-uy-lI1\" kind=\"show\" identifier=\"showNativeBannerTemplate\" id=\"ruR-hz-E0B\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </prototypes>\n                                <sections/>\n                                <connections>\n                                    <outlet property=\"dataSource\" destination=\"h3A-xj-Pwg\" id=\"Hai-0q-fck\"/>\n                                    <outlet property=\"delegate\" destination=\"h3A-xj-Pwg\" id=\"opX-q7-xsV\"/>\n                                </connections>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89211697050000005\" green=\"0.89608012770000001\" blue=\"0.90796959919999998\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"tmk-vm-vf2\" firstAttribute=\"top\" secondItem=\"QvH-VV-AcG\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"3tB-n2-ZhQ\"/>\n                            <constraint firstItem=\"tmk-vm-vf2\" firstAttribute=\"leading\" secondItem=\"vjb-ix-F79\" secondAttribute=\"leading\" constant=\"48\" id=\"F4Q-tx-bC4\"/>\n                            <constraint firstItem=\"QvH-VV-AcG\" firstAttribute=\"top\" secondItem=\"Nnl-4J-G6v\" secondAttribute=\"bottom\" constant=\"10\" id=\"G2T-AT-Qi7\"/>\n                            <constraint firstItem=\"QvH-VV-AcG\" firstAttribute=\"centerX\" secondItem=\"vjb-ix-F79\" secondAttribute=\"centerX\" id=\"QVa-Ls-ezf\"/>\n                            <constraint firstItem=\"tmk-vm-vf2\" firstAttribute=\"centerX\" secondItem=\"vjb-ix-F79\" secondAttribute=\"centerX\" id=\"TNE-q3-CUA\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"wo0-zb-8YA\" secondAttribute=\"trailing\" id=\"fs9-rS-OOO\"/>\n                            <constraint firstItem=\"Rwv-mE-itj\" firstAttribute=\"top\" secondItem=\"wo0-zb-8YA\" secondAttribute=\"bottom\" id=\"gbA-2p-Xiq\"/>\n                            <constraint firstItem=\"wo0-zb-8YA\" firstAttribute=\"leading\" secondItem=\"vjb-ix-F79\" secondAttribute=\"leading\" id=\"sNY-WO-27i\"/>\n                            <constraint firstItem=\"wo0-zb-8YA\" firstAttribute=\"top\" secondItem=\"tmk-vm-vf2\" secondAttribute=\"bottom\" id=\"voH-ay-REN\"/>\n                        </constraints>\n                    </view>\n                    <extendedEdge key=\"edgesForExtendedLayout\" bottom=\"YES\"/>\n                    <navigationItem key=\"navigationItem\" title=\"Native Ad\" id=\"YcV-Nw-N8x\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Settings\" id=\"2Et-uL-VVd\">\n                            <connections>\n                                <segue destination=\"rYe-iJ-Hk4\" kind=\"show\" identifier=\"showSettings\" id=\"cOa-ao-kuO\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <simulatedNavigationBarMetrics key=\"simulatedTopBarMetrics\" prompted=\"NO\"/>\n                    <connections>\n                        <outlet property=\"adBodyLabel\" destination=\"CN1-eA-jyj\" id=\"WNl-XM-Ij9\"/>\n                        <outlet property=\"adCallToActionButton\" destination=\"klZ-qf-OmP\" id=\"wXo-0m-4Zk\"/>\n                        <outlet property=\"adCoverMediaView\" destination=\"Xgo-9X-Tov\" id=\"kQY-8A-8n5\"/>\n                        <outlet property=\"adIconView\" destination=\"1qO-97-dE8\" id=\"7eX-JX-9yg\"/>\n                        <outlet property=\"adOptionsView\" destination=\"L0J-Ar-2A6\" id=\"pHp-Jh-DRZ\"/>\n                        <outlet property=\"adSocialContextLabel\" destination=\"TD4-vT-TIf\" id=\"O5L-Ie-okz\"/>\n                        <outlet property=\"adStatusLabel\" destination=\"tmk-vm-vf2\" id=\"Zpv-Jv-sON\"/>\n                        <outlet property=\"adTitleLabel\" destination=\"IXj-hk-GDc\" id=\"pm6-SD-pPl\"/>\n                        <outlet property=\"adUIView\" destination=\"QvH-VV-AcG\" id=\"gEC-AI-cy0\"/>\n                        <outlet property=\"menuTableView\" destination=\"wo0-zb-8YA\" id=\"DbN-Ds-kmK\"/>\n                        <outlet property=\"sponsoredLabel\" destination=\"uNB-p0-YO1\" id=\"eqh-fK-3WJ\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"faM-yL-sS0\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-2465\" y=\"-449\"/>\n        </scene>\n        <!--Table View-->\n        <scene sceneID=\"jdS-PS-bgN\">\n            <objects>\n                <viewController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"tvO-xh-a3q\" customClass=\"TableViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"KK1-iT-3Vo\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"15e-HE-Xg6\"/>\n                    </layoutGuides>\n                    <view key=\"view\" clearsContextBeforeDrawing=\"NO\" contentMode=\"scaleToFill\" id=\"ivL-us-uBs\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"plain\" separatorStyle=\"default\" rowHeight=\"44\" sectionHeaderHeight=\"22\" sectionFooterHeight=\"22\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"OgQ-p9-WTF\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"375\" height=\"603\"/>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                            </tableView>\n                            <activityIndicatorView opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" hidesWhenStopped=\"YES\" animating=\"YES\" style=\"whiteLarge\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"qzs-Qf-u4i\">\n                                <rect key=\"frame\" x=\"169\" y=\"315\" width=\"37\" height=\"37\"/>\n                                <color key=\"color\" red=\"0.21960784310000001\" green=\"0.3294117647\" blue=\"0.52941176469999995\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </activityIndicatorView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"OgQ-p9-WTF\" firstAttribute=\"top\" secondItem=\"KK1-iT-3Vo\" secondAttribute=\"bottom\" id=\"7JC-fG-agQ\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"OgQ-p9-WTF\" secondAttribute=\"trailing\" id=\"93y-7M-7T8\"/>\n                            <constraint firstItem=\"qzs-Qf-u4i\" firstAttribute=\"centerX\" secondItem=\"ivL-us-uBs\" secondAttribute=\"centerX\" id=\"LWe-v1-TYZ\"/>\n                            <constraint firstItem=\"OgQ-p9-WTF\" firstAttribute=\"leading\" secondItem=\"ivL-us-uBs\" secondAttribute=\"leading\" id=\"epa-En-bgk\"/>\n                            <constraint firstItem=\"qzs-Qf-u4i\" firstAttribute=\"centerY\" secondItem=\"ivL-us-uBs\" secondAttribute=\"centerY\" id=\"gy2-Qv-LKT\"/>\n                            <constraint firstItem=\"15e-HE-Xg6\" firstAttribute=\"top\" secondItem=\"OgQ-p9-WTF\" secondAttribute=\"bottom\" id=\"ttH-4Z-vk4\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Table View\" id=\"BSg-1P-RVK\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Refresh\" id=\"hWV-tH-Jpd\">\n                            <connections>\n                                <action selector=\"refresh:\" destination=\"tvO-xh-a3q\" id=\"vJ0-4k-K2x\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"activityIndicator\" destination=\"qzs-Qf-u4i\" id=\"1eh-xy-EL6\"/>\n                        <outlet property=\"tableView\" destination=\"OgQ-p9-WTF\" id=\"vV7-DA-coy\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"XHS-vx-HB4\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1732\" y=\"-451\"/>\n        </scene>\n        <!--Scroll View-->\n        <scene sceneID=\"nDD-W1-hWW\">\n            <objects>\n                <viewController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"Eeu-oS-oqg\" customClass=\"ScrollViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"rrl-nj-CcF\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"AVf-Fb-eFh\"/>\n                    </layoutGuides>\n                    <view key=\"view\" clearsContextBeforeDrawing=\"NO\" contentMode=\"scaleToFill\" id=\"rMh-nF-9ty\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"jBr-Qs-tEk\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"183.5\" width=\"375\" height=\"300\"/>\n                                <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"300\" id=\"Hkc-hl-MoV\"/>\n                                </constraints>\n                            </view>\n                            <activityIndicatorView opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" hidesWhenStopped=\"YES\" animating=\"YES\" style=\"whiteLarge\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wHC-nW-Hgs\">\n                                <rect key=\"frame\" x=\"169\" y=\"315\" width=\"37\" height=\"37\"/>\n                                <color key=\"color\" red=\"0.21960784310000001\" green=\"0.3294117647\" blue=\"0.52941176469999995\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </activityIndicatorView>\n                        </subviews>\n                        <color key=\"backgroundColor\" cocoaTouchSystemColor=\"groupTableViewBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"jBr-Qs-tEk\" firstAttribute=\"leading\" secondItem=\"rMh-nF-9ty\" secondAttribute=\"leading\" id=\"98A-9r-jh9\"/>\n                            <constraint firstItem=\"jBr-Qs-tEk\" firstAttribute=\"centerY\" secondItem=\"rMh-nF-9ty\" secondAttribute=\"centerY\" id=\"Akv-E9-Xar\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"jBr-Qs-tEk\" secondAttribute=\"trailing\" id=\"Ssv-va-Ohx\"/>\n                            <constraint firstItem=\"wHC-nW-Hgs\" firstAttribute=\"centerY\" secondItem=\"rMh-nF-9ty\" secondAttribute=\"centerY\" id=\"cb3-zK-DcM\"/>\n                            <constraint firstItem=\"jBr-Qs-tEk\" firstAttribute=\"centerX\" secondItem=\"rMh-nF-9ty\" secondAttribute=\"centerX\" id=\"ugC-Xe-rBC\"/>\n                            <constraint firstItem=\"wHC-nW-Hgs\" firstAttribute=\"centerX\" secondItem=\"rMh-nF-9ty\" secondAttribute=\"centerX\" id=\"y1Z-4h-zuj\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Scroll View\" id=\"LRr-Jb-kIh\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Refresh\" id=\"i3c-0m-qae\">\n                            <connections>\n                                <action selector=\"refresh:\" destination=\"Eeu-oS-oqg\" id=\"r4G-Sx-2av\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"activityIndicator\" destination=\"wHC-nW-Hgs\" id=\"WVu-d0-MeV\"/>\n                        <outlet property=\"containerView\" destination=\"jBr-Qs-tEk\" id=\"uMd-pM-VdR\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Fgh-2K-V23\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-2466\" y=\"267\"/>\n        </scene>\n        <!--Collection View-->\n        <scene sceneID=\"h5n-5Y-yry\">\n            <objects>\n                <viewController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"IyT-mt-azy\" customClass=\"CollectionViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Ste-Eb-nx0\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"gOg-34-Mwk\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"I59-d2-ojt\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                        <subviews>\n                            <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" dataMode=\"prototypes\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Zkg-CL-dso\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"375\" height=\"603\"/>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <collectionViewFlowLayout key=\"collectionViewLayout\" minimumLineSpacing=\"10\" minimumInteritemSpacing=\"10\" id=\"8bu-3c-C6a\">\n                                    <size key=\"itemSize\" width=\"50\" height=\"50\"/>\n                                    <size key=\"headerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <size key=\"footerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <inset key=\"sectionInset\" minX=\"0.0\" minY=\"0.0\" maxX=\"0.0\" maxY=\"0.0\"/>\n                                </collectionViewFlowLayout>\n                            </collectionView>\n                            <activityIndicatorView hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" hidesWhenStopped=\"YES\" style=\"whiteLarge\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"EE4-bp-YHj\">\n                                <rect key=\"frame\" x=\"169\" y=\"315\" width=\"37\" height=\"37\"/>\n                                <color key=\"color\" red=\"0.21960784310000001\" green=\"0.3294117647\" blue=\"0.52941176469999995\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </activityIndicatorView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"EE4-bp-YHj\" firstAttribute=\"centerX\" secondItem=\"I59-d2-ojt\" secondAttribute=\"centerX\" id=\"30g-fm-593\"/>\n                            <constraint firstItem=\"EE4-bp-YHj\" firstAttribute=\"centerY\" secondItem=\"I59-d2-ojt\" secondAttribute=\"centerY\" id=\"S74-l2-4wx\"/>\n                            <constraint firstItem=\"gOg-34-Mwk\" firstAttribute=\"top\" secondItem=\"Zkg-CL-dso\" secondAttribute=\"bottom\" id=\"XUm-XM-mzF\"/>\n                            <constraint firstItem=\"Zkg-CL-dso\" firstAttribute=\"top\" secondItem=\"Ste-Eb-nx0\" secondAttribute=\"bottom\" id=\"fX5-Re-qXS\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"Zkg-CL-dso\" secondAttribute=\"trailing\" id=\"msI-bi-RWl\"/>\n                            <constraint firstItem=\"Zkg-CL-dso\" firstAttribute=\"leading\" secondItem=\"I59-d2-ojt\" secondAttribute=\"leading\" id=\"zG2-nN-dwy\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Collection View\" id=\"gD1-hc-2YO\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Refresh\" id=\"hUc-SX-dgl\">\n                            <connections>\n                                <action selector=\"refresh:\" destination=\"IyT-mt-azy\" id=\"gi0-dy-yYr\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"activityIndicator\" destination=\"EE4-bp-YHj\" id=\"nlU-4q-9nS\"/>\n                        <outlet property=\"collectionView\" destination=\"Zkg-CL-dso\" id=\"vvr-P5-6ee\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"e14-fP-unm\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1732\" y=\"267\"/>\n        </scene>\n        <!--Menu Controller-->\n        <scene sceneID=\"eAw-c2-9LE\">\n            <objects>\n                <tableViewController id=\"KVl-WL-add\" userLabel=\"Menu Controller\" customClass=\"MenuTableViewController\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"static\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"44\" sectionHeaderHeight=\"18\" sectionFooterHeight=\"18\" id=\"alf-XA-uif\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" cocoaTouchSystemColor=\"groupTableViewBackgroundColor\"/>\n                        <sections>\n                            <tableViewSection id=\"iHx-hP-NIy\">\n                                <cells>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" accessoryType=\"disclosureIndicator\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"Cell\" textLabel=\"Ltz-Lp-UfB\" style=\"IBUITableViewCellStyleDefault\" id=\"Adj-KV-ZxR\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"35\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"Adj-KV-ZxR\" id=\"odB-uv-Uuc\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"341\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Banner\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"Ltz-Lp-UfB\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"0.0\" width=\"324\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <connections>\n                                            <segue destination=\"QbK-Vd-ovp\" kind=\"show\" id=\"ruw-EF-zlo\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" accessoryType=\"disclosureIndicator\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"Cell\" textLabel=\"B5T-04-omF\" style=\"IBUITableViewCellStyleDefault\" id=\"O1f-ee-g93\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"79\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"O1f-ee-g93\" id=\"HAG-zr-wDP\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"341\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Medium Rect\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"B5T-04-omF\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"0.0\" width=\"324\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <connections>\n                                            <segue destination=\"yyP-cK-zjg\" kind=\"show\" id=\"3ed-yH-Djn\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" accessoryType=\"disclosureIndicator\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"Cell\" textLabel=\"CJs-GB-2Ds\" style=\"IBUITableViewCellStyleDefault\" id=\"EoG-N4-CoT\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"123\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"EoG-N4-CoT\" id=\"BmC-nZ-YeX\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"341\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Interstitial\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"CJs-GB-2Ds\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"0.0\" width=\"324\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <connections>\n                                            <segue destination=\"YRZ-03-2Bt\" kind=\"show\" id=\"DSS-4Y-mJk\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" accessoryType=\"disclosureIndicator\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"Cell\" textLabel=\"8Gf-PQ-idg\" style=\"IBUITableViewCellStyleDefault\" id=\"6eB-as-zbZ\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"167\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"6eB-as-zbZ\" id=\"RfB-Qn-rit\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"341\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Rewarded Video\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"8Gf-PQ-idg\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"0.0\" width=\"324\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <connections>\n                                            <segue destination=\"GEB-PC-Iex\" kind=\"show\" id=\"m5m-F5-NUt\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" accessoryType=\"disclosureIndicator\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"Cell\" textLabel=\"hQR-gD-KOY\" style=\"IBUITableViewCellStyleDefault\" id=\"2i1-0x-G7T\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"211\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"2i1-0x-G7T\" id=\"44N-6s-znX\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"341\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Instream\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"hQR-gD-KOY\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"0.0\" width=\"324\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <connections>\n                                            <segue destination=\"aXS-Ey-VrL\" kind=\"show\" id=\"VoB-lr-Fsb\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" accessoryType=\"disclosureIndicator\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"Cell\" textLabel=\"SSD-QN-igD\" style=\"IBUITableViewCellStyleDefault\" id=\"vrc-HS-w1C\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"255\" width=\"375\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"vrc-HS-w1C\" id=\"8DN-0p-odQ\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"341\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Native\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"SSD-QN-igD\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"0.0\" width=\"324\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <connections>\n                                            <segue destination=\"h3A-xj-Pwg\" kind=\"show\" id=\"Fqb-fH-hMe\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </cells>\n                            </tableViewSection>\n                        </sections>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"KVl-WL-add\" id=\"y0B-Sf-JpW\"/>\n                            <outlet property=\"delegate\" destination=\"KVl-WL-add\" id=\"BaY-3H-FKh\"/>\n                        </connections>\n                    </tableView>\n                    <navigationItem key=\"navigationItem\" title=\"Ad Samples\" id=\"tBT-jX-XAx\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Settings\" id=\"EUq-8d-yFz\">\n                            <connections>\n                                <segue destination=\"rYe-iJ-Hk4\" kind=\"show\" id=\"iUt-pZ-5pO\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"vev-8i-yq8\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-3266.4000000000001\" y=\"-449.32533733133437\"/>\n        </scene>\n        <!--Native Template-->\n        <scene sceneID=\"Y8A-OM-kCT\">\n            <objects>\n                <viewController id=\"sQQ-YB-bv1\" customClass=\"NativeAdTemplateViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"8c9-NM-cqE\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"NNz-dD-iC3\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"vrg-H3-J6f\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"top\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Tap 'Load Ad' above\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"3kC-bF-OPw\">\n                                <rect key=\"frame\" x=\"15\" y=\"72\" width=\"345\" height=\"14.5\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"14.5\" id=\"6IG-ZN-dUC\"/>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"45\" id=\"nH1-8h-p4E\" userLabel=\"height = 45\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <view clipsSubviews=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ATc-S4-yyM\">\n                                <rect key=\"frame\" x=\"20\" y=\"367\" width=\"335\" height=\"250\"/>\n                                <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"250\" id=\"ErV-Ge-E7b\"/>\n                                    <constraint firstAttribute=\"width\" constant=\"335\" id=\"FYT-xO-fok\"/>\n                                </constraints>\n                            </view>\n                            <slider opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" value=\"250\" minValue=\"150\" maxValue=\"450\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PT8-dh-u6s\">\n                                <rect key=\"frame\" x=\"123\" y=\"106.5\" width=\"218\" height=\"30\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"29\" id=\"I53-lk-1ND\"/>\n                                </constraints>\n                                <connections>\n                                    <action selector=\"handleAdHeightChange:\" destination=\"sQQ-YB-bv1\" eventType=\"valueChanged\" id=\"70N-rs-PqG\"/>\n                                </connections>\n                            </slider>\n                            <slider opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" value=\"250\" minValue=\"120\" maxValue=\"320\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"WrF-nB-gFj\">\n                                <rect key=\"frame\" x=\"123\" y=\"155.5\" width=\"218\" height=\"30\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"29\" id=\"TNy-t0-WfQ\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"29\" id=\"wUR-XF-aC6\"/>\n                                </constraints>\n                                <connections>\n                                    <action selector=\"handleWidthChange:\" destination=\"sQQ-YB-bv1\" eventType=\"valueChanged\" id=\"iqY-gJ-YrL\"/>\n                                </connections>\n                            </slider>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Height\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aop-w5-OZI\">\n                                <rect key=\"frame\" x=\"29\" y=\"111\" width=\"51\" height=\"21\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"6XG-aq-W5W\"/>\n                                    <constraint firstAttribute=\"width\" constant=\"51\" id=\"Xdf-ci-74b\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"15\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Width\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"2Dv-P7-vXZ\">\n                                <rect key=\"frame\" x=\"29\" y=\"160\" width=\"46\" height=\"21\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" constant=\"46\" id=\"BwB-pL-k1J\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"r59-9J-aWd\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"15\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89009666440000001\" green=\"0.89009666440000001\" blue=\"0.89009666440000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"ATc-S4-yyM\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"vrg-H3-J6f\" secondAttribute=\"leading\" constant=\"10\" id=\"1hB-Zx-40C\"/>\n                            <constraint firstItem=\"WrF-nB-gFj\" firstAttribute=\"top\" secondItem=\"PT8-dh-u6s\" secondAttribute=\"bottom\" constant=\"20\" id=\"5y7-8d-dUQ\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"PT8-dh-u6s\" secondAttribute=\"trailing\" constant=\"20\" id=\"7yd-P4-i6P\"/>\n                            <constraint firstItem=\"ATc-S4-yyM\" firstAttribute=\"centerX\" secondItem=\"vrg-H3-J6f\" secondAttribute=\"centerX\" id=\"IK1-FD-NOO\"/>\n                            <constraint firstItem=\"NNz-dD-iC3\" firstAttribute=\"top\" secondItem=\"ATc-S4-yyM\" secondAttribute=\"bottom\" constant=\"50\" id=\"KTf-Mn-cVm\"/>\n                            <constraint firstItem=\"2Dv-P7-vXZ\" firstAttribute=\"leading\" secondItem=\"aop-w5-OZI\" secondAttribute=\"leading\" id=\"LyD-oB-Dpp\"/>\n                            <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"ATc-S4-yyM\" secondAttribute=\"trailing\" constant=\"10\" id=\"Oa1-7w-8A6\"/>\n                            <constraint firstItem=\"2Dv-P7-vXZ\" firstAttribute=\"top\" secondItem=\"aop-w5-OZI\" secondAttribute=\"bottom\" constant=\"28\" id=\"Xxy-ea-Tg7\"/>\n                            <constraint firstItem=\"PT8-dh-u6s\" firstAttribute=\"leading\" secondItem=\"aop-w5-OZI\" secondAttribute=\"trailing\" constant=\"45\" id=\"aza-DI-Du2\"/>\n                            <constraint firstItem=\"WrF-nB-gFj\" firstAttribute=\"leading\" secondItem=\"2Dv-P7-vXZ\" secondAttribute=\"trailing\" constant=\"50\" id=\"dha-Ye-8tH\"/>\n                            <constraint firstItem=\"3kC-bF-OPw\" firstAttribute=\"leading\" secondItem=\"vrg-H3-J6f\" secondAttribute=\"leading\" constant=\"15\" id=\"gOp-dy-BvF\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"3kC-bF-OPw\" secondAttribute=\"trailing\" constant=\"15\" id=\"iQR-gW-Vzf\"/>\n                            <constraint firstItem=\"aop-w5-OZI\" firstAttribute=\"leading\" secondItem=\"vrg-H3-J6f\" secondAttribute=\"leading\" constant=\"29\" id=\"j3Z-zO-lKL\"/>\n                            <constraint firstItem=\"PT8-dh-u6s\" firstAttribute=\"top\" secondItem=\"3kC-bF-OPw\" secondAttribute=\"bottom\" constant=\"20\" id=\"j6v-4y-oHt\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"WrF-nB-gFj\" secondAttribute=\"trailing\" constant=\"20\" id=\"ofc-TW-IFK\"/>\n                            <constraint firstItem=\"3kC-bF-OPw\" firstAttribute=\"top\" secondItem=\"8c9-NM-cqE\" secondAttribute=\"bottom\" constant=\"8\" id=\"q21-2o-FNw\"/>\n                            <constraint firstItem=\"aop-w5-OZI\" firstAttribute=\"top\" secondItem=\"3kC-bF-OPw\" secondAttribute=\"bottom\" constant=\"24.5\" id=\"uv2-dw-Tmo\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Native Template\" id=\"aZX-16-ALd\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Load Ad\" id=\"WnW-8m-ZRq\">\n                            <connections>\n                                <action selector=\"loadNativeAd\" destination=\"sQQ-YB-bv1\" id=\"xnb-Yl-etn\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"adContainerHeightConstraint\" destination=\"ErV-Ge-E7b\" id=\"x5d-Id-mjK\"/>\n                        <outlet property=\"adContainerView\" destination=\"ATc-S4-yyM\" id=\"RzY-Gk-DGu\"/>\n                        <outlet property=\"adContainerWidthConstraint\" destination=\"FYT-xO-fok\" id=\"y7t-5i-yVU\"/>\n                        <outlet property=\"adStatusLabel\" destination=\"3kC-bF-OPw\" id=\"fQR-HP-aft\"/>\n                        <outlet property=\"heightSlider\" destination=\"PT8-dh-u6s\" id=\"cb9-4K-kKM\"/>\n                        <outlet property=\"widthSlider\" destination=\"WrF-nB-gFj\" id=\"bNG-c8-ltI\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"1qc-1b-leL\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-4847.1999999999998\" y=\"-1174.3628185907048\"/>\n        </scene>\n        <!--Banner-->\n        <scene sceneID=\"ZDA-sE-0SS\">\n            <objects>\n                <viewController id=\"QbK-Vd-ovp\" customClass=\"BannerViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"B6S-7s-Pof\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"WOb-Ay-3FS\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"x3h-do-tCg\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"top\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Loading an ad...\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8Lr-aD-ttX\">\n                                <rect key=\"frame\" x=\"31\" y=\"79\" width=\"313\" height=\"14.5\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"45\" id=\"MJk-CA-GRe\" userLabel=\"height = 45\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89009666440000001\" green=\"0.89009666440000001\" blue=\"0.89009666440000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"8Lr-aD-ttX\" firstAttribute=\"leading\" secondItem=\"x3h-do-tCg\" secondAttribute=\"leadingMargin\" constant=\"15\" id=\"4xT-XZ-5OH\"/>\n                            <constraint firstItem=\"8Lr-aD-ttX\" firstAttribute=\"top\" secondItem=\"B6S-7s-Pof\" secondAttribute=\"bottom\" constant=\"15\" id=\"NoP-f2-sp5\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"8Lr-aD-ttX\" secondAttribute=\"trailing\" constant=\"15\" id=\"kzN-Ew-I9E\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Banner\" id=\"PdM-Re-hgZ\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Refresh\" id=\"dwx-Pg-giJ\">\n                            <connections>\n                                <action selector=\"refreshAd:\" destination=\"QbK-Vd-ovp\" id=\"BPX-GT-aJO\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"adStatusLabel\" destination=\"8Lr-aD-ttX\" id=\"OLn-xf-q7q\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"8N9-7P-J2L\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-4106\" y=\"-1174\"/>\n        </scene>\n        <!--Rewarded Video-->\n        <scene sceneID=\"ghD-JL-9ry\">\n            <objects>\n                <viewController id=\"GEB-PC-Iex\" customClass=\"RewardedVideoViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"8Db-ne-trV\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"mpz-9b-22b\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"qJF-Oi-mSd\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"top\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1. Tap 'Load Ad' 2. Once ad loads, tap 'Show!' to see the ad\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UBJ-jZ-zYj\">\n                                <rect key=\"frame\" x=\"31\" y=\"79\" width=\"313\" height=\"29\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"200\" id=\"Hhm-ie-jc5\" userLabel=\"height = 45\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89009666440000001\" green=\"0.89009666440000001\" blue=\"0.89009666440000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"UBJ-jZ-zYj\" secondAttribute=\"trailing\" constant=\"15\" id=\"U1T-5V-w6M\"/>\n                            <constraint firstItem=\"UBJ-jZ-zYj\" firstAttribute=\"leading\" secondItem=\"qJF-Oi-mSd\" secondAttribute=\"leadingMargin\" constant=\"15\" id=\"cA9-fz-2WM\"/>\n                            <constraint firstItem=\"UBJ-jZ-zYj\" firstAttribute=\"top\" secondItem=\"8Db-ne-trV\" secondAttribute=\"bottom\" constant=\"15\" id=\"tUg-Ab-Dt2\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Rewarded Video\" id=\"XLa-q3-pOa\">\n                        <rightBarButtonItems>\n                            <barButtonItem title=\"Show!\" id=\"jOD-KW-rTA\">\n                                <connections>\n                                    <action selector=\"showAd\" destination=\"GEB-PC-Iex\" id=\"dbu-oA-MLC\"/>\n                                </connections>\n                            </barButtonItem>\n                            <barButtonItem title=\"Load Ad\" id=\"kVK-qQ-cuI\">\n                                <connections>\n                                    <action selector=\"loadAd\" destination=\"GEB-PC-Iex\" id=\"r7g-mq-cGd\"/>\n                                </connections>\n                            </barButtonItem>\n                        </rightBarButtonItems>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"adStatusLabel\" destination=\"UBJ-jZ-zYj\" id=\"j91-Gr-Sfc\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"8wb-Wa-IeJ\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-4106\" y=\"267\"/>\n        </scene>\n        <!--Medium Rect-->\n        <scene sceneID=\"p0p-7p-FAC\">\n            <objects>\n                <viewController id=\"yyP-cK-zjg\" customClass=\"MediumRectViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Jnn-GO-0Kb\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"pl1-me-RG0\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Qew-UM-63q\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"top\" verticalHuggingPriority=\"750\" horizontalCompressionResistancePriority=\"1000\" verticalCompressionResistancePriority=\"250\" text=\"Loading an ad...\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"j6L-58-9Qm\">\n                                <rect key=\"frame\" x=\"15\" y=\"79\" width=\"345\" height=\"14.5\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"45\" id=\"FfY-ew-y1Y\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"rlh-TU-gIG\">\n                                <rect key=\"frame\" x=\"37.5\" y=\"208.5\" width=\"300\" height=\"250\"/>\n                                <color key=\"backgroundColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" constant=\"300\" id=\"Ay9-Mr-yER\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"250\" id=\"LKj-LG-rZP\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89009666440000001\" green=\"0.89009666440000001\" blue=\"0.89009666440000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"j6L-58-9Qm\" firstAttribute=\"top\" secondItem=\"Jnn-GO-0Kb\" secondAttribute=\"bottom\" constant=\"15\" id=\"0ef-7s-REf\"/>\n                            <constraint firstItem=\"rlh-TU-gIG\" firstAttribute=\"centerY\" secondItem=\"Qew-UM-63q\" secondAttribute=\"centerY\" id=\"QnJ-F8-1Tp\"/>\n                            <constraint firstItem=\"rlh-TU-gIG\" firstAttribute=\"centerX\" secondItem=\"Qew-UM-63q\" secondAttribute=\"centerX\" id=\"WYl-em-sG4\"/>\n                            <constraint firstItem=\"j6L-58-9Qm\" firstAttribute=\"leading\" secondItem=\"Qew-UM-63q\" secondAttribute=\"leading\" constant=\"15\" id=\"baC-4I-BRr\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"j6L-58-9Qm\" secondAttribute=\"trailing\" constant=\"15\" id=\"kKy-X5-HlJ\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Medium Rect\" id=\"7Jn-YB-wio\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Refresh\" id=\"0NY-5f-6RK\">\n                            <connections>\n                                <action selector=\"refreshAd:\" destination=\"yyP-cK-zjg\" id=\"2Lw-Mc-E61\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"adContainer\" destination=\"rlh-TU-gIG\" id=\"NVN-BO-brf\"/>\n                        <outlet property=\"adStatusLabel\" destination=\"j6L-58-9Qm\" id=\"fPR-rl-7qe\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Kyl-hB-fxr\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-3266\" y=\"267\"/>\n        </scene>\n        <!--Interstitial-->\n        <scene sceneID=\"ZMp-Z5-1OD\">\n            <objects>\n                <viewController id=\"YRZ-03-2Bt\" customClass=\"InterstitialViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"KjC-Jg-oEz\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"eu2-tR-csy\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Gx9-vo-MuT\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"top\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1. Tap 'Load Ad' 2. Once ad loads, tap 'Show!' to see the ad\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"5CG-xS-mKU\">\n                                <rect key=\"frame\" x=\"31\" y=\"79\" width=\"313\" height=\"29\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"200\" id=\"e1s-2m-TTG\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89009666440000001\" green=\"0.89009666440000001\" blue=\"0.89009666440000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"5CG-xS-mKU\" secondAttribute=\"trailing\" constant=\"15\" id=\"Yxw-CZ-jyL\"/>\n                            <constraint firstItem=\"5CG-xS-mKU\" firstAttribute=\"top\" secondItem=\"KjC-Jg-oEz\" secondAttribute=\"bottom\" constant=\"15\" id=\"b7X-ej-SAC\"/>\n                            <constraint firstItem=\"5CG-xS-mKU\" firstAttribute=\"leading\" secondItem=\"Gx9-vo-MuT\" secondAttribute=\"leadingMargin\" constant=\"15\" id=\"dne-d6-mCc\"/>\n                            <constraint firstItem=\"5CG-xS-mKU\" firstAttribute=\"centerX\" secondItem=\"Gx9-vo-MuT\" secondAttribute=\"centerX\" id=\"p89-oU-nB5\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Interstitial\" id=\"cec-lt-0sa\">\n                        <rightBarButtonItems>\n                            <barButtonItem title=\"Show!\" id=\"Kvy-Ts-EDf\">\n                                <connections>\n                                    <action selector=\"showAd\" destination=\"YRZ-03-2Bt\" id=\"IeX-N9-2q0\"/>\n                                </connections>\n                            </barButtonItem>\n                            <barButtonItem title=\"Load Ad\" id=\"Z3K-wa-l1W\">\n                                <connections>\n                                    <action selector=\"loadAd\" destination=\"YRZ-03-2Bt\" id=\"t3X-VS-1Mk\"/>\n                                </connections>\n                            </barButtonItem>\n                        </rightBarButtonItems>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"adStatusLabel\" destination=\"5CG-xS-mKU\" id=\"jql-fn-XqG\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"MPT-CL-9pT\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-3266\" y=\"-1174\"/>\n        </scene>\n        <!--Instream-->\n        <scene sceneID=\"43u-17-GiY\">\n            <objects>\n                <viewController id=\"aXS-Ey-VrL\" customClass=\"InstreamViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"1qz-PC-qYs\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"OGF-jw-wl7\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Uiu-jg-2Fr\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view clipsSubviews=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"DLC-YX-Wzx\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"375\" height=\"211\"/>\n                                <subviews>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"SE4-hT-8Cr\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"211\"/>\n                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" secondItem=\"SE4-hT-8Cr\" secondAttribute=\"height\" multiplier=\"16:9\" id=\"OF0-Ul-ODo\"/>\n                                        </constraints>\n                                    </view>\n                                </subviews>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" secondItem=\"SE4-hT-8Cr\" secondAttribute=\"height\" id=\"Eb2-mS-aVh\"/>\n                                    <constraint firstAttribute=\"height\" secondItem=\"SE4-hT-8Cr\" secondAttribute=\"height\" priority=\"750\" id=\"S0p-vh-YlM\"/>\n                                    <constraint firstItem=\"SE4-hT-8Cr\" firstAttribute=\"top\" secondItem=\"DLC-YX-Wzx\" secondAttribute=\"top\" id=\"Sc5-QB-S38\"/>\n                                    <constraint firstItem=\"SE4-hT-8Cr\" firstAttribute=\"centerX\" secondItem=\"DLC-YX-Wzx\" secondAttribute=\"centerX\" id=\"VZd-8a-Qyb\"/>\n                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" secondItem=\"SE4-hT-8Cr\" secondAttribute=\"width\" id=\"htq-eo-dgt\"/>\n                                    <constraint firstItem=\"SE4-hT-8Cr\" firstAttribute=\"width\" secondItem=\"DLC-YX-Wzx\" secondAttribute=\"width\" priority=\"750\" id=\"vSZ-Nt-bnG\"/>\n                                </constraints>\n                            </view>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"top\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1. Tap 'Load Ad' 2. Once ad loads, tap 'Show!' to see the ad\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"35Z-IE-DFl\">\n                                <rect key=\"frame\" x=\"15\" y=\"290\" width=\"345\" height=\"29\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"29\" id=\"jCg-hs-sxT\"/>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"45\" id=\"pgp-Rz-DPp\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"DLC-YX-Wzx\" firstAttribute=\"leading\" secondItem=\"Uiu-jg-2Fr\" secondAttribute=\"leading\" id=\"5n5-oU-vRi\"/>\n                            <constraint firstItem=\"35Z-IE-DFl\" firstAttribute=\"top\" secondItem=\"DLC-YX-Wzx\" secondAttribute=\"bottom\" constant=\"15\" id=\"7cY-g0-nzf\"/>\n                            <constraint firstItem=\"OGF-jw-wl7\" firstAttribute=\"top\" relation=\"greaterThanOrEqual\" secondItem=\"35Z-IE-DFl\" secondAttribute=\"bottom\" constant=\"15\" id=\"8Go-15-mTV\"/>\n                            <constraint firstItem=\"DLC-YX-Wzx\" firstAttribute=\"top\" secondItem=\"1qz-PC-qYs\" secondAttribute=\"bottom\" id=\"Gsc-6K-8M4\"/>\n                            <constraint firstItem=\"DLC-YX-Wzx\" firstAttribute=\"trailing\" secondItem=\"Uiu-jg-2Fr\" secondAttribute=\"trailing\" id=\"IJZ-s5-O1Z\"/>\n                            <constraint firstItem=\"35Z-IE-DFl\" firstAttribute=\"leading\" secondItem=\"Uiu-jg-2Fr\" secondAttribute=\"leading\" constant=\"15\" id=\"S2q-F2-Gsr\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"35Z-IE-DFl\" secondAttribute=\"trailing\" constant=\"15\" id=\"fGw-O0-1ly\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Instream\" id=\"djp-4s-emG\">\n                        <rightBarButtonItems>\n                            <barButtonItem title=\"Show!\" id=\"ZXD-Nf-C4Y\">\n                                <connections>\n                                    <action selector=\"showAd\" destination=\"aXS-Ey-VrL\" id=\"OCC-wR-s4v\"/>\n                                </connections>\n                            </barButtonItem>\n                            <barButtonItem title=\"Load Ad\" id=\"iEB-Ag-blS\">\n                                <connections>\n                                    <action selector=\"loadAd\" destination=\"aXS-Ey-VrL\" id=\"6ll-cZ-XhP\"/>\n                                </connections>\n                            </barButtonItem>\n                        </rightBarButtonItems>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"adStatusLabel\" destination=\"35Z-IE-DFl\" id=\"GCd-tA-djH\"/>\n                        <outlet property=\"mediaView\" destination=\"SE4-hT-8Cr\" id=\"EdZ-1f-KMb\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Ti1-S5-JYw\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-2466\" y=\"-1174\"/>\n        </scene>\n        <!--Native Banner Ad-->\n        <scene sceneID=\"RQw-7M-ib4\">\n            <objects>\n                <viewController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"SlD-I8-jEL\" customClass=\"NativeBannerViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"xN0-ZJ-OJn\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"uyl-Mj-etP\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"VO0-Ml-rXG\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"603\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"n5W-7u-4pP\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"548\" width=\"375\" height=\"55\"/>\n                                <subviews>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aY9-jD-Hgh\" customClass=\"FBAdIconView\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"56\" height=\"55\"/>\n                                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" secondItem=\"aY9-jD-Hgh\" secondAttribute=\"height\" multiplier=\"1:1\" constant=\"1\" id=\"Nag-gD-RYA\"/>\n                                        </constraints>\n                                    </view>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"VD4-5r-Fsp\">\n                                        <rect key=\"frame\" x=\"64\" y=\"27\" width=\"203\" height=\"1\"/>\n                                        <subviews>\n                                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" preferredMaxLayoutWidth=\"256\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"55y-bc-SDH\">\n                                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"14\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Rd0-Tf-lsY\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"1\" width=\"203\" height=\"0.0\"/>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                <color key=\"textColor\" red=\"0.33333333329999998\" green=\"0.33333333329999998\" blue=\"0.33333333329999998\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Bm1-Ip-JdH\" customClass=\"FBAdOptionsView\">\n                                                <rect key=\"frame\" x=\"5\" y=\"-2\" width=\"40\" height=\"20\"/>\n                                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" constant=\"40\" id=\"6EI-Wz-MSv\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"20\" id=\"zkc-J3-TbN\"/>\n                                                </constraints>\n                                            </view>\n                                        </subviews>\n                                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                        <constraints>\n                                            <constraint firstItem=\"Rd0-Tf-lsY\" firstAttribute=\"top\" secondItem=\"55y-bc-SDH\" secondAttribute=\"bottom\" constant=\"1\" id=\"0VY-JD-fO9\"/>\n                                            <constraint firstItem=\"Bm1-Ip-JdH\" firstAttribute=\"top\" secondItem=\"55y-bc-SDH\" secondAttribute=\"top\" constant=\"-2\" id=\"4f8-Lo-Xmd\"/>\n                                            <constraint firstAttribute=\"bottom\" secondItem=\"Rd0-Tf-lsY\" secondAttribute=\"bottom\" id=\"BVq-Lv-0bc\"/>\n                                            <constraint firstItem=\"55y-bc-SDH\" firstAttribute=\"top\" secondItem=\"VD4-5r-Fsp\" secondAttribute=\"top\" id=\"Npe-8r-2Tg\"/>\n                                            <constraint firstItem=\"Bm1-Ip-JdH\" firstAttribute=\"leading\" secondItem=\"55y-bc-SDH\" secondAttribute=\"trailing\" constant=\"5\" id=\"P4Z-WY-hVg\"/>\n                                            <constraint firstItem=\"Rd0-Tf-lsY\" firstAttribute=\"leading\" secondItem=\"VD4-5r-Fsp\" secondAttribute=\"leading\" id=\"QWy-gT-hKX\"/>\n                                            <constraint firstItem=\"55y-bc-SDH\" firstAttribute=\"leading\" secondItem=\"VD4-5r-Fsp\" secondAttribute=\"leading\" id=\"ZU0-1n-V9z\"/>\n                                            <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"Bm1-Ip-JdH\" secondAttribute=\"trailing\" constant=\"5\" id=\"bfW-lZ-xdj\"/>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"Rd0-Tf-lsY\" secondAttribute=\"trailing\" id=\"jW0-aa-j9l\"/>\n                                        </constraints>\n                                    </view>\n                                    <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"d2X-Iy-sBy\">\n                                        <rect key=\"frame\" x=\"275\" y=\"0.0\" width=\"100\" height=\"55\"/>\n                                        <color key=\"backgroundColor\" red=\"0.35686274509999999\" green=\"0.57647058819999997\" blue=\"0.98823529409999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" constant=\"100\" id=\"eYQ-TI-VmL\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"14\"/>\n                                        <state key=\"normal\">\n                                            <color key=\"titleColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        </state>\n                                    </button>\n                                </subviews>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstItem=\"aY9-jD-Hgh\" firstAttribute=\"top\" secondItem=\"n5W-7u-4pP\" secondAttribute=\"top\" id=\"ABy-Ef-7SZ\"/>\n                                    <constraint firstItem=\"aY9-jD-Hgh\" firstAttribute=\"leading\" secondItem=\"n5W-7u-4pP\" secondAttribute=\"leading\" id=\"Fyv-nM-9le\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"d2X-Iy-sBy\" secondAttribute=\"bottom\" id=\"Gii-vM-EdN\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"aY9-jD-Hgh\" secondAttribute=\"bottom\" id=\"LaL-f8-TlD\"/>\n                                    <constraint firstItem=\"VD4-5r-Fsp\" firstAttribute=\"leading\" secondItem=\"aY9-jD-Hgh\" secondAttribute=\"trailing\" constant=\"8\" id=\"Val-oH-jYG\"/>\n                                    <constraint firstItem=\"d2X-Iy-sBy\" firstAttribute=\"top\" secondItem=\"n5W-7u-4pP\" secondAttribute=\"top\" id=\"bXw-kV-LRl\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"55\" id=\"dWt-4o-GA1\"/>\n                                    <constraint firstItem=\"d2X-Iy-sBy\" firstAttribute=\"leading\" secondItem=\"VD4-5r-Fsp\" secondAttribute=\"trailing\" constant=\"8\" id=\"h2i-ko-37Z\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"d2X-Iy-sBy\" secondAttribute=\"trailing\" id=\"nDV-Vt-sQX\"/>\n                                    <constraint firstItem=\"VD4-5r-Fsp\" firstAttribute=\"centerY\" secondItem=\"n5W-7u-4pP\" secondAttribute=\"centerY\" id=\"tov-dl-wZL\"/>\n                                </constraints>\n                            </view>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Tap 'Load Ad'\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"r87-5i-1HA\">\n                                <rect key=\"frame\" x=\"48\" y=\"12\" width=\"279\" height=\"40\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"999\" constant=\"40\" id=\"dwU-zU-6DC\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89211697050000005\" green=\"0.89608012770000001\" blue=\"0.90796959919999998\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"r87-5i-1HA\" firstAttribute=\"top\" secondItem=\"xN0-ZJ-OJn\" secondAttribute=\"bottom\" constant=\"12\" id=\"47C-vC-zmV\"/>\n                            <constraint firstItem=\"uyl-Mj-etP\" firstAttribute=\"top\" secondItem=\"n5W-7u-4pP\" secondAttribute=\"bottom\" id=\"4j8-61-4om\"/>\n                            <constraint firstItem=\"r87-5i-1HA\" firstAttribute=\"leading\" secondItem=\"VO0-Ml-rXG\" secondAttribute=\"leading\" constant=\"48\" id=\"84O-Kq-heI\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"n5W-7u-4pP\" secondAttribute=\"trailing\" id=\"V8Q-DG-agP\"/>\n                            <constraint firstItem=\"n5W-7u-4pP\" firstAttribute=\"leading\" secondItem=\"VO0-Ml-rXG\" secondAttribute=\"leading\" id=\"Yp0-LR-85K\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"r87-5i-1HA\" secondAttribute=\"trailing\" constant=\"48\" id=\"zbb-0a-T3K\"/>\n                        </constraints>\n                    </view>\n                    <extendedEdge key=\"edgesForExtendedLayout\" bottom=\"YES\"/>\n                    <navigationItem key=\"navigationItem\" title=\"Native Banner Ad\" id=\"dva-ur-8b9\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Load Ad\" id=\"GpL-hS-9vh\">\n                            <connections>\n                                <action selector=\"loadAd:\" destination=\"SlD-I8-jEL\" id=\"GTp-f9-iyU\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <simulatedNavigationBarMetrics key=\"simulatedTopBarMetrics\" prompted=\"NO\"/>\n                    <connections>\n                        <outlet property=\"adCallToActionButton\" destination=\"d2X-Iy-sBy\" id=\"PQy-gH-x4n\"/>\n                        <outlet property=\"adIconView\" destination=\"aY9-jD-Hgh\" id=\"GhO-mZ-P7d\"/>\n                        <outlet property=\"adOptionsView\" destination=\"Bm1-Ip-JdH\" id=\"ASE-ov-ftI\"/>\n                        <outlet property=\"adSponsoredLabel\" destination=\"Rd0-Tf-lsY\" id=\"BOh-KZ-g9j\"/>\n                        <outlet property=\"adStatusLabel\" destination=\"r87-5i-1HA\" id=\"2Ci-oD-Tbr\"/>\n                        <outlet property=\"adTitleLabel\" destination=\"55y-bc-SDH\" id=\"5fd-dx-mOg\"/>\n                        <outlet property=\"adUIView\" destination=\"n5W-7u-4pP\" id=\"jdl-h0-sDE\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"hpT-uE-Dnz\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-4106.3999999999996\" y=\"979.16041979010504\"/>\n        </scene>\n        <!--Log Debug Event-->\n        <scene sceneID=\"2kL-Mn-B1j\">\n            <objects>\n                <tableViewController title=\"Log Debug Event\" id=\"xn4-J1-axs\" customClass=\"DebugLogsViewController\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"-1\" estimatedRowHeight=\"-1\" sectionHeaderHeight=\"18\" sectionFooterHeight=\"18\" id=\"JJU-Vn-dg8\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" cocoaTouchSystemColor=\"groupTableViewBackgroundColor\"/>\n                        <prototypes>\n                            <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" selectionStyle=\"default\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"kDebugLogsCellIdentifier\" id=\"td5-gq-jAj\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\" tableViewCell=\"td5-gq-jAj\" id=\"Bbv-mg-Tiz\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                </tableViewCellContentView>\n                            </tableViewCell>\n                        </prototypes>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"xn4-J1-axs\" id=\"hRc-lB-B8S\"/>\n                            <outlet property=\"delegate\" destination=\"xn4-J1-axs\" id=\"oGR-zk-STk\"/>\n                        </connections>\n                    </tableView>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"jWF-C6-Fah\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-974\" y=\"-1174\"/>\n        </scene>\n        <!--Native Banner Template-->\n        <scene sceneID=\"K6E-eU-19W\">\n            <objects>\n                <viewController id=\"IDg-uy-lI1\" customClass=\"NativeBannerAdTemplateViewController\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"a4h-pw-fH5\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"G4J-uZ-Feo\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"W7U-xN-j7f\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"top\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Tap 'Load Ad' above\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"0\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"hLU-3j-i1e\">\n                                <rect key=\"frame\" x=\"15\" y=\"72\" width=\"345\" height=\"14.5\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" relation=\"lessThanOrEqual\" constant=\"45\" id=\"jpm-TR-zID\" userLabel=\"height = 45\"/>\n                                    <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"14.5\" id=\"yo1-F6-K8g\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <view clipsSubviews=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Gc8-AY-VJN\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"567\" width=\"375\" height=\"100\"/>\n                                <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"100\" id=\"xoV-cf-c4P\"/>\n                                </constraints>\n                            </view>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"tNE-DE-77E\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"102.5\" width=\"375\" height=\"44\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Template type\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"9qL-i5-d8a\">\n                                        <rect key=\"frame\" x=\"15\" y=\"11.5\" width=\"109\" height=\"21\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"21\" id=\"cFL-8d-cKT\"/>\n                                            <constraint firstAttribute=\"height\" relation=\"greaterThanOrEqual\" constant=\"21\" id=\"ek1-QQ-z3Q\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                        <nil key=\"textColor\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <segmentedControl opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"top\" segmentControlStyle=\"plain\" selectedSegmentIndex=\"0\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"xHP-ao-nAS\">\n                                        <rect key=\"frame\" x=\"239\" y=\"8\" width=\"121\" height=\"29\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"28\" id=\"klV-OW-5di\"/>\n                                            <constraint firstAttribute=\"width\" constant=\"121\" id=\"tlN-Eu-Nd6\"/>\n                                        </constraints>\n                                        <segments>\n                                            <segment title=\"50pt\"/>\n                                            <segment title=\"100pt\"/>\n                                            <segment title=\"120pt\"/>\n                                        </segments>\n                                    </segmentedControl>\n                                </subviews>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                <constraints>\n                                    <constraint firstItem=\"9qL-i5-d8a\" firstAttribute=\"centerY\" secondItem=\"tNE-DE-77E\" secondAttribute=\"centerY\" id=\"K8f-G7-iaA\"/>\n                                    <constraint firstItem=\"xHP-ao-nAS\" firstAttribute=\"centerY\" secondItem=\"tNE-DE-77E\" secondAttribute=\"centerY\" id=\"P5A-Mv-Ylo\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"44\" id=\"VEO-s2-coU\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"xHP-ao-nAS\" secondAttribute=\"trailing\" constant=\"15\" id=\"uGZ-SM-Mjx\"/>\n                                    <constraint firstItem=\"9qL-i5-d8a\" firstAttribute=\"leading\" secondItem=\"tNE-DE-77E\" secondAttribute=\"leading\" constant=\"15\" id=\"xwv-kG-D6Z\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"0.89009666440000001\" green=\"0.89009666440000001\" blue=\"0.89009666440000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"Gc8-AY-VJN\" secondAttribute=\"trailing\" id=\"4Fm-CY-yRc\"/>\n                            <constraint firstItem=\"hLU-3j-i1e\" firstAttribute=\"leading\" secondItem=\"W7U-xN-j7f\" secondAttribute=\"leading\" constant=\"15\" id=\"DeM-qQ-HGd\"/>\n                            <constraint firstItem=\"Gc8-AY-VJN\" firstAttribute=\"leading\" secondItem=\"W7U-xN-j7f\" secondAttribute=\"leading\" id=\"MOm-6k-Ndr\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"hLU-3j-i1e\" secondAttribute=\"trailing\" constant=\"15\" id=\"WpM-Ua-9OL\"/>\n                            <constraint firstItem=\"tNE-DE-77E\" firstAttribute=\"leading\" secondItem=\"W7U-xN-j7f\" secondAttribute=\"leading\" id=\"ace-cC-HZS\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"tNE-DE-77E\" secondAttribute=\"trailing\" id=\"dkV-1J-XlP\"/>\n                            <constraint firstItem=\"tNE-DE-77E\" firstAttribute=\"top\" secondItem=\"hLU-3j-i1e\" secondAttribute=\"bottom\" constant=\"16\" id=\"mLK-OQ-6n2\"/>\n                            <constraint firstItem=\"G4J-uZ-Feo\" firstAttribute=\"top\" secondItem=\"Gc8-AY-VJN\" secondAttribute=\"bottom\" id=\"tpf-yb-ddZ\"/>\n                            <constraint firstItem=\"hLU-3j-i1e\" firstAttribute=\"top\" secondItem=\"a4h-pw-fH5\" secondAttribute=\"bottom\" constant=\"8\" id=\"xub-3g-Bru\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Native Banner Template\" id=\"Be3-jV-AwI\">\n                        <barButtonItem key=\"rightBarButtonItem\" title=\"Load Ad\" id=\"Nqr-en-3za\">\n                            <connections>\n                                <action selector=\"loadNativeAd\" destination=\"IDg-uy-lI1\" id=\"exz-v6-dCi\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"adContainerHeightConstraint\" destination=\"xoV-cf-c4P\" id=\"W1a-Ud-hhh\"/>\n                        <outlet property=\"adContainerView\" destination=\"Gc8-AY-VJN\" id=\"x91-I9-Enj\"/>\n                        <outlet property=\"adStatusLabel\" destination=\"hLU-3j-i1e\" id=\"WYg-Uo-vJa\"/>\n                        <outlet property=\"templateTypeControl\" destination=\"xHP-ao-nAS\" id=\"EpY-Ku-O7e\"/>\n                        <outlet property=\"view\" destination=\"W7U-xN-j7f\" id=\"1J8-Is-rCv\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"4vy-kn-05s\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-4772\" y=\"-459\"/>\n        </scene>\n    </scenes>\n    <inferredMetricsTieBreakers>\n        <segue reference=\"cOa-ao-kuO\"/>\n    </inferredMetricsTieBreakers>\n</document>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/AppDelegate.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (nonatomic, strong) UIWindow *window;\n@property (nonatomic, strong) UIViewController *viewController;\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/AppDelegate.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"AppDelegate.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetworkAds.h>\n\n@implementation AppDelegate\n\nvoid installUncaughtExceptionHandler(void);\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary<NSString *, id> *)launchOptions\n{\n    // Debug exception handler\n    installUncaughtExceptionHandler();\n\n    [FBAudienceNetworkAds initializeWithSettings:nil completionHandler:nil];\n\n    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];\n    self.viewController = [[UIStoryboard storyboardWithName:@\"AdUnitsSampleStoryboard\" bundle:nil] instantiateInitialViewController];\n    self.window.rootViewController = self.viewController;\n    [self.window makeKeyAndVisible];\n    return YES;\n}\n\n- (void)applicationWillResignActive:(UIApplication *)application\n{\n    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.\n    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.\n}\n\n- (void)applicationDidEnterBackground:(UIApplication *)application\n{\n    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.\n    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n}\n\n- (void)applicationWillEnterForeground:(UIApplication *)application\n{\n    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.\n}\n\n- (void)applicationDidBecomeActive:(UIApplication *)application\n{\n    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.\n}\n\n- (void)applicationWillTerminate:(UIApplication *)application\n{\n    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n}\n\n#pragma mark Exception Handling (for debugging purposes)\n\nNSString * const FBAdSignalExceptionName = @\"handlerExceptionName\";\nNSString * const FBAdStackTraceKey = @\"handlerStackTraceKey\";\nNSString * const FBAdSignalKey = @\"handlerSignalKey\";\n\nvoid FBAdExceptionHandler(NSException *exception);\nvoid FBAdSignalHandler(int signal);\nstatic BOOL _displayExceptionMessage = YES;\n\nvoid installUncaughtExceptionHandler()\n{\n    NSSetUncaughtExceptionHandler(&FBAdExceptionHandler);\n    signal(SIGABRT, FBAdSignalHandler);\n    signal(SIGILL, FBAdSignalHandler);\n    signal(SIGSEGV, FBAdSignalHandler);\n    signal(SIGFPE, FBAdSignalHandler);\n    signal(SIGBUS, FBAdSignalHandler);\n    signal(SIGPIPE, FBAdSignalHandler);\n}\n\nvoid FBAdExceptionHandler(NSException *exception)\n{\n    if (!exception) {\n        NSLog(@\"Exception handler called with nil exception.\");\n        __builtin_trap();\n    }\n    NSArray<NSString *> *callStack = [exception callStackSymbols];\n    NSLog(@\"Stack trace: %@\", callStack);\n    AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];\n    NSMutableDictionary<NSString *, id> *userInfo = [@{FBAdStackTraceKey: callStack} mutableCopy];\n    [userInfo addEntriesFromDictionary:exception.userInfo];\n    NSException *newException = [NSException exceptionWithName:exception.name reason:exception.reason userInfo:userInfo];\n    [delegate performSelectorOnMainThread:@selector(handleException:) withObject:newException waitUntilDone:YES];\n}\n\nvoid FBAdSignalHandler(int signal)\n{\n    NSMutableDictionary<NSString*, id> *userInfo = [@{FBAdSignalKey: @(signal)} mutableCopy];\n    NSMutableArray<NSString *> *callStack = [[NSThread callStackSymbols] mutableCopy];\n    if (callStack) {\n        NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 2)];\n        if ([callStack objectsAtIndexes:indexSet]) {\n            [callStack removeObjectsAtIndexes:indexSet];\n        }\n        userInfo[FBAdStackTraceKey] = callStack;\n        NSLog(@\"Stack trace: %@\", callStack);\n    }\n    NSString *reason = [NSString stringWithFormat:@\"Signal %d was raised.\", signal];\n    NSException *exception = [NSException exceptionWithName:FBAdSignalExceptionName reason:reason userInfo:userInfo];\n    AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];\n    [delegate performSelectorOnMainThread:@selector(handleException:) withObject:exception waitUntilDone:YES];\n}\n\n- (void)handleException:(NSException *)exception\n{\n    BOOL displayExceptionMessage = _displayExceptionMessage;\n    _displayExceptionMessage = NO;\n    if (displayExceptionMessage) {\n        NSString *message = [NSString stringWithFormat:@\"The app has crashed due to an unhandled exception.\\n\\n\"\n                             @\"Stack trace:\\n%@\\n%@\", [exception reason], [[exception userInfo] objectForKey:FBAdStackTraceKey]];\n\n        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@\"Unhandled Exception\"\n                                                                                 message:message\n                                                                          preferredStyle:UIAlertControllerStyleAlert];\n        UIAlertAction *cancel = [UIAlertAction actionWithTitle:@\"OK\" style:UIAlertActionStyleCancel handler:nil];\n        [alertController addAction:cancel];\n        [self.viewController presentViewController:alertController animated:YES completion:nil];\n    }\n\n    CFRunLoopRef runLoop = CFRunLoopGetCurrent();\n    CFArrayRef allModesCF = CFRunLoopCopyAllModes(runLoop);\n    NSArray<NSString *> *allModes = CFBridgingRelease(allModesCF);\n\n    while (true) {\n        for (NSString *mode in allModes) {\n            CFRunLoopRunInMode((CFStringRef)mode, 0.01, false);\n        }\n    }\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/BannerViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface BannerViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/BannerViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"BannerViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface BannerViewController () <FBAdViewDelegate>\n\n@property (nonatomic, strong) IBOutlet UILabel *adStatusLabel;\n@property (nonatomic, strong) FBAdView *adView;\n\n@end\n\n@implementation BannerViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    [self loadAd];\n}\n\n- (void)viewDidLayoutSubviews\n{\n    [super viewDidLayoutSubviews];\n\n    FBAdSize adSize = [self fbAdSize];\n    CGSize viewSize = self.view.bounds.size;\n    CGSize tabBarSize = self.tabBarController.tabBar.frame.size;\n    viewSize = CGSizeMake(viewSize.width, viewSize.height - tabBarSize.height);\n    UIEdgeInsets insets = [self safeAreaInsets];\n    CGFloat bottomAlignedY = viewSize.height - adSize.size.height - insets.bottom;\n    self.adView.frame = CGRectMake(insets.left,\n                                   bottomAlignedY,\n                                   viewSize.width - insets.right - insets.left,\n                                   adSize.size.height);\n}\n\n- (UIEdgeInsets)safeAreaInsets\n{\n    // Comment the following if-statement if you are not running XCode 9+\n    if (@available(iOS 11.0, *)) {\n        UIWindow *window = [[UIApplication sharedApplication].delegate window];\n        return [window safeAreaInsets];\n    }\n    return UIEdgeInsetsZero;\n}\n\n- (IBAction)refreshAd:(id)sender\n{\n    self.adView.hidden = YES;\n    [self loadAd];\n}\n\n- (void)loadAd\n{\n    if (nil != self.adView) {\n        [self.adView removeFromSuperview];\n    }\n\n    // Create a banner's ad view with a unique placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    FBAdSize adSize = [self fbAdSize];\n    self.adView = [[FBAdView alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"\n                                                 adSize:adSize\n                                     rootViewController:self];\n\n    // Set a delegate to get notified on changes or when the user interact with the ad.\n    self.adView.delegate = self;\n\n    // When testing on a device, add its hashed ID to force test ads.\n    // The hash ID is printed to console when running on a device.\n    // [FBAdSettings addTestDevice:@\"THE HASHED ID AS PRINTED TO CONSOLE\"];\n\n    // Set autoresizingMask so the rotation is automatically handled\n    self.adView.autoresizingMask =\n    UIViewAutoresizingFlexibleRightMargin |\n    UIViewAutoresizingFlexibleLeftMargin|\n    UIViewAutoresizingFlexibleWidth |\n    UIViewAutoresizingFlexibleTopMargin;\n\n    // Add adView to the view hierarchy.\n    [self.view addSubview:self.adView];\n\n    self.adStatusLabel.text = @\"Loading ad...\";\n    [self.adView loadAd];\n}\n\n- (FBAdSize)fbAdSize\n{\n    BOOL isIPAD = ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad);\n    return isIPAD ? kFBAdSizeHeight90Banner : kFBAdSizeHeight50Banner;\n}\n\n#pragma mark - FBAdViewDelegate implementation\n\n// Implement this function if you want to change the viewController after the FBAdView\n// is created. The viewController will be used to present the modal view (such as the\n// in-app browser that can appear when an ad is clicked).\n//- (UIViewController *)viewControllerForPresentingModalView\n//{\n//    return self;\n//}\n\n- (void)adViewDidClick:(FBAdView *)adView\n{\n    NSLog(@\"Ad was clicked.\");\n}\n\n- (void)adViewDidFinishHandlingClick:(FBAdView *)adView\n{\n    NSLog(@\"Ad did finish click handling.\");\n}\n\n- (void)adViewDidLoad:(FBAdView *)adView\n{\n    self.adStatusLabel.text = @\"Ad loaded.\";\n    NSLog(@\"Ad was loaded.\");\n    // Now that the ad was loaded, show the view in case it was hidden before.\n    self.adView.hidden = NO;\n}\n\n- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error\n{\n    self.adStatusLabel.text = [NSString stringWithFormat:@\"Ad failed to load. %@\", error.localizedDescription];\n    NSLog(@\"Ad failed to load with error: %@\", error);\n\n    // Hide the unit since no ad is shown.\n    self.adView.hidden = YES;\n}\n\n- (void)adViewWillLogImpression:(FBAdView *)adView\n{\n    NSLog(@\"Ad impression is being captured.\");\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/CollectionViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface CollectionViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/CollectionViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"CollectionViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\nstatic NSInteger const kRowStrideForAdCell = 3;\nstatic NSString *const kDefaultCellIdentifier = @\"kDefaultCellIdentifier\";\n\n@interface CollectionViewCell : UICollectionViewCell\n\n@property (nonatomic, strong, nullable) UILabel *textLabel;\n\n@end\n\n@implementation CollectionViewCell\n\n- (instancetype)initWithFrame:(CGRect)frame\n{\n    self = [super initWithFrame:frame];\n    if (self) {\n        UILabel *label = [UILabel new];\n        label.textColor = [UIColor blackColor];\n        label.numberOfLines = 2;\n        self.textLabel = label;\n        [self.contentView addSubview:label];\n    }\n    return self;\n}\n\n@end\n\n@interface CollectionViewController () <UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, FBNativeAdsManagerDelegate, FBNativeAdDelegate>\n\n@property (strong, nonatomic) IBOutlet UICollectionView *collectionView;\n@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;\n@property (strong, nonatomic) FBNativeAdsManager *adsManager;\n@property (strong, nonatomic) FBNativeAdCollectionViewCellProvider *cellProvider;\n@property (strong, nonatomic) NSMutableArray<NSString *> *collectionViewContentArray;\n@property (assign, nonatomic) BOOL adCellsCreated;\n\n@end\n\n@implementation CollectionViewController\n\n#pragma mark - Lazy Loading\n- (NSMutableArray<NSString *> *)collectionViewContentArray\n{\n    if (!_collectionViewContentArray) {\n        _collectionViewContentArray = [NSMutableArray array];\n        for (NSUInteger i = 0; i < 10; i++) {\n            [_collectionViewContentArray addObject:[NSString stringWithFormat:@\"CollectionView\\n Cell #%lu\", (unsigned long)(i + 1)]];\n        }\n    }\n\n    return _collectionViewContentArray;\n}\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    self.collectionView.delegate = self;\n    self.collectionView.dataSource = self;\n\n    [self.collectionView registerClass:[CollectionViewCell class] forCellWithReuseIdentifier:kDefaultCellIdentifier];\n\n    [self loadNativeAd];\n}\n\n- (IBAction)dismissViewController:(id)sender\n{\n    [self dismissViewControllerAnimated:YES completion:nil];\n}\n\n- (IBAction)refresh:(id)sender\n{\n    [self loadNativeAd];\n}\n\n- (void)loadNativeAd\n{\n    [self.activityIndicator startAnimating];\n\n    if (!self.adsManager) {\n        // Create a native ad manager with a unique placement ID (generate your own on the Facebook app settings)\n        // and how many ads you would like to create. Note that you may get fewer ads than you ask for.\n        // Use different ID for each ad placement in your app.\n        self.adsManager = [[FBNativeAdsManager alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"\n                                                        forNumAdsRequested:5];\n        // Set a delegate to get notified when the ads are loaded.\n        self.adsManager.delegate = self;\n\n        // Configure native ad manager to wait to call nativeAdsLoaded until all ad assets are loaded\n        self.adsManager.mediaCachePolicy = FBNativeAdsCachePolicyAll;\n\n        // When testing on a device, add its hashed ID to force test ads.\n        // The hash ID is printed to console when running on a device.\n        // [FBAdSettings addTestDevice:@\"THE HASHED ID AS PRINTED TO CONSOLE\"];\n    }\n\n    // Load some ads\n    [self.adsManager loadAds];\n}\n\n#pragma mark FBNativeAdsManagerDelegate implementation\n\n- (void)nativeAdsLoaded\n{\n    NSLog(@\"Native ad was loaded, constructing native UI...\");\n\n    // After the native ads have loaded we create the native ad cell provider and let it take over\n    FBNativeAdsManager *manager = self.adsManager;\n    self.adsManager.delegate = nil;\n    self.adsManager = nil;\n\n    // The native ad cell provider operates over a loaded ads manager and can create table cells with native\n    // ad templates in them as well as help with the math to have a consistent distribution of ads within a table.\n    FBNativeAdCollectionViewCellProvider *cellProvider = [[FBNativeAdCollectionViewCellProvider alloc] initWithManager:manager forType:FBNativeAdViewTypeGenericHeight300];\n    self.cellProvider = cellProvider;\n    self.cellProvider.delegate = self;\n\n    [self.collectionView reloadData];\n    [self.activityIndicator stopAnimating];\n}\n\n- (void)nativeAdsFailedToLoadWithError:(NSError *)error\n{\n    NSLog(@\"Native ad failed to load with error: %@\", error);\n    [self.activityIndicator stopAnimating];\n\n    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@\"Native ad failed to load\"\n                                                                             message:@\"Check console for more details\"\n                                                                      preferredStyle:UIAlertControllerStyleAlert];\n    UIAlertAction *cancel = [UIAlertAction actionWithTitle:@\"OK\" style:UIAlertActionStyleCancel handler:nil];\n\n    [alertController addAction:cancel];\n    [self presentViewController:alertController animated:YES completion:nil];\n}\n\n#pragma mark FBNativeAdDelegate\n\n- (void)nativeAdDidClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad was clicked.\");\n}\n\n- (void)nativeAdDidFinishHandlingClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad did finish click handling.\");\n}\n\n- (void)nativeAdWillLogImpression:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad impression is being captured.\");\n}\n\n#pragma mark <UICollectionViewDataSource>\n\n- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView\n{\n    return 1;\n}\n\n- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section\n{\n    // In this example the ads are evenly distributed within the table every kRowStrideForAdCell-th cell.\n    NSUInteger count = [self.collectionViewContentArray count];\n    count = [self.cellProvider adjustCount:count forStride:kRowStrideForAdCell] ?: count;\n    return count;\n}\n\n- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath\n{\n    if ([self.cellProvider isAdCellAtIndexPath:indexPath forStride:kRowStrideForAdCell]) {\n        return [self.cellProvider collectionView:collectionView cellForItemAtIndexPath:indexPath];\n    } else {\n        indexPath = [self.cellProvider adjustNonAdCellIndexPath:indexPath forStride:kRowStrideForAdCell] ?: indexPath;\n        CollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kDefaultCellIdentifier forIndexPath:indexPath];\n        cell.textLabel.text = [self.collectionViewContentArray objectAtIndex:indexPath.row];\n        [cell.textLabel sizeToFit];\n        cell.textLabel.center = cell.contentView.center;\n        return cell;\n    }\n}\n\n- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath\n{\n    if ([self.cellProvider isAdCellAtIndexPath:indexPath forStride:kRowStrideForAdCell]) {\n        return (CGSize){300.0, [self.cellProvider collectionView:collectionView heightForRowAtIndexPath:indexPath]};\n    } else {\n        return (CGSize){300.0, 100.0};\n    }\n}\n\n- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section\n{\n    return 20.0;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/DebugLogsViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface DebugLogsViewController : UITableViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/DebugLogsViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"DebugLogsViewController.h\"\n\nstatic NSString *const kDebugLogsCellIdentifier = @\"kDebugLogsCellIdentifier\";\n\n@interface DebugLogsViewController ()\n\n@property (nonatomic, strong, readonly) NSArray<NSString *> *tableViewCellLabels;\n\n@end\n\n@implementation DebugLogsViewController\n@synthesize tableViewCellLabels = _tableViewCellLabels;\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n}\n\n- (NSArray<NSString *> *)tableViewCellLabels\n{\n    if (nil == _tableViewCellLabels) {\n        _tableViewCellLabels = @[@\"Generic Error\", @\"Database Error\", @\"Exception App Crash\", @\"Signal App Crash\", @\"Exception SDK Crash\"];\n    }\n    return _tableViewCellLabels;\n}\n\n- (void)generateGenericError\n{\n    Class class = NSClassFromString(@\"FBAdDebugLogging\");\n    SEL selector = NSSelectorFromString(@\"logDebugEventWithType:code:description:\");\n    NSMethodSignature *signature = [class methodSignatureForSelector:selector];\n\n    NSUInteger errorCode = 0;\n    NSString *eventType = @\"generic\";\n    NSString *errorDescription = @\"Generic error test message\";\n\n    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\n    [invocation setTarget:class];\n    [invocation setSelector:selector];\n    [invocation setArgument:&eventType atIndex:2];\n    [invocation setArgument:&errorCode atIndex:3];\n    [invocation setArgument:&errorDescription atIndex:4];\n    [invocation retainArguments];\n\n    [invocation invoke];\n}\n\n- (void)generateDatabaseError\n{\n    Class class = NSClassFromString(@\"FBAdDebugLogging\");\n    SEL selector = NSSelectorFromString(@\"logDebugEventWithType:code:description:\");\n    NSMethodSignature *signature = [class methodSignatureForSelector:selector];\n\n    NSUInteger errorCode = 7;\n    NSString *eventType = @\"database\";\n    NSString *errorDescription = @\"Database error cannot open database test message\";\n\n    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\n    [invocation setTarget:class];\n    [invocation setSelector:selector];\n    [invocation setArgument:&eventType atIndex:2];\n    [invocation setArgument:&errorCode atIndex:3];\n    [invocation setArgument:&errorDescription atIndex:4];\n    [invocation retainArguments];\n\n    [invocation invoke];\n}\n\n- (void)generateExceptionCrash\n{\n    [[self class] staticGenerateExceptionCrash];\n}\n\n+ (void)staticGenerateExceptionCrash\n{\n    NSString *string = nil;\n    NSArray *array = @[string];\n    array = nil;\n}\n\n- (void)generateSignalCrash\n{\n    __unsafe_unretained NSNumber *number = @4.4;\n    [number description];\n}\n\n- (void)generateSDKCrash\n{\n    Class class = NSClassFromString(@\"FBAdReportingItem\");\n\n    id reportingItem = [class alloc];\n\n    SEL selector = NSSelectorFromString(@\"initWithIdentifier:title:heading:subItems:\");\n    NSMethodSignature *signature = [reportingItem methodSignatureForSelector:selector];\n\n    NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\n    [invocation setTarget:reportingItem];\n    [invocation setSelector:selector];\n    [invocation setArgument:@\"\" atIndex:2];\n    [invocation setArgument:@\"\" atIndex:3];\n    [invocation setArgument:@\"\" atIndex:4];\n    [invocation retainArguments];\n\n    [invocation invoke];\n\n    selector = NSSelectorFromString(@\"addSubItem:\");\n    signature = [reportingItem methodSignatureForSelector:selector];\n\n    invocation = [NSInvocation invocationWithMethodSignature:signature];\n    [invocation setTarget:reportingItem];\n    [invocation setSelector:selector];\n    [invocation retainArguments];\n\n    [invocation invoke];\n}\n\n#pragma mark - UITableViewDataSource implementation\n\n- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section\n{\n    return [@\"Select one of the options below\" uppercaseString];\n}\n\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section\n{\n    return self.tableViewCellLabels.count;\n}\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kDebugLogsCellIdentifier forIndexPath:indexPath];\n    cell.textLabel.text = self.tableViewCellLabels[indexPath.row];\n\n    return cell;\n}\n\n#pragma mark - UITableViewDelegate implementation\n\n- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    [tableView deselectRowAtIndexPath:indexPath animated:YES];\n\n    switch (indexPath.row) {\n        case 0:\n            [self generateGenericError];\n            break;\n\n        case 1:\n            [self generateDatabaseError];\n            break;\n\n        case 2:\n            [self generateExceptionCrash];\n            break;\n\n        case 3:\n            [self generateSignalCrash];\n            break;\n\n        case 4:\n            [self generateSDKCrash];\n            break;\n    }\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-Small@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-Small-40@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"57x57\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"57x57\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-Small-60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"Icon-Small-60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-Small.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-Small-40.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-Small-40@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"50x50\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-Small-50.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"50x50\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-Small-50@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"72x72\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-72.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"72x72\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-72@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-76.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"76x76\",\n      \"idiom\" : \"ipad\",\n      \"filename\" : \"Icon-76@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ios-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"car\",\n      \"filename\" : \"Icon-60@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"car\",\n      \"filename\" : \"Icon-60@3x.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"24x24\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"notificationCenter\",\n      \"subtype\" : \"38mm\"\n    },\n    {\n      \"size\" : \"27.5x27.5\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"notificationCenter\",\n      \"subtype\" : \"42mm\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"watch\",\n      \"filename\" : \"Icon-Small@2x.png\",\n      \"role\" : \"companionSettings\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"watch\",\n      \"role\" : \"companionSettings\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"appLauncher\",\n      \"subtype\" : \"38mm\"\n    },\n    {\n      \"size\" : \"44x44\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"appLauncher\",\n      \"subtype\" : \"40mm\"\n    },\n    {\n      \"size\" : \"50x50\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"appLauncher\",\n      \"subtype\" : \"44mm\"\n    },\n    {\n      \"size\" : \"86x86\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"quickLook\",\n      \"subtype\" : \"38mm\"\n    },\n    {\n      \"size\" : \"98x98\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"quickLook\",\n      \"subtype\" : \"42mm\"\n    },\n    {\n      \"size\" : \"108x108\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"quickLook\",\n      \"subtype\" : \"44mm\"\n    },\n    {\n      \"idiom\" : \"watch-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"size\" : \"44x44\",\n      \"idiom\" : \"watch\",\n      \"scale\" : \"2x\",\n      \"role\" : \"longLook\",\n      \"subtype\" : \"42mm\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/Images.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>AdUnitsSampleStoryboard</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/InstreamViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface InstreamViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/InstreamViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"InstreamViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface InstreamViewController () <FBInstreamAdViewDelegate>\n\n@property (nonatomic, strong) IBOutlet UILabel *adStatusLabel;\n@property (nonatomic, strong) IBOutlet UIView *mediaView;\n@property (nonatomic, strong) FBInstreamAdView *adView;\n\n@end\n\n@implementation InstreamViewController\n\n- (IBAction)loadAd\n{\n    // Create an instream ad view with a unique placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    [self.adView removeFromSuperview];\n    self.adView = [[FBInstreamAdView alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"];\n\n    // Set a delegate to get notified on changes or when the user interacts with the ad.\n    self.adView.delegate = self;\n\n    // Initiate a request to load an ad.\n    [self.adView loadAd];\n    self.adStatusLabel.text = @\"Loading instream ad...\";\n}\n\n- (IBAction)showAd\n{\n    if (!self.adView || !self.adView.adValid) {\n        // Ad not ready to present.\n        self.adStatusLabel.text = @\"Ad not loaded. Click load to request an ad.\";\n    } else {\n        // Ad is ready, present it!\n        self.adStatusLabel.text = nil;\n        self.adView.frame = self.mediaView.bounds;\n        self.adView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n        [self.mediaView addSubview:self.adView];\n        [self.adView showAdFromRootViewController:self];\n    }\n}\n\n#pragma mark - FBInstreamAdViewDelegate implementation\n\n- (void)adViewDidLoad:(FBInstreamAdView *)adView\n{\n    self.adStatusLabel.text = @\"Ad loaded\";\n}\n\n- (void)adViewDidEnd:(FBInstreamAdView *)adView\n{\n    self.adStatusLabel.text = @\"Ad ended\";\n    [self.adView removeFromSuperview];\n    self.adView = nil;\n}\n\n- (void)adView:(FBInstreamAdView *)adView didFailWithError:(NSError *)error\n{\n    self.adStatusLabel.text = [NSString stringWithFormat:@\"Ad failed: %@\", error.localizedDescription];\n    [self.adView removeFromSuperview];\n    self.adView = nil;\n}\n\n- (void)adViewDidClick:(FBInstreamAdView *)adView\n{\n    self.adStatusLabel.text = @\"Ad clicked\";\n}\n\n- (void)adViewWillLogImpression:(FBInstreamAdView *)adView\n{\n    self.adStatusLabel.text = @\"Ad impression\";\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/InterstitialViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface InterstitialViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/InterstitialViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"InterstitialViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface InterstitialViewController () <FBInterstitialAdDelegate>\n\n@property (nonatomic, strong) IBOutlet UILabel *adStatusLabel;\n@property (nonatomic, strong) FBInterstitialAd *interstitialAd;\n\n@end\n\n@implementation InterstitialViewController\n\n- (IBAction)loadAd\n{\n    self.adStatusLabel.text = @\"Loading interstitial ad...\";\n\n    // Create the interstitial unit with a placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    self.interstitialAd = [[FBInterstitialAd alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"];\n\n    // Set a delegate to get notified on changes or when the user interact with the ad.\n    self.interstitialAd.delegate = self;\n\n    // Initiate the request to load the ad.\n    [self.interstitialAd loadAd];\n}\n\n- (IBAction)showAd\n{\n    if (!self.interstitialAd || !self.interstitialAd.isAdValid)\n    {\n        // Ad not ready to present.\n        self.adStatusLabel.text = @\"Ad not loaded. Click load to request an ad.\";\n    } else {\n        self.adStatusLabel.text = @\"1. Tap 'Load Ad'\\n2. Once ad loads, tap 'Show!' to see the ad\";\n\n        // Ad is ready, present it!\n        [self.interstitialAd showAdFromRootViewController:self];\n    }\n}\n\n#pragma mark - FBInterstitialAdDelegate implementation\n\n- (void)interstitialAdDidLoad:(FBInterstitialAd *)interstitialAd\n{\n    NSLog(@\"Interstitial ad was loaded. Can present now.\");\n    self.adStatusLabel.text = @\"Ad loaded. Click show to present!\";\n}\n\n- (void)interstitialAd:(FBInterstitialAd *)interstitialAd didFailWithError:(NSError *)error\n{\n    NSLog(@\"Interstitial failed to load with error: %@\", error.description);\n    self.adStatusLabel.text = [NSString stringWithFormat:@\"Interstitial ad failed to load. %@\", error.localizedDescription];\n}\n\n- (void)interstitialAdDidClick:(FBInterstitialAd *)interstitialAd\n{\n    NSLog(@\"Interstitial was clicked.\");\n}\n\n- (void)interstitialAdDidClose:(FBInterstitialAd *)interstitialAd\n{\n    NSLog(@\"Interstitial closed.\");\n\n    // Optional, Cleaning up.\n    self.interstitialAd = nil;\n}\n\n- (void)interstitialAdWillClose:(FBInterstitialAd *)interstitialAd\n{\n    NSLog(@\"Interstitial will close.\");\n}\n\n- (void)interstitialAdWillLogImpression:(FBInterstitialAd *)interstitialAd\n{\n    NSLog(@\"Interstitial impression is being captured.\");\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13771\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13772\"/>\n        <capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"bR3-ow-2zY\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"V16-fD-R9v\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"obG-Y5-kRd\">\n                                <rect key=\"frame\" x=\"20\" y=\"647\" width=\"335\" height=\"0.0\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"AdUnitsSample\" textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GJd-Yh-RWb\">\n                                <rect key=\"frame\" x=\"20\" y=\"202\" width=\"335\" height=\"43\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>\n                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"  Copyright (c) 2018 Facebook. All rights reserved.\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"E9H-NX-t4e\">\n                                <rect key=\"frame\" x=\"15\" y=\"638.5\" width=\"345\" height=\"13.5\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"13.5\" id=\"9so-Lf-bGl\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                                <variation key=\"widthClass=compact\">\n                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"11\"/>\n                                </variation>\n                            </label>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"centerX\" secondItem=\"obG-Y5-kRd\" secondAttribute=\"centerX\" id=\"5cz-MP-9tL\"/>\n                            <constraint firstItem=\"E9H-NX-t4e\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" constant=\"15\" id=\"8Cs-li-hk0\"/>\n                            <constraint firstAttribute=\"centerX\" secondItem=\"GJd-Yh-RWb\" secondAttribute=\"centerX\" id=\"Q3B-4B-g5h\"/>\n                            <constraint firstItem=\"obG-Y5-kRd\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"SfN-ll-jLj\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"E9H-NX-t4e\" secondAttribute=\"trailing\" constant=\"15\" id=\"Sft-eU-4U8\"/>\n                            <constraint firstAttribute=\"bottom\" secondItem=\"obG-Y5-kRd\" secondAttribute=\"bottom\" constant=\"20\" id=\"Y44-ml-fuU\"/>\n                            <constraint firstItem=\"V16-fD-R9v\" firstAttribute=\"top\" secondItem=\"E9H-NX-t4e\" secondAttribute=\"bottom\" constant=\"15\" id=\"lc2-IZ-2Mz\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"centerY\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"moa-c2-u7t\"/>\n                            <constraint firstItem=\"GJd-Yh-RWb\" firstAttribute=\"leading\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"leading\" symbolic=\"YES\" id=\"x7j-FC-K8j\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/MediumRectViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface MediumRectViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/MediumRectViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"MediumRectViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface MediumRectViewController () <FBAdViewDelegate>\n\n@property (nonatomic, strong) IBOutlet UIView *adContainer;\n@property (nonatomic, strong) IBOutlet UILabel *adStatusLabel;\n@property (nonatomic, strong) FBAdView *mediumRectAdView;\n\n@end\n\n@implementation MediumRectViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    [self loadAd];\n}\n\n- (IBAction)refreshAd:(id)sender\n{\n    self.mediumRectAdView.hidden = YES;\n    [self loadAd];\n}\n\n- (void)loadAd\n{\n    if (nil != self.mediumRectAdView) {\n        [self.mediumRectAdView removeFromSuperview];\n    }\n\n    // Create the medium rectangle unit with a placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    FBAdSize adSize = kFBAdSizeHeight250Rectangle;\n    self.mediumRectAdView = [[FBAdView alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"\n                                                           adSize:adSize\n                                               rootViewController:self];\n    self.mediumRectAdView.hidden = YES;\n\n    // Set a delegate to get notified on changes or when the user interact with the ad.\n    self.mediumRectAdView.delegate = self;\n\n    // Reposition the adView\n    self.mediumRectAdView.frame = CGRectMake(0, 0, 300, 250);\n\n    [self.adContainer addSubview:self.mediumRectAdView];\n\n    self.adStatusLabel.text = @\"Loading ad...\";\n    [self.mediumRectAdView loadAd];\n}\n\n#pragma mark - FBAdViewDelegate implementation\n\n// Implement this function if you want to change the viewController after the FBAdView\n// is created. The viewController will be used to present the modal view (such as the\n// in-app browser that can appear when an ad is clicked).\n// - (UIViewController *)viewControllerForPresentingModalView\n// {\n//   return self;\n// }\n\n- (void)adViewDidClick:(FBAdView *)adView\n{\n    NSLog(@\"Ad was clicked.\");\n}\n\n- (void)adViewDidFinishHandlingClick:(FBAdView *)adView\n{\n    NSLog(@\"Ad did finish click handling.\");\n}\n\n- (void)adViewDidLoad:(FBAdView *)adView\n{\n    self.adStatusLabel.text = @\"Ad loaded.\";\n    NSLog(@\"Ad was loaded.\");\n    // Now that the ad was loaded, show the view in case it was hidden before.\n    self.mediumRectAdView.hidden = NO;\n}\n\n- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error\n{\n    self.adStatusLabel.text = [NSString stringWithFormat:@\"Ad failed to load. Check console for details. %@\", error.localizedDescription];\n    NSLog(@\"Ad failed to load with error: %@\", error);\n\n    // Hide the unit since no ad is shown.\n    self.mediumRectAdView.hidden = YES;\n}\n\n- (void)adViewWillLogImpression:(FBAdView *)adView\n{\n    NSLog(@\"Ad impression is being captured.\");\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/MenuTableViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface MenuTableViewController : UITableViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/MenuTableViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"MenuTableViewController.h\"\n\n@interface MenuTableViewController ()\n\n@end\n\n@implementation MenuTableViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n\n    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];\n}\n\n- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section\n{\n    return @\"Select one of the options below\".uppercaseString;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeAdTemplateViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface NativeAdTemplateViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeAdTemplateViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"NativeAdTemplateViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface NativeAdTemplateViewController () <FBNativeAdDelegate>\n\n@property (strong, nonatomic) IBOutlet UILabel *adStatusLabel;\n@property (strong, nonatomic) IBOutlet UIView *adContainerView;\n@property (strong, nonatomic) IBOutlet NSLayoutConstraint *adContainerHeightConstraint;\n@property (retain, nonatomic) IBOutlet NSLayoutConstraint *adContainerWidthConstraint;\n@property (retain, nonatomic) IBOutlet UISlider *heightSlider;\n@property (retain, nonatomic) IBOutlet UISlider *widthSlider;\n@property (strong, nonatomic) FBNativeAd *nativeAd;\n@property (strong, nonatomic) FBNativeAdViewAttributes *nativeAdAttributes;\n@property (strong, nonatomic) FBNativeAdView *adView;\n\n@end\n\n@implementation NativeAdTemplateViewController\n\n- (FBNativeAdViewAttributes *)nativeAdAttributes\n{\n    FBNativeAdViewAttributes *attributes = _nativeAdAttributes;\n\n    if (!attributes) {\n        attributes = [[FBNativeAdViewAttributes alloc] init];\n        attributes.backgroundColor = [UIColor whiteColor];\n        attributes.advertiserNameColor = [UIColor colorWithRed:0.11 green:0.12 blue:0.13 alpha:1.0];\n        attributes.buttonColor = [UIColor colorWithRed:0.235 green:0.485 blue:1.000 alpha:1.000];\n        attributes.buttonTitleColor = [UIColor whiteColor];\n        attributes.titleColor = [UIColor darkGrayColor];\n        attributes.descriptionColor = [UIColor grayColor];\n        _nativeAdAttributes = attributes;\n    }\n\n    return attributes;\n}\n\n- (void)viewDidLayoutSubviews\n{\n    [super viewDidLayoutSubviews];\n\n    self.heightSlider.value = self.adContainerHeightConstraint.constant;\n    self.widthSlider.value = self.adContainerWidthConstraint.constant;\n}\n\n#pragma mark - Actions\n\n- (IBAction)handleAdHeightChange:(id)sender\n{\n    CGFloat height = ((UISlider *)sender).value;\n    self.adContainerHeightConstraint.constant = height;\n\n}\n- (IBAction)handleWidthChange:(id)sender\n{\n    CGFloat width = ((UISlider *)sender).value;\n    self.adContainerWidthConstraint.constant = width;\n}\n\n- (IBAction)loadNativeAd\n{\n    self.adStatusLabel.text = @\"Requesting an ad...\";\n\n    // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    FBNativeAd *nativeAd = [[FBNativeAd alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"];\n\n    // Set a delegate to get notified when the ad was loaded.\n    nativeAd.delegate = self;\n\n    // When testing on a device, add its hashed ID to force test ads.\n    // The hash ID is printed to console when running on a device.\n    // [FBAdSettings addTestDevice:@\"THE HASHED ID AS PRINTED TO CONSOLE\"];\n\n    // Initiate a request to load an ad.\n    [nativeAd loadAd];\n\n    [self.adView removeFromSuperview];\n}\n\n#pragma mark - FBNativeAdDelegate\n\n- (void)nativeAdDidLoad:(FBNativeAd *)nativeAd\n{\n    if (self.nativeAd) {\n        [self.nativeAd unregisterView];\n    }\n\n    self.nativeAd = nativeAd;\n\n    self.adStatusLabel.text = @\"Ad loaded.\";\n\n    if (nativeAd && nativeAd.isAdValid) {\n        FBNativeAdView *adView = [FBNativeAdView nativeAdViewWithNativeAd:nativeAd\n                                                           withAttributes:[self nativeAdAttributes]];\n        adView.frame = self.adContainerView.bounds;\n        adView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n        [self.adContainerView addSubview:adView];\n        self.adView = adView;\n    }\n}\n\n- (void)nativeAd:(FBNativeAd *)nativeAd didFailWithError:(NSError *)error\n{\n    self.adStatusLabel.text = @\"Ad failed to load. Check console for details.\";\n    NSLog(@\"Native ad failed to load with error: %@\", error);\n}\n\n- (void)nativeAdDidClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad was clicked.\");\n}\n\n- (void)nativeAdDidFinishHandlingClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad did finish click handling.\");\n}\n\n- (void)nativeAdWillLogImpression:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad impression is being captured.\");\n}\n\n#pragma mark - Orientation\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    return UIInterfaceOrientationMaskPortrait;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeBannerAdTemplateViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface NativeBannerAdTemplateViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeBannerAdTemplateViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"NativeBannerAdTemplateViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface NativeBannerAdTemplateViewController () <FBNativeBannerAdDelegate>\n\n@property (strong, nonatomic) IBOutlet UISegmentedControl *templateTypeControl;\n@property (strong, nonatomic) IBOutlet UILabel *adStatusLabel;\n@property (strong, nonatomic) IBOutlet UIView *adContainerView;\n@property (strong, nonatomic) IBOutlet NSLayoutConstraint *adContainerHeightConstraint;\n@property (strong, nonatomic) FBNativeBannerAd *nativeAd;\n@property (strong, nonatomic) FBNativeAdViewAttributes *nativeAdAttributes;\n@property (strong, nonatomic) FBNativeBannerAdView *adView;\n\n@end\n\n@implementation NativeBannerAdTemplateViewController\n\n- (void)adjustAdContainerHeight\n{\n    switch ([self templateType]) {\n        case FBNativeBannerAdViewTypeGenericHeight50:\n            self.adContainerHeightConstraint.constant = 50.0f;\n            break;\n        case FBNativeBannerAdViewTypeGenericHeight100:\n            self.adContainerHeightConstraint.constant = 100.f;\n            break;\n        case FBNativeBannerAdViewTypeGenericHeight120:\n            self.adContainerHeightConstraint.constant = 120.f;\n            break;\n        default:\n            break;\n    }\n}\n\n- (FBNativeBannerAdViewType)templateType\n{\n    FBNativeBannerAdViewType type = FBNativeBannerAdViewTypeGenericHeight50;\n\n    switch (self.templateTypeControl.selectedSegmentIndex) {\n        case 0:\n            type = FBNativeBannerAdViewTypeGenericHeight50;\n            break;\n        case 1:\n            type = FBNativeBannerAdViewTypeGenericHeight100;\n            break;\n        case 2:\n            type = FBNativeBannerAdViewTypeGenericHeight120;\n            break;\n    };\n\n    return type;\n}\n\n#pragma mark - Actions\n\n- (IBAction)loadNativeAd\n{\n    self.adStatusLabel.text = @\"Requesting an ad...\";\n\n    // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    FBNativeBannerAd *nativeAd = [[FBNativeBannerAd alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"];\n\n    // Set a delegate to get notified when the ad was loaded.\n    nativeAd.delegate = self;\n\n    // When testing on a device, add its hashed ID to force test ads.\n    // The hash ID is printed to console when running on a device.\n    // [FBAdSettings addTestDevice:@\"THE HASHED ID AS PRINTED TO CONSOLE\"];\n\n    // Initiate a request to load an ad.\n    [nativeAd loadAd];\n\n    [self.adView removeFromSuperview];\n    [self adjustAdContainerHeight];\n}\n\n#pragma mark - FBNativeAdDelegate\n\n- (void)nativeBannerAdDidLoad:(FBNativeBannerAd *)nativeBannerAd\n{\n    if (self.nativeAd) {\n        [self.nativeAd unregisterView];\n    }\n\n    self.nativeAd = nativeBannerAd;\n\n    self.adStatusLabel.text = @\"Ad loaded.\";\n\n    if (nativeBannerAd && nativeBannerAd.isAdValid) {\n        FBNativeBannerAdView *adView = [FBNativeBannerAdView nativeBannerAdViewWithNativeBannerAd:nativeBannerAd\n                                                                                         withType:[self templateType]];\n        adView.frame = self.adContainerView.bounds;\n        [self.adContainerView addSubview:adView];\n        self.adView = adView;\n    }\n}\n\n- (void)nativeBannerAd:(FBNativeBannerAd *)nativeBannerAd didFailWithError:(NSError *)error\n{\n    self.adStatusLabel.text = @\"Ad failed to load. Check console for details.\";\n    NSLog(@\"Native ad failed to load with error: %@\", error);\n}\n\n- (void)nativeBannerAdDidClick:(FBNativeBannerAd *)nativeBannerAd\n{\n    NSLog(@\"Native ad was clicked.\");\n}\n\n- (void)nativeBannerAdDidFinishHandlingClick:(FBNativeBannerAd *)nativeBannerAd\n{\n    NSLog(@\"Native ad did finish click handling.\");\n}\n\n- (void)nativeBannerAdWillLogImpression:(FBNativeBannerAd *)nativeBannerAd\n{\n    NSLog(@\"Native ad impression is being captured.\");\n}\n\n#pragma mark - Orientation\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    return UIInterfaceOrientationMaskAll;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeBannerViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface NativeBannerViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeBannerViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"NativeBannerViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface NativeBannerViewController () <FBNativeBannerAdDelegate>\n\n@property (nonatomic, strong) IBOutlet UILabel *adStatusLabel;\n@property (nonatomic, strong) IBOutlet FBAdIconView *adIconView;\n@property (nonatomic, strong) IBOutlet UILabel *adTitleLabel;\n@property (nonatomic, strong) IBOutlet UIButton *adCallToActionButton;\n@property (nonatomic, strong) IBOutlet UILabel *adSponsoredLabel;\n@property (nonatomic, strong) IBOutlet FBAdOptionsView *adOptionsView;\n@property (nonatomic, strong) IBOutlet UIView *adUIView;\n@property (nonatomic, strong) FBNativeBannerAd *nativeBannerAd;\n\n@end\n\n@implementation NativeBannerViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n\n    self.adOptionsView.hidden = YES;\n}\n\n#pragma mark - IB Actions\n\n- (IBAction)loadAd:(id)sender\n{\n    self.adStatusLabel.text = @\"Requesting an ad...\";\n\n    // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    FBNativeBannerAd *nativeBannerAd = [[FBNativeBannerAd alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"];\n\n    // Set a delegate to get notified when the ad was loaded.\n    nativeBannerAd.delegate = self;\n\n    // When testing on a device, add its hashed ID to force test ads.\n    // The hash ID is printed to console when running on a device.\n    // [FBAdSettings addTestDevice:@\"THE HASHED ID AS PRINTED TO CONSOLE\"];\n\n    // Initiate a request to load an ad.\n    [nativeBannerAd loadAd];\n}\n\n#pragma mark - FBNativeBannerAdDelegate implementation\n\n- (void)nativeBannerAdDidLoad:(FBNativeBannerAd *)nativeBannerAd\n{\n    NSLog(@\"Native banner ad was loaded, constructing native UI...\");\n\n    if (self.nativeBannerAd) {\n        [self.nativeBannerAd unregisterView];\n    }\n\n    self.nativeBannerAd = nativeBannerAd;\n\n    self.adStatusLabel.text = @\"Ad loaded.\";\n\n    // Render native ads onto UIView\n    self.adTitleLabel.text = self.nativeBannerAd.advertiserName;\n    self.adSponsoredLabel.text = self.nativeBannerAd.sponsoredTranslation;\n\n    [self setCallToActionButton:self.nativeBannerAd.callToAction];\n\n    NSLog(@\"Register UIView for impression and click...\");\n\n    // Set native banner ad view tags to declare roles of your views for better analysis in future\n    // We will be able to provide you statistics how often these views were clicked by users\n    // Views provided by Facebook already have appropriate tag set\n    self.adTitleLabel.nativeAdViewTag = FBNativeAdViewTagTitle;\n    self.adCallToActionButton.nativeAdViewTag = FBNativeAdViewTagCallToAction;\n\n    // Specify the clickable areas. View you were using to set ad view tags should be clickable.\n    NSArray<UIView *> *clickableViews = @[self.adCallToActionButton];\n    [nativeBannerAd registerViewForInteraction:self.adUIView\n                                      iconView:self.adIconView\n                                viewController:self\n                                clickableViews:clickableViews];\n\n    //    In you don't want to provide native ad view tags you can simply\n    //    Wire up UIView with the native banner ad; the whole UIView will be clickable.\n    //    [nativeBannerAd registerViewForInteraction:self.adUIView\n    //                                      iconView:self.adIconView\n    //                                viewController:self];\n\n    self.adOptionsView.nativeAd = nativeBannerAd;\n    self.adOptionsView.hidden = NO;\n}\n\n- (void)nativeBannerAd:(FBNativeBannerAd *)nativeBannerAd didFailWithError:(NSError *)error\n{\n    self.adStatusLabel.text = @\"Ad failed to load. Check console for details.\";\n    NSLog(@\"Native ad failed to load with error: %@\", error);\n}\n\n- (void)nativeBannerAdDidClick:(FBNativeBannerAd *)nativeBannerAd\n{\n    NSLog(@\"Native ad was clicked.\");\n}\n\n- (void)nativeBannerAdDidFinishHandlingClick:(FBNativeBannerAd *)nativeBannerAd\n{\n    NSLog(@\"Native ad did finish click handling.\");\n}\n\n- (void)nativeBannerAdWillLogImpression:(FBNativeBannerAd *)nativeBannerAd\n{\n    NSLog(@\"Native ad impression is being captured.\");\n}\n\n#pragma mark - Private Methods\n\n- (void)setCallToActionButton:(NSString *)callToAction\n{\n    if (callToAction) {\n        [self.adCallToActionButton setHidden:NO];\n        [self.adCallToActionButton setTitle:callToAction\n                                   forState:UIControlStateNormal];\n    } else {\n        [self.adCallToActionButton setHidden:YES];\n    }\n}\n\n#pragma mark - Orientation\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    return UIInterfaceOrientationMaskPortrait;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface NativeViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NativeViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"NativeViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\nconst NSUInteger LoadNativeAdCellRowIndex = 0;\n\n@interface NativeViewController () <UITableViewDelegate, UITableViewDataSource, FBNativeAdDelegate, FBMediaViewDelegate>\n\n@property (strong, nonatomic) IBOutlet UITableView *menuTableView;\n@property (strong, nonatomic) IBOutlet UILabel *adStatusLabel;\n@property (strong, nonatomic) IBOutlet FBMediaView *adIconView;\n@property (strong, nonatomic) IBOutlet FBMediaView *adCoverMediaView;\n@property (strong, nonatomic) IBOutlet UILabel *adTitleLabel;\n@property (strong, nonatomic) IBOutlet UILabel *adBodyLabel;\n@property (strong, nonatomic) IBOutlet UIButton *adCallToActionButton;\n@property (strong, nonatomic) IBOutlet UILabel *adSocialContextLabel;\n@property (strong, nonatomic) IBOutlet UILabel *sponsoredLabel;\n@property (strong, nonatomic) IBOutlet FBAdOptionsView *adOptionsView;\n@property (strong, nonatomic) IBOutlet UIView *adUIView;\n@property (strong, nonatomic) FBNativeAd *nativeAd;\n\n@end\n\n@implementation NativeViewController\n\n- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil\n{\n    // Used in xib must be referenced here so linker won't eliminate it.\n    [FBMediaView class];\n    \n    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];\n    if (self) {\n        // Custom initialization\n    }\n    return self;\n}\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    self.adOptionsView.hidden = YES;\n    self.menuTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];\n}\n\n#pragma mark - IB Actions\n\n- (void)loadNativeAd\n{\n    self.adStatusLabel.text = @\"Requesting an ad...\";\n    \n    // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    FBNativeAd *nativeAd = [[FBNativeAd alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"];\n    \n    // Set a delegate to get notified when the ad was loaded.\n    nativeAd.delegate = self;\n    \n    // When testing on a device, add its hashed ID to force test ads.\n    // The hash ID is printed to console when running on a device.\n    // [FBAdSettings addTestDevice:@\"THE HASHED ID AS PRINTED TO CONSOLE\"];\n    \n    // Initiate a request to load an ad.\n    [nativeAd loadAd];\n}\n\n#pragma mark - FBNativeAdDelegate implementation\n\n- (void)nativeAdDidLoad:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad was loaded, constructing native UI...\");\n    \n    if (self.nativeAd) {\n        [self.nativeAd unregisterView];\n    }\n    \n    self.nativeAd = nativeAd;\n    \n    // Create native UI using the ad metadata.\n    self.adCoverMediaView.delegate = self;\n    \n    self.adStatusLabel.text = @\"Ad loaded.\";\n    \n    // Render native ads onto UIView\n    self.adTitleLabel.text = self.nativeAd.advertiserName;\n    self.adBodyLabel.text = self.nativeAd.bodyText;\n    self.adSocialContextLabel.text = self.nativeAd.socialContext;\n    self.sponsoredLabel.text = self.nativeAd.sponsoredTranslation;\n    \n    [self setCallToActionButton:self.nativeAd.callToAction];\n    \n    // set the frame of the adBodyLabel depending on whether to show to call to action button\n    CGFloat gapToBorder = 9.0f;\n    CGFloat gapToCTAButton = 8.0f;\n    CGRect adBodyLabelFrame = self.adBodyLabel.frame;\n    if (!self.nativeAd.callToAction) {\n        adBodyLabelFrame.size.width = self.adCoverMediaView.bounds.size.width - gapToBorder * 2;\n    } else {\n        adBodyLabelFrame.size.width = self.adCoverMediaView.bounds.size.width - gapToCTAButton - gapToBorder - (self.adCoverMediaView.bounds.size.width - self.adCallToActionButton.frame.origin.x);\n    }\n    self.adBodyLabel.frame = adBodyLabelFrame;\n    \n    NSLog(@\"Register UIView for impression and click...\");\n    \n    // Set native ad view tags to declare roles of your views for better analysis in future\n    // We will be able to provide you statistics how often these views were clicked by users\n    // Views provided by Facebook already have appropriate tag set\n    self.adTitleLabel.nativeAdViewTag = FBNativeAdViewTagTitle;\n    self.adBodyLabel.nativeAdViewTag = FBNativeAdViewTagBody;\n    self.adSocialContextLabel.nativeAdViewTag = FBNativeAdViewTagSocialContext;\n    self.adCallToActionButton.nativeAdViewTag = FBNativeAdViewTagCallToAction;\n    \n    // Specify the clickable areas. Views you were using to set ad view tags should be clickable.\n    NSArray<UIView *> *clickableViews = @[self.adIconView, self.adTitleLabel, self.adBodyLabel, self.adSocialContextLabel, self.adCallToActionButton];\n    [nativeAd registerViewForInteraction:self.adUIView\n                               mediaView:self.adCoverMediaView\n                                iconView:self.adIconView\n                          viewController:self\n                          clickableViews:clickableViews];\n    \n    //    // You may use this method if you want to have all adUIView's subviews clickable\n    //    [nativeAd registerViewForInteraction:self.adUIView\n    //                               mediaView:self.adCoverMediaView\n    //                                iconView:self.adIconView\n    //                          viewController:self];\n    \n    self.adOptionsView.hidden = NO;\n    self.adOptionsView.nativeAd = nativeAd;\n}\n\n- (void)nativeAd:(FBNativeAd *)nativeAd didFailWithError:(NSError *)error\n{\n    self.adStatusLabel.text = @\"Ad failed to load. Check console for details.\";\n    NSLog(@\"Native ad failed to load with error: %@\", error);\n}\n\n- (void)nativeAdDidClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad was clicked.\");\n}\n\n- (void)nativeAdDidFinishHandlingClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad did finish click handling.\");\n}\n\n- (void)nativeAdWillLogImpression:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad impression is being captured.\");\n}\n\n#pragma mark - Menu Table View\n\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section\n{\n    return [self menuItems].count;\n}\n\n- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    if (indexPath.row == LoadNativeAdCellRowIndex) {\n        [self loadNativeAd];\n        return;\n    }\n    \n    NSString *segue = [self segueIdentifierForIndexPath:indexPath];\n    [self performSegueWithIdentifier:segue sender:nil];\n}\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@\"menuCell\" forIndexPath:indexPath];\n    cell.textLabel.text = [self menuItems][indexPath.row];\n    cell.accessoryType = [self accessoryTypeForIndexPath:indexPath];\n    return cell;\n}\n\n#pragma mark - Private Methods\n\n- (UITableViewCellAccessoryType)accessoryTypeForIndexPath:(NSIndexPath *)indexPath\n{\n    return indexPath.row == LoadNativeAdCellRowIndex ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;\n}\n\n- (NSString *)segueIdentifierForIndexPath:(NSIndexPath *)indexPath\n{\n    if (indexPath.row == LoadNativeAdCellRowIndex) { return nil; }\n    \n    NSArray<NSString *> *segues =  @[@\"showTemplate\",\n                                     @\"showTableView\",\n                                     @\"showScrollView\",\n                                     @\"showCollectionView\",\n                                     @\"showNativeBanner\",\n                                     @\"showNativeBannerTemplate\"];\n    return segues[indexPath.row - 1];\n}\n\n- (NSArray<NSString *> *)menuItems\n{\n    return @[@\"Load Native Ad\",\n             @\"Load Native Ad using Template\",\n             @\"Load Native Ad in TableView\",\n             @\"Load Native Ad in ScrollView\",\n             @\"Load Native Ad in CollectionView\",\n             @\"Load Native Banner Ad\",\n             @\"Load Native Banner Ad using Template\"];\n}\n\n- (void)setCallToActionButton:(NSString *)callToAction\n{\n    if (callToAction) {\n        [self.adCallToActionButton setHidden:NO];\n        [self.adCallToActionButton setTitle:callToAction\n                                   forState:UIControlStateNormal];\n    } else {\n        [self.adCallToActionButton setHidden:YES];\n    }\n}\n\n#pragma mark - Orientation\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    return UIInterfaceOrientationMaskPortrait;\n}\n\n- (void)mediaViewDidLoad:(FBMediaView *)mediaView\n{\n    \n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NavigationController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface NavigationController : UINavigationController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/NavigationController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"NavigationController.h\"\n\n#import \"NativeViewController.h\"\n\n@interface NavigationController ()\n\n@end\n\n@implementation NavigationController\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    UIInterfaceOrientationMask mask = UIInterfaceOrientationMaskAll;\n    NSArray<UIViewController *> *viewControllers = [self viewControllers];\n\n    for (UIViewController *viewController in viewControllers) {\n        if ([viewController isKindOfClass:[NativeViewController class]]) {\n            mask = UIInterfaceOrientationMaskPortrait;\n            break;\n        }\n    }\n\n    return mask;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/RewardedVideoViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface RewardedVideoViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/RewardedVideoViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"RewardedVideoViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface RewardedVideoViewController () <FBRewardedVideoAdDelegate>\n\n@property (nonatomic, strong) IBOutlet UILabel *adStatusLabel;\n@property (nonatomic, strong) FBRewardedVideoAd *rewardedVideoAd;\n\n@end\n\n@implementation RewardedVideoViewController\n\n- (IBAction)loadAd\n{\n    self.adStatusLabel.text = @\"Loading rewarded video ad...\";\n\n    // Create the rewarded video unit with a placement ID (generate your own on the Facebook app settings).\n    // Use different ID for each ad placement in your app.\n    self.rewardedVideoAd = [[FBRewardedVideoAd alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"];\n    // Set a delegate to get notified on changes or when the user interact with the ad.\n    self.rewardedVideoAd.delegate = self;\n\n    // Initiate the request to load the ad.\n    [self.rewardedVideoAd loadAd];\n\n    // Optional: Set Reward data.\n    [self.rewardedVideoAd setRewardDataWithUserID:@\"user1234\" withCurrency:@\"gold\"];\n}\n\n- (IBAction)showAd\n{\n    if (!self.rewardedVideoAd || !self.rewardedVideoAd.isAdValid)\n    {\n        // Ad not ready to present.\n        self.adStatusLabel.text = @\"Ad not loaded. Click load to request an ad.\";\n    } else {\n        self.adStatusLabel.text = @\"1. Tap 'Load Ad'\\n2. Once ad loads, tap 'Show!' to see the ad\";\n\n        // Ad is ready, present it!\n        [self.rewardedVideoAd showAdFromRootViewController:self animated:NO];\n    }\n}\n\n#pragma mark - FBRewardedVideoAdDelegate implementation\n\n- (void)rewardedVideoAdDidLoad:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video ad was loaded. Can present now.\");\n    self.adStatusLabel.text = @\"Ad loaded. Click show to present!\";\n}\n\n- (void)rewardedVideoAd:(FBRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *)error\n{\n    NSLog(@\"Rewarded video failed to load with error: %@\", error.description);\n    self.adStatusLabel.text = [NSString stringWithFormat:@\"Rewarded Video ad failed to load. %@\", error.localizedDescription];\n}\n\n- (void)rewardedVideoAdDidClick:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video was clicked.\");\n}\n\n- (void)rewardedVideoAdDidClose:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video closed.\");\n}\n\n- (void)rewardedVideoAdWillClose:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video will close.\");\n}\n\n- (void)rewardedVideoAdWillLogImpression:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video impression is being captured.\");\n}\n\n- (void)rewardedVideoAdVideoComplete:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video was completed successfully.\");\n}\n\n- (void)rewardedVideoAdServerRewardDidSucceed:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video server side reward succeeded.\");\n    //optional, cleanup\n    self.rewardedVideoAd = nil;\n}\n\n- (void)rewardedVideoAdServerRewardDidFail:(FBRewardedVideoAd *)rewardedVideoAd\n{\n    NSLog(@\"Rewarded video server side reward failed.\");\n    //optional, cleanup\n    self.rewardedVideoAd = nil;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/ScrollViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface ScrollViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/ScrollViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"ScrollViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface ScrollViewController () <FBNativeAdDelegate, FBNativeAdsManagerDelegate>\n\n@property (nonatomic, strong) IBOutlet UIView *containerView;\n@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *activityIndicator;\n@property (nonatomic, strong) FBNativeAdsManager *manager;\n@property (nonatomic, weak) FBNativeAdScrollView *scrollView;\n\n@end\n\n@implementation ScrollViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n\n    FBNativeAdsManager *manager = [[FBNativeAdsManager alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\" forNumAdsRequested:5];\n    manager.delegate = self;\n    manager.mediaCachePolicy = FBNativeAdsCachePolicyAll;\n    [manager loadAds];\n    self.manager = manager;\n}\n\n- (void)viewDidAppear:(BOOL)animated\n{\n    [super viewDidAppear:animated];\n    self.scrollView.frame = self.containerView.bounds;\n}\n\n- (IBAction)refresh:(id)sender\n{\n    [self.manager loadAds];\n    if (self.scrollView) {\n        [self.scrollView removeFromSuperview];\n        self.scrollView = nil;\n    }\n    [self.activityIndicator startAnimating];\n}\n\n#pragma mark FBNativeAdDelegate\n\n- (void)nativeAdDidClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad was clicked.\");\n}\n\n- (void)nativeAdDidFinishHandlingClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad did finish click handling.\");\n}\n\n- (void)nativeAdWillLogImpression:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad impression is being captured.\");\n}\n\n#pragma mark FBNativeAdsManagerDelegate\n\n- (void)nativeAdsLoaded\n{\n    [self.activityIndicator stopAnimating];\n    NSLog(@\"Native ads loaded, constructing native UI...\");\n    if (self.scrollView) {\n        [self.scrollView removeFromSuperview];\n        self.scrollView = nil;\n    }\n    FBNativeAdScrollView *scrollView = [[FBNativeAdScrollView alloc] initWithNativeAdsManager:self.manager withType:FBNativeAdViewTypeGenericHeight300];\n    scrollView.delegate = self;\n    scrollView.frame = self.containerView.bounds;\n    [self.containerView addSubview:scrollView];\n    self.scrollView = scrollView;\n}\n\n- (void)nativeAdsFailedToLoadWithError:(NSError *)error\n{\n    [self.activityIndicator stopAnimating];\n    NSLog(@\"Native ads failed to load with error: %@\", error);\n\n    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@\"Native ad failed to load\"\n                                                                             message:@\"Check console for more details\"\n                                                                      preferredStyle:UIAlertControllerStyleAlert];\n    UIAlertAction *cancel = [UIAlertAction actionWithTitle:@\"OK\" style:UIAlertActionStyleCancel handler:nil];\n\n    [alertController addAction:cancel];\n    [self presentViewController:alertController animated:YES completion:nil];\n}\n\n#pragma mark - Orientation\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    return UIInterfaceOrientationMaskPortrait;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsLogLevelCell.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface SettingsLogLevelCell : UITableViewCell\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsLogLevelCell.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"SettingsLogLevelCell.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface SettingsLogLevelCell ()\n\n@property (nonatomic, strong) IBOutlet UIStepper *stepper;\n@property (nonatomic, strong) IBOutlet UILabel *logLevelLabel;\n@property (nonatomic, copy) void (^onLogLevelChange)(FBAdLogLevel logLevel);\n\n@end\n\n@implementation SettingsLogLevelCell\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n    self.logLevelLabel.text = [self stringFromLogLevel:[FBAdSettings getLogLevel]];\n    self.stepper.value = [FBAdSettings getLogLevel];\n}\n\n- (IBAction)logValueDidChange:(UIStepper *)sender\n{\n    [FBAdSettings setLogLevel:sender.value];\n    self.logLevelLabel.text = [self stringFromLogLevel:[FBAdSettings getLogLevel]];\n\n    if (self.onLogLevelChange) {\n        self.onLogLevelChange([FBAdSettings getLogLevel]);\n    }\n}\n\n- (NSString *)stringFromLogLevel:(FBAdLogLevel)logLevel\n{\n    NSString *logLevelString = nil;\n    switch (logLevel) {\n        case FBAdLogLevelNone:\n            logLevelString = @\"None\";\n            break;\n        case FBAdLogLevelNotification:\n            logLevelString = @\"Notification\";\n            break;\n        case FBAdLogLevelError:\n            logLevelString = @\"Error\";\n            break;\n        case FBAdLogLevelWarning:\n            logLevelString = @\"Warning\";\n            break;\n        case FBAdLogLevelLog:\n            logLevelString = @\"Log\";\n            break;\n        case FBAdLogLevelDebug:\n            logLevelString = @\"Debug\";\n            break;\n        case FBAdLogLevelVerbose:\n            logLevelString = @\"Verbose\";\n            break;\n        default:\n            logLevelString = @\"Unknown\";\n            break;\n    }\n\n    return logLevelString;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsSandboxCell.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface SettingsSandboxCell : UITableViewCell\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsSandboxCell.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"SettingsSandboxCell.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface SettingsSandboxCell () <UITextFieldDelegate>\n\n@property (nonatomic, strong) IBOutlet UITextField *sandboxTextField;\n\n@end\n\n@implementation SettingsSandboxCell\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n\n    self.sandboxTextField.text = [FBAdSettings urlPrefix];\n    self.sandboxTextField.delegate = self;\n}\n\n#pragma mark - Text field delegate\n\n- (void)textFieldDidEndEditing:(UITextField *)textField\n{\n    [FBAdSettings setUrlPrefix:textField.text];\n}\n\n- (BOOL)textFieldShouldReturn:(UITextField *)textField\n{\n    [textField resignFirstResponder];\n    return YES;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsTableViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface SettingsTableViewController : UITableViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsTableViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"SettingsTableViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n#import \"SettingsTestModeCell.h\"\n\n@interface SettingsTableViewController ()\n@property (nonatomic, strong, readonly) NSArray<NSString *> *reuseIdentifiers;\n@end\n\n@implementation SettingsTableViewController\n@synthesize reuseIdentifiers = _reuseIdentifiers;\n\n#pragma mark - Private\n\n- (NSArray<NSString *> *)reuseIdentifiers\n{\n    if (nil == _reuseIdentifiers) {\n        NSMutableArray<NSString *> *identifiers = [@[@\"SettingsSandboxCell\",\n                                                     @\"SettingsLogLevelCell\",\n                                                     @\"SettingsTestModeCell\",\n                                                     @\"SettingsTestAdCell\"] mutableCopy];\n\n        if ([self isDebugLogsViewControllerAvailable]) {\n            [identifiers insertObject:@\"SettingsDebugEventCell\" atIndex:2];\n        }\n\n        _reuseIdentifiers = [identifiers copy];\n    }\n    return _reuseIdentifiers;\n}\n\n- (NSString *)reuseIdentifierForIndexPath:(NSIndexPath *)indexPath\n{\n    return self.reuseIdentifiers[indexPath.row];\n}\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    return UIInterfaceOrientationMaskPortrait;\n}\n\n- (BOOL)isDebugLogsViewControllerAvailable\n{\n    return NSClassFromString(@\"DebugLogsViewController\") != nil;\n}\n\n#pragma mark - UITableViewDataSource implementation\n\n- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView\n{\n    return 1;\n}\n\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section\n{\n    NSInteger numberOfRows = [FBAdSettings isTestMode] ? 4 : 3;\n    if ([self isDebugLogsViewControllerAvailable]) {\n        numberOfRows++;\n    }\n    return numberOfRows;\n}\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    NSString *reuseId = [self reuseIdentifierForIndexPath:indexPath];\n    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseId\n                                                            forIndexPath:indexPath];\n    if ([reuseId isEqualToString:@\"SettingsTestModeCell\"]) {\n        ((SettingsTestModeCell *)cell).onTestModeChange = ^(BOOL enabled) {\n            [self.tableView reloadData];\n        };\n    }\n\n    return cell;\n}\n\n- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section\n{\n    return [NSString stringWithFormat:@\"SDK Version %@\", FB_AD_SDK_VERSION];\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsTestAdCell.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface SettingsTestAdCell : UITableViewCell\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsTestAdCell.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"SettingsTestAdCell.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface SettingsTestAdCell () <UIPickerViewDelegate, UIPickerViewDataSource>\n\n@property (nonatomic, strong) IBOutlet UITextField *testAdTextField;\n@property (nonatomic, strong) UIPickerView *pickerView;\n@property (nonatomic, copy) NSDictionary<NSNumber *, NSString *> *testsAds;\n\n@end\n\n@implementation SettingsTestAdCell\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n\n    self.pickerView.delegate = self;\n    self.testsAds = @{\n                      @(FBAdTestAdType_Default) : @\"default\",\n                      @(FBAdTestAdType_Img_16_9_App_Install) : @\"image_install\",\n                      @(FBAdTestAdType_Img_16_9_Link) : @\"image_link\",\n                      @(FBAdTestAdType_Vid_HD_16_9_46s_App_Install) : @\"video_16x9_46s_install\",\n                      @(FBAdTestAdType_Vid_HD_16_9_46s_Link) : @\"video_16x9_46s_link\",\n                      @(FBAdTestAdType_Vid_HD_16_9_15s_App_Install) : @\"video_16x9_15s_install\",\n                      @(FBAdTestAdType_Vid_HD_16_9_15s_Link) : @\"video_16x9_15s_link\",\n                      @(FBAdTestAdType_Vid_HD_9_16_39s_App_Install) : @\"video_9x16_39s_install\",\n                      @(FBAdTestAdType_Vid_HD_9_16_39s_Link) : @\"video_9x16_39s_link\",\n                      @(FBAdTestAdType_Carousel_Img_Square_App_Install) : @\"carousel_install\",\n                      @(FBAdTestAdType_Carousel_Img_Square_Link) : @\"carousel_link\"\n                      };\n\n    [self setupPickerView];\n    [self setupAdTextField];\n}\n\n- (void)setupPickerView\n{\n    self.pickerView = [UIPickerView new];\n    self.pickerView.delegate = self;\n    self.pickerView.dataSource = self;\n\n    [self.pickerView selectRow:FBAdSettings.testAdType inComponent:0 animated:NO];\n}\n\n- (UIToolbar *)toolbar\n{\n    UIToolbar* toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth([UIScreen mainScreen].bounds), 44)];\n    UIBarButtonItem *flex = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace\n                                                                          target:nil action:nil];\n    UIBarButtonItem *done = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done:)];\n    toolbar.items = @[flex, done];\n\n    [toolbar sizeToFit];\n    return toolbar;\n}\n\n- (void)setupAdTextField\n{\n    self.testAdTextField.inputView = self.pickerView;\n    self.testAdTextField.inputAccessoryView = [self toolbar];\n    self.testAdTextField.text = self.testsAds[@(FBAdSettings.testAdType)];\n}\n\n- (void)done:(id)sender\n{\n    [self.testAdTextField resignFirstResponder];\n}\n\n#pragma mark - Picker view delegate\n\n- (NSString *)pickerView:(UIPickerView *)pickerView\n             titleForRow:(NSInteger)row\n            forComponent:(NSInteger)component\n{\n    NSString *title = self.testsAds[@(row)];\n    if (!title) {\n        title = @\"None\";\n    }\n    return title;\n}\n\n- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView\n{\n    return 1;\n}\n\n- (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component\n{\n    return self.testsAds.count;\n}\n\n- (void)pickerView:(UIPickerView *)thePickerView\n      didSelectRow:(NSInteger)row\n       inComponent:(NSInteger)component\n{\n    self.testAdTextField.text = self.testsAds[@(row)] ? self.testsAds[@(row)] : @\"None\";\n    FBAdSettings.testAdType = row;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsTestModeCell.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface SettingsTestModeCell : UITableViewCell\n\n@property (nonatomic, copy) void (^onTestModeChange)(BOOL enabled);\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/SettingsTestModeCell.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"SettingsTestModeCell.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\n@interface SettingsTestModeCell ()\n\n@property (nonatomic, strong) IBOutlet UISwitch *switcher;\n\n@end\n\n@implementation SettingsTestModeCell\n\n- (void)awakeFromNib\n{\n    [super awakeFromNib];\n\n    [self.switcher setOn:[FBAdSettings isTestMode]];\n}\n\n- (IBAction)switcherValueChanged:(UISwitch *)sender\n{\n    if ([sender isOn]) {\n        [FBAdSettings addTestDevice:[FBAdSettings testDeviceHash]];\n    } else {\n        [FBAdSettings clearTestDevice:[FBAdSettings testDeviceHash]];\n    }\n\n    if (self.onTestModeChange) {\n        self.onTestModeChange([FBAdSettings isTestMode]);\n    }\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/TableViewController.h",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface TableViewController : UIViewController\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/TableViewController.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import \"TableViewController.h\"\n\n#import <FBAudienceNetwork/FBAudienceNetwork.h>\n\nstatic NSInteger const kRowStrideForAdCell = 9;\nstatic NSString *const kDefaultCellIdentifier = @\"kDefaultCellIdentifier\";\n\n@interface TableViewController () <UITableViewDataSource, UITableViewDelegate, FBNativeAdsManagerDelegate, FBNativeAdDelegate>\n\n@property (nonatomic, strong) IBOutlet UITableView *tableView;\n@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *activityIndicator;\n@property (nonatomic, strong) FBNativeAdsManager *adsManager;\n@property (nonatomic, strong) FBNativeAdTableViewCellProvider *cellProvider;\n@property (nonatomic, strong) NSMutableArray<NSString *> *tableViewContentArray;\n@property (nonatomic, assign) BOOL adCellsCreated;\n\n@end\n\n@implementation TableViewController\n\n#pragma mark - Lazy Loading\n\n- (NSMutableArray<NSString *> *)tableViewContentArray\n{\n    if (!_tableViewContentArray) {\n        _tableViewContentArray = [NSMutableArray array];\n        for (NSUInteger i = 0; i < 45; i++) {\n            [_tableViewContentArray addObject:[NSString stringWithFormat:@\"TableView Cell #%lu\", (unsigned long)(i + 1)]];\n        }\n    }\n\n    return _tableViewContentArray;\n}\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    // Do any additional setup after loading the view from its nib.\n    self.tableView.delegate = self;\n    self.tableView.dataSource = self;\n\n    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:kDefaultCellIdentifier];\n\n    [self loadNativeAd];\n}\n\n- (IBAction)refresh:(id)sender\n{\n    [self loadNativeAd];\n}\n\n- (void)loadNativeAd\n{\n    [self.activityIndicator startAnimating];\n\n    if (!self.adsManager) {\n        // Create a native ad manager with a unique placement ID (generate your own on the Facebook app settings)\n        // and how many ads you would like to create. Note that you may get fewer ads than you ask for.\n        // Use different ID for each ad placement in your app.\n        self.adsManager = [[FBNativeAdsManager alloc] initWithPlacementID:@\"YOUR_PLACEMENT_ID\"\n                                                        forNumAdsRequested:5];\n        // Set a delegate to get notified when the ads are loaded.\n        self.adsManager.delegate = self;\n\n        // Configure native ad manager to wait to call nativeAdsLoaded until all ad assets are loaded\n        self.adsManager.mediaCachePolicy = FBNativeAdsCachePolicyAll;\n\n        // When testing on a device, add its hashed ID to force test ads.\n        // The hash ID is printed to console when running on a device.\n        // [FBAdSettings addTestDevice:@\"THE HASHED ID AS PRINTED TO CONSOLE\"];\n    }\n\n    // Load some ads\n    [self.adsManager loadAds];\n}\n\n#pragma mark FBNativeAdsManagerDelegate implementation\n\n- (void)nativeAdsLoaded\n{\n    NSLog(@\"Native ad was loaded, constructing native UI...\");\n\n    // After the native ads have loaded we create the native ad cell provider and let it take over\n    FBNativeAdsManager *manager = self.adsManager;\n    self.adsManager.delegate = nil;\n    self.adsManager = nil;\n\n    // The native ad cell provider operates over a loaded ads manager and can create table cells with native\n    // ad templates in them as well as help with the math to have a consistent distribution of ads within a table.\n    FBNativeAdTableViewCellProvider *cellProvider = [[FBNativeAdTableViewCellProvider alloc] initWithManager:manager forType:FBNativeAdViewTypeGenericHeight300];\n    self.cellProvider = cellProvider;\n    self.cellProvider.delegate = self;\n\n\n    [self.tableView reloadData];\n    [self.activityIndicator stopAnimating];\n}\n\n- (void)nativeAdsFailedToLoadWithError:(NSError *)error\n{\n    NSLog(@\"Native ad failed to load with error: %@\", error);\n    [self.activityIndicator stopAnimating];\n\n    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@\"Native ad failed to load\"\n                                                                             message:@\"Check console for more details\"\n                                                                      preferredStyle:UIAlertControllerStyleAlert];\n    UIAlertAction *cancel = [UIAlertAction actionWithTitle:@\"OK\" style:UIAlertActionStyleCancel handler:nil];\n\n    [alertController addAction:cancel];\n    [self presentViewController:alertController animated:YES completion:nil];\n}\n\n#pragma mark FBNativeAdDelegate\n\n- (void)nativeAdDidClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad was clicked.\");\n}\n\n- (void)nativeAdDidFinishHandlingClick:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad did finish click handling.\");\n}\n\n- (void)nativeAdWillLogImpression:(FBNativeAd *)nativeAd\n{\n    NSLog(@\"Native ad impression is being captured.\");\n}\n\n#pragma mark - UITableViewDataSource\n\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section\n{\n    // In this example the ads are evenly distributed within the table every kRowStrideForAdCell-th cell.\n    NSUInteger count = [self.tableViewContentArray count];\n    count = [self.cellProvider adjustCount:count forStride:kRowStrideForAdCell] ?: count;\n    return count;\n}\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    // For ad cells just as the ad cell provider, for normal cells do whatever you would do.\n    if ([self.cellProvider isAdCellAtIndexPath:indexPath forStride:kRowStrideForAdCell]) {\n        return [self.cellProvider tableView:tableView cellForRowAtIndexPath:indexPath];\n    } else {\n        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kDefaultCellIdentifier forIndexPath:indexPath];\n        // In this example we need to adjust the index back to the domain of the data.\n        indexPath = [self.cellProvider adjustNonAdCellIndexPath:indexPath forStride:kRowStrideForAdCell] ?: indexPath;\n        cell.textLabel.text = [self.tableViewContentArray objectAtIndex:indexPath.row];\n        return cell;\n    }\n}\n\n#pragma mark - UITableViewDelegate\n\n- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath\n{\n    // The ad cell provider knows the height of ad cells based on its configuration\n    if ([self.cellProvider isAdCellAtIndexPath:indexPath forStride:kRowStrideForAdCell]) {\n        return [self.cellProvider tableView:tableView heightForRowAtIndexPath:indexPath];\n    } else {\n        return 80;\n    }\n}\n\n#pragma mark - Orientation\n\n- (UIInterfaceOrientationMask)supportedInterfaceOrientations\n{\n    return UIInterfaceOrientationMaskPortrait;\n}\n\n@end\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample/main.m",
    "content": "// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n//\n// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n// copy, modify, and distribute this software in source code or binary form for use\n// in connection with the web services and APIs provided by Facebook.\n//\n// As with any software that integrates with the Facebook platform, your use of\n// this software is subject to the Facebook Developer Principles and Policies\n// [http://developers.facebook.com/policy/]. This copyright notice shall be\n// included in all copies or substantial portions of the software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n#import \"AppDelegate.h\"\n\nint main(int argc, char * argv[])\n{\n    @autoreleasepool {\n        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));\n    }\n}\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t58D92D5C18C7A6B10090E7E2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 58D92D5A18C7A6B10090E7E2 /* AppDelegate.m */; };\n\t\t58D92D5D18C7A6B10090E7E2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 58D92D5B18C7A6B10090E7E2 /* Images.xcassets */; };\n\t\t58D92D6C18C7A6D00090E7E2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 58D92D6818C7A6D00090E7E2 /* main.m */; };\n\t\t7DB6D5831D2EF6020095B2E3 /* CollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB6D5811D2EF6020095B2E3 /* CollectionViewController.m */; };\n\t\t821E0AB21FC5923300F6C1DC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 821E0AB11FC5923200F6C1DC /* LaunchScreen.storyboard */; };\n\t\t825B69E321400B0900C130F6 /* NativeAdTemplateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B69E121400B0900C130F6 /* NativeAdTemplateViewController.m */; };\n\t\t825B69E421400B0900C130F6 /* NativeBannerAdTemplateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B69E221400B0900C130F6 /* NativeBannerAdTemplateViewController.m */; };\n\t\t825B76321FE00ED4002E9410 /* MediumRectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B76261FE00ED2002E9410 /* MediumRectViewController.m */; };\n\t\t825B76331FE00ED4002E9410 /* RewardedVideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B762A1FE00ED3002E9410 /* RewardedVideoViewController.m */; };\n\t\t825B76341FE00ED4002E9410 /* InstreamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B762B1FE00ED3002E9410 /* InstreamViewController.m */; };\n\t\t825B76351FE00ED4002E9410 /* InterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B762D1FE00ED3002E9410 /* InterstitialViewController.m */; };\n\t\t825B76361FE00ED4002E9410 /* BannerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B762E1FE00ED3002E9410 /* BannerViewController.m */; };\n\t\t825B76371FE00ED4002E9410 /* MenuTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 825B762F1FE00ED4002E9410 /* MenuTableViewController.m */; };\n\t\t829C8D1A1FBF35BE00B784C1 /* SettingsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 829C8D0E1FBF35BD00B784C1 /* SettingsTableViewController.m */; };\n\t\t829C8D1B1FBF35BE00B784C1 /* AdUnitsSampleStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 829C8D0F1FBF35BD00B784C1 /* AdUnitsSampleStoryboard.storyboard */; };\n\t\t829C8D1C1FBF35BE00B784C1 /* SettingsTestAdCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 829C8D131FBF35BD00B784C1 /* SettingsTestAdCell.m */; };\n\t\t829C8D1D1FBF35BE00B784C1 /* SettingsSandboxCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 829C8D141FBF35BD00B784C1 /* SettingsSandboxCell.m */; };\n\t\t829C8D1E1FBF35BE00B784C1 /* NavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 829C8D151FBF35BD00B784C1 /* NavigationController.m */; };\n\t\t829C8D1F1FBF35BE00B784C1 /* SettingsTestModeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 829C8D181FBF35BE00B784C1 /* SettingsTestModeCell.m */; };\n\t\t829C8D201FBF35BE00B784C1 /* SettingsLogLevelCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 829C8D191FBF35BE00B784C1 /* SettingsLogLevelCell.m */; };\n\t\t90E89CD41A99AE95005D3430 /* ScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90E89CD21A99AE95005D3430 /* ScrollViewController.m */; };\n\t\t9981CCDC1F696FF100935A60 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9981CCDB1F696FF100935A60 /* libc++.tbd */; };\n\t\t9C86FDA720F8CF4C00077F54 /* NativeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C86FDA520F8CF4C00077F54 /* NativeViewController.m */; };\n\t\t9CF70F3A207E0C6D002D30D2 /* NativeBannerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CF70F39207E0C6D002D30D2 /* NativeBannerViewController.m */; };\n\t\tEE23E6E8198B0B0600215C81 /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE23E6E6198B0B0600215C81 /* TableViewController.m */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXCopyFilesBuildPhase section */\n\t\tB87B1D2D1DDE5CA6004828BC /* Embed Frameworks */ = {\n\t\t\tisa = PBXCopyFilesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tdstPath = \"\";\n\t\t\tdstSubfolderSpec = 10;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tname = \"Embed Frameworks\";\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXCopyFilesBuildPhase section */\n\n/* Begin PBXFileReference section */\n\t\t58D92D1E18C7A6100090E7E2 /* AdUnitsSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AdUnitsSample.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t58D92D5918C7A6B10090E7E2 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = \"<group>\"; };\n\t\t58D92D5A18C7A6B10090E7E2 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = \"<group>\"; };\n\t\t58D92D5B18C7A6B10090E7E2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = \"<group>\"; };\n\t\t58D92D6618C7A6D00090E7E2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t58D92D6718C7A6D00090E7E2 /* InfoPlist.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t58D92D6818C7A6D00090E7E2 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = \"<group>\"; };\n\t\t58D92D6918C7A6D00090E7E2 /* AdUnitsSample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"AdUnitsSample-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t7DB6D5801D2EF6020095B2E3 /* CollectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionViewController.h; sourceTree = \"<group>\"; };\n\t\t7DB6D5811D2EF6020095B2E3 /* CollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionViewController.m; sourceTree = \"<group>\"; };\n\t\t821E0AB11FC5923200F6C1DC /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t825B69DF21400B0800C130F6 /* NativeBannerAdTemplateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeBannerAdTemplateViewController.h; sourceTree = \"<group>\"; };\n\t\t825B69E021400B0900C130F6 /* NativeAdTemplateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeAdTemplateViewController.h; sourceTree = \"<group>\"; };\n\t\t825B69E121400B0900C130F6 /* NativeAdTemplateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeAdTemplateViewController.m; sourceTree = \"<group>\"; };\n\t\t825B69E221400B0900C130F6 /* NativeBannerAdTemplateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeBannerAdTemplateViewController.m; sourceTree = \"<group>\"; };\n\t\t825B76261FE00ED2002E9410 /* MediumRectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MediumRectViewController.m; sourceTree = \"<group>\"; };\n\t\t825B76271FE00ED2002E9410 /* InterstitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InterstitialViewController.h; sourceTree = \"<group>\"; };\n\t\t825B76281FE00ED2002E9410 /* BannerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BannerViewController.h; sourceTree = \"<group>\"; };\n\t\t825B76291FE00ED2002E9410 /* RewardedVideoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RewardedVideoViewController.h; sourceTree = \"<group>\"; };\n\t\t825B762A1FE00ED3002E9410 /* RewardedVideoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RewardedVideoViewController.m; sourceTree = \"<group>\"; };\n\t\t825B762B1FE00ED3002E9410 /* InstreamViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstreamViewController.m; sourceTree = \"<group>\"; };\n\t\t825B762C1FE00ED3002E9410 /* InstreamViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstreamViewController.h; sourceTree = \"<group>\"; };\n\t\t825B762D1FE00ED3002E9410 /* InterstitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InterstitialViewController.m; sourceTree = \"<group>\"; };\n\t\t825B762E1FE00ED3002E9410 /* BannerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BannerViewController.m; sourceTree = \"<group>\"; };\n\t\t825B762F1FE00ED4002E9410 /* MenuTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuTableViewController.m; sourceTree = \"<group>\"; };\n\t\t825B76301FE00ED4002E9410 /* MediumRectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediumRectViewController.h; sourceTree = \"<group>\"; };\n\t\t825B76311FE00ED4002E9410 /* MenuTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuTableViewController.h; sourceTree = \"<group>\"; };\n\t\t829C8D0D1FBF35BD00B784C1 /* SettingsLogLevelCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsLogLevelCell.h; sourceTree = \"<group>\"; };\n\t\t829C8D0E1FBF35BD00B784C1 /* SettingsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsTableViewController.m; sourceTree = \"<group>\"; };\n\t\t829C8D0F1FBF35BD00B784C1 /* AdUnitsSampleStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = AdUnitsSampleStoryboard.storyboard; sourceTree = \"<group>\"; };\n\t\t829C8D101FBF35BD00B784C1 /* SettingsSandboxCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsSandboxCell.h; sourceTree = \"<group>\"; };\n\t\t829C8D111FBF35BD00B784C1 /* SettingsTestAdCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsTestAdCell.h; sourceTree = \"<group>\"; };\n\t\t829C8D121FBF35BD00B784C1 /* NavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationController.h; sourceTree = \"<group>\"; };\n\t\t829C8D131FBF35BD00B784C1 /* SettingsTestAdCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsTestAdCell.m; sourceTree = \"<group>\"; };\n\t\t829C8D141FBF35BD00B784C1 /* SettingsSandboxCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsSandboxCell.m; sourceTree = \"<group>\"; };\n\t\t829C8D151FBF35BD00B784C1 /* NavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavigationController.m; sourceTree = \"<group>\"; };\n\t\t829C8D161FBF35BE00B784C1 /* SettingsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsTableViewController.h; sourceTree = \"<group>\"; };\n\t\t829C8D171FBF35BE00B784C1 /* SettingsTestModeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsTestModeCell.h; sourceTree = \"<group>\"; };\n\t\t829C8D181FBF35BE00B784C1 /* SettingsTestModeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsTestModeCell.m; sourceTree = \"<group>\"; };\n\t\t829C8D191FBF35BE00B784C1 /* SettingsLogLevelCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsLogLevelCell.m; sourceTree = \"<group>\"; };\n\t\t90E89CD11A99AE95005D3430 /* ScrollViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollViewController.h; sourceTree = \"<group>\"; };\n\t\t90E89CD21A99AE95005D3430 /* ScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScrollViewController.m; sourceTree = \"<group>\"; };\n\t\t9981CCDB1F696FF100935A60 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = \"sourcecode.text-based-dylib-definition\"; name = \"libc++.tbd\"; path = \"usr/lib/libc++.tbd\"; sourceTree = SDKROOT; };\n\t\t9C86FDA520F8CF4C00077F54 /* NativeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeViewController.m; sourceTree = \"<group>\"; };\n\t\t9C86FDA620F8CF4C00077F54 /* NativeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeViewController.h; sourceTree = \"<group>\"; };\n\t\t9CF70F38207E0C6D002D30D2 /* NativeBannerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeBannerViewController.h; sourceTree = \"<group>\"; };\n\t\t9CF70F39207E0C6D002D30D2 /* NativeBannerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeBannerViewController.m; sourceTree = \"<group>\"; };\n\t\tB81CBE1E1DC7F21400651A52 /* AdUnitsSample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AdUnitsSample.entitlements; sourceTree = \"<group>\"; };\n\t\tEE23E6E5198B0B0600215C81 /* TableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableViewController.h; sourceTree = \"<group>\"; };\n\t\tEE23E6E6198B0B0600215C81 /* TableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableViewController.m; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t58D92D1B18C7A6100090E7E2 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t9981CCDC1F696FF100935A60 /* libc++.tbd in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t58D92D1518C7A6100090E7E2 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t58D92D2718C7A6100090E7E2 /* AdUnitsSample */,\n\t\t\t\t58D92D2018C7A6100090E7E2 /* Frameworks */,\n\t\t\t\t58D92D1F18C7A6100090E7E2 /* Products */,\n\t\t\t);\n\t\t\tindentWidth = 4;\n\t\t\tsourceTree = \"<group>\";\n\t\t\ttabWidth = 4;\n\t\t};\n\t\t58D92D1F18C7A6100090E7E2 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t58D92D1E18C7A6100090E7E2 /* AdUnitsSample.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t58D92D2018C7A6100090E7E2 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9981CCDB1F696FF100935A60 /* libc++.tbd */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t58D92D2718C7A6100090E7E2 /* AdUnitsSample */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t58D92D5918C7A6B10090E7E2 /* AppDelegate.h */,\n\t\t\t\t58D92D5A18C7A6B10090E7E2 /* AppDelegate.m */,\n\t\t\t\t9C6C3B9F20F8C2C800149EF6 /* FormatSamples */,\n\t\t\t\t9C6C3B9E20F8C2A200149EF6 /* SettingsMenu */,\n\t\t\t\t9C41349120F8C1D70032CC52 /* Resources */,\n\t\t\t\t58D92D2818C7A6100090E7E2 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = AdUnitsSample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t58D92D2818C7A6100090E7E2 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t58D92D6618C7A6D00090E7E2 /* Info.plist */,\n\t\t\t\t58D92D6718C7A6D00090E7E2 /* InfoPlist.strings */,\n\t\t\t\t58D92D6818C7A6D00090E7E2 /* main.m */,\n\t\t\t\t58D92D6918C7A6D00090E7E2 /* AdUnitsSample-Prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9C41349120F8C1D70032CC52 /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t821E0AB11FC5923200F6C1DC /* LaunchScreen.storyboard */,\n\t\t\t\t829C8D0F1FBF35BD00B784C1 /* AdUnitsSampleStoryboard.storyboard */,\n\t\t\t\t58D92D5B18C7A6B10090E7E2 /* Images.xcassets */,\n\t\t\t\tB81CBE1E1DC7F21400651A52 /* AdUnitsSample.entitlements */,\n\t\t\t);\n\t\t\tname = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9C6C3B9E20F8C2A200149EF6 /* SettingsMenu */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t829C8D0D1FBF35BD00B784C1 /* SettingsLogLevelCell.h */,\n\t\t\t\t829C8D191FBF35BE00B784C1 /* SettingsLogLevelCell.m */,\n\t\t\t\t829C8D101FBF35BD00B784C1 /* SettingsSandboxCell.h */,\n\t\t\t\t829C8D141FBF35BD00B784C1 /* SettingsSandboxCell.m */,\n\t\t\t\t829C8D161FBF35BE00B784C1 /* SettingsTableViewController.h */,\n\t\t\t\t829C8D0E1FBF35BD00B784C1 /* SettingsTableViewController.m */,\n\t\t\t\t829C8D111FBF35BD00B784C1 /* SettingsTestAdCell.h */,\n\t\t\t\t829C8D131FBF35BD00B784C1 /* SettingsTestAdCell.m */,\n\t\t\t\t829C8D171FBF35BE00B784C1 /* SettingsTestModeCell.h */,\n\t\t\t\t829C8D181FBF35BE00B784C1 /* SettingsTestModeCell.m */,\n\t\t\t\t825B76311FE00ED4002E9410 /* MenuTableViewController.h */,\n\t\t\t\t825B762F1FE00ED4002E9410 /* MenuTableViewController.m */,\n\t\t\t\t829C8D121FBF35BD00B784C1 /* NavigationController.h */,\n\t\t\t\t829C8D151FBF35BD00B784C1 /* NavigationController.m */,\n\t\t\t);\n\t\t\tname = SettingsMenu;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9C6C3B9F20F8C2C800149EF6 /* FormatSamples */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t825B69E021400B0900C130F6 /* NativeAdTemplateViewController.h */,\n\t\t\t\t825B69E121400B0900C130F6 /* NativeAdTemplateViewController.m */,\n\t\t\t\t825B69DF21400B0800C130F6 /* NativeBannerAdTemplateViewController.h */,\n\t\t\t\t825B69E221400B0900C130F6 /* NativeBannerAdTemplateViewController.m */,\n\t\t\t\t825B76281FE00ED2002E9410 /* BannerViewController.h */,\n\t\t\t\t825B762E1FE00ED3002E9410 /* BannerViewController.m */,\n\t\t\t\t9CF70F38207E0C6D002D30D2 /* NativeBannerViewController.h */,\n\t\t\t\t9CF70F39207E0C6D002D30D2 /* NativeBannerViewController.m */,\n\t\t\t\t825B762C1FE00ED3002E9410 /* InstreamViewController.h */,\n\t\t\t\t825B762B1FE00ED3002E9410 /* InstreamViewController.m */,\n\t\t\t\t825B76271FE00ED2002E9410 /* InterstitialViewController.h */,\n\t\t\t\t825B762D1FE00ED3002E9410 /* InterstitialViewController.m */,\n\t\t\t\t825B76301FE00ED4002E9410 /* MediumRectViewController.h */,\n\t\t\t\t825B76261FE00ED2002E9410 /* MediumRectViewController.m */,\n\t\t\t\t825B76291FE00ED2002E9410 /* RewardedVideoViewController.h */,\n\t\t\t\t825B762A1FE00ED3002E9410 /* RewardedVideoViewController.m */,\n\t\t\t\tEE23E6E5198B0B0600215C81 /* TableViewController.h */,\n\t\t\t\tEE23E6E6198B0B0600215C81 /* TableViewController.m */,\n\t\t\t\t90E89CD11A99AE95005D3430 /* ScrollViewController.h */,\n\t\t\t\t90E89CD21A99AE95005D3430 /* ScrollViewController.m */,\n\t\t\t\t7DB6D5801D2EF6020095B2E3 /* CollectionViewController.h */,\n\t\t\t\t7DB6D5811D2EF6020095B2E3 /* CollectionViewController.m */,\n\t\t\t\t9C86FDA620F8CF4C00077F54 /* NativeViewController.h */,\n\t\t\t\t9C86FDA520F8CF4C00077F54 /* NativeViewController.m */,\n\t\t\t);\n\t\t\tname = FormatSamples;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t58D92D1D18C7A6100090E7E2 /* AdUnitsSample */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 58D92D5318C7A6110090E7E2 /* Build configuration list for PBXNativeTarget \"AdUnitsSample\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t58D92D1A18C7A6100090E7E2 /* Sources */,\n\t\t\t\t58D92D1C18C7A6100090E7E2 /* Resources */,\n\t\t\t\t58D92D1B18C7A6100090E7E2 /* Frameworks */,\n\t\t\t\tB87B1D2D1DDE5CA6004828BC /* Embed Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = AdUnitsSample;\n\t\t\tproductName = AdUnitsSample;\n\t\t\tproductReference = 58D92D1E18C7A6100090E7E2 /* AdUnitsSample.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t58D92D1618C7A6100090E7E2 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0700;\n\t\t\t\tORGANIZATIONNAME = Facebook;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t58D92D1D18C7A6100090E7E2 = {\n\t\t\t\t\t\tProvisioningStyle = Automatic;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 58D92D1918C7A6100090E7E2 /* Build configuration list for PBXProject \"AdUnitsSample\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 58D92D1518C7A6100090E7E2;\n\t\t\tproductRefGroup = 58D92D1F18C7A6100090E7E2 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t58D92D1D18C7A6100090E7E2 /* AdUnitsSample */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t58D92D1C18C7A6100090E7E2 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t821E0AB21FC5923300F6C1DC /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t829C8D1B1FBF35BE00B784C1 /* AdUnitsSampleStoryboard.storyboard in Resources */,\n\t\t\t\t58D92D5D18C7A6B10090E7E2 /* Images.xcassets in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t58D92D1A18C7A6100090E7E2 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t9C86FDA720F8CF4C00077F54 /* NativeViewController.m in Sources */,\n\t\t\t\t829C8D1A1FBF35BE00B784C1 /* SettingsTableViewController.m in Sources */,\n\t\t\t\t829C8D1F1FBF35BE00B784C1 /* SettingsTestModeCell.m in Sources */,\n\t\t\t\t825B76351FE00ED4002E9410 /* InterstitialViewController.m in Sources */,\n\t\t\t\t825B69E321400B0900C130F6 /* NativeAdTemplateViewController.m in Sources */,\n\t\t\t\t825B76331FE00ED4002E9410 /* RewardedVideoViewController.m in Sources */,\n\t\t\t\t825B76361FE00ED4002E9410 /* BannerViewController.m in Sources */,\n\t\t\t\t58D92D5C18C7A6B10090E7E2 /* AppDelegate.m in Sources */,\n\t\t\t\t829C8D1D1FBF35BE00B784C1 /* SettingsSandboxCell.m in Sources */,\n\t\t\t\t829C8D201FBF35BE00B784C1 /* SettingsLogLevelCell.m in Sources */,\n\t\t\t\t7DB6D5831D2EF6020095B2E3 /* CollectionViewController.m in Sources */,\n\t\t\t\t58D92D6C18C7A6D00090E7E2 /* main.m in Sources */,\n\t\t\t\t90E89CD41A99AE95005D3430 /* ScrollViewController.m in Sources */,\n\t\t\t\t829C8D1C1FBF35BE00B784C1 /* SettingsTestAdCell.m in Sources */,\n\t\t\t\t825B69E421400B0900C130F6 /* NativeBannerAdTemplateViewController.m in Sources */,\n\t\t\t\t825B76321FE00ED4002E9410 /* MediumRectViewController.m in Sources */,\n\t\t\t\t829C8D1E1FBF35BE00B784C1 /* NavigationController.m in Sources */,\n\t\t\t\tEE23E6E8198B0B0600215C81 /* TableViewController.m in Sources */,\n\t\t\t\t825B76371FE00ED4002E9410 /* MenuTableViewController.m in Sources */,\n\t\t\t\t825B76341FE00ED4002E9410 /* InstreamViewController.m in Sources */,\n\t\t\t\t9CF70F3A207E0C6D002D30D2 /* NativeBannerViewController.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t58D92D5118C7A6110090E7E2 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = NO;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t58D92D5218C7A6110090E7E2 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = NO;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t58D92D5418C7A6110090E7E2 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = AdUnitsSample/AdUnitsSample.entitlements;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = \"\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(SRCROOT)/../../..//Static\",\n\t\t\t\t);\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"AdUnitsSample/AdUnitsSample-Prefix.pch\";\n\t\t\t\tHEADER_SEARCH_PATHS = \"\";\n\t\t\t\tINFOPLIST_FILE = AdUnitsSample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.facebook.audiencenetwork.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tPROVISIONING_PROFILE = \"8d2650e7-a3c0-4b70-a158-1df747083300\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t58D92D5518C7A6110090E7E2 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCODE_SIGN_ENTITLEMENTS = AdUnitsSample/AdUnitsSample.entitlements;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Distribution\";\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = \"\";\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"$(SRCROOT)/../../..//Static\",\n\t\t\t\t);\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"AdUnitsSample/AdUnitsSample-Prefix.pch\";\n\t\t\t\tHEADER_SEARCH_PATHS = \"\";\n\t\t\t\tINFOPLIST_FILE = AdUnitsSample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.facebook.audiencenetwork.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tPROVISIONING_PROFILE = \"e7603b38-718e-4f37-98d5-3a5668531043\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t58D92D1918C7A6100090E7E2 /* Build configuration list for PBXProject \"AdUnitsSample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t58D92D5118C7A6110090E7E2 /* Debug */,\n\t\t\t\t58D92D5218C7A6110090E7E2 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t58D92D5318C7A6110090E7E2 /* Build configuration list for PBXNativeTarget \"AdUnitsSample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t58D92D5418C7A6110090E7E2 /* Debug */,\n\t\t\t\t58D92D5518C7A6110090E7E2 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 58D92D1618C7A6100090E7E2 /* Project object */;\n}\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample.xcodeproj/xcshareddata/xcschemes/AdUnitsSample.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"0820\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"58D92D1D18C7A6100090E7E2\"\n               BuildableName = \"AdUnitsSample.app\"\n               BlueprintName = \"AdUnitsSample\"\n               ReferencedContainer = \"container:AdUnitsSample.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n      </Testables>\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"58D92D1D18C7A6100090E7E2\"\n            BuildableName = \"AdUnitsSample.app\"\n            BlueprintName = \"AdUnitsSample\"\n            ReferencedContainer = \"container:AdUnitsSample.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"58D92D1D18C7A6100090E7E2\"\n            BuildableName = \"AdUnitsSample.app\"\n            BlueprintName = \"AdUnitsSample\"\n            ReferencedContainer = \"container:AdUnitsSample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n      <AdditionalOptions>\n      </AdditionalOptions>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"58D92D1D18C7A6100090E7E2\"\n            BuildableName = \"AdUnitsSample.app\"\n            BlueprintName = \"AdUnitsSample\"\n            ReferencedContainer = \"container:AdUnitsSample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:AdUnitsSample.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/AdUnitsSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/Podfile",
    "content": "# Uncomment the next line to define a global platform for your project\n# platform :ios, '9.0'\n\ntarget 'AdUnitsSample' do\n  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks\n  # use_frameworks!\n\n  # Pods for AdUnitsSample\n  pod 'FBAudienceNetwork'\nend\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/ReadMe.txt",
    "content": "AdUnitsSample\n\nIn this sample we demonstrate how to use the Native Ad API (FBNativeAd) from the Facebook Ads SDK for iOS. FBNativeAd gives the flexibility to the to allow developer to render the ad in a more native format that blends into their app. We also show how to wire up the delegate to get notified when the ad status changes over time or when the user interacts with the ad.\n\nWhen running the sample on the simulator, test ads are served by default. On a device however, real ads will be served unless you specify otherwise. If you test your app on a device, please make sure to call the following API to enable test ads: [FBAdSettings addTestDevice:@\"<your device hash printed out on console>\"].\n\nHow to use the sample?\n\n1/ Launch the AdUnitsSample project using Xcode from the <Facebook SDK>/samples/AdUnitsSample directory.\n2/ Open the file ViewController.m and replace \"YOUR_PLACEMENT_ID\" with the Placement ID you created through developer.facebook.com.\n3/ Run the sample on the simulator or on a device.\n"
  },
  {
    "path": "samples/ios/AdUnitsSample/VERSION.bzl",
    "content": "VERSION_CONFIG = {\n    # These are bumped by automation\n    # See https://our.intern.facebook.com/intern/wiki/index.php/Releng/Mobile/Version_numbers\n    \"FB_BUNDLE_VERSION_SHORT\": \"7.0\",\n    \"FB_APP_VERSION\": \"7.0.0.19.473\",\n}\n"
  },
  {
    "path": "samples/ios/FANSample/.gitignore",
    "content": "# Xcode\n\n## Build generated\nbuild/\nDerivedData/\n\n## Various settings\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata/\n\n## Other\n*.moved-aside\n*.xccheckout\n*.xcscmblueprint\n\n# CocoaPods\nPods/\nPodfile.lock\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/AppDelegate.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n        // Override point for customization after application launch.\n\n        FBAudienceNetworkAds.initialize(with: nil, completionHandler: nil)\n\n        FBAdSettings.setAdvertiserTrackingEnabled(true)\n\n        return true\n    }\n\n    // MARK: UISceneSession Lifecycle\n\n    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {\n        // Called when a new scene session is being created.\n        // Use this method to select a configuration to create the new scene with.\n        return UISceneConfiguration(name: \"Default Configuration\", sessionRole: connectingSceneSession.role)\n    }\n\n    func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {\n        // Called when the user discards a scene session.\n        // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.\n        // Use this method to release any resources that were specific to the discarded scenes, as they will not return.\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_20@2x.png\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\",\n      \"filename\" : \"icon_20@3x.png\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_29@2x.png\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\",\n      \"filename\" : \"icon_29@3x.png\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_40@2x.png\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\",\n      \"filename\" : \"icon_40@3x.png\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_60@2x.png\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\",\n      \"filename\" : \"icon_60@3x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"1x\",\n      \"filename\" : \"icon_20@1x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_20@2x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\",\n      \"filename\" : \"icon_29@1x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_29@2x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\",\n      \"filename\" : \"icon_40@1x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_40@2x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\",\n      \"filename\" : \"icon_76@1x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_76@2x.png\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\",\n      \"filename\" : \"icon_83.5@2x.png\"\n    },\n    {\n      \"idiom\" : \"ios-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\",\n      \"filename\" : \"icon_1024@1x.png\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Assets.xcassets/fan.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"fan.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"17156\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"17125\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"System colors in document resources\" minToolsVersion=\"11.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <imageView clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"fan\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Wg8-ML-rqU\">\n                                <rect key=\"frame\" x=\"41.5\" y=\"5\" width=\"331\" height=\"896\"/>\n                            </imageView>\n                        </subviews>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"Wg8-ML-rqU\" firstAttribute=\"centerX\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"centerX\" id=\"0Ju-A7-Fry\"/>\n                            <constraint firstItem=\"Wg8-ML-rqU\" firstAttribute=\"width\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"width\" multiplier=\"0.8\" id=\"1Tu-Gg-OuL\"/>\n                            <constraint firstItem=\"Wg8-ML-rqU\" firstAttribute=\"centerY\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"centerY\" id=\"D0X-Sp-R14\"/>\n                            <constraint firstItem=\"Wg8-ML-rqU\" firstAttribute=\"height\" secondItem=\"Ze5-6b-2t3\" secondAttribute=\"height\" id=\"o5q-2Z-RmW\"/>\n                        </constraints>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"52.173913043478265\" y=\"375\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"fan\" width=\"760.5\" height=\"370\"/>\n        <systemColor name=\"systemBackgroundColor\">\n            <color white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n        </systemColor>\n    </resources>\n</document>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"17156\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"zzo-QI-cvI\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"17125\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"System colors in document resources\" minToolsVersion=\"11.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--Samples View Controller-->\n        <scene sceneID=\"smW-Zh-WAh\">\n            <objects>\n                <tableViewController title=\"Master\" clearsSelectionOnViewWillAppear=\"NO\" id=\"7bK-jq-Zjz\" userLabel=\"Samples View Controller\" customClass=\"SamplesViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"-1\" estimatedRowHeight=\"-1\" sectionHeaderHeight=\"18\" sectionFooterHeight=\"18\" id=\"r7i-6Z-zg0\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <prototypes>\n                            <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"blue\" hidesAccessoryWhenEditing=\"NO\" indentationLevel=\"1\" indentationWidth=\"0.0\" reuseIdentifier=\"AdFormatCell\" textLabel=\"Arm-wq-HPj\" style=\"IBUITableViewCellStyleDefault\" id=\"WCw-Qf-5nD\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"414\" height=\"47.5\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"WCw-Qf-5nD\" id=\"37f-cq-3Eg\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"47.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                    <subviews>\n                                        <label opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" text=\"Ad Format Cell\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"Arm-wq-HPj\">\n                                            <rect key=\"frame\" x=\"20\" y=\"0.0\" width=\"374\" height=\"47.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <fontDescription key=\"fontDescription\" type=\"system\" weight=\"light\" pointSize=\"20\"/>\n                                            <nil key=\"textColor\"/>\n                                            <color key=\"highlightedColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        </label>\n                                    </subviews>\n                                </tableViewCellContentView>\n                                <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                            </tableViewCell>\n                        </prototypes>\n                        <sections/>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"7bK-jq-Zjz\" id=\"Gho-Na-rnu\"/>\n                            <outlet property=\"delegate\" destination=\"7bK-jq-Zjz\" id=\"RA6-mI-bju\"/>\n                        </connections>\n                    </tableView>\n                    <navigationItem key=\"navigationItem\" title=\"Facebook Audience Network\" id=\"Zdf-7t-Un8\">\n                        <barButtonItem key=\"rightBarButtonItem\" image=\"ellipsis.circle\" catalog=\"system\" id=\"5D1-yF-2OW\">\n                            <connections>\n                                <action selector=\"settingsButtonTapped\" destination=\"7bK-jq-Zjz\" id=\"eTG-Bp-hHW\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Rux-fX-hf1\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"5360.8695652173919\" y=\"-618.08035714285711\"/>\n        </scene>\n        <!--Fullscreen Ad Sample View Controller-->\n        <scene sceneID=\"H2R-CK-PZm\">\n            <objects>\n                <viewController storyboardIdentifier=\"FullscreenAdSampleViewController\" id=\"00D-4a-tie\" customClass=\"FullscreenAdSampleViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"eM6-ac-xhb\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"CH0-46-mq3\" customClass=\"BottomBarView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n                                <rect key=\"frame\" x=\"16\" y=\"718\" width=\"382\" height=\"128\"/>\n                                <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"250\" constant=\"128\" id=\"sfD-xI-OwA\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <viewLayoutGuide key=\"safeArea\" id=\"VO4-MI-sZe\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"CH0-46-mq3\" firstAttribute=\"leading\" secondItem=\"VO4-MI-sZe\" secondAttribute=\"leading\" constant=\"16\" id=\"IHY-cM-lZT\"/>\n                            <constraint firstItem=\"VO4-MI-sZe\" firstAttribute=\"bottom\" secondItem=\"CH0-46-mq3\" secondAttribute=\"bottom\" constant=\"16\" id=\"Kwb-80-ZM4\"/>\n                            <constraint firstItem=\"VO4-MI-sZe\" firstAttribute=\"trailing\" secondItem=\"CH0-46-mq3\" secondAttribute=\"trailing\" constant=\"16\" id=\"s0t-aP-TaO\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"bottomBarView\" destination=\"CH0-46-mq3\" id=\"vMT-v5-p5A\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"1jM-re-w2o\" userLabel=\"First Responder\" customClass=\"UIResponder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"2355\" y=\"129\"/>\n        </scene>\n        <!--Banner Sample View Controller-->\n        <scene sceneID=\"yeH-Ff-iLb\">\n            <objects>\n                <viewController storyboardIdentifier=\"BannerSampleViewController\" id=\"6fO-tm-4Zp\" customClass=\"BannerSampleViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"y5A-2O-1pm\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PAq-xo-OA0\" customClass=\"BottomBarView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n                                <rect key=\"frame\" x=\"16\" y=\"718\" width=\"382\" height=\"128\"/>\n                                <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"250\" constant=\"128\" id=\"zuq-8G-F6D\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <viewLayoutGuide key=\"safeArea\" id=\"KcE-lT-f1j\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"KcE-lT-f1j\" firstAttribute=\"trailing\" secondItem=\"PAq-xo-OA0\" secondAttribute=\"trailing\" constant=\"16\" id=\"fiE-J1-hPm\"/>\n                            <constraint firstItem=\"KcE-lT-f1j\" firstAttribute=\"bottom\" secondItem=\"PAq-xo-OA0\" secondAttribute=\"bottom\" constant=\"16\" id=\"gFp-G6-IDM\"/>\n                            <constraint firstItem=\"PAq-xo-OA0\" firstAttribute=\"leading\" secondItem=\"KcE-lT-f1j\" secondAttribute=\"leading\" constant=\"16\" id=\"he5-ZQ-JT0\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"bottomBarView\" destination=\"PAq-xo-OA0\" id=\"Quu-25-Wbm\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"rhM-0k-sb8\" userLabel=\"First Responder\" customClass=\"UIResponder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"3109\" y=\"129\"/>\n        </scene>\n        <!--Native Banner Ad Screen View Controller-->\n        <scene sceneID=\"QoF-61-ysh\">\n            <objects>\n                <viewController storyboardIdentifier=\"NativeBannerAdScreenViewController\" id=\"5uW-NQ-EOz\" customClass=\"NativeBannerAdScreenViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"SCU-s6-DfZ\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"KDt-0A-fNh\" customClass=\"BottomBarView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n                                <rect key=\"frame\" x=\"16\" y=\"614\" width=\"382\" height=\"128\"/>\n                                <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"250\" constant=\"128\" id=\"Pua-5t-Us5\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <viewLayoutGuide key=\"safeArea\" id=\"KLd-Db-clN\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"KLd-Db-clN\" firstAttribute=\"trailing\" secondItem=\"KDt-0A-fNh\" secondAttribute=\"trailing\" constant=\"16\" id=\"4dt-bW-umY\"/>\n                            <constraint firstItem=\"KLd-Db-clN\" firstAttribute=\"bottom\" secondItem=\"KDt-0A-fNh\" secondAttribute=\"bottom\" constant=\"120\" id=\"AR0-XX-onj\"/>\n                            <constraint firstItem=\"KDt-0A-fNh\" firstAttribute=\"leading\" secondItem=\"KLd-Db-clN\" secondAttribute=\"leading\" constant=\"16\" id=\"kr5-MZ-geM\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"bottomBarView\" destination=\"KDt-0A-fNh\" id=\"jgN-5D-yXi\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"H2i-Gy-Ayy\" userLabel=\"First Responder\" customClass=\"UIResponder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"4671\" y=\"129\"/>\n        </scene>\n        <!--Native Ad Screen View Controller-->\n        <scene sceneID=\"rNa-40-Dyw\">\n            <objects>\n                <viewController storyboardIdentifier=\"NativeAdScreenViewController\" id=\"GrF-Ts-Fch\" customClass=\"NativeAdScreenViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"QAU-ob-ctc\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"5bK-Zp-VXJ\" customClass=\"BottomBarView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n                                <rect key=\"frame\" x=\"16\" y=\"718\" width=\"382\" height=\"128\"/>\n                                <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"250\" constant=\"128\" id=\"Q0v-cX-LMa\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <viewLayoutGuide key=\"safeArea\" id=\"s6P-mm-DIu\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"s6P-mm-DIu\" firstAttribute=\"bottom\" secondItem=\"5bK-Zp-VXJ\" secondAttribute=\"bottom\" constant=\"16\" id=\"HSc-LH-ete\"/>\n                            <constraint firstItem=\"5bK-Zp-VXJ\" firstAttribute=\"leading\" secondItem=\"s6P-mm-DIu\" secondAttribute=\"leading\" constant=\"16\" id=\"SXg-pX-lv8\"/>\n                            <constraint firstItem=\"s6P-mm-DIu\" firstAttribute=\"trailing\" secondItem=\"5bK-Zp-VXJ\" secondAttribute=\"trailing\" constant=\"16\" id=\"pln-Zd-myq\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"bottomBarView\" destination=\"5bK-Zp-VXJ\" id=\"gM7-MW-qhl\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Qjh-Cp-Ktx\" userLabel=\"First Responder\" customClass=\"UIResponder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"5459\" y=\"129\"/>\n        </scene>\n        <!--Native Template Screen View Controller-->\n        <scene sceneID=\"3UY-Ub-cF0\">\n            <objects>\n                <viewController storyboardIdentifier=\"NativeTemplateScreenViewController\" id=\"nfh-6R-DCT\" customClass=\"NativeTemplateScreenViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"02O-1G-QGX\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" axis=\"vertical\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"XJN-sZ-WJA\">\n                                <rect key=\"frame\" x=\"16\" y=\"614\" width=\"382\" height=\"88\"/>\n                                <subviews>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"D4t-Ot-Ycm\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"382\" height=\"44\"/>\n                                        <subviews>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Ad Width\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wLi-Bf-dbT\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"12\" width=\"176\" height=\"20.5\"/>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <nil key=\"textColor\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <slider opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" value=\"0.5\" minValue=\"0.0\" maxValue=\"1\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"djs-Ax-zUl\">\n                                                <rect key=\"frame\" x=\"190\" y=\"7\" width=\"194\" height=\"31\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" constant=\"190\" id=\"9OX-Mi-aTC\"/>\n                                                </constraints>\n                                                <connections>\n                                                    <action selector=\"widthSliderValueChangedWithSender:\" destination=\"nfh-6R-DCT\" eventType=\"valueChanged\" id=\"rue-S1-KzA\"/>\n                                                </connections>\n                                            </slider>\n                                        </subviews>\n                                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                        <constraints>\n                                            <constraint firstItem=\"wLi-Bf-dbT\" firstAttribute=\"leading\" secondItem=\"D4t-Ot-Ycm\" secondAttribute=\"leading\" id=\"67r-t9-gDM\"/>\n                                            <constraint firstItem=\"djs-Ax-zUl\" firstAttribute=\"leading\" secondItem=\"wLi-Bf-dbT\" secondAttribute=\"trailing\" constant=\"16\" id=\"Ap6-Uf-X7v\"/>\n                                            <constraint firstItem=\"djs-Ax-zUl\" firstAttribute=\"centerY\" secondItem=\"D4t-Ot-Ycm\" secondAttribute=\"centerY\" id=\"QQf-Lh-0pl\"/>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"djs-Ax-zUl\" secondAttribute=\"trailing\" id=\"Rw9-Ru-jSi\"/>\n                                            <constraint firstAttribute=\"height\" constant=\"44\" id=\"YfR-dB-wxY\"/>\n                                            <constraint firstItem=\"wLi-Bf-dbT\" firstAttribute=\"centerY\" secondItem=\"D4t-Ot-Ycm\" secondAttribute=\"centerY\" id=\"mhU-NU-esp\"/>\n                                        </constraints>\n                                    </view>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"xP4-4L-TAM\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"44\" width=\"382\" height=\"44\"/>\n                                        <subviews>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Ad Height\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"a1m-9W-L9r\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"12\" width=\"176\" height=\"20.5\"/>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <nil key=\"textColor\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <slider opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" value=\"0.5\" minValue=\"0.0\" maxValue=\"1\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yCY-eA-p3c\">\n                                                <rect key=\"frame\" x=\"190\" y=\"7\" width=\"194\" height=\"31\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" constant=\"190\" id=\"H5H-aa-LfM\"/>\n                                                </constraints>\n                                                <connections>\n                                                    <action selector=\"heightSliderValueChangedWithSender:\" destination=\"nfh-6R-DCT\" eventType=\"valueChanged\" id=\"KfP-Hl-zZc\"/>\n                                                </connections>\n                                            </slider>\n                                        </subviews>\n                                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"yCY-eA-p3c\" secondAttribute=\"trailing\" id=\"9AH-c3-XDN\"/>\n                                            <constraint firstItem=\"a1m-9W-L9r\" firstAttribute=\"centerY\" secondItem=\"xP4-4L-TAM\" secondAttribute=\"centerY\" id=\"KLo-SP-DHz\"/>\n                                            <constraint firstAttribute=\"height\" constant=\"44\" id=\"Kap-zm-KGk\"/>\n                                            <constraint firstItem=\"yCY-eA-p3c\" firstAttribute=\"leading\" secondItem=\"a1m-9W-L9r\" secondAttribute=\"trailing\" constant=\"16\" id=\"ewZ-gk-ydh\"/>\n                                            <constraint firstItem=\"a1m-9W-L9r\" firstAttribute=\"leading\" secondItem=\"xP4-4L-TAM\" secondAttribute=\"leading\" id=\"fhV-nf-aGK\"/>\n                                            <constraint firstItem=\"yCY-eA-p3c\" firstAttribute=\"centerY\" secondItem=\"xP4-4L-TAM\" secondAttribute=\"centerY\" id=\"wHy-j5-NhG\"/>\n                                        </constraints>\n                                    </view>\n                                </subviews>\n                            </stackView>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yUT-p9-72Q\" customClass=\"BottomBarView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n                                <rect key=\"frame\" x=\"16\" y=\"718\" width=\"382\" height=\"128\"/>\n                                <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"250\" constant=\"128\" id=\"DR7-4c-98v\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <viewLayoutGuide key=\"safeArea\" id=\"wUs-g7-TyW\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"yUT-p9-72Q\" firstAttribute=\"top\" secondItem=\"XJN-sZ-WJA\" secondAttribute=\"bottom\" constant=\"16\" id=\"2uS-FB-5UM\"/>\n                            <constraint firstItem=\"wUs-g7-TyW\" firstAttribute=\"trailing\" secondItem=\"yUT-p9-72Q\" secondAttribute=\"trailing\" constant=\"16\" id=\"6by-dA-ANF\"/>\n                            <constraint firstItem=\"XJN-sZ-WJA\" firstAttribute=\"leading\" secondItem=\"yUT-p9-72Q\" secondAttribute=\"leading\" id=\"72V-6Y-6fP\"/>\n                            <constraint firstItem=\"wUs-g7-TyW\" firstAttribute=\"bottom\" secondItem=\"yUT-p9-72Q\" secondAttribute=\"bottom\" constant=\"16\" id=\"I18-n3-gnB\"/>\n                            <constraint firstItem=\"XJN-sZ-WJA\" firstAttribute=\"trailing\" secondItem=\"yUT-p9-72Q\" secondAttribute=\"trailing\" id=\"KtN-ra-9D8\"/>\n                            <constraint firstItem=\"yUT-p9-72Q\" firstAttribute=\"leading\" secondItem=\"wUs-g7-TyW\" secondAttribute=\"leading\" constant=\"16\" id=\"ikB-GN-8h5\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"bottomBarView\" destination=\"yUT-p9-72Q\" id=\"UVR-Pw-tc2\"/>\n                        <outlet property=\"heightSlider\" destination=\"yCY-eA-p3c\" id=\"8DT-w6-BLQ\"/>\n                        <outlet property=\"slidersStackView\" destination=\"XJN-sZ-WJA\" id=\"MO9-fN-B5Y\"/>\n                        <outlet property=\"widthSlider\" destination=\"djs-Ax-zUl\" id=\"Duy-4K-cd1\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"z6e-PF-0Fh\" userLabel=\"First Responder\" customClass=\"UIResponder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"3908.6956521739135\" y=\"128.57142857142856\"/>\n        </scene>\n        <!--Native Banner Template Ad Screen View Controller-->\n        <scene sceneID=\"3WQ-lu-q9t\">\n            <objects>\n                <viewController storyboardIdentifier=\"NativeBannerTemplateAdScreenViewController\" id=\"Mxh-tp-Noh\" customClass=\"NativeBannerTemplateAdScreenViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"qWJ-56-sA1\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"2JC-D3-VhI\" customClass=\"BottomBarView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n                                <rect key=\"frame\" x=\"16\" y=\"594\" width=\"382\" height=\"128\"/>\n                                <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" priority=\"250\" constant=\"128\" id=\"tBI-zr-gdp\"/>\n                                </constraints>\n                            </view>\n                            <segmentedControl opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"top\" segmentControlStyle=\"plain\" selectedSegmentIndex=\"0\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"D2p-cK-WrJ\">\n                                <rect key=\"frame\" x=\"144\" y=\"547\" width=\"254\" height=\"32\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"31\" id=\"gfP-9x-Ki4\"/>\n                                </constraints>\n                                <segments>\n                                    <segment title=\"50pt\"/>\n                                    <segment title=\"100pt\"/>\n                                    <segment title=\"120pt\"/>\n                                </segments>\n                                <connections>\n                                    <action selector=\"segmentedControlValueChangedWithSender:\" destination=\"Mxh-tp-Noh\" eventType=\"valueChanged\" id=\"PTl-tD-oM6\"/>\n                                </connections>\n                            </segmentedControl>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Template Type\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"C9e-fg-Xlq\">\n                                <rect key=\"frame\" x=\"16\" y=\"552\" width=\"112\" height=\"21\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                        </subviews>\n                        <viewLayoutGuide key=\"safeArea\" id=\"dTY-iJ-cfB\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <constraints>\n                            <constraint firstItem=\"2JC-D3-VhI\" firstAttribute=\"top\" secondItem=\"D2p-cK-WrJ\" secondAttribute=\"bottom\" constant=\"16\" id=\"8Wg-CX-J0h\"/>\n                            <constraint firstItem=\"C9e-fg-Xlq\" firstAttribute=\"leading\" secondItem=\"2JC-D3-VhI\" secondAttribute=\"leading\" id=\"Aa5-1Z-yWS\"/>\n                            <constraint firstItem=\"D2p-cK-WrJ\" firstAttribute=\"trailing\" secondItem=\"2JC-D3-VhI\" secondAttribute=\"trailing\" id=\"VI7-ru-gSb\"/>\n                            <constraint firstItem=\"D2p-cK-WrJ\" firstAttribute=\"leading\" secondItem=\"C9e-fg-Xlq\" secondAttribute=\"trailing\" constant=\"16\" id=\"aXe-0B-7VW\"/>\n                            <constraint firstItem=\"dTY-iJ-cfB\" firstAttribute=\"bottom\" secondItem=\"2JC-D3-VhI\" secondAttribute=\"bottom\" constant=\"140\" id=\"b4Q-wA-EZ2\"/>\n                            <constraint firstItem=\"2JC-D3-VhI\" firstAttribute=\"leading\" secondItem=\"dTY-iJ-cfB\" secondAttribute=\"leading\" constant=\"16\" id=\"ml9-Jc-wwK\"/>\n                            <constraint firstItem=\"C9e-fg-Xlq\" firstAttribute=\"centerY\" secondItem=\"D2p-cK-WrJ\" secondAttribute=\"centerY\" id=\"rJr-SG-des\"/>\n                            <constraint firstItem=\"dTY-iJ-cfB\" firstAttribute=\"trailing\" secondItem=\"2JC-D3-VhI\" secondAttribute=\"trailing\" constant=\"16\" id=\"vq6-gq-hHa\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"bottomBarView\" destination=\"2JC-D3-VhI\" id=\"6eY-gZ-m4d\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"zYm-m9-q3G\" userLabel=\"First Responder\" customClass=\"UIResponder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"6221.739130434783\" y=\"128.57142857142856\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"xmC-0B-Tva\">\n            <objects>\n                <navigationController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"zzo-QI-cvI\" customClass=\"NavigationController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <toolbarItems/>\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" id=\"lXz-vw-WWO\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"44\" width=\"414\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <nil name=\"viewControllers\"/>\n                    <connections>\n                        <segue destination=\"7bK-jq-Zjz\" kind=\"relationship\" relationship=\"rootViewController\" id=\"rLf-k6-cI3\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"xcS-LW-hdc\" userLabel=\"First Responder\" customClass=\"UIResponder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"4393\" y=\"-618\"/>\n        </scene>\n        <!--Settings Screen View Controller-->\n        <scene sceneID=\"r15-M9-CFx\">\n            <objects>\n                <tableViewController storyboardIdentifier=\"SettingScreenViewController\" title=\"Master\" clearsSelectionOnViewWillAppear=\"NO\" id=\"4AI-Uw-gbe\" userLabel=\"Settings Screen View Controller\" customClass=\"SettingScreenViewController\" customModule=\"FANSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"-1\" estimatedRowHeight=\"-1\" sectionHeaderHeight=\"18\" sectionFooterHeight=\"18\" id=\"ica-cD-nsR\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                        <sections/>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"4AI-Uw-gbe\" id=\"FcW-b6-kv8\"/>\n                            <outlet property=\"delegate\" destination=\"4AI-Uw-gbe\" id=\"ad3-Nn-wag\"/>\n                        </connections>\n                    </tableView>\n                    <navigationItem key=\"navigationItem\" title=\"Facebook Audience Network\" id=\"Z0m-N3-4wd\">\n                        <barButtonItem key=\"rightBarButtonItem\" image=\"xmark\" catalog=\"system\" id=\"Nfq-Qt-52H\">\n                            <connections>\n                                <action selector=\"dismissButtonTapped\" destination=\"4AI-Uw-gbe\" id=\"0vp-eR-kfu\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"UG9-z1-UIg\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"6248\" y=\"-618\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"ellipsis.circle\" catalog=\"system\" width=\"128\" height=\"121\"/>\n        <image name=\"xmark\" catalog=\"system\" width=\"128\" height=\"113\"/>\n        <systemColor name=\"systemBackgroundColor\">\n            <color white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n        </systemColor>\n    </resources>\n</document>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Extensions/NSObject+ClassName.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport Foundation\n\nextension NSObject {\n    var className: String {\n        return String(describing: type(of: self))\n    }\n    \n    class var className: String {\n        return String(describing: self)\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Extensions/UIView+NibContent.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nextension UIView {\n    @discardableResult\n    func fromNib<T : UIView>() -> T? {\n        guard let contentView = Bundle(for: type(of: self)).loadNibNamed(type(of: self).className, owner: self, options: nil)?.first as? T else {\n            return nil\n        }\n        addSubview(contentView)\n        contentView.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            contentView.leadingAnchor.constraint(equalTo: safeAreaLayoutGuide.leadingAnchor),\n            contentView.trailingAnchor.constraint(equalTo: safeAreaLayoutGuide.trailingAnchor),\n            contentView.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor),\n            contentView.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor)\n        ])\n        return contentView\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Extensions/UIViewController+Storyboard.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nextension UIViewController {\n    static func create<ViewControllerType: UIViewController>() -> ViewControllerType {\n        UIStoryboard(\n            name: \"Main\",\n            bundle: nil\n        )\n        .instantiateViewController(\n            identifier: Self.className\n        ) as! ViewControllerType\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t\t<key>UISceneStoryboardFile</key>\n\t\t\t\t\t<string>Main</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UIStatusBarTintParameters</key>\n\t<dict>\n\t\t<key>UINavigationBar</key>\n\t\t<dict>\n\t\t\t<key>Style</key>\n\t\t\t<string>UIBarStyleDefault</string>\n\t\t\t<key>Translucent</key>\n\t\t\t<false/>\n\t\t</dict>\n\t</dict>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/BannerSampleViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nenum BannerAdType {\n    case banner, mediumRect\n\n    var title: String {\n        switch self {\n        case .banner:\n            return \"Banner\"\n        case .mediumRect:\n            return \"Medium Rectangle\"\n        }\n    }\n}\n\nfinal class BannerSampleViewController: UIViewController {\n\n    // MARK: - Properties\n\n    private var adType: BannerAdType\n    private var adView: FBAdView?\n\n    private var adSize: FBAdSize {\n        switch adType {\n        case .banner:\n            let isRegularWidth = traitCollection.horizontalSizeClass == .regular\n            return isRegularWidth ? kFBAdSizeHeight90Banner : kFBAdSizeHeight50Banner\n        case .mediumRect:\n            return kFBAdSizeHeight250Rectangle\n        }\n    }\n\n    private let statusLabel = UILabel()\n    @IBOutlet private weak var bottomBarView: BottomBarView!\n\n    // MARK: - Setup and Lifecylce\n\n    static func create(adType: BannerAdType) -> BannerSampleViewController {\n        let vc: BannerSampleViewController = BannerSampleViewController.create()\n        vc.adType = adType\n        return vc\n    }\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        navigationItem.title = adType.title\n\n        setupStatusLabel()\n        loadAd()\n\n        bottomBarView.tapHandler = { [weak self] in\n            self?.loadAd()\n        }\n    }\n\n    required init?(coder: NSCoder) {\n        self.adType = .banner\n        super.init(coder: coder)\n    }\n\n    private func setupStatusLabel() {\n        view.addSubview(statusLabel)\n        statusLabel.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            statusLabel.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16),\n            statusLabel.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16),\n            statusLabel.bottomAnchor.constraint(equalTo: bottomBarView.topAnchor, constant: -16)\n        ])\n        statusLabel.textAlignment = .center\n        statusLabel.numberOfLines = 0\n    }\n\n    // MARK: Helpers\n\n    private func loadAd() {\n        adView?.removeFromSuperview()\n        adView = createNewAd()\n        adView?.loadAd()\n        statusLabel.text = AdStatus.isLoading.debugDescription\n    }\n\n    private func createNewAd() -> FBAdView {\n        let adView = FBAdView(placementID: \"YOUR_PLACEMENT_ID\", adSize: adSize, rootViewController: self)\n        adView.delegate = self\n        return adView\n    }\n}\n\n// MARK: FBAdViewDelegate\n\nextension BannerSampleViewController: FBAdViewDelegate {\n\n    func adViewDidLoad(_ adView: FBAdView) {\n        statusLabel.text = AdStatus.didLoad.debugDescription\n\n        adView.backgroundColor = .clear\n        adView.translatesAutoresizingMaskIntoConstraints = false\n\n        view.addSubview(adView)\n\n        NSLayoutConstraint.activate([\n            adView.heightAnchor.constraint(equalToConstant: adSize.size.height),\n            adView.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n            adView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 30)\n        ])\n\n        if adSize.size == kFBAdSizeHeight250Rectangle.size {\n            NSLayoutConstraint.activate([adView.widthAnchor.constraint(equalToConstant: 300)])\n        } else {\n            NSLayoutConstraint.activate([\n                adView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),\n                adView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor)\n            ])\n        }\n    }\n\n    func adViewDidClick(_ adView: FBAdView) {\n        statusLabel.text = AdStatus.didClick.debugDescription\n    }\n\n    func adViewDidFinishHandlingClick(_ adView: FBAdView) {\n        statusLabel.text = AdStatus.didFinishHandlingClick.debugDescription\n    }\n\n    func adView(_ adView: FBAdView, didFailWithError error: Error) {\n        statusLabel.text = AdStatus.failure(error).debugDescription\n    }\n\n    func adViewWillLogImpression(_ adView: FBAdView) {\n        statusLabel.text = AdStatus.willLogImpression.debugDescription\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/FullscreenAdSampleViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport os\nimport UIKit\nimport FBAudienceNetwork\n\nprotocol FullscreenAd {\n    func load()\n    func show(from viewController: UIViewController)\n}\n\nextension FBInterstitialAd: FullscreenAd {\n    func show(from viewController: UIViewController) {\n        self.show(fromRootViewController: viewController)\n    }\n}\n\nextension FBRewardedVideoAd: FullscreenAd {\n    func show(from viewController: UIViewController) {\n        self.show(fromRootViewController: viewController)\n    }\n}\n\nextension FBRewardedInterstitialAd: FullscreenAd {\n    func show(from viewController: UIViewController) {\n        self.show(fromRootViewController: viewController, animated: true)\n    }\n}\n\nenum FullscreenAdType {\n    case interstitial, rewardedVideo, rewardedInterstitial\n\n    var title: String {\n        switch self {\n        case .interstitial:\n            return \"Interstitial\"\n        case .rewardedVideo:\n            return \"Rewarded video\"\n        case .rewardedInterstitial:\n            return \"Rewarded interstitial\"\n        }\n    }\n}\n\nfinal class FullscreenAdSampleViewController: UIViewController {\n\n    // MARK: - Properties\n\n    private var adType: FullscreenAdType\n    private var ad: FullscreenAd? {\n        didSet {\n            if let ad = ad as? FBInterstitialAd {\n                ad.delegate = self\n            } else if let ad = ad as? FBRewardedVideoAd {\n                ad.delegate = self\n            } else if let ad = ad as? FBRewardedInterstitialAd {\n                ad.delegate = self\n            }\n        }\n    }\n\n    private var state: LoadingState = .initial {\n        didSet {\n            switch state {\n            case .initial:\n                bottomBarView.set(buttonTitle: \"Load Ad\", isEnabled: true)\n            case .loading:\n                bottomBarView.set(buttonTitle: \"Loading\", isEnabled: false)\n            case .loaded:\n                bottomBarView.set(buttonTitle: \"Show Ad\", isEnabled: true)\n            case .error(let message):\n                bottomBarView.set(buttonTitle: \"Retry\", isEnabled: true)\n                let alert = UIAlertController(title: \"Error\", message: message, preferredStyle: .alert)\n                alert.addAction(UIAlertAction(title: \"Close\", style: .cancel, handler: nil))\n                present(alert, animated: true)\n            }\n        }\n    }\n\n    @IBOutlet private var bottomBarView: BottomBarView!\n\n    // MARK: - Lifecycle and Setup\n\n    static func create(adType: FullscreenAdType) -> UIViewController {\n        let vc: FullscreenAdSampleViewController = FullscreenAdSampleViewController.create()\n        vc.adType = adType\n        return vc\n    }\n\n    required init?(coder: NSCoder) {\n        self.adType = .interstitial\n        super.init(coder: coder)\n    }\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        ad = createNewAd()\n        navigationItem.title = \"\\(adType.title) Ad\"\n\n        bottomBarView.tapHandler = { [weak self] in\n            self?.handleTap()\n        }\n    }\n\n    // MARK: - Helpers\n\n    private func handleTap() {\n        switch state {\n        case .initial:\n            loadAd()\n        case .loading, .error:\n            ad = createNewAd()\n            loadAd()\n        case .loaded:\n            ad?.show(from: self)\n        }\n    }\n\n    private func loadAd() {\n        state = .loading\n        ad?.load()\n    }\n\n    private func createNewAd() -> FullscreenAd {\n        let placementID = \"YOUR_PLACEMENT_ID\"\n        switch adType {\n        case .interstitial:\n            return FBInterstitialAd(placementID: placementID)\n        case .rewardedVideo:\n            return FBRewardedVideoAd(placementID: placementID)\n        case .rewardedInterstitial:\n            return FBRewardedInterstitialAd(placementID: placementID)\n        }\n    }\n}\n\n// MARK: - FBInterstitialAdDelegate\n\nextension FullscreenAdSampleViewController: FBInterstitialAdDelegate {\n\n    func interstitialAdDidLoad(_ interstitialAd: FBInterstitialAd) {\n        ad = interstitialAd\n        state = .loaded\n    }\n\n    func interstitialAd(_ interstitialAd: FBInterstitialAd, didFailWithError error: Error) {\n        state = .error(message: error.localizedDescription)\n    }\n\n    func interstitialAdDidClick(_ interstitialAd: FBInterstitialAd) {\n\n    }\n\n    func interstitialAdDidClose(_ interstitialAd: FBInterstitialAd) {\n        ad = createNewAd()\n        state = .initial\n    }\n\n    func interstitialAdWillClose(_ interstitialAd: FBInterstitialAd) {\n\n    }\n\n    func interstitialAdWillLogImpression(_ interstitialAd: FBInterstitialAd) {\n\n    }\n}\n\n// MARK: - FBRewardedVideoAdDelegate\n\nextension FullscreenAdSampleViewController: FBRewardedVideoAdDelegate {\n\n    func rewardedVideoAdDidLoad(_ rewardedVideoAd: FBRewardedVideoAd) {\n        ad = rewardedVideoAd\n        state = .loaded\n    }\n\n    func rewardedVideoAd(_ rewardedVideoAd: FBRewardedVideoAd, didFailWithError error: Error) {\n        state = .error(message: error.localizedDescription)\n    }\n\n    func rewardedVideoAdDidClick(_ rewardedVideoAd: FBRewardedVideoAd) {\n\n    }\n\n    func rewardedVideoAdDidClose(_ rewardedVideoAd: FBRewardedVideoAd) {\n        ad = createNewAd()\n        state = .initial\n    }\n\n    func rewardedVideoAdServerRewardDidFail(_ rewardedVideoAd: FBRewardedVideoAd) {\n\n    }\n\n    func rewardedVideoAdVideoComplete(_ rewardedVideoAd: FBRewardedVideoAd) {\n\n    }\n\n    func rewardedVideoAdServerRewardDidSucceed(_ rewardedVideoAd: FBRewardedVideoAd) {\n\n    }\n\n    func rewardedVideoAdWillClose(_ rewardedVideoAd: FBRewardedVideoAd) {\n\n    }\n\n    func rewardedVideoAdWillLogImpression(_ rewardedVideoAd: FBRewardedVideoAd) {\n\n    }\n}\n\nextension FullscreenAdSampleViewController: FBRewardedInterstitialAdDelegate {\n    func rewardedInterstitialAdDidLoad(_ rewardedInterstitialAd: FBRewardedInterstitialAd) {\n        os_log(\"Rewarded interstitial ad was loaded. Can present now.\")\n        ad = rewardedInterstitialAd\n        state = .loaded\n    }\n    \n    func rewardedInterstitialAd(_ rewardedInterstitialAd: FBRewardedInterstitialAd, didFailWithError error: Error) {\n        let error = error as NSError\n        os_log(\"Rewarded interstitial failed to load with error: %@\", error.description)\n        state = .error(message: \"Rewarded interstitial ad failed to load. \\(error.localizedDescription)\")\n    }\n    \n    func rewardedInterstitialAdDidClick(_ rewardedInterstitialAd: FBRewardedInterstitialAd) {\n        os_log(\"Rewarded interstitial was clicked.\")\n    }\n    \n    func rewardedInterstitialAdDidClose(_ rewardedInterstitialAd: FBRewardedInterstitialAd) {\n        os_log(\"Rewarded interstitial closed.\")\n    }\n    \n    func rewardedInterstitialAdWillClose(_ rewardedInterstitialAd: FBRewardedInterstitialAd) {\n        os_log(\"Rewarded interstitial will close.\")\n    }\n    \n    func rewardedInterstitialAdWillLogImpression(_ rewardedInterstitialAd: FBRewardedInterstitialAd) {\n        os_log(\"Rewarded impression is being captured.\")\n    }\n    \n    func rewardedInterstitialAdVideoComplete(_ rewardedInterstitialAd: FBRewardedInterstitialAd) {\n        os_log(\"Rewarded interstitial ad video completed.\")\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/Native/NativeAdScreenViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nfinal class NativeAdScreenViewController: UIViewController {\n\n    // MARK: - Properties\n\n    override var shouldAutorotate: Bool {\n        false\n    }\n\n    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {\n        [.portrait, .portraitUpsideDown]\n    }\n\n    @IBOutlet private var bottomBarView: BottomBarView!\n\n    private var adView: NativeAdView!\n    private let statusLabel = UILabel()\n\n    // MARK: - Lifecycle\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        navigationItem.title = AdFormatInfo.native.title\n        setupSubviews()\n\n        bottomBarView.tapHandler = { [weak adView] in\n            adView?.load()\n        }\n    }\n\n    // MARK: - UI Setup\n\n    private func setupSubviews() {\n\n        // Configure a status label that reports ad load status\n\n        view.addSubview(statusLabel)\n        statusLabel.translatesAutoresizingMaskIntoConstraints = false\n        statusLabel.textAlignment = .center\n        statusLabel.numberOfLines = 0\n\n        // Configure an Ad view that shows the layout of the ad\n\n        adView = NativeAdView(ownerViewController: self) { [weak self] status in\n            self?.statusLabel.text = status.debugDescription\n        }\n        view.addSubview(adView)\n        adView.translatesAutoresizingMaskIntoConstraints = false\n\n        // Setup constraints\n\n        NSLayoutConstraint.activate([\n            statusLabel.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16),\n            statusLabel.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16),\n            statusLabel.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 16)\n        ])\n\n        NSLayoutConstraint.activate([\n            adView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16),\n            adView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16),\n            adView.bottomAnchor.constraint(equalTo: bottomBarView.safeAreaLayoutGuide.topAnchor, constant: -32),\n            adView.heightAnchor.constraint(equalToConstant: 300)\n        ])\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/Native/NativeAdView.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nfinal class NativeAdView: UIView {\n\n    // MARK: - Properties\n\n    @IBOutlet private var iconView: FBMediaView!\n    @IBOutlet private var coverView: FBMediaView!\n    @IBOutlet private var optionsView: FBAdOptionsView!\n    @IBOutlet private var titleLabel: UILabel!\n    @IBOutlet private var bodyLabel: UILabel!\n    @IBOutlet private var sponsoredLabel: UILabel!\n    @IBOutlet private var socialContextLabel: UILabel!\n    @IBOutlet private var callToActionButton: UIButton!\n\n    @IBOutlet private var bodyLabelTrailingToCTAButtonConstraint: NSLayoutConstraint!\n    @IBOutlet private var bodyLabelTrailingToSuperviewConstraint: NSLayoutConstraint!\n\n    private var ad: FBNativeAd?\n    private let updateStatus: AdStatusUpdate\n    private weak var ownerViewController: UIViewController?\n\n    // MARK: - Setup\n\n    init(ownerViewController: UIViewController, updateStatus: @escaping AdStatusUpdate) {\n        self.ownerViewController = ownerViewController\n        self.updateStatus = updateStatus\n        super.init(frame: .zero)\n        fromNib()\n\n        coverView.delegate = self\n        optionsView.isHidden = true\n    }\n\n    @available(*, unavailable)\n    required init?(coder: NSCoder) { nil }\n\n    func load() {\n\n        updateStatus(.isLoading)\n\n        /// Hide the view before loading a new one\n        isHidden = true\n\n        // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n        // Use different ID for each ad placement in your app.\n        let ad = FBNativeAd(placementID: \"YOUR_PLACEMENT_ID\")\n\n        // Set the delegate of the ad object before loading the ad\n        ad.delegate = self\n\n        // Initiate a request to load an ad.\n        ad.loadAd()\n    }\n\n    private func setupCallToActionButton(with title: String?) {\n        guard let title = title else {\n            callToActionButton.isHidden = true\n            return\n        }\n        callToActionButton.isHidden = false\n        callToActionButton.setTitle(title, for: .normal)\n    }\n}\n\n// MARK - FBNativeAdDelegate\n\nextension NativeAdView: FBNativeAdDelegate {\n    func nativeAdDidLoad(_ nativeAd: FBNativeAd) {\n        updateStatus(.didLoad)\n\n        if let ad = ad {\n            ad.unregisterView()\n        }\n\n        isHidden = false\n\n        ad = nativeAd\n        titleLabel.text = nativeAd.advertiserName\n        bodyLabel.text = nativeAd.bodyText\n        socialContextLabel.text = nativeAd.socialContext\n        sponsoredLabel.text = nativeAd.sponsoredTranslation\n        setupCallToActionButton(with: nativeAd.callToAction)\n\n        if let callToAction = nativeAd.callToAction, !callToAction.isEmpty {\n            bodyLabelTrailingToCTAButtonConstraint.priority = .defaultHigh\n            bodyLabelTrailingToSuperviewConstraint.priority = .defaultLow\n        } else {\n            bodyLabelTrailingToSuperviewConstraint.priority = .defaultHigh\n            bodyLabelTrailingToCTAButtonConstraint.priority = .defaultLow\n        }\n\n        print(\"Register UIView for impression and click...\")\n\n        // Set native ad view tags to declare roles of your views for better analysis in future\n        // We will be able to provide you statistics how often these views were clicked by users\n        // Views provided by Facebook already have appropriate tag set\n        titleLabel.nativeAdViewTag = .title\n        bodyLabel.nativeAdViewTag = .body\n        socialContextLabel.nativeAdViewTag = .socialContext\n        callToActionButton.nativeAdViewTag = .callToAction\n\n        // Specify the clickable areas. Views you were using to set ad view tags should be clickable.\n        let clickableViews: [UIView] = [\n            iconView,\n            titleLabel,\n            bodyLabel,\n            socialContextLabel,\n            callToActionButton\n        ]\n        nativeAd.registerView(\n            forInteraction: self,\n            mediaView: coverView,\n            iconView: iconView,\n            viewController: ownerViewController,\n            clickableViews: clickableViews\n        )\n\n        // You may want to use this method if you want to have all subviews clickable\n//        nativeAd.registerView(\n//            forInteraction: self,\n//            mediaView: coverView,\n//            iconView: iconView,\n//            viewController: ownerViewController\n//        )\n\n        optionsView.isHidden = false\n        optionsView.nativeAd = nativeAd\n\n        layoutIfNeeded()\n    }\n\n    func nativeAdDidClick(_ nativeAd: FBNativeAd) {\n        updateStatus(.didClick)\n    }\n\n    func nativeAdDidDownloadMedia(_ nativeAd: FBNativeAd) {\n        updateStatus(.didDownloadMedia)\n    }\n\n    func nativeAdWillLogImpression(_ nativeAd: FBNativeAd) {\n        updateStatus(.willLogImpression)\n    }\n\n    func nativeAdDidFinishHandlingClick(_ nativeAd: FBNativeAd) {\n        updateStatus(.didFinishHandlingClick)\n    }\n\n    func nativeAd(_ nativeAd: FBNativeAd, didFailWithError error: Error) {\n        updateStatus(.failure(error))\n    }\n}\n\n// MARK: - FBMediaViewDelegate\n\nextension NativeAdView: FBMediaViewDelegate {\n    func mediaViewDidLoad(_ mediaView: FBMediaView) {\n        print(\"Media view did load\")\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/Native/NativeAdView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"17156\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"17125\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"System colors in document resources\" minToolsVersion=\"11.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\" customClass=\"NativeAdView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"bodyLabel\" destination=\"gEH-2q-0WQ\" id=\"e3s-qy-xMV\"/>\n                <outlet property=\"bodyLabelTrailingToCTAButtonConstraint\" destination=\"voB-UY-BNx\" id=\"OJx-nR-w3p\"/>\n                <outlet property=\"bodyLabelTrailingToSuperviewConstraint\" destination=\"2bo-kZ-KaE\" id=\"l8P-GY-Kvb\"/>\n                <outlet property=\"callToActionButton\" destination=\"eqJ-5J-Rot\" id=\"ZQ6-Kz-vTX\"/>\n                <outlet property=\"coverView\" destination=\"h9A-AT-ISN\" id=\"ApM-Ia-MNd\"/>\n                <outlet property=\"iconView\" destination=\"fMS-9m-u43\" id=\"xxk-bX-VVI\"/>\n                <outlet property=\"optionsView\" destination=\"JGT-HK-Xy7\" id=\"LUt-82-fYo\"/>\n                <outlet property=\"socialContextLabel\" destination=\"pir-Yn-zKy\" id=\"sfl-11-4F9\"/>\n                <outlet property=\"sponsoredLabel\" destination=\"x3w-u3-DZL\" id=\"EUn-VS-nLj\"/>\n                <outlet property=\"titleLabel\" destination=\"0VX-dF-Ie6\" id=\"7nK-Rc-lxZ\"/>\n            </connections>\n        </placeholder>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"9no-ww-u3z\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"200\"/>\n            <subviews>\n                <view contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"fMS-9m-u43\" userLabel=\"Icon View\" customClass=\"FBMediaView\">\n                    <rect key=\"frame\" x=\"8\" y=\"8\" width=\"38\" height=\"38\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" secondItem=\"fMS-9m-u43\" secondAttribute=\"height\" multiplier=\"1:1\" id=\"ZLp-Jl-Ksx\"/>\n                    </constraints>\n                </view>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" preferredMaxLayoutWidth=\"256\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"0VX-dF-Ie6\" userLabel=\"Title Label\">\n                    <rect key=\"frame\" x=\"52\" y=\"8\" width=\"0.0\" height=\"22\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" relation=\"lessThanOrEqual\" constant=\"187\" id=\"8Xr-r1-4Iw\"/>\n                        <constraint firstAttribute=\"height\" constant=\"22\" id=\"f4w-cC-4un\"/>\n                    </constraints>\n                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"16\"/>\n                    <nil key=\"textColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n                <view userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"h9A-AT-ISN\" userLabel=\"Cover View\" customClass=\"FBMediaView\">\n                    <rect key=\"frame\" x=\"8\" y=\"53\" width=\"398\" height=\"62\"/>\n                </view>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" numberOfLines=\"3\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" preferredMaxLayoutWidth=\"191\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"gEH-2q-0WQ\" userLabel=\"Body Label\">\n                    <rect key=\"frame\" x=\"8\" y=\"140\" width=\"289\" height=\"50\"/>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                    <nil key=\"textColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"pir-Yn-zKy\" userLabel=\"Social Context Label\">\n                    <rect key=\"frame\" x=\"8\" y=\"123\" width=\"0.0\" height=\"15\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" constant=\"15\" id=\"sQm-Do-Jds\"/>\n                    </constraints>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"10\"/>\n                    <nil key=\"textColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n                <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"x3w-u3-DZL\" userLabel=\"Sponsored Label\">\n                    <rect key=\"frame\" x=\"52\" y=\"30\" width=\"0.0\" height=\"16\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" constant=\"16\" id=\"hAa-2Z-OKH\"/>\n                    </constraints>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"10\"/>\n                    <color key=\"textColor\" systemColor=\"secondaryLabelColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n                <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"eqJ-5J-Rot\" userLabel=\"Call To Action Button\">\n                    <rect key=\"frame\" x=\"306\" y=\"140\" width=\"100\" height=\"28\"/>\n                    <color key=\"backgroundColor\" red=\"0.35686274509999999\" green=\"0.57647058819999997\" blue=\"0.98823529409999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" constant=\"100\" id=\"42M-2h-pWh\"/>\n                        <constraint firstAttribute=\"height\" constant=\"28\" id=\"UUQ-HY-dNr\"/>\n                    </constraints>\n                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"12\"/>\n                    <state key=\"normal\">\n                        <color key=\"titleColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                    </state>\n                </button>\n                <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"JGT-HK-Xy7\" userLabel=\"Options View\" customClass=\"FBAdOptionsView\">\n                    <rect key=\"frame\" x=\"360\" y=\"8\" width=\"46\" height=\"18\"/>\n                    <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" constant=\"18\" id=\"2s6-LR-a6W\"/>\n                        <constraint firstAttribute=\"width\" constant=\"46\" id=\"RET-IF-8bo\"/>\n                    </constraints>\n                </view>\n            </subviews>\n            <viewLayoutGuide key=\"safeArea\" id=\"LUr-C1-Drc\"/>\n            <constraints>\n                <constraint firstItem=\"h9A-AT-ISN\" firstAttribute=\"trailing\" secondItem=\"gEH-2q-0WQ\" secondAttribute=\"trailing\" priority=\"250\" id=\"2bo-kZ-KaE\"/>\n                <constraint firstItem=\"h9A-AT-ISN\" firstAttribute=\"leading\" secondItem=\"pir-Yn-zKy\" secondAttribute=\"leading\" id=\"3JZ-TO-qEs\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"h9A-AT-ISN\" secondAttribute=\"trailing\" constant=\"8\" id=\"EGL-Og-ECF\"/>\n                <constraint firstItem=\"0VX-dF-Ie6\" firstAttribute=\"leading\" secondItem=\"x3w-u3-DZL\" secondAttribute=\"leading\" id=\"EPJ-9P-e0H\"/>\n                <constraint firstItem=\"gEH-2q-0WQ\" firstAttribute=\"top\" secondItem=\"eqJ-5J-Rot\" secondAttribute=\"top\" id=\"EtV-a7-RKt\"/>\n                <constraint firstItem=\"h9A-AT-ISN\" firstAttribute=\"top\" secondItem=\"fMS-9m-u43\" secondAttribute=\"bottom\" constant=\"7\" id=\"FJ2-7t-Ep8\"/>\n                <constraint firstItem=\"pir-Yn-zKy\" firstAttribute=\"top\" secondItem=\"h9A-AT-ISN\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"GiV-aM-uSe\"/>\n                <constraint firstAttribute=\"height\" priority=\"999\" constant=\"295\" id=\"PX1-6A-tyv\"/>\n                <constraint firstItem=\"eqJ-5J-Rot\" firstAttribute=\"top\" secondItem=\"pir-Yn-zKy\" secondAttribute=\"bottom\" constant=\"2\" id=\"QHt-nE-SIi\"/>\n                <constraint firstItem=\"pir-Yn-zKy\" firstAttribute=\"leading\" secondItem=\"gEH-2q-0WQ\" secondAttribute=\"leading\" id=\"RnE-yW-ow7\"/>\n                <constraint firstItem=\"fMS-9m-u43\" firstAttribute=\"leading\" secondItem=\"9no-ww-u3z\" secondAttribute=\"leading\" constant=\"8\" id=\"Thx-D5-fld\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"JGT-HK-Xy7\" secondAttribute=\"trailing\" constant=\"8\" id=\"U6d-jr-yTT\"/>\n                <constraint firstItem=\"JGT-HK-Xy7\" firstAttribute=\"top\" secondItem=\"0VX-dF-Ie6\" secondAttribute=\"top\" id=\"Xuo-L4-baN\"/>\n                <constraint firstItem=\"x3w-u3-DZL\" firstAttribute=\"leading\" secondItem=\"fMS-9m-u43\" secondAttribute=\"trailing\" constant=\"6\" id=\"YOB-Cq-Mzy\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"eqJ-5J-Rot\" secondAttribute=\"bottom\" constant=\"32\" id=\"Zyc-mV-gJl\"/>\n                <constraint firstItem=\"h9A-AT-ISN\" firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"pir-Yn-zKy\" secondAttribute=\"trailing\" id=\"bfc-Gs-X5A\"/>\n                <constraint firstItem=\"x3w-u3-DZL\" firstAttribute=\"top\" secondItem=\"0VX-dF-Ie6\" secondAttribute=\"bottom\" id=\"fbY-Yf-4cj\"/>\n                <constraint firstItem=\"fMS-9m-u43\" firstAttribute=\"leading\" secondItem=\"h9A-AT-ISN\" secondAttribute=\"leading\" id=\"i40-NO-peX\"/>\n                <constraint firstItem=\"fMS-9m-u43\" firstAttribute=\"top\" secondItem=\"0VX-dF-Ie6\" secondAttribute=\"top\" id=\"kgQ-oR-lhl\"/>\n                <constraint firstItem=\"h9A-AT-ISN\" firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"x3w-u3-DZL\" secondAttribute=\"trailing\" id=\"oN3-6H-Lhr\"/>\n                <constraint firstItem=\"h9A-AT-ISN\" firstAttribute=\"top\" secondItem=\"x3w-u3-DZL\" secondAttribute=\"bottom\" constant=\"7\" id=\"rhg-dN-rNo\"/>\n                <constraint firstAttribute=\"width\" secondItem=\"9no-ww-u3z\" secondAttribute=\"height\" multiplier=\"316:295\" priority=\"999\" id=\"t6Y-75-w9S\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"gEH-2q-0WQ\" secondAttribute=\"bottom\" constant=\"10\" id=\"uJX-Wh-EI1\"/>\n                <constraint firstItem=\"eqJ-5J-Rot\" firstAttribute=\"leading\" secondItem=\"gEH-2q-0WQ\" secondAttribute=\"trailing\" priority=\"750\" constant=\"9\" id=\"voB-UY-BNx\"/>\n                <constraint firstItem=\"fMS-9m-u43\" firstAttribute=\"top\" secondItem=\"9no-ww-u3z\" secondAttribute=\"top\" constant=\"8\" id=\"wLh-Xg-JrU\"/>\n                <constraint firstItem=\"JGT-HK-Xy7\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"0VX-dF-Ie6\" secondAttribute=\"trailing\" constant=\"10\" id=\"y1e-DZ-WhF\"/>\n                <constraint firstItem=\"eqJ-5J-Rot\" firstAttribute=\"trailing\" secondItem=\"h9A-AT-ISN\" secondAttribute=\"trailing\" id=\"zuK-Hg-5XM\"/>\n            </constraints>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <point key=\"canvasLocation\" x=\"-71\" y=\"-520\"/>\n        </view>\n    </objects>\n    <resources>\n        <systemColor name=\"secondaryLabelColor\">\n            <color red=\"0.23529411764705882\" green=\"0.23529411764705882\" blue=\"0.2627450980392157\" alpha=\"0.59999999999999998\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n        </systemColor>\n    </resources>\n</document>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/NativeBanner/NativeBannerAdScreenViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nfinal class NativeBannerAdScreenViewController: UIViewController {\n\n    // MARK: - Properties\n    \n    @IBOutlet private var bottomBarView: BottomBarView!\n    private var adView: NativeBannerAdView!\n    private let statusLabel = UILabel()\n    \n    // MARK: - Lifecycle\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        navigationItem.title = AdFormatInfo.nativeBanner.title\n        setupStatusLabel()\n        setupAdView()\n\n        bottomBarView.tapHandler = { [weak adView] in\n            adView?.load()\n        }\n    }\n    \n    // MARK: - UI Setup\n    \n    private func setupStatusLabel() {\n        view.addSubview(statusLabel)\n        statusLabel.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            statusLabel.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16),\n            statusLabel.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16),\n            statusLabel.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor)\n        ])\n        statusLabel.textAlignment = .center\n        statusLabel.numberOfLines = 0\n    }\n    \n    private func setupAdView() {\n        adView = NativeBannerAdView(ownerViewController: self) { [weak self] status in\n            self?.statusLabel.text = status.debugDescription\n        }\n        view.addSubview(adView)\n        adView.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            adView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),\n            adView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),\n            adView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor)\n        ])\n    }\n}\n\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/NativeBanner/NativeBannerAdView.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nfinal class NativeBannerAdView: UIView {\n    \n    // MARK: - Properties\n    \n    @IBOutlet private var iconView: FBMediaView!\n    @IBOutlet private var optionsView: FBAdOptionsView!\n    @IBOutlet private var titleLabel: UILabel!\n    @IBOutlet private var callToActionButton: UIButton!\n    @IBOutlet private var sponsoredLabel: UILabel!\n    \n    private var ad: FBNativeBannerAd?\n    private let updateStatus: AdStatusUpdate\n    \n    private weak var ownerViewController: UIViewController?\n    \n    // MARK: - Setup\n    \n    init(ownerViewController: UIViewController, updateStatus: @escaping AdStatusUpdate) {\n        self.ownerViewController = ownerViewController\n        self.updateStatus = updateStatus\n        super.init(frame: .zero)\n        fromNib()\n        \n        optionsView.isHidden = true\n    }\n    \n    @available(*, unavailable)\n    required init?(coder: NSCoder) { nil }\n    \n    func load() {\n\n        updateStatus(.isLoading)\n\n        /// Hide the view before loading a new one\n        isHidden = true\n\n        // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n        // Use different ID for each ad placement in your app.\n        let ad = FBNativeBannerAd(placementID: \"YOUR_PLACEMENT_ID\")\n        \n        // Set the delegate of the ad object before loading the ad\n        ad.delegate = self\n\n        // Initiate a request to load an ad.\n        ad.loadAd()\n    }\n        \n    private func setupCallToActionButton(with title: String?) {\n        guard let title = title else {\n            callToActionButton.isHidden = true\n            return\n        }\n        callToActionButton.isHidden = false\n        callToActionButton.setTitle(title, for: .normal)\n    }\n}\n\n// MARK: - FBNativeBannerAdDelegate\n\nextension NativeBannerAdView: FBNativeBannerAdDelegate {\n        \n    func nativeBannerAdDidLoad(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didLoad)\n        \n        if let ad = ad {\n            ad.unregisterView()\n        }\n        \n        ad = nativeBannerAd\n\n        isHidden = false\n\n        titleLabel.text = nativeBannerAd.advertiserName\n        sponsoredLabel.text = nativeBannerAd.sponsoredTranslation\n        setupCallToActionButton(with: nativeBannerAd.callToAction)\n        \n        print(\"Register UIView for impression and click...\")\n\n        // Set native banner ad view tags to declare roles of your views for better analysis in future\n        // We will be able to provide you statistics how often these views were clicked by users\n        // Views provided by Facebook already have appropriate tag set\n        titleLabel.nativeAdViewTag = .title\n        callToActionButton.nativeAdViewTag = FBNativeAdViewTag.callToAction\n\n        // Specify the clickable areas. View you were using to set ad view tags should be clickable.\n        let clickableViews: [UIView] = [callToActionButton]\n        nativeBannerAd.registerView(\n            forInteraction: self,\n            iconView: iconView,\n            viewController: ownerViewController,\n            clickableViews: clickableViews\n        )\n                \n        // If you don't want to provide native ad view tags you can simply\n        // wire up UIView with the native banner ad and the whole UIView will be clickable.\n//        nativeBannerAd.registerView(\n//            forInteraction: iconView,\n//            iconView: iconView,\n//            viewController: ownerViewController\n//        )\n\n        optionsView.nativeAd = nativeBannerAd\n        optionsView.isHidden = false\n    }\n        \n    func nativeBannerAdDidDownloadMedia(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didDownloadMedia)\n    }\n    \n    func nativeBannerAdWillLogImpression(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.willLogImpression)\n    }\n    \n    func nativeBannerAd(_ nativeBannerAd: FBNativeBannerAd, didFailWithError error: Error) {\n        updateStatus(.failure(error))\n    }\n    \n    func nativeBannerAdDidClick(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didClick)\n    }\n    \n    func nativeBannerAdDidFinishHandlingClick(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didFinishHandlingClick)\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/NativeBanner/NativeBannerAdView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"16097.2\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"16087\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\" customClass=\"NativeBannerAdView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"callToActionButton\" destination=\"nrl-uR-fQU\" id=\"Vme-2I-Ska\"/>\n                <outlet property=\"iconView\" destination=\"5zm-hl-BJP\" id=\"wpt-Rx-t8R\"/>\n                <outlet property=\"optionsView\" destination=\"LPH-YO-jb4\" id=\"fYu-an-wQ5\"/>\n                <outlet property=\"sponsoredLabel\" destination=\"50I-iU-Pqg\" id=\"hx5-MV-Uco\"/>\n                <outlet property=\"titleLabel\" destination=\"Nzj-B2-nSW\" id=\"Cuu-xQ-QDn\"/>\n            </connections>\n        </placeholder>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"VER-HE-MUb\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"376\" height=\"55\"/>\n            <subviews>\n                <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"5zm-hl-BJP\" customClass=\"FBMediaView\">\n                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"56\" height=\"55\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" secondItem=\"5zm-hl-BJP\" secondAttribute=\"height\" multiplier=\"1:1\" constant=\"1\" id=\"J1d-yH-yIp\"/>\n                    </constraints>\n                </view>\n                <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"7zY-RF-R0g\">\n                    <rect key=\"frame\" x=\"64\" y=\"27\" width=\"204\" height=\"1\"/>\n                    <subviews>\n                        <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" preferredMaxLayoutWidth=\"256\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Nzj-B2-nSW\">\n                            <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"14\"/>\n                            <nil key=\"highlightedColor\"/>\n                        </label>\n                        <label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumScaleFactor=\"0.5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"50I-iU-Pqg\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"1\" width=\"204\" height=\"0.0\"/>\n                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                            <color key=\"textColor\" red=\"0.33333333329999998\" green=\"0.33333333329999998\" blue=\"0.33333333329999998\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            <nil key=\"highlightedColor\"/>\n                        </label>\n                        <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"LPH-YO-jb4\" customClass=\"FBAdOptionsView\">\n                            <rect key=\"frame\" x=\"5\" y=\"-2\" width=\"48\" height=\"20\"/>\n                            <color key=\"backgroundColor\" cocoaTouchSystemColor=\"groupTableViewBackgroundColor\"/>\n                            <constraints>\n                                <constraint firstAttribute=\"width\" constant=\"48\" id=\"AN2-MB-ezn\"/>\n                                <constraint firstAttribute=\"height\" constant=\"20\" id=\"gu7-5M-dXo\"/>\n                            </constraints>\n                        </view>\n                    </subviews>\n                    <constraints>\n                        <constraint firstItem=\"LPH-YO-jb4\" firstAttribute=\"top\" secondItem=\"Nzj-B2-nSW\" secondAttribute=\"top\" constant=\"-2\" id=\"1Da-bR-HVy\"/>\n                        <constraint firstItem=\"Nzj-B2-nSW\" firstAttribute=\"top\" secondItem=\"7zY-RF-R0g\" secondAttribute=\"top\" id=\"4gi-JD-pUo\"/>\n                        <constraint firstItem=\"50I-iU-Pqg\" firstAttribute=\"top\" secondItem=\"Nzj-B2-nSW\" secondAttribute=\"bottom\" constant=\"1\" id=\"4nD-ux-oMU\"/>\n                        <constraint firstItem=\"50I-iU-Pqg\" firstAttribute=\"leading\" secondItem=\"7zY-RF-R0g\" secondAttribute=\"leading\" id=\"9rp-c2-R9h\"/>\n                        <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"LPH-YO-jb4\" secondAttribute=\"trailing\" constant=\"5\" id=\"Q4i-K8-dq1\"/>\n                        <constraint firstAttribute=\"bottom\" secondItem=\"50I-iU-Pqg\" secondAttribute=\"bottom\" id=\"Qju-fT-dwT\"/>\n                        <constraint firstItem=\"LPH-YO-jb4\" firstAttribute=\"leading\" secondItem=\"Nzj-B2-nSW\" secondAttribute=\"trailing\" constant=\"5\" id=\"cWc-3h-i8u\"/>\n                        <constraint firstItem=\"Nzj-B2-nSW\" firstAttribute=\"leading\" secondItem=\"7zY-RF-R0g\" secondAttribute=\"leading\" id=\"fdg-60-7rv\"/>\n                        <constraint firstAttribute=\"trailing\" secondItem=\"50I-iU-Pqg\" secondAttribute=\"trailing\" id=\"hgG-gQ-7V5\"/>\n                    </constraints>\n                </view>\n                <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nrl-uR-fQU\">\n                    <rect key=\"frame\" x=\"276\" y=\"0.0\" width=\"100\" height=\"55\"/>\n                    <color key=\"backgroundColor\" red=\"0.35686274509999999\" green=\"0.57647058819999997\" blue=\"0.98823529409999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" constant=\"100\" id=\"nVZ-XP-VSN\"/>\n                    </constraints>\n                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"14\"/>\n                    <state key=\"normal\">\n                        <color key=\"titleColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                    </state>\n                </button>\n            </subviews>\n            <constraints>\n                <constraint firstAttribute=\"height\" constant=\"55\" id=\"3sW-je-jKF\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"nrl-uR-fQU\" secondAttribute=\"bottom\" id=\"D6N-Xf-rNM\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"nrl-uR-fQU\" secondAttribute=\"trailing\" id=\"EhM-gK-bwd\"/>\n                <constraint firstItem=\"nrl-uR-fQU\" firstAttribute=\"top\" secondItem=\"VER-HE-MUb\" secondAttribute=\"top\" id=\"HAi-t1-3I9\"/>\n                <constraint firstItem=\"5zm-hl-BJP\" firstAttribute=\"top\" secondItem=\"VER-HE-MUb\" secondAttribute=\"top\" id=\"YKf-Lz-QM5\"/>\n                <constraint firstItem=\"nrl-uR-fQU\" firstAttribute=\"leading\" secondItem=\"7zY-RF-R0g\" secondAttribute=\"trailing\" constant=\"8\" id=\"bV3-5W-n1Y\"/>\n                <constraint firstItem=\"5zm-hl-BJP\" firstAttribute=\"leading\" secondItem=\"VER-HE-MUb\" secondAttribute=\"leading\" id=\"bpc-33-c2B\"/>\n                <constraint firstItem=\"7zY-RF-R0g\" firstAttribute=\"centerY\" secondItem=\"VER-HE-MUb\" secondAttribute=\"centerY\" id=\"n1K-of-vIX\"/>\n                <constraint firstItem=\"7zY-RF-R0g\" firstAttribute=\"leading\" secondItem=\"5zm-hl-BJP\" secondAttribute=\"trailing\" constant=\"8\" id=\"n9f-NP-M3c\"/>\n                <constraint firstAttribute=\"bottom\" secondItem=\"5zm-hl-BJP\" secondAttribute=\"bottom\" id=\"s4u-5i-zS1\"/>\n            </constraints>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <viewLayoutGuide key=\"safeArea\" id=\"lny-N9-taR\"/>\n            <point key=\"canvasLocation\" x=\"20.289855072463769\" y=\"465.73660714285711\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/NativeBannerTemplate/NativeBannerTemplateAdScreenViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nfinal class NativeBannerTemplateAdScreenViewController: UIViewController {\n\n    // MARK: - Properties\n\n    @IBOutlet private var bottomBarView: BottomBarView!\n\n    private var adView: NativeBannerTemplateAdView!\n    private let statusLabel = UILabel()\n\n    // MARK: - Lifecycle\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        navigationItem.title = AdFormatInfo.nativeBannerTemplate.title\n        setupSubviews()\n\n        bottomBarView.tapHandler = { [weak adView] in\n            adView?.load()\n        }\n    }\n\n    private func setupSubviews() {\n        adView = NativeBannerTemplateAdView { [weak self] status in\n            self?.statusLabel.text = status.debugDescription\n        }\n        view.addSubview(adView)\n        view.addSubview(statusLabel)\n\n        statusLabel.textAlignment = .center\n        statusLabel.numberOfLines = 0\n\n        adView.adViewType = .genericHeight50\n\n        statusLabel.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            statusLabel.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16),\n            statusLabel.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16),\n            statusLabel.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 16)\n        ])\n\n        NSLayoutConstraint.activate([\n            adView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),\n            adView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),\n            adView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor)\n        ])\n    }\n\n    // MARK: - IBActions\n\n    @IBAction private func segmentedControlValueChanged(sender: UISegmentedControl) {\n        switch sender.selectedSegmentIndex {\n        case 0:\n            adView.adViewType = .genericHeight50\n        case 1:\n            adView.adViewType = .genericHeight100\n        default:\n            adView.adViewType = .genericHeight120\n        }\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/NativeBannerTemplate/NativeBannerTemplateAdView.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nextension FBNativeBannerAdViewType {\n    var heightInPoints: CGFloat {\n        switch self {\n        case .genericHeight50:\n            return 50\n        case .genericHeight100:\n            return 100\n        case .genericHeight120:\n            return 120\n        @unknown default:\n            print(\"Unknown `FBNativeBannerAdViewType` type. Returning \\(FBNativeBannerAdViewType.genericHeight50) instead.\")\n            return FBNativeBannerAdViewType.genericHeight50.heightInPoints\n        }\n    }\n}\n\nfinal class NativeBannerTemplateAdView: UIView {\n\n    // MARK: - Properties\n\n    var adViewType: FBNativeBannerAdViewType = .genericHeight50 {\n        didSet {\n            heightConstraint.constant = adViewType.heightInPoints\n            load()\n        }\n    }\n\n    private var adView: FBNativeBannerAdView!\n    private var ad: FBNativeBannerAd?\n    private let updateStatus: AdStatusUpdate\n\n    private var heightConstraint: NSLayoutConstraint!\n\n    // MARK: - Setup\n\n    init(updateStatus: @escaping AdStatusUpdate) {\n        self.updateStatus = updateStatus\n        super.init(frame: .zero)\n\n        translatesAutoresizingMaskIntoConstraints = false\n        heightConstraint = heightAnchor.constraint(equalToConstant: adViewType.heightInPoints)\n        heightConstraint.isActive = true\n    }\n\n    @available(*, unavailable)\n    required init?(coder: NSCoder) { nil }\n\n    func load() {\n\n        /// Hide the view before loading a new one\n        adView?.removeFromSuperview()\n\n        // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n        // Use different ID for each ad placement in your app.\n        let ad = FBNativeBannerAd(placementID: \"YOUR_PLACEMENT_ID\")\n\n        // Set the delegate of the ad object before loading the ad\n        ad.delegate = self\n\n        // Initiate a request to load an ad.\n        ad.loadAd()\n    }\n}\n\nextension NativeBannerTemplateAdView: FBNativeBannerAdDelegate {\n\n    func nativeBannerAdDidLoad(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didLoad)\n\n        if let ad = ad {\n            ad.unregisterView()\n            adView?.removeFromSuperview()\n            adView = nil\n        }\n\n        guard nativeBannerAd.isAdValid else {\n            updateStatus(.invalid)\n            return\n        }\n\n        ad = nativeBannerAd\n\n        adView = FBNativeBannerAdView(nativeBannerAd: nativeBannerAd, with: adViewType)\n        adView.frame = bounds\n        adView.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n        addSubview(adView)\n\n        layoutIfNeeded()\n    }\n\n    func nativeBannerAdDidDownloadMedia(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didDownloadMedia)\n    }\n\n    func nativeBannerAdWillLogImpression(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.willLogImpression)\n    }\n\n    func nativeBannerAd(_ nativeBannerAd: FBNativeBannerAd, didFailWithError error: Error) {\n        updateStatus(.failure(error))\n    }\n\n    func nativeBannerAdDidClick(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didClick)\n    }\n\n    func nativeBannerAdDidFinishHandlingClick(_ nativeBannerAd: FBNativeBannerAd) {\n        updateStatus(.didFinishHandlingClick)\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/NativeTemplate/NativeTemplateAdView.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nfinal class NativeTemplateAdView: UIView {\n\n    // MARK: - Properties\n\n    private lazy var adAttributes: FBNativeAdViewAttributes = {\n        let attributes = FBNativeAdViewAttributes()\n        attributes.backgroundColor = .white\n        attributes.advertiserNameColor = UIColor(red: 0.11, green: 0.12, blue: 0.13, alpha: 1)\n        attributes.buttonColor = UIColor(red: 0.235, green: 0.485, blue: 1, alpha: 1)\n        attributes.buttonTitleColor = .white\n        attributes.titleColor = .darkGray\n        attributes.descriptionColor = .gray\n        return attributes\n    }()\n    private var ad: FBNativeAd?\n    private var adView: FBNativeAdView!\n\n    private let updateStatus: AdStatusUpdate\n\n    // MARK: - Setup\n\n    init(updateStatus: @escaping AdStatusUpdate) {\n        self.updateStatus = updateStatus\n        super.init(frame: .zero)\n        backgroundColor = .white\n    }\n\n    @available(*, unavailable)\n    required init?(coder: NSCoder) { nil }\n\n    func load() {\n\n        updateStatus(.isLoading)\n\n        // Remove the previous view before loading a new one\n        adView?.removeFromSuperview()\n\n        // Create a native ad request with a unique placement ID (generate your own on the Facebook app settings).\n        // Use different ID for each ad placement in your app.\n        let ad = FBNativeAd(placementID: \"YOUR_PLACEMENT_ID\")\n\n        // Set the delegate of the ad object before loading the ad\n        ad.delegate = self\n\n        // Initiate a request to load an ad.\n        ad.loadAd()\n    }\n}\n\n// MARK - FBNativeAdDelegate\n\nextension NativeTemplateAdView: FBNativeAdDelegate {\n    func nativeAdDidLoad(_ nativeAd: FBNativeAd) {\n        updateStatus(.didLoad)\n\n        if let ad = ad {\n            ad.unregisterView()\n            adView?.removeFromSuperview()\n            adView = nil\n        }\n\n        guard nativeAd.isAdValid else {\n            updateStatus(.invalid)\n            return\n        }\n\n        ad = nativeAd\n\n        adView = FBNativeAdView(nativeAd: nativeAd, with: adAttributes)\n        adView.frame = bounds\n        adView.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n        addSubview(adView)\n\n        layoutIfNeeded()\n    }\n\n    func nativeAdDidClick(_ nativeAd: FBNativeAd) {\n        updateStatus(.didClick)\n    }\n\n    func nativeAdDidDownloadMedia(_ nativeAd: FBNativeAd) {\n        updateStatus(.didDownloadMedia)\n    }\n\n    func nativeAdWillLogImpression(_ nativeAd: FBNativeAd) {\n        updateStatus(.willLogImpression)\n    }\n\n    func nativeAdDidFinishHandlingClick(_ nativeAd: FBNativeAd) {\n        updateStatus(.didFinishHandlingClick)\n    }\n\n    func nativeAd(_ nativeAd: FBNativeAd, didFailWithError error: Error) {\n        updateStatus(.failure(error))\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Samples/NativeTemplate/NativeTemplateScreenViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nfinal class NativeTemplateScreenViewController: UIViewController {\n\n    // MARK: - Constants\n\n    private enum Constants {\n        enum Width {\n            static let min: Float = 120\n            static let `default`: Float = 250\n            static let max: Float = 320\n        }\n\n        enum Height {\n            static let min: Float = 150\n            static let `default`: Float = 250\n            static let max: Float = 400\n        }\n    }\n\n    override var shouldAutorotate: Bool {\n        false\n    }\n\n    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {\n        [.portrait, .portraitUpsideDown]\n    }\n\n    @IBOutlet private var widthSlider: UISlider!\n    @IBOutlet private var heightSlider: UISlider!\n    @IBOutlet private var slidersStackView: UIStackView!\n    @IBOutlet private var bottomBarView: BottomBarView!\n\n    private var heightConstraint: NSLayoutConstraint!\n    private var widthConstraint: NSLayoutConstraint!\n\n    private var adView: NativeTemplateAdView!\n    private let statusLabel = UILabel()\n\n    // MARK: - Lifecycle\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        navigationItem.title = AdFormatInfo.nativeTemplate.title\n        setupSubviews()\n\n        bottomBarView.tapHandler = { [weak adView] in\n            adView?.load()\n        }\n    }\n\n    // MARK: - UI Setup\n\n    private func setupSubviews() {\n        adView = NativeTemplateAdView { [weak self] status in\n            self?.statusLabel.text = status.debugDescription\n        }\n        view.addSubview(adView)\n        view.addSubview(statusLabel)\n\n        statusLabel.textAlignment = .center\n        statusLabel.numberOfLines = 0\n\n        widthSlider.minimumValue = Constants.Width.min\n        widthSlider.maximumValue = Constants.Width.max\n        widthSlider.value = Constants.Width.default\n\n        heightSlider.minimumValue = Constants.Height.min\n        heightSlider.maximumValue = Constants.Height.max\n        heightSlider.value = Constants.Height.default\n\n        statusLabel.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            statusLabel.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16),\n            statusLabel.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16),\n            statusLabel.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 16)\n        ])\n\n        adView.translatesAutoresizingMaskIntoConstraints = false\n        NSLayoutConstraint.activate([\n            adView.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor),\n            adView.bottomAnchor.constraint(equalTo: slidersStackView.topAnchor, constant: -32)\n        ])\n\n        heightConstraint = adView.heightAnchor.constraint(equalToConstant: CGFloat(heightSlider.value))\n        heightConstraint.isActive = true\n\n        widthConstraint = adView.widthAnchor.constraint(equalToConstant: CGFloat(widthSlider.value))\n        widthConstraint.isActive = true\n    }\n\n    // MARK: - IBActions\n\n    @IBAction private func widthSliderValueChanged(sender: UISlider) {\n        widthConstraint.constant = CGFloat(sender.value)\n    }\n\n    @IBAction private func heightSliderValueChanged(sender: UISlider) {\n        heightConstraint.constant = CGFloat(sender.value)\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/SamplesViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nfinal class SamplesViewController: UITableViewController {\n\n    // MARK: - Types\n\n    private struct Section {\n        let title: String\n        let objects: [AdFormatInfo]\n    }\n\n    // MARK: - Properties\n\n    private let sections: [Section] = {\n        let nativeSection = Section(\n            title: \"Native\",\n            objects: [.native, .nativeTemplate, .nativeBanner, .nativeBannerTemplate]\n        )\n        let bannerSection = Section(\n            title: \"Banner\",\n            objects: [.banner, .mediumRect]\n        )\n        let fullscreenSection = Section(\n            title: \"Fullscreen\",\n            objects: [.interstitial, .rewardedVideo, .rewardedInterstitial]\n        )\n        return [nativeSection, bannerSection, fullscreenSection]\n    }()\n\n    private let sdkInfoLabel: UILabel = {\n        let sdkInfoLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 0, height: 50))\n        sdkInfoLabel.textAlignment = .center\n        sdkInfoLabel.text = \"AN SDK \\(FB_AD_SDK_VERSION)\"\n        return sdkInfoLabel\n    }()\n\n    // MARK: - Lifecycle\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        tableView.tableFooterView = sdkInfoLabel\n    }\n\n    private func createViewController(for adFormat: AdFormatInfo) -> UIViewController? {\n      let vc: UIViewController?\n      switch adFormat {\n        case .interstitial:\n          vc = FullscreenAdSampleViewController.create(adType: .interstitial)\n        case .rewardedVideo:\n          vc = FullscreenAdSampleViewController.create(adType: .rewardedVideo)\n        case .rewardedInterstitial:\n          vc = FullscreenAdSampleViewController.create(adType: .rewardedInterstitial)\n        case .banner:\n          vc = BannerSampleViewController.create(adType: .banner)\n        case .native:\n          vc = NativeAdScreenViewController.create()\n        case .nativeBanner:\n          vc = NativeBannerAdScreenViewController.create()\n        case .nativeTemplate:\n          vc = NativeTemplateScreenViewController.create()\n        case .mediumRect:\n          vc = BannerSampleViewController.create(adType: .mediumRect)\n        case .nativeBannerTemplate:\n          vc = NativeBannerTemplateAdScreenViewController.create()\n      }\n      return vc\n    }\n\n    // MARK: - Settings\n\n    @IBAction private func settingsButtonTapped() {\n        let navigationController = NavigationController(nibName: nil, bundle: nil)\n        navigationController.viewControllers = [SettingScreenViewController.create()]\n        self.navigationController?.present(navigationController, animated: true, completion: nil)\n    }\n\n    // MARK: - Table View\n\n    override func numberOfSections(in tableView: UITableView) -> Int {\n        sections.count\n    }\n\n    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        sections[section].objects.count\n    }\n\n    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {\n        tableView.deselectRow(at: indexPath, animated: true)\n        let currentObject = sections[indexPath.section].objects[indexPath.row]\n        guard let vc = createViewController(for: currentObject) else { return }\n        navigationController?.pushViewController(vc, animated: true)\n    }\n\n    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        let currentSection = sections[indexPath.section]\n        let cell = tableView.dequeueReusableCell(withIdentifier: \"AdFormatCell\",\n                                                 for: indexPath)\n        cell.textLabel?.text = currentSection.objects[indexPath.row].title\n        return cell\n    }\n\n    override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {\n        sections[section].title\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/SceneDelegate.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate, UISplitViewControllerDelegate {\n\n    var window: UIWindow?\n\n    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {\n        // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.\n        // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.\n        // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).\n    }\n\n    func sceneDidDisconnect(_ scene: UIScene) {\n        // Called as the scene is being released by the system.\n        // This occurs shortly after the scene enters the background, or when its session is discarded.\n        // Release any resources associated with this scene that can be re-created the next time the scene connects.\n        // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).\n    }\n\n    func sceneDidBecomeActive(_ scene: UIScene) {\n        // Called when the scene has moved from an inactive state to an active state.\n        // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.\n    }\n\n    func sceneWillResignActive(_ scene: UIScene) {\n        // Called when the scene will move from an active state to an inactive state.\n        // This may occur due to temporary interruptions (ex. an incoming phone call).\n    }\n\n    func sceneWillEnterForeground(_ scene: UIScene) {\n        // Called as the scene transitions from the background to the foreground.\n        // Use this method to undo the changes made on entering the background.\n    }\n\n    func sceneDidEnterBackground(_ scene: UIScene) {\n        // Called as the scene transitions from the foreground to the background.\n        // Use this method to save data, release shared resources, and store enough scene-specific state information\n        // to restore the scene back to its current state.\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Settings/Picker/PickerTableViewCell.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nfinal class PickerTableViewCell: UITableViewCell {\n\n    // MARK: - Properties\n\n    var dataSource: PickerCellViewModelAPI? {\n        didSet {\n            guard let dataSource = dataSource else { return }\n            pickerView.selectRow(dataSource.selectedRow, inComponent: 0, animated: false)\n            titleLabel.text = dataSource.title\n            textField.text = dataSource.name(by: dataSource.selectedRow)\n        }\n    }\n\n    private let pickerView = UIPickerView()\n    @IBOutlet private var titleLabel: UILabel!\n    @IBOutlet private var textField: UITextField!\n\n    // MARK: - Lifecycle\n\n    override func awakeFromNib() {\n        super.awakeFromNib()\n\n        pickerView.dataSource = self\n        pickerView.delegate = self\n\n        textField.inputView = pickerView\n        textField.inputAccessoryView = createToolbar()\n    }\n\n    override func prepareForReuse() {\n        super.prepareForReuse()\n        dataSource = nil\n    }\n\n    private func createToolbar() -> UIToolbar {\n        let toolbar = UIToolbar(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 44))\n        let flexItem = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)\n        let doneItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(doneButtonTapped))\n        toolbar.items = [flexItem, doneItem]\n        toolbar.sizeToFit()\n        return toolbar\n    }\n\n    // MARK: - Actions\n\n    @objc\n    private func doneButtonTapped() {\n        textField.resignFirstResponder()\n    }\n}\n\n// MARK: - UIPickerViewDelegate, UIPickerViewDataSource\n\nextension PickerTableViewCell: UIPickerViewDelegate, UIPickerViewDataSource {\n    func numberOfComponents(in pickerView: UIPickerView) -> Int { 1 }\n\n    func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {\n        dataSource?.numberOfRows ?? 0\n    }\n\n    func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {\n        dataSource?.name(by: row)\n    }\n\n    func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {\n        dataSource?.select(index: row)\n        textField.text = dataSource?.name(by: row)\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Settings/Picker/PickerTableViewCell.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"17156\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"17125\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"PickerTableViewCell\" id=\"KGk-i7-Jjw\" customClass=\"PickerTableViewCell\" customModule=\"FANSample\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"44\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n            <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"KGk-i7-Jjw\" id=\"H2p-sc-9uM\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"44\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <textField opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" textAlignment=\"right\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"G88-uG-ZHT\">\n                        <rect key=\"frame\" x=\"16\" y=\"11\" width=\"288\" height=\"22\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                        <textInputTraits key=\"textInputTraits\"/>\n                    </textField>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Title\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ky9-fH-Xpd\">\n                        <rect key=\"frame\" x=\"16\" y=\"12\" width=\"33\" height=\"20.5\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                        <nil key=\"textColor\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                </subviews>\n                <constraints>\n                    <constraint firstItem=\"G88-uG-ZHT\" firstAttribute=\"centerY\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"centerY\" id=\"AMY-iu-9n3\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"G88-uG-ZHT\" secondAttribute=\"trailing\" constant=\"16\" id=\"RWK-ib-dTo\"/>\n                    <constraint firstItem=\"ky9-fH-Xpd\" firstAttribute=\"centerY\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"centerY\" id=\"dAz-al-oal\"/>\n                    <constraint firstItem=\"ky9-fH-Xpd\" firstAttribute=\"leading\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"leading\" constant=\"16\" id=\"gYZ-m0-dLS\"/>\n                    <constraint firstItem=\"G88-uG-ZHT\" firstAttribute=\"leading\" secondItem=\"ky9-fH-Xpd\" secondAttribute=\"leading\" id=\"i8E-km-zLK\"/>\n                </constraints>\n            </tableViewCellContentView>\n            <viewLayoutGuide key=\"safeArea\" id=\"njF-e1-oar\"/>\n            <connections>\n                <outlet property=\"textField\" destination=\"G88-uG-ZHT\" id=\"eGc-R6-PDR\"/>\n                <outlet property=\"titleLabel\" destination=\"ky9-fH-Xpd\" id=\"o06-wm-m3u\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"140.57971014492756\" y=\"127.90178571428571\"/>\n        </tableViewCell>\n    </objects>\n</document>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Settings/Picker/ViewModels.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport Foundation\nimport FBAudienceNetwork\n\nprotocol PickerCellViewModelAPI {\n    var title: String { get }\n    var selectedRow: Int { get }\n    var numberOfRows: Int { get }\n    func name(by index: Int) -> String?\n    func select(index: Int)\n}\n\nstruct LogLevelCellViewModel: PickerCellViewModelAPI {\n\n    let title = \"Log Level\"\n\n    var numberOfRows: Int { nameByLevel.count }\n    var selectedRow: Int { FBAdSettings.getLogLevel().rawValue }\n\n    private let nameByLevel: [FBAdLogLevel: String] = [\n        .none : \"None\",\n        .notification : \"Notification\",\n        .error : \"Error\",\n        .warning : \"Warning\",\n        .log : \"Log\",\n        .debug : \"Debug\",\n        .verbose : \"Verbose\"\n    ]\n\n    func name(by index: Int) -> String? {\n        guard let type = FBAdLogLevel(rawValue: index) else {\n            print(\"Error: unable to map index to `FBAdLogLevel`\")\n            return nil\n        }\n        return nameByLevel[type]\n    }\n\n    func select(index: Int) {\n        guard let level = FBAdLogLevel(rawValue: index) else {\n            return\n        }\n        FBAdSettings.setLogLevel(level)\n    }\n}\n\nstruct AdTypeCellViewModel: PickerCellViewModelAPI {\n\n    let title = \"Ad Type\"\n\n    var numberOfRows: Int { nameByType.count }\n    var selectedRow: Int { FBAdSettings.testAdType.rawValue }\n\n    private let nameByType: [FBAdTestAdType: String] = [\n        .default : \"default\",\n        .img_16_9_App_Install : \"image_install\",\n        .img_16_9_Link : \"image_link\",\n        .vid_HD_16_9_46s_App_Install : \"video_16x9_46s_install\",\n        .vid_HD_16_9_46s_Link : \"video_16x9_46s_link\",\n        .vid_HD_16_9_15s_App_Install : \"video_16x9_15s_install\",\n        .vid_HD_16_9_15s_Link : \"video_16x9_15s_link\",\n        .vid_HD_9_16_39s_App_Install : \"video_9x16_39s_install\",\n        .vid_HD_9_16_39s_Link : \"video_9x16_39s_link\",\n        .carousel_Img_Square_App_Install : \"carousel_install\",\n        .carousel_Img_Square_Link : \"carousel_link\",\n        .carousel_Vid_Square_Link : \"carousel_video\",\n        .playable : \"playable\"\n    ]\n\n    func name(by index: Int) -> String? {\n        guard let type = FBAdTestAdType(rawValue: index) else {\n            print(\"Error: unable to map index to `FBAdTestAdType`\")\n            return nil\n        }\n        return nameByType[type]\n    }\n\n    func select(index: Int) {\n        guard let type = FBAdTestAdType(rawValue: index) else {\n            return\n        }\n        FBAdSettings.testAdType = type\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Settings/SettingScreenViewController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nfinal class SettingScreenViewController: UITableViewController {\n\n    // MARK: - Properties\n\n    private lazy var adTypeCellViewModel = AdTypeCellViewModel()\n    private lazy var logLevelCellViewModel = LogLevelCellViewModel()\n\n    // MARK: - Lifecylce\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        navigationItem.title = \"Settings\"\n        tableView.register(\n            UINib(nibName: \"TestModeTableViewCell\", bundle: nil),\n            forCellReuseIdentifier: \"TestModeTableViewCell\"\n        )\n        tableView.register(\n            UINib(nibName: \"PickerTableViewCell\", bundle: nil),\n            forCellReuseIdentifier: \"PickerTableViewCell\"\n        )\n        tableView.rowHeight = 48\n        tableView.allowsSelection = false\n    }\n\n    // MARK: - Table View\n\n    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 3 }\n\n    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        switch indexPath.row {\n        case 0:\n            let cell = tableView.dequeueReusableCell(withIdentifier: \"TestModeTableViewCell\", for: indexPath) as! TestModeTableViewCell\n            return cell\n        case 1:\n            let cell = tableView.dequeueReusableCell(withIdentifier: \"PickerTableViewCell\", for: indexPath) as! PickerTableViewCell\n            cell.dataSource = adTypeCellViewModel\n            return cell\n        case 2:\n            let cell = tableView.dequeueReusableCell(withIdentifier: \"PickerTableViewCell\", for: indexPath) as! PickerTableViewCell\n            cell.dataSource = logLevelCellViewModel\n            return cell\n        default:\n            return UITableViewCell()\n        }\n    }\n\n    override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {\n        \"SDK Version \\(FB_AD_SDK_VERSION)\"\n    }\n\n    // MARK: - Actions\n\n    @IBAction private func dismissButtonTapped() {\n        dismiss(animated: true, completion: nil)\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Settings/TestMode/TestModeTableViewCell.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nfinal class TestModeTableViewCell: UITableViewCell {\n\n    @IBOutlet private var testModeSwitch: UISwitch!\n\n    override func awakeFromNib() {\n        super.awakeFromNib()\n        testModeSwitch.isOn = FBAdSettings.isTestMode()\n    }\n\n    @IBAction private func testModeSwitchValueChanged(sender: UISwitch) {\n        let testDeviceHash = FBAdSettings.testDeviceHash()\n        if sender.isOn {\n            FBAdSettings.addTestDevice(testDeviceHash)\n        } else {\n            FBAdSettings.clearTestDevice(testDeviceHash)\n        }\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Settings/TestMode/TestModeTableViewCell.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"17156\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"17125\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"TestModeTableViewCell\" id=\"KGk-i7-Jjw\" customClass=\"TestModeTableViewCell\" customModule=\"FANSample\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"44\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n            <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"KGk-i7-Jjw\" id=\"H2p-sc-9uM\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"44\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <switch opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" on=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"DdX-kZ-czY\">\n                        <rect key=\"frame\" x=\"255\" y=\"6.5\" width=\"51\" height=\"31\"/>\n                        <connections>\n                            <action selector=\"testModeSwitchValueChangedWithSender:\" destination=\"KGk-i7-Jjw\" eventType=\"valueChanged\" id=\"cYg-DL-jKO\"/>\n                        </connections>\n                    </switch>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Test Mode\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Ol6-ge-Zzj\">\n                        <rect key=\"frame\" x=\"16\" y=\"12\" width=\"80\" height=\"20.5\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                        <nil key=\"textColor\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                </subviews>\n                <constraints>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"DdX-kZ-czY\" secondAttribute=\"trailing\" constant=\"16\" id=\"ArR-1n-0TI\"/>\n                    <constraint firstItem=\"Ol6-ge-Zzj\" firstAttribute=\"centerY\" secondItem=\"DdX-kZ-czY\" secondAttribute=\"centerY\" id=\"Ks8-hO-q2K\"/>\n                    <constraint firstItem=\"Ol6-ge-Zzj\" firstAttribute=\"leading\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"leading\" constant=\"16\" id=\"grL-ym-Kf6\"/>\n                    <constraint firstItem=\"DdX-kZ-czY\" firstAttribute=\"centerY\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"centerY\" id=\"sA6-wM-xmV\"/>\n                </constraints>\n            </tableViewCellContentView>\n            <viewLayoutGuide key=\"safeArea\" id=\"njF-e1-oar\"/>\n            <connections>\n                <outlet property=\"testModeSwitch\" destination=\"DdX-kZ-czY\" id=\"LN5-C5-AiT\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"-197\" y=\"59\"/>\n        </tableViewCell>\n    </objects>\n</document>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Utils/AdUtils.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport Foundation\n\ntypealias AdStatusUpdate = (AdStatus) -> Void\n\nenum AdStatus: CustomDebugStringConvertible {\n    case willLogImpression\n    case failure(Error)\n    case invalid\n    case didClick\n    case didFinishHandlingClick\n    case isLoading\n    case didLoad\n    case didDownloadMedia\n\n    var debugDescription: String {\n        switch self {\n        case .didClick:\n            return \"Ad was clicked\"\n        case .failure(let error):\n            return \"Ad failed to load with error: \" + error.localizedDescription\n        case .invalid:\n            return \"Ad is invalid\"\n        case .didLoad:\n            return \"Ad did load\"\n        case .isLoading:\n            return \"Ad is loading\"\n        case .didDownloadMedia:\n            return \"Ad did download media\"\n        case .willLogImpression:\n            return \"Ad impression is being captured\"\n        case .didFinishHandlingClick:\n            return \"Ad did finish handling click\"\n        }\n    }\n}\n\nenum LoadingState {\n    case initial\n    case loading\n    case loaded\n    case error(message: String)\n}\n\nenum AdFormatInfo {\n    case native\n    case nativeTemplate\n    case nativeBanner\n    case nativeBannerTemplate\n    case banner\n    case mediumRect\n    case interstitial\n    case rewardedVideo\n    case rewardedInterstitial\n\n    var title: String {\n        switch self {\n        case .native: return \"Native\"\n        case .nativeTemplate: return  \"Native (Template)\"\n        case .nativeBanner: return \"Native Banner\"\n        case .nativeBannerTemplate: return \"Native Banner (Template)\"\n        case .banner: return \"Banner\"\n        case .mediumRect: return \"Medium Rectangle\"\n        case .interstitial: return \"Interstitial\"\n        case .rewardedVideo: return \"Rewarded Video\"\n        case .rewardedInterstitial: return \"Rewarded Interstitial\"\n        }\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Utils/BottomBarView.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\nimport FBAudienceNetwork\n\nfinal class BottomBarView: UIView {\n\n    // MARK: - Types\n\n    typealias TapHandler = () -> Void\n\n    // MARK: - Properties\n\n    var tapHandler: TapHandler!\n\n    @IBOutlet private var button: UIButton!\n    @IBOutlet private var testModeSwitch: UISwitch!\n\n    // MARK: - Setup\n\n    override init(frame: CGRect) {\n        super.init(frame: frame)\n        setup()\n    }\n\n    required init?(coder: NSCoder) {\n        super.init(coder: coder)\n        setup()\n    }\n\n    private func setup() {\n        fromNib()\n        testModeSwitch.isOn = FBAdSettings.isTestMode()\n    }\n\n    // MARK: - Actions\n\n    @IBAction private func buttonTapped() {\n        tapHandler()\n    }\n\n    @IBAction private func testModeSwitchValueChanged(sender: UISwitch) {\n        let testDeviceHash = FBAdSettings.testDeviceHash()\n        if sender.isOn {\n            FBAdSettings.addTestDevice(testDeviceHash)\n        } else {\n            FBAdSettings.clearTestDevice(testDeviceHash)\n        }\n    }\n\n    func set(buttonTitle: String, isEnabled: Bool) {\n        button.setTitle(buttonTitle, for: .normal)\n        button.isEnabled = isEnabled\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Utils/BottomBarView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"17156\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"17125\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"System colors in document resources\" minToolsVersion=\"11.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\" customClass=\"BottomBarView\" customModule=\"FANSample\" customModuleProvider=\"target\">\n            <connections>\n                <outlet property=\"button\" destination=\"Z9U-5P-90W\" id=\"0cf-1q-fki\"/>\n                <outlet property=\"testModeSwitch\" destination=\"Jaf-fs-aLM\" id=\"dHC-zW-zDi\"/>\n            </connections>\n        </placeholder>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"455\" height=\"147\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <stackView opaque=\"NO\" contentMode=\"scaleToFill\" axis=\"vertical\" spacing=\"16\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GFo-bm-TUL\">\n                    <rect key=\"frame\" x=\"0.0\" y=\"26.5\" width=\"455\" height=\"104\"/>\n                    <subviews>\n                        <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"hZr-EF-erY\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"455\" height=\"44\"/>\n                            <subviews>\n                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Test Mode\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aDr-7Q-AdJ\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"12\" width=\"390\" height=\"20.5\"/>\n                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                    <nil key=\"textColor\"/>\n                                    <nil key=\"highlightedColor\"/>\n                                </label>\n                                <switch opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Jaf-fs-aLM\">\n                                    <rect key=\"frame\" x=\"406\" y=\"6.5\" width=\"51\" height=\"31\"/>\n                                    <connections>\n                                        <action selector=\"testModeSwitchValueChangedWithSender:\" destination=\"-1\" eventType=\"valueChanged\" id=\"IM1-9V-n9m\"/>\n                                    </connections>\n                                </switch>\n                            </subviews>\n                            <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n                            <constraints>\n                                <constraint firstItem=\"Jaf-fs-aLM\" firstAttribute=\"leading\" secondItem=\"aDr-7Q-AdJ\" secondAttribute=\"trailing\" priority=\"999\" constant=\"16\" id=\"8Dn-wG-fWD\"/>\n                                <constraint firstItem=\"aDr-7Q-AdJ\" firstAttribute=\"leading\" secondItem=\"hZr-EF-erY\" secondAttribute=\"leading\" id=\"9bC-sH-F5L\"/>\n                                <constraint firstItem=\"Jaf-fs-aLM\" firstAttribute=\"centerY\" secondItem=\"hZr-EF-erY\" secondAttribute=\"centerY\" id=\"IHW-JO-XzL\"/>\n                                <constraint firstAttribute=\"height\" constant=\"44\" id=\"dUZ-HR-hyP\"/>\n                                <constraint firstItem=\"aDr-7Q-AdJ\" firstAttribute=\"centerY\" secondItem=\"hZr-EF-erY\" secondAttribute=\"centerY\" id=\"iuL-9Y-hRV\"/>\n                                <constraint firstAttribute=\"trailing\" secondItem=\"Jaf-fs-aLM\" secondAttribute=\"trailing\" id=\"xbm-fF-xgf\"/>\n                            </constraints>\n                        </view>\n                        <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Z9U-5P-90W\">\n                            <rect key=\"frame\" x=\"0.0\" y=\"60\" width=\"455\" height=\"44\"/>\n                            <color key=\"backgroundColor\" systemColor=\"systemGreenColor\"/>\n                            <constraints>\n                                <constraint firstAttribute=\"height\" constant=\"44\" id=\"VCA-og-adz\"/>\n                            </constraints>\n                            <inset key=\"contentEdgeInsets\" minX=\"10\" minY=\"10\" maxX=\"10\" maxY=\"10\"/>\n                            <state key=\"normal\" title=\"Load Ad\">\n                                <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                            </state>\n                            <userDefinedRuntimeAttributes>\n                                <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.cornerRadius\">\n                                    <integer key=\"value\" value=\"5\"/>\n                                </userDefinedRuntimeAttribute>\n                            </userDefinedRuntimeAttributes>\n                            <connections>\n                                <action selector=\"buttonTapped\" destination=\"-1\" eventType=\"touchUpInside\" id=\"alR-Qq-Xzu\"/>\n                            </connections>\n                        </button>\n                    </subviews>\n                </stackView>\n            </subviews>\n            <viewLayoutGuide key=\"safeArea\" id=\"vUN-kp-3ea\"/>\n            <color key=\"backgroundColor\" systemColor=\"systemBackgroundColor\"/>\n            <constraints>\n                <constraint firstItem=\"GFo-bm-TUL\" firstAttribute=\"leading\" secondItem=\"vUN-kp-3ea\" secondAttribute=\"leading\" id=\"0Jn-KY-Rg1\"/>\n                <constraint firstItem=\"vUN-kp-3ea\" firstAttribute=\"top\" secondItem=\"GFo-bm-TUL\" secondAttribute=\"top\" priority=\"999\" id=\"3HS-q5-GbX\"/>\n                <constraint firstItem=\"GFo-bm-TUL\" firstAttribute=\"centerY\" secondItem=\"vUN-kp-3ea\" secondAttribute=\"centerY\" id=\"BtM-wS-j82\"/>\n                <constraint firstItem=\"vUN-kp-3ea\" firstAttribute=\"trailing\" secondItem=\"GFo-bm-TUL\" secondAttribute=\"trailing\" id=\"gPP-Lx-0XB\"/>\n                <constraint firstItem=\"vUN-kp-3ea\" firstAttribute=\"bottom\" secondItem=\"GFo-bm-TUL\" secondAttribute=\"bottom\" priority=\"999\" id=\"nbZ-Su-AoE\"/>\n            </constraints>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <point key=\"canvasLocation\" x=\"170.28985507246378\" y=\"280.91517857142856\"/>\n        </view>\n    </objects>\n    <resources>\n        <systemColor name=\"systemBackgroundColor\">\n            <color white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n        </systemColor>\n        <systemColor name=\"systemGreenColor\">\n            <color red=\"0.20392156862745098\" green=\"0.7803921568627451\" blue=\"0.34901960784313724\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n        </systemColor>\n    </resources>\n</document>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample/Utils/NavigationController.swift",
    "content": "// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n\nimport UIKit\n\nfinal class NavigationController: UINavigationController {\n    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {\n        topViewController?.supportedInterfaceOrientations ?? .all\n    }\n\n    override var shouldAutorotate: Bool {\n        topViewController?.shouldAutorotate ?? false\n    }\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 51;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t1437CFB92538A405003DB489 /* UIViewController+Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1437CFB82538A405003DB489 /* UIViewController+Storyboard.swift */; };\n\t\t14548A11253E0DC000E62C49 /* AdUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14548A10253E0DC000E62C49 /* AdUtils.swift */; };\n\t\t145A31CE253ED12000A83B62 /* PickerTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31CC253ED12000A83B62 /* PickerTableViewCell.swift */; };\n\t\t145A31CF253ED12000A83B62 /* PickerTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 145A31CD253ED12000A83B62 /* PickerTableViewCell.xib */; };\n\t\t145A31D6253EE15A00A83B62 /* ViewModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31D5253EE15A00A83B62 /* ViewModels.swift */; };\n\t\t145A31F8253EF50300A83B62 /* FullscreenAdSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31E8253EF50300A83B62 /* FullscreenAdSampleViewController.swift */; };\n\t\t145A31F9253EF50300A83B62 /* NativeAdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31EA253EF50300A83B62 /* NativeAdView.swift */; };\n\t\t145A31FA253EF50300A83B62 /* NativeAdScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31EB253EF50300A83B62 /* NativeAdScreenViewController.swift */; };\n\t\t145A31FB253EF50300A83B62 /* NativeAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 145A31EC253EF50300A83B62 /* NativeAdView.xib */; };\n\t\t145A31FC253EF50300A83B62 /* NativeBannerTemplateAdScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31EE253EF50300A83B62 /* NativeBannerTemplateAdScreenViewController.swift */; };\n\t\t145A31FD253EF50300A83B62 /* NativeBannerTemplateAdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31EF253EF50300A83B62 /* NativeBannerTemplateAdView.swift */; };\n\t\t145A31FE253EF50300A83B62 /* NativeBannerAdScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31F1253EF50300A83B62 /* NativeBannerAdScreenViewController.swift */; };\n\t\t145A31FF253EF50300A83B62 /* NativeBannerAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 145A31F2253EF50300A83B62 /* NativeBannerAdView.xib */; };\n\t\t145A3200253EF50300A83B62 /* NativeBannerAdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31F3253EF50300A83B62 /* NativeBannerAdView.swift */; };\n\t\t145A3201253EF50300A83B62 /* NativeTemplateAdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31F5253EF50300A83B62 /* NativeTemplateAdView.swift */; };\n\t\t145A3202253EF50300A83B62 /* NativeTemplateScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31F6253EF50300A83B62 /* NativeTemplateScreenViewController.swift */; };\n\t\t145A3203253EF50300A83B62 /* BannerSampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A31F7253EF50300A83B62 /* BannerSampleViewController.swift */; };\n\t\t145A3206253EF57800A83B62 /* SamplesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A3205253EF57800A83B62 /* SamplesViewController.swift */; };\n\t\t145A320A253EF5BC00A83B62 /* BottomBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A3208253EF5BC00A83B62 /* BottomBarView.swift */; };\n\t\t145A320B253EF5BC00A83B62 /* BottomBarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 145A3209253EF5BC00A83B62 /* BottomBarView.xib */; };\n\t\t145A320E253EF61D00A83B62 /* NavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145A320D253EF61D00A83B62 /* NavigationController.swift */; };\n\t\t1468FC7A252F33B7004E2CD9 /* NSObject+ClassName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1468FC79252F33B7004E2CD9 /* NSObject+ClassName.swift */; };\n\t\t1468FC7C252F33D1004E2CD9 /* UIView+NibContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1468FC7B252F33D1004E2CD9 /* UIView+NibContent.swift */; };\n\t\t1499C93E253E495A003E0FE5 /* SettingScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1499C93D253E495A003E0FE5 /* SettingScreenViewController.swift */; };\n\t\t1499C945253E4DA3003E0FE5 /* TestModeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1499C943253E4DA3003E0FE5 /* TestModeTableViewCell.swift */; };\n\t\t1499C946253E4DA3003E0FE5 /* TestModeTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1499C944253E4DA3003E0FE5 /* TestModeTableViewCell.xib */; };\n\t\t82B89F4623F7F95900DF6E14 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B89F4523F7F95900DF6E14 /* AppDelegate.swift */; };\n\t\t82B89F4823F7F95900DF6E14 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82B89F4723F7F95900DF6E14 /* SceneDelegate.swift */; };\n\t\t82B89F4F23F7F95900DF6E14 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 82B89F4D23F7F95900DF6E14 /* Main.storyboard */; };\n\t\t82B89F5123F7F95B00DF6E14 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 82B89F5023F7F95B00DF6E14 /* Assets.xcassets */; };\n\t\t82B89F5423F7F95B00DF6E14 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 82B89F5223F7F95B00DF6E14 /* LaunchScreen.storyboard */; };\n\t\t9E769FD66DA26D7240AE192E /* Pods_FANSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A2B6B472CA61D8834794B3B /* Pods_FANSample.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t1437CFB82538A405003DB489 /* UIViewController+Storyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = \"UIViewController+Storyboard.swift\"; sourceTree = \"<group>\"; };\n\t\t14548A10253E0DC000E62C49 /* AdUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdUtils.swift; sourceTree = \"<group>\"; };\n\t\t145A31CC253ED12000A83B62 /* PickerTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\t145A31CD253ED12000A83B62 /* PickerTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PickerTableViewCell.xib; sourceTree = \"<group>\"; };\n\t\t145A31D5253EE15A00A83B62 /* ViewModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModels.swift; sourceTree = \"<group>\"; };\n\t\t145A31E8253EF50300A83B62 /* FullscreenAdSampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FullscreenAdSampleViewController.swift; sourceTree = \"<group>\"; };\n\t\t145A31EA253EF50300A83B62 /* NativeAdView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeAdView.swift; sourceTree = \"<group>\"; };\n\t\t145A31EB253EF50300A83B62 /* NativeAdScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeAdScreenViewController.swift; sourceTree = \"<group>\"; };\n\t\t145A31EC253EF50300A83B62 /* NativeAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NativeAdView.xib; sourceTree = \"<group>\"; };\n\t\t145A31EE253EF50300A83B62 /* NativeBannerTemplateAdScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeBannerTemplateAdScreenViewController.swift; sourceTree = \"<group>\"; };\n\t\t145A31EF253EF50300A83B62 /* NativeBannerTemplateAdView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeBannerTemplateAdView.swift; sourceTree = \"<group>\"; };\n\t\t145A31F1253EF50300A83B62 /* NativeBannerAdScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeBannerAdScreenViewController.swift; sourceTree = \"<group>\"; };\n\t\t145A31F2253EF50300A83B62 /* NativeBannerAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NativeBannerAdView.xib; sourceTree = \"<group>\"; };\n\t\t145A31F3253EF50300A83B62 /* NativeBannerAdView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeBannerAdView.swift; sourceTree = \"<group>\"; };\n\t\t145A31F5253EF50300A83B62 /* NativeTemplateAdView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeTemplateAdView.swift; sourceTree = \"<group>\"; };\n\t\t145A31F6253EF50300A83B62 /* NativeTemplateScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeTemplateScreenViewController.swift; sourceTree = \"<group>\"; };\n\t\t145A31F7253EF50300A83B62 /* BannerSampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BannerSampleViewController.swift; sourceTree = \"<group>\"; };\n\t\t145A3205253EF57800A83B62 /* SamplesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SamplesViewController.swift; sourceTree = \"<group>\"; };\n\t\t145A3208253EF5BC00A83B62 /* BottomBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomBarView.swift; sourceTree = \"<group>\"; };\n\t\t145A3209253EF5BC00A83B62 /* BottomBarView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BottomBarView.xib; sourceTree = \"<group>\"; };\n\t\t145A320D253EF61D00A83B62 /* NavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationController.swift; sourceTree = \"<group>\"; };\n\t\t145A321B253F22C800A83B62 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };\n\t\t1468FC79252F33B7004E2CD9 /* NSObject+ClassName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = \"NSObject+ClassName.swift\"; sourceTree = \"<group>\"; };\n\t\t1468FC7B252F33D1004E2CD9 /* UIView+NibContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = \"UIView+NibContent.swift\"; sourceTree = \"<group>\"; };\n\t\t1499C93D253E495A003E0FE5 /* SettingScreenViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingScreenViewController.swift; sourceTree = \"<group>\"; };\n\t\t1499C943253E4DA3003E0FE5 /* TestModeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestModeTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\t1499C944253E4DA3003E0FE5 /* TestModeTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TestModeTableViewCell.xib; sourceTree = \"<group>\"; };\n\t\t4F0CF2FBCD28B527F12C5658 /* Pods-FANSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-FANSample.debug.xcconfig\"; path = \"Target Support Files/Pods-FANSample/Pods-FANSample.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5A2B6B472CA61D8834794B3B /* Pods_FANSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FANSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t7344E3D24EBE09AC50121E89 /* Pods-FANSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-FANSample.release.xcconfig\"; path = \"Target Support Files/Pods-FANSample/Pods-FANSample.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t82B89F4223F7F95900DF6E14 /* FANSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FANSample.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t82B89F4523F7F95900DF6E14 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t82B89F4723F7F95900DF6E14 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = \"<group>\"; };\n\t\t82B89F4E23F7F95900DF6E14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t82B89F5023F7F95B00DF6E14 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t82B89F5323F7F95B00DF6E14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t82B89F5523F7F95B00DF6E14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t82B89F3F23F7F95900DF6E14 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t9E769FD66DA26D7240AE192E /* Pods_FANSample.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t14548A0F253E0DA300E62C49 /* Utils */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A320D253EF61D00A83B62 /* NavigationController.swift */,\n\t\t\t\t145A3208253EF5BC00A83B62 /* BottomBarView.swift */,\n\t\t\t\t145A3209253EF5BC00A83B62 /* BottomBarView.xib */,\n\t\t\t\t14548A10253E0DC000E62C49 /* AdUtils.swift */,\n\t\t\t);\n\t\t\tpath = Utils;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t145A31D3253EE13800A83B62 /* Picker */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A31CC253ED12000A83B62 /* PickerTableViewCell.swift */,\n\t\t\t\t145A31CD253ED12000A83B62 /* PickerTableViewCell.xib */,\n\t\t\t\t145A31D5253EE15A00A83B62 /* ViewModels.swift */,\n\t\t\t);\n\t\t\tpath = Picker;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t145A31D4253EE14600A83B62 /* TestMode */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1499C943253E4DA3003E0FE5 /* TestModeTableViewCell.swift */,\n\t\t\t\t1499C944253E4DA3003E0FE5 /* TestModeTableViewCell.xib */,\n\t\t\t);\n\t\t\tpath = TestMode;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t145A31E7253EF50300A83B62 /* Samples */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A31F7253EF50300A83B62 /* BannerSampleViewController.swift */,\n\t\t\t\t145A31E8253EF50300A83B62 /* FullscreenAdSampleViewController.swift */,\n\t\t\t\t145A31E9253EF50300A83B62 /* Native */,\n\t\t\t\t145A31ED253EF50300A83B62 /* NativeBannerTemplate */,\n\t\t\t\t145A31F0253EF50300A83B62 /* NativeBanner */,\n\t\t\t\t145A31F4253EF50300A83B62 /* NativeTemplate */,\n\t\t\t);\n\t\t\tpath = Samples;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t145A31E9253EF50300A83B62 /* Native */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A31EA253EF50300A83B62 /* NativeAdView.swift */,\n\t\t\t\t145A31EB253EF50300A83B62 /* NativeAdScreenViewController.swift */,\n\t\t\t\t145A31EC253EF50300A83B62 /* NativeAdView.xib */,\n\t\t\t);\n\t\t\tpath = Native;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t145A31ED253EF50300A83B62 /* NativeBannerTemplate */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A31EE253EF50300A83B62 /* NativeBannerTemplateAdScreenViewController.swift */,\n\t\t\t\t145A31EF253EF50300A83B62 /* NativeBannerTemplateAdView.swift */,\n\t\t\t);\n\t\t\tpath = NativeBannerTemplate;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t145A31F0253EF50300A83B62 /* NativeBanner */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A31F1253EF50300A83B62 /* NativeBannerAdScreenViewController.swift */,\n\t\t\t\t145A31F2253EF50300A83B62 /* NativeBannerAdView.xib */,\n\t\t\t\t145A31F3253EF50300A83B62 /* NativeBannerAdView.swift */,\n\t\t\t);\n\t\t\tpath = NativeBanner;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t145A31F4253EF50300A83B62 /* NativeTemplate */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A31F5253EF50300A83B62 /* NativeTemplateAdView.swift */,\n\t\t\t\t145A31F6253EF50300A83B62 /* NativeTemplateScreenViewController.swift */,\n\t\t\t);\n\t\t\tpath = NativeTemplate;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1468FC78252F33A5004E2CD9 /* Extensions */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1468FC79252F33B7004E2CD9 /* NSObject+ClassName.swift */,\n\t\t\t\t1468FC7B252F33D1004E2CD9 /* UIView+NibContent.swift */,\n\t\t\t\t1437CFB82538A405003DB489 /* UIViewController+Storyboard.swift */,\n\t\t\t);\n\t\t\tpath = Extensions;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1499C942253E4CDF003E0FE5 /* Settings */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1499C93D253E495A003E0FE5 /* SettingScreenViewController.swift */,\n\t\t\t\t145A31D4253EE14600A83B62 /* TestMode */,\n\t\t\t\t145A31D3253EE13800A83B62 /* Picker */,\n\t\t\t);\n\t\t\tpath = Settings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t57008FCE14BB49DABB99EE2F /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t4F0CF2FBCD28B527F12C5658 /* Pods-FANSample.debug.xcconfig */,\n\t\t\t\t7344E3D24EBE09AC50121E89 /* Pods-FANSample.release.xcconfig */,\n\t\t\t);\n\t\t\tpath = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t82B89F3923F7F95900DF6E14 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t82B89F4423F7F95900DF6E14 /* FANSample */,\n\t\t\t\t82B89F4323F7F95900DF6E14 /* Products */,\n\t\t\t\t57008FCE14BB49DABB99EE2F /* Pods */,\n\t\t\t\tD1A18B97378710965348E129 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t82B89F4323F7F95900DF6E14 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t82B89F4223F7F95900DF6E14 /* FANSample.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t82B89F4423F7F95900DF6E14 /* FANSample */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t145A321B253F22C800A83B62 /* README.md */,\n\t\t\t\t82B89F5523F7F95B00DF6E14 /* Info.plist */,\n\t\t\t\t82B89F5023F7F95B00DF6E14 /* Assets.xcassets */,\n\t\t\t\t82B89F5223F7F95B00DF6E14 /* LaunchScreen.storyboard */,\n\t\t\t\t82B89F4D23F7F95900DF6E14 /* Main.storyboard */,\n\t\t\t\t82B89F4523F7F95900DF6E14 /* AppDelegate.swift */,\n\t\t\t\t82B89F4723F7F95900DF6E14 /* SceneDelegate.swift */,\n\t\t\t\t145A3205253EF57800A83B62 /* SamplesViewController.swift */,\n\t\t\t\t145A31E7253EF50300A83B62 /* Samples */,\n\t\t\t\t1499C942253E4CDF003E0FE5 /* Settings */,\n\t\t\t\t1468FC78252F33A5004E2CD9 /* Extensions */,\n\t\t\t\t14548A0F253E0DA300E62C49 /* Utils */,\n\t\t\t);\n\t\t\tpath = FANSample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tD1A18B97378710965348E129 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t5A2B6B472CA61D8834794B3B /* Pods_FANSample.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t82B89F4123F7F95900DF6E14 /* FANSample */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 82B89F5823F7F95B00DF6E14 /* Build configuration list for PBXNativeTarget \"FANSample\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tA1609BF6C269CF969F41C6B1 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t82B89F3E23F7F95900DF6E14 /* Sources */,\n\t\t\t\t82B89F3F23F7F95900DF6E14 /* Frameworks */,\n\t\t\t\t82B89F4023F7F95900DF6E14 /* Resources */,\n\t\t\t\t63A734DE5EB10572F77F4766 /* [CP] Embed Pods Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = FANSample;\n\t\t\tproductName = FANSample;\n\t\t\tproductReference = 82B89F4223F7F95900DF6E14 /* FANSample.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t82B89F3A23F7F95900DF6E14 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 1130;\n\t\t\t\tLastUpgradeCheck = 1130;\n\t\t\t\tORGANIZATIONNAME = \"Facebook, Inc.\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t82B89F4123F7F95900DF6E14 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 11.3;\n\t\t\t\t\t\tLastSwiftMigration = 1160;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 82B89F3D23F7F95900DF6E14 /* Build configuration list for PBXProject \"FANSample\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 82B89F3923F7F95900DF6E14;\n\t\t\tproductRefGroup = 82B89F4323F7F95900DF6E14 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t82B89F4123F7F95900DF6E14 /* FANSample */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t82B89F4023F7F95900DF6E14 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t82B89F5423F7F95B00DF6E14 /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t82B89F5123F7F95B00DF6E14 /* Assets.xcassets in Resources */,\n\t\t\t\t82B89F4F23F7F95900DF6E14 /* Main.storyboard in Resources */,\n\t\t\t\t1499C946253E4DA3003E0FE5 /* TestModeTableViewCell.xib in Resources */,\n\t\t\t\t145A31FF253EF50300A83B62 /* NativeBannerAdView.xib in Resources */,\n\t\t\t\t145A31FB253EF50300A83B62 /* NativeAdView.xib in Resources */,\n\t\t\t\t145A31CF253ED12000A83B62 /* PickerTableViewCell.xib in Resources */,\n\t\t\t\t145A320B253EF5BC00A83B62 /* BottomBarView.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t63A734DE5EB10572F77F4766 /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-FANSample/Pods-FANSample-frameworks-${CONFIGURATION}-input-files.xcfilelist\",\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputFileListPaths = (\n\t\t\t\t\"${PODS_ROOT}/Target Support Files/Pods-FANSample/Pods-FANSample-frameworks-${CONFIGURATION}-output-files.xcfilelist\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-FANSample/Pods-FANSample-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tA1609BF6C269CF969F41C6B1 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputFileListPaths = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputFileListPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-FANSample-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"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\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t82B89F3E23F7F95900DF6E14 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t145A3200253EF50300A83B62 /* NativeBannerAdView.swift in Sources */,\n\t\t\t\t1499C945253E4DA3003E0FE5 /* TestModeTableViewCell.swift in Sources */,\n\t\t\t\t1468FC7C252F33D1004E2CD9 /* UIView+NibContent.swift in Sources */,\n\t\t\t\t145A31FE253EF50300A83B62 /* NativeBannerAdScreenViewController.swift in Sources */,\n\t\t\t\t14548A11253E0DC000E62C49 /* AdUtils.swift in Sources */,\n\t\t\t\t145A3202253EF50300A83B62 /* NativeTemplateScreenViewController.swift in Sources */,\n\t\t\t\t1499C93E253E495A003E0FE5 /* SettingScreenViewController.swift in Sources */,\n\t\t\t\t145A31FD253EF50300A83B62 /* NativeBannerTemplateAdView.swift in Sources */,\n\t\t\t\t82B89F4623F7F95900DF6E14 /* AppDelegate.swift in Sources */,\n\t\t\t\t145A31CE253ED12000A83B62 /* PickerTableViewCell.swift in Sources */,\n\t\t\t\t145A320A253EF5BC00A83B62 /* BottomBarView.swift in Sources */,\n\t\t\t\t82B89F4823F7F95900DF6E14 /* SceneDelegate.swift in Sources */,\n\t\t\t\t145A3203253EF50300A83B62 /* BannerSampleViewController.swift in Sources */,\n\t\t\t\t145A31FA253EF50300A83B62 /* NativeAdScreenViewController.swift in Sources */,\n\t\t\t\t145A31FC253EF50300A83B62 /* NativeBannerTemplateAdScreenViewController.swift in Sources */,\n\t\t\t\t145A320E253EF61D00A83B62 /* NavigationController.swift in Sources */,\n\t\t\t\t145A31D6253EE15A00A83B62 /* ViewModels.swift in Sources */,\n\t\t\t\t1468FC7A252F33B7004E2CD9 /* NSObject+ClassName.swift in Sources */,\n\t\t\t\t145A3206253EF57800A83B62 /* SamplesViewController.swift in Sources */,\n\t\t\t\t145A3201253EF50300A83B62 /* NativeTemplateAdView.swift in Sources */,\n\t\t\t\t145A31F8253EF50300A83B62 /* FullscreenAdSampleViewController.swift in Sources */,\n\t\t\t\t1437CFB92538A405003DB489 /* UIViewController+Storyboard.swift in Sources */,\n\t\t\t\t145A31F9253EF50300A83B62 /* NativeAdView.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t82B89F4D23F7F95900DF6E14 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t82B89F4E23F7F95900DF6E14 /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t82B89F5223F7F95B00DF6E14 /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t82B89F5323F7F95B00DF6E14 /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t82B89F5623F7F95B00DF6E14 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.2;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t82B89F5723F7F95B00DF6E14 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.2;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t82B89F5923F7F95B00DF6E14 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 4F0CF2FBCD28B527F12C5658 /* Pods-FANSample.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tDEVELOPMENT_TEAM = V9WTTPBFK9;\n\t\t\t\tGCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;\n\t\t\t\tINFOPLIST_FILE = FANSample/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.facebook.audiencenetwork.FANSample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"Facebook Generic\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t82B89F5A23F7F95B00DF6E14 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7344E3D24EBE09AC50121E89 /* Pods-FANSample.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tDEVELOPMENT_TEAM = V9WTTPBFK9;\n\t\t\t\tGCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;\n\t\t\t\tINFOPLIST_FILE = FANSample/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.facebook.audiencenetwork.FANSample;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"Facebook Generic\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t82B89F3D23F7F95900DF6E14 /* Build configuration list for PBXProject \"FANSample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t82B89F5623F7F95B00DF6E14 /* Debug */,\n\t\t\t\t82B89F5723F7F95B00DF6E14 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t82B89F5823F7F95B00DF6E14 /* Build configuration list for PBXNativeTarget \"FANSample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t82B89F5923F7F95B00DF6E14 /* Debug */,\n\t\t\t\t82B89F5A23F7F95B00DF6E14 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 82B89F3A23F7F95900DF6E14 /* Project object */;\n}\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample.xcodeproj/xcshareddata/xcschemes/FANSample.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1200\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"82B89F4123F7F95900DF6E14\"\n               BuildableName = \"FANSample.app\"\n               BlueprintName = \"FANSample\"\n               ReferencedContainer = \"container:FANSample.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"82B89F4123F7F95900DF6E14\"\n            BuildableName = \"FANSample.app\"\n            BlueprintName = \"FANSample\"\n            ReferencedContainer = \"container:FANSample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"82B89F4123F7F95900DF6E14\"\n            BuildableName = \"FANSample.app\"\n            BlueprintName = \"FANSample\"\n            ReferencedContainer = \"container:FANSample.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:FANSample.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "samples/ios/FANSample/FANSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "samples/ios/FANSample/Podfile",
    "content": "# Uncomment the next line to define a global platform for your project\nplatform :ios, '9.0'\n\nuse_frameworks!\n\ntarget 'FANSample' do\n  pod 'FBAudienceNetwork'\nend\n"
  },
  {
    "path": "samples/ios/FANSample/README.md",
    "content": "# FANSample <img align=\"left\" height=42 src=\"https://facebookbrand.com/wp-content/uploads/2016/10/Audience_Network_Alvin_Logo_Grape_rgb1.png\">\n\nThis Swift sample project demonstrates how to use various ad units supported by our Facebook Ads SDK.\nNative ads will give you the flexibility to render the ad in a more native format that blends into your app. \nWe also show how to wire up the delegate to get notified when the ad status changes over time or when the user interacts with the ad.\n\n### Brief usage example\n\n`FBNativeAd` can be used to show a native ad with a few simple steps:\n\n```Swift\n// Instantiate an ad with placement ID\nlet ad = FBNativeAd(placementID: \"YOUR_PLACEMENT_ID\")\n\n// Wire up the FBNativeAdDelegate delegate (See documentation for more information).\n// It is a good practice to set the delegate of the ad and implement the callback methods.\nad.delegate = self\n\n// Load the ad\nad.loadAd()\n```\n\nMore information regarding API usage can be found in the sample project.\n\n### Samples shown in this project\n\n- Interstitial ad (a full screen ad)\n- Rewarded video ad (a full screen ad that shows a video).\n- Native banner ad composed of native views.\n- Native ad from template (layout that can be shown in various sizes)\n- Native banner ad from template (layout that can be shown in various sizes).\n\n### How to setup the project\n\n1. Make sure [CocoaPods](https://cocoapods.org/) is installed on your machine.\n2. Go to the project directory and run `pod install`.\n3. A workspace file named `FANSample.xcworkspace` will be generated. Open it using Xcode.\n4. You can find the samples under `FANSamples/Samples`. Replace \"YOUR_PLACEMENT_ID\" with the Placement ID you created through [developer.facebook.com](https://developers.facebook.com/).\n5. Run the project either on a simulator or a device.\n\n### Test ads\n\nWhen running the project on a simulator, test ads are served by default. However, on a device real ads will be served unless you specify otherwise.\nIf you test your app on a device, please make sure to call the following API to enable test ads:\n\n`FBAdSettings.addTestDevice(\"<your device hash printed out on console>\")`\n\n### Additional resources\n\n- [Audience Network Docs](https://developers.facebook.com/docs/audience-network)\n- [Getting Started](https://developers.facebook.com/docs/audience-network/get-started/ios)\n- [SDK Reference Documentation](https://developers.facebook.com/docs/audience-network/reference/)\n"
  },
  {
    "path": "samples/ios/README.md",
    "content": "Samples for iOS\n===============\n\nFacebook Audience Network allows you to monetize your iOS apps with Facebook ads. Here we have a list of sample apps that implements different ad placements for your reference.\n\nPlease make sure that you have completed the [Audience Network Getting Started][1] and [iOS Getting Started][2] guides before you proceed.\n\nThe sample projects are setup with [Cocoa Pods][7].  You would need to run `pod install` in the project folder from command line to download the latest Audience Network SDK.\n\nSample list\n-----------\n\nThese sample projects include demonstration for different placement formats including [Banner][3], [Interstitial][4], [Rewarded Video][9], [In-stream Video][8] [Native][5] and [Native Banner Ads][10].\n\n- [AdUnitsSample](./AdUnitsSample) - An Objective C sample project. \n- [FANSample](./FANSample) - A Swift sample project.\n\n[1]: https://developers.facebook.com/docs/audience-network/getting-started\n[2]: https://developers.facebook.com/docs/audience-network/ios\n[3]: https://developers.facebook.com/docs/audience-network/ios-banners\n[4]: https://developers.facebook.com/docs/audience-network/ios-interstitial\n[5]: https://developers.facebook.com/docs/audience-network/ios-native\n[8]: https://developers.facebook.com/docs/audience-network/ios/instream-video\n[9]: https://developers.facebook.com/docs/audience-network/ios/rewarded-video\n[10]: https://developers.facebook.com/docs/audience-network/ios-native-banner\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/.gitignore",
    "content": "# Created by .ignore support plugin (hsz.mobi)\n### Python template\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nenv/\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\n*.egg-info/\n.installed.cfg\n*.egg\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*,cover\n.hypothesis/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\ntarget/\n\n# IPython Notebook\n.ipynb_checkpoints\n\n# pyenv\n.python-version\n\n# celery beat schedule file\ncelerybeat-schedule\n\n# dotenv\n.env\n\n# virtualenv\nvenv/\nENV/\n\n# Spyder project settings\n.spyderproject\n\n# Rope project settings\n.ropeproject\n### VirtualEnv template\n# Virtualenv\n# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/\n.Python\n[Bb]in\n[Ii]nclude\n[Ll]ib\n[Ll]ib64\n[Ll]ocal\n[Ss]cripts\npyvenv.cfg\n.venv\npip-selfcheck.json\n### JetBrains template\n# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm\n# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839\n\n# User-specific stuff:\n.idea/workspace.xml\n.idea/tasks.xml\n.idea/dictionaries\n.idea/vcs.xml\n.idea/jsLibraryMappings.xml\n\n# Sensitive or high-churn files:\n.idea/dataSources.ids\n.idea/dataSources.xml\n.idea/dataSources.local.xml\n.idea/sqlDataSources.xml\n.idea/dynamic.xml\n.idea/uiDesigner.xml\n\n# Gradle:\n.idea/gradle.xml\n.idea/libraries\n\n# Mongo Explorer plugin:\n.idea/mongoSettings.xml\n\n.idea/\n\n## File-based project format:\n*.iws\n\n## Plugin-specific files:\n\n# IntelliJ\n/out/\n\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Crashlytics plugin (for Android Studio and IntelliJ)\ncom_crashlytics_export_strings.xml\ncrashlytics.properties\ncrashlytics-build.properties\nfabric.properties\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/CONTRIBUTING.md",
    "content": "# Contributing to audience-network-reporting-api-samples\n\nWe want to make contributing to this project as easy and transparent as possible.\n\n## Our Development Process\n\naudience-network-reporting-api-samples is maintained and developed on github.\n\nSend us your pull requests, and we'd be happy to provide feedback and merge as appropriate.\n\n## Pull Requests\nWe actively welcome your pull requests.\n1. Fork the repo and create your branch from `master`.\n2. If you've added code that should be tested, add tests\n3. If you've changed APIs, update the documentation.\n4. Make sure your code lints (e.g., pyflakes, PEP8, etc)\n5. If you haven't already, complete the Contributor License Agreement (\"CLA\").\n\n## Contributor License Agreement (\"CLA\")\nIn order to accept your pull request, we need you to submit a CLA. You only need\nto do this once to work on any of Facebook's open source projects.\n\nComplete your CLA here: <https://code.facebook.com/cla>\n\n## Issues\nWe use GitHub issues to track public bugs. Please ensure your description is\nclear and has sufficient instructions to be able to reproduce the issue.\n\n## License\nBy contributing to audience-network-reporting-api-samples, you agree that your contributions will be licensed\nunder the LICENSE file in the root directory of this source tree.\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/LICENSE.md",
    "content": "BSD License\n\nFor audience-network-reporting-api-samples software\n\nCopyright (c) 2017-present, Facebook, Inc. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n * Neither the name Facebook nor the names of its contributors may be used to\n   endorse or promote products derived from this software without specific\n   prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/PATENTS.md",
    "content": "Additional Grant of Patent Rights Version 2\n\n\"Software\" means the audience-network-reporting-api-samples software contributed by Facebook, Inc.\n\nFacebook, Inc. (\"Facebook\") hereby grants to each recipient of the Software\n(\"you\") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable\n(subject to the termination provision below) license under any Necessary\nClaims, to make, have made, use, sell, offer to sell, import, and otherwise\ntransfer the Software. For avoidance of doubt, no license is granted under\nFacebook’s rights in any patent claims that are infringed by (i) modifications\nto the Software made by you or any third party or (ii) the Software in\ncombination with any software or other technology.\n\nThe license granted hereunder will terminate, automatically and without notice,\nif you (or any of your subsidiaries, corporate affiliates or agents) initiate\ndirectly or indirectly, or take a direct financial interest in, any Patent\nAssertion: (i) against Facebook or any of its subsidiaries or corporate\naffiliates, (ii) against any party if such Patent Assertion arises in whole or\nin part from any software, technology, product or service of Facebook or any of\nits subsidiaries or corporate affiliates, or (iii) against any party relating\nto the Software. Notwithstanding the foregoing, if Facebook or any of its\nsubsidiaries or corporate affiliates files a lawsuit alleging patent\ninfringement against you in the first instance, and you respond by filing a\npatent infringement counterclaim in that lawsuit against that party that is\nunrelated to the Software, the license granted hereunder will not terminate\nunder section (i) of this paragraph due to such counterclaim.\n\nA \"Necessary Claim\" is a claim of a patent owned by Facebook that is\nnecessarily infringed by the Software standing alone.\n\nA \"Patent Assertion\" is any lawsuit or other action alleging direct, indirect,\nor contributory infringement or inducement to infringe any patent, including a\ncross-claim or counterclaim.\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/README.md",
    "content": "# Audience Network Reporting API Samples\nThe Audience Network Reporting API lets you automate downloading performance data for\nyour Business and Properties. This sample project walks through key API features and use cases\nin Python to send requests (sync or async) to fetch performance data and save them as .csv file.\n\nThe API now supports sync (GET request) and async (POST request). Sync requests are\nlight and immediately return data. Async requests are designed to handle heavier data\nloads and return a query ID for you to retrieve the data at a later time. More info below.\n\nThis repository includes contents as follows:\n\n## Recommendation\n\nWe highly recommend you include our adnw_examples.py into your project because those examples are the best practices for\naccessing our end point.\n\nAfter you fetch query ids successfully, please wait for a few seconds (i.e. 10 seconds) before you send another \"async\" request with\nquery ids such that you are guaranteed to get results. Also, please do not try to request more than 50 times within 60 seconds.\n\n## Run Reporting API Examples\n\nIn adnw_examples.py, it provides examples using adnw_requests to build sync and async requests\nto get data. Uncomment corresponding test cases in adnw_examples.py and run it.\n\n## Versions\n\nThe python version is 3.6.<br>\nThe [requests library](https://github.com/requests/requests) version is 2.18.4."
  },
  {
    "path": "samples/python/ReportingAPISamples/adnw_examples.py",
    "content": "from adnw_requests import *\nfrom adnw_utils import *\nfrom adnw_response import *\nfrom time import sleep\nimport datetime\n\n\n\"\"\" Run sync request, but there are some limitations.\n    Support only one metric and two max breakdowns per request. \n\"\"\"\ndef run_sync_request(app_id, access_token):\n    builder = ADNWRequestBuilder(app_id, access_token)\n    builder.add_metric(Metric.ADNW_REQUEST)\n    builder.add_filter(Filter(Breakdown.COUNTRY, FilterOperator.IN, ['US', 'JP']))\n    builder.add_filter(Filter(Breakdown.PLATFORM, FilterOperator.IN, ['ios', 'android', 'unknown']))\n    builder.add_breakdown(Breakdown.COUNTRY)\n    builder.add_breakdown(Breakdown.PLATFORM)\n    builder.set_date_range(datetime.date(2018, 4, 1), datetime.date(2018, 4, 1))\n    builder.set_limit(MAX_ROW_LIMIT_SYNC)\n    sync_request = builder.build_sync_request()\n    ADNWResponse.get_instance().validate_response(sync_request)\n    adnw_utils.write_to_csv(sync_request.json())\n\n\n\"\"\" Run async request to get request id (no limitations on params),\n    then run sync request with request id.\n    No max metric and breakdowns per request. \n\"\"\"\ndef run_async_request_1(app_id, access_token):\n    builder = ADNWRequestBuilder(app_id, access_token)\n    builder.add_metric(Metric.ADNW_IMPRESSION)\n    builder.add_metric(Metric.ADNW_REQUEST)\n    builder.add_filter(Filter(Breakdown.COUNTRY, FilterOperator.IN, ['US', 'JP']))\n    builder.add_filter(Filter(Breakdown.PLATFORM, FilterOperator.IN, ['ios', 'android']))\n    builder.add_breakdown(Breakdown.COUNTRY)\n    builder.add_breakdown(Breakdown.PLACEMENT)\n    builder.set_date_range(datetime.date(2018, 4, 1), datetime.date(2018, 4, 1))\n    builder.set_limit(MAX_ROW_LIMIT_ASYNC)\n    async_request = builder.build_async_request()\n    adnw_response = ADNWResponse.get_instance()\n    adnw_response.validate_response(async_request)\n    query_id = adnw_response.get_query_id(async_request.json())\n    print(\"Successfully get valid query id: \" + query_id)\n    return query_id\n\n\n\"\"\" Run multiple async request to get request ids (no limitations on params),\n    then run sync request with multiple request ids.\n    No max metric and breakdowns per request. \n\"\"\"\ndef run_async_request_2(app_id, access_token):\n    builder = ADNWRequestBuilder(app_id, access_token)\n    builder.add_metric(Metric.ADNW_CMP)\n    builder.add_metric(Metric.ADNW_CLICK)\n    builder.add_filter(Filter(Breakdown.COUNTRY, FilterOperator.IN, ['MK', 'SB']))\n    builder.add_filter(Filter(Breakdown.PLATFORM, FilterOperator.IN, ['ios', 'unknown']))\n    builder.add_breakdown(Breakdown.PLATFORM)\n    builder.add_breakdown(Breakdown.PLACEMENT)\n    builder.set_limit(MAX_ROW_LIMIT_ASYNC)\n    async_request = builder.build_async_request()\n    adnw_response = ADNWResponse.get_instance()\n    adnw_response.validate_response(async_request)\n    query_id = adnw_response.get_query_id(async_request.json())\n    print(\"Successfully get valid query id: \" + query_id)\n    return query_id\n\n\ndef run_async_request_for_result_1(app_id, access_token):\n    query_id = run_async_request_1(app_id, access_token)\n    \"\"\"The waiting period here is to make sure the results have been generated on our backend.\"\"\"\n    sleep(10)\n    try_run_async_request_with_query_ids(app_id, access_token, [query_id])\n\n\ndef run_async_request_for_result_2(app_id, access_token):\n    query_id_1 = run_async_request_1(app_id, access_token)\n    query_id_2 = run_async_request_2(app_id, access_token)\n    \"\"\"The waiting period here is to make sure the results have been generated on our backend.\"\"\"\n    sleep(10)\n    try_run_async_request_with_query_ids(app_id, access_token, [query_id_1, query_id_2])\n\n\ndef try_run_async_request_with_query_ids(app_id, access_token, query_ids: [string]):\n    for i in range(0, 3):\n        try:\n            run_async_request_with_query_ids(app_id, access_token, query_ids)\n            break\n        except adnw_exception.ValidationError as error:\n            print(error.message)\n            \"\"\"Waiting 60 seconds if first async request fails, because clustering too many requests \n            in our backend will slow your process of fetching results.\"\"\"\n            sleep(60)\n            continue\n\n\ndef run_async_request_with_query_ids(app_id, access_token, query_ids: [string]):\n    builder = ADNWRequestBuilder(app_id, access_token)\n    builder.set_query_ids(query_ids)\n    sync_request = builder.build_sync_request_with_query_ids()\n    ADNWResponse.get_instance().validate_response(sync_request)\n    adnw_utils.write_to_csv(sync_request.json())\n\n\nif __name__ == '__main__':\n\n    \"\"\"Replace with your app_id and valid access_token to start your testing.\"\"\"\n    _app_id = \"YOUR_APP_ID\"\n    _access_token = \"USER_ACCESS_TOKEN\"\n\n    \"\"\"Uncomment corresponding function for testing.\"\"\"\n    # run_sync_request(_app_id, _access_token)\n\n    run_async_request_for_result_1(_app_id, _access_token)\n\n    # run_async_request_for_result_2(_app_id, _access_token)"
  },
  {
    "path": "samples/python/ReportingAPISamples/adnw_exception.py",
    "content": "class ValidationError(Exception):\n    def __init__(self, message, errors=None):\n        super().__init__(message)\n        self.errors = errors\n        self.message = message\n\n\nclass HttpResponseError(Exception):\n    def __init__(self, message, errors=None):\n        super().__init__(message)\n        self.errors = errors\n        self.message = message\n\n\nclass InvalidQueryIdError(Exception):\n    def __init__(self, message, errors=None):\n        super().__init__(message)\n        self.errors = errors\n        self.message = message"
  },
  {
    "path": "samples/python/ReportingAPISamples/adnw_params.py",
    "content": "import enum\nimport string\n\n# Params Key\nMETRICS = 'metrics'\nBREAKDOWNS = 'breakdowns'\nFILTERS = 'filters'\nVALUES = 'values'\nORDERING_COLUMN = 'ordering_column'\nORDERING_TYPE = 'ordering_type'\nLIMIT = 'limit'\nAGGREGATION_PERIOD = 'aggregation_period'\nDate_SINCE = 'since'\nDate_UNTIL = 'until'\n\n\n# Required Parameters for Sync Request without query ids\nclass Metric(enum.Enum):\n    ADNW_REVENUE = 'fb_ad_network_revenue'\n    ADNW_REQUEST = 'fb_ad_network_request'\n    ADNW_CMP = 'fb_ad_network_cpm'\n    ADNW_CLICK = 'fb_ad_network_click'\n    ADNW_IMPRESSION = 'fb_ad_network_imp'\n    ADNW_FILLED_REQUEST = 'fb_ad_network_filled_request'\n    ADNW_FILL_RATE = 'fb_ad_network_fill_rate'\n    ADNW_CTR = 'fb_ad_network_ctr'\n    ADNW_SHOW_RATE = 'fb_ad_network_show_rate'\n    ADNW_VIDEO_GUARANTEE_REVENUE = 'fb_ad_network_video_guarantee_revenue'\n    ADNW_VIDEO_VIEW = 'fb_ad_network_video_view'\n    ADNW_VIDEO_VIEW_RATE = 'fb_ad_network_video_view_rate'\n    ADNW_VIDEO_MRC = 'fb_ad_network_video_mrc'\n    ADNW_VIDEO_MRC_RATE = 'fb_ad_network_video_mrc_rate'\n    ADNW_BIDDING_REQUEST = 'fb_ad_network_bidding_request'\n    ADNW_BIDDING_RESPONSE = 'fb_ad_network_bidding_response'\n\n\n# Optional Parameters\nclass Breakdown(enum.Enum):\n    COUNTRY = 'country'\n    DELIVERY_METHOD = 'delivery_method'\n    PLATFORM = 'platform'\n    APP = 'app'\n    PROPERTY = 'property'\n    PLACEMENT = 'placement'\n    DEAL = 'deal'\n\n\nclass FilterOperator(enum.Enum):\n    IN = 'in'\n\n\nclass Filter:\n    def __init__(self, condition: Breakdown, operator: FilterOperator, filters: [string]):\n        self.condition = condition\n        self.operator = operator\n        self.filters = filters\n\n    def raw_value(self):\n        return {'field': self.condition.value,\n                'operator': self.operator.value,\n                'values': self.filters}\n\n    def __hash__(self):\n        return self.condition.__hash__()\n\n    def __eq__(self, other):\n        return self.condition == other.condition\n\n\nclass OrderingColumn(enum.Enum):\n    TIME = 'time'\n    VALUE = 'value'\n\n\nclass OrderingType(enum.Enum):\n    ASCENDING = 'ascending'\n    DESCENDING = 'descending'\n\n\nclass AggregationPeriod(enum.Enum):\n    DAY = 'day'\n    TOTAL = 'total'\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/adnw_requests.py",
    "content": "import datetime\nimport requests\nimport json\nimport adnw_utils\nfrom adnw_params import *\n\n# Base URL\nBASE_URL = 'https://graph.facebook.com'\nAPI_VERSION = 'v10.0'\nADNW_REQUEST_API = '/adnetworkanalytics'\nADNW_REQUEST_API_BY_QUERY_IDS = '/adnetworkanalytics_results'\nACCESS_TOKEN_KEY = 'access_token'\nQUERY_IDS = 'query_ids'\nMAX_ROW_LIMIT_ASYNC = 10000\nMAX_ROW_LIMIT_SYNC = 1000\nnow = datetime.datetime.now()\ndate_format = \"%Y-%m-%d\"\n\n\nclass ADNWRequestBuilder(object):\n\n    def __init__(self, app_id: string, access_token: string):\n        self.url = BASE_URL + '/' + API_VERSION + '/' + app_id\n        self.access_token = access_token\n        self.metrics = set()\n        self.breakdowns = set()\n        self.date_since = now.date() + datetime.timedelta(days=-6)\n        self.date_until = now.date()\n        self.filters = set()\n        self.ordering_column = OrderingColumn.TIME\n        self.ordering_type = OrderingType.ASCENDING\n        self.limit = MAX_ROW_LIMIT_SYNC\n        self.aggregation_period = AggregationPeriod.DAY\n        self.query_ids = set()\n\n    def add_metrics(self, metrics: [Metric]):\n        self.metrics.add(metrics)\n\n    def add_metric(self, metric: Metric):\n        self.metrics.add(metric)\n\n    def add_breakdowns(self, breakdowns: [Breakdown]):\n        self.breakdowns.add(breakdowns)\n\n    def add_breakdown(self, breakdown: Breakdown):\n        self.breakdowns.add(breakdown)\n\n    def set_date_range(self, date_since: datetime.date, date_until: datetime.date):\n        self.date_since = date_since\n        self.date_until = date_until\n\n    def add_filters(self, filters: [Filter]):\n        self.filters.add(filters)\n\n    def add_filter(self, _filter: Filter):\n        self.filters.add(_filter)\n\n    def set_ordering_type(self, ordering_type: OrderingType):\n        self.ordering_type = ordering_type\n\n    def set_ordering_column(self, ordering_column: OrderingColumn):\n        self.ordering_column = ordering_column\n\n    def set_aggregation_period(self, aggregation_period: AggregationPeriod):\n        self.aggregation_period = aggregation_period\n\n    def set_limit(self, limit: int):\n        self.limit = limit\n\n    def set_query_ids(self, query_ids: [string]):\n        self.query_ids = query_ids\n\n    \"\"\" Build sync request with provided params.\"\"\"\n    def build_sync_request(self):\n        sync_url = self.url + ADNW_REQUEST_API + '/'\n        self.validate_params()\n        return requests.get(sync_url, self.get_params())\n\n    \"\"\" Build sync request with query ids and access token.\n        Any other param will be ignored.\n    \"\"\"\n    def build_sync_request_with_query_ids(self):\n        sync_url = self.url + ADNW_REQUEST_API_BY_QUERY_IDS + '/'\n        print(\"You are using query ids to get results.\"\n              \" The fields except for query ids and access token will be ignored.\")\n        self.validate_params(is_using_query_ids=True)\n        params = {\n            ACCESS_TOKEN_KEY: self.access_token,\n            QUERY_IDS: json.dumps(self.query_ids)\n        }\n        return requests.get(sync_url, params)\n\n    \"\"\" Build async request to fetch query id.\"\"\"\n    def build_async_request(self):\n        async_url = self.url + ADNW_REQUEST_API + '/'\n        self.validate_params(is_sync_request=False)\n        return requests.post(async_url, json=self.get_params())\n\n    def get_params(self):\n        metrics_list = list(map(adnw_utils.raw_value, self.metrics))\n        breakdowns_list = list(map(adnw_utils.raw_value, self.breakdowns))\n        filters_list = list(map(adnw_utils.raw_statement, self.filters))\n        return {\n            ACCESS_TOKEN_KEY: self.access_token,\n            METRICS: json.dumps(metrics_list),\n            BREAKDOWNS: json.dumps(breakdowns_list),\n            Date_SINCE: self.date_since.strftime(date_format),\n            Date_UNTIL: self.date_until.strftime(date_format),\n            FILTERS: json.dumps(filters_list),\n            ORDERING_COLUMN: self.ordering_column.value,\n            ORDERING_TYPE: self.ordering_type.value,\n            LIMIT: self.limit,\n            AGGREGATION_PERIOD: self.aggregation_period.value\n        }\n\n    def validate_params(self, is_sync_request: bool = True, is_using_query_ids: bool = False):\n        if not is_using_query_ids and len(self.metrics) == 0:\n            raise Exception(\"The parameter metrics is required.\")\n\n        diff = (self.date_until - self.date_since).days\n        if diff >= 7 or diff < 0:\n            print(\"date since: \" + str(self.date_since))\n            print(\"date since: \" + str(self.date_until))\n        if diff >= 7:\n            raise Exception(\"The time range needs to be at most 7 days.\")\n        if diff < 0:\n            raise Exception(\"The time range is invalid.\")\n\n        if is_sync_request:\n            if len(self.metrics) > 1:\n                raise Exception(\"The parameter metrics cannot be more than 1 with Sync Request.\")\n            if len(self.breakdowns) > 2:\n                raise Exception(\"The parameter breakdowns cannot be more than 2 with Sync Request.\")\n            if self.limit > 1000:\n                raise Exception(\"The parameter limit cannot be more than 1000 with Sync Request.\")\n        else:\n            if self.limit > 10000:\n                raise Exception(\"The parameter limit cannot be more than 10000 with Async Request.\")\n\n        if is_using_query_ids:\n            if len(self.query_ids) <= 0:\n                raise Exception(\"The query ids are not valid in the request.\")\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/adnw_response.py",
    "content": "import json\nimport requests\nimport adnw_utils\nimport adnw_exception\n\n\nclass ADNWResponse(object):\n    __instance = None\n\n    @staticmethod\n    def get_instance():\n        if ADNWResponse.__instance is None:\n            ADNWResponse()\n        return ADNWResponse.__instance\n\n    def __init__(self):\n        if ADNWResponse.__instance:\n            raise Exception(\"ADNWResponse class is a singleton!\")\n        else:\n            ADNWResponse.__instance = self\n\n    \"\"\" Check error message if status_code is not 200.\n        Validate response (make sure the status in Json is \"complete\") \n        from sync request with query ids if status_code is 200.\n    \"\"\"\n    def validate_response(self, _request: requests.request):\n        _json = _request.json()\n        if _request.status_code != 200:\n            _error = _json[\"error\"]\n            _message = _error[\"message\"]\n            raise adnw_exception.HttpResponseError(_message)\n        else:\n            try:\n                _data = _json[\"data\"]\n                if adnw_utils.is_list_empty(_data):\n                    raise adnw_exception.InvalidQueryIdError(\"query id is invalid.\")\n                else:\n                    for each in _data:\n                        if each[\"status\"] != \"complete\":\n                            raise adnw_exception.ValidationError(\"Report is not ready in Backend, please retry later.\")\n            except KeyError:\n                return\n\n    def get_query_id(self, _json: json):\n        try:\n            query_id = _json[\"query_id\"]\n        except KeyError:\n            raise adnw_exception.InvalidQueryIdError(\"Unable to get valid query id.\")\n        return query_id\n\n"
  },
  {
    "path": "samples/python/ReportingAPISamples/adnw_utils.py",
    "content": "from adnw_params import *\nimport datetime\nimport json\nimport csv\nimport shutil\nimport os.path\n\n\nflat_item = {}\nREPORTS_DIR = 'csv_reports'\n\n\ndef raw_value(enum_val: enum.Enum):\n    return enum_val.value\n\n\ndef raw_statement(_filter: Filter):\n    return _filter.raw_value()\n\n\ndef validate(date_text: string):\n    try:\n        datetime.datetime.strptime(date_text, '%Y-%m-%d')\n    except ValueError:\n        raise ValueError(\"Invalid data format, should be YYYY-MM-DD\")\n\n\n\"\"\" Flatten nested Json object.\"\"\"\ndef flatten_item(value, key=None):\n    global flat_item\n\n    if type(value) is list:\n        for item in value:\n            flatten_item(item)\n    elif type(value) is dict:\n        (sub_key, sub_value) = add_separated_key_value_if_needed(value)\n        if not (sub_key or sub_value):\n            for (sub_key, sub_value) in value.items():\n                flatten_item(sub_value, sub_key)\n        else:\n            flat_item[sub_key] = sub_value\n\n    elif type(key) is str:\n        flat_item[key] = value\n\n\n\"\"\" Flatten nested Json and save to csv file\"\"\"\ndef write_to_csv(_json: json):\n    if os.path.exists(REPORTS_DIR):\n        shutil.rmtree(REPORTS_DIR)\n\n    if not _json:\n        print(\"Failed to writing results to csv, json results: \\n\" + str(_json))\n        return\n\n    flat_datas = list()\n    global flat_item\n    data_array = _json[\"data\"]\n    for data in data_array:\n        flat_items = list()\n        for item in data[\"results\"]:\n            flat_item = {}\n            flatten_item(item)\n            flat_items.append(flat_item)\n        flat_datas.append(flat_items)\n\n    if is_list_empty(flat_datas) or is_list_empty(flat_datas[0]):\n        print(\"Failed to writing results to csv, json results: \\n\" + str(_json))\n        return\n\n    if not os.path.exists(REPORTS_DIR):\n        os.makedirs(REPORTS_DIR)\n\n    i = 0\n    for flat_items in flat_datas:\n        if is_list_empty(flat_items):\n            continue\n        csv_output = csv.DictWriter(open(REPORTS_DIR + \"/report_\" + str(i) + \".csv\", \"w+\"), flat_items[0].keys(), quoting=csv.QUOTE_ALL)\n        csv_output.writeheader()\n        for flat_item in flat_items:\n            csv_output.writerow(flat_item)\n        i += 1\n\n    print(\"json response: \" + str(_json))\n    print(\"Finish writing results to csv, check 'csv_reports/report.csv' in root directory.\")\n\n\ndef add_separated_key_value_if_needed(node: dict):\n    key = None\n    value = None\n    for (sub_key, sub_value) in node.items():\n        if sub_key == 'key':\n            key = sub_value\n        elif sub_key == 'value':\n            value = sub_value\n        else:\n            break\n    return key, value\n\n\ndef is_list_empty(_list: list):\n    return _list is None or len(_list) == 0\n\n\n"
  }
]