Configure iOS

OpenWeb Native View Configuration

  1. In the Podfile in your project's iOS folder, set use_frameworks!.
  2. (React Native 0.63+) Comment out the following lines within the Podfile to disable flipper.
#  post_install do |installer|
#  flipper_post_install(installer)

  1. (React Native 0.63+) In AppDelegate.m, remove the following lines to disable the Flipper initialization.
    #import <FlipperKit/FlipperClient.h>
    #import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
    #import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
    #import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
    #import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
    #import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

    static void InitializeFlipper(UIApplication *application) {
        FlipperClient *client = [FlipperClient sharedClient];
        SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
        [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
        [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
        [client addPlugin:[FlipperKitReactPlugin new]];
        [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
        client start];

  1. To support native navigation, wrap the app with a navigation controller.

    The default React-Native root view controller is an instance of UIViewController. OpenWeb uses UINavigationController to navigate to native view controllers.


@property (nonatomic, strong) UINavigationController *navControll;


UIViewController *rootViewController = [UIViewController new];
self.navControll = [[UINavigationController alloc] initWithRootViewController:rootViewController];
[self.navControll setNavigationBarHidden:YES]; // Hide nav bar if you don't use native navigation controller
rootViewController.view = rootView;
self.window.rootViewController = self.navControll;

Monetization Configuration (AdsProvider)

  1. Run pod install in the "ios" folder

  2. Open in Finder the following dir Pods\SpotImCore\SpotImAdsProvider\ and copy the file GoogleAdsProvider.swift into your app target folder (where AppDelegate.m\h are) and make sure that in Xcode GoogleAdsProvider.swift is included in your app target.

  1. In AppDelegate.m at the top add #import "<ProductName>-Swift.h (explanation here)

  2. In AppDelegate.m in application:didFinishLaunchingWithOptions: method, please add the following line:

[GoogleAdsProvider setSpotImSDKWithProvider];