Configure iOS

Integrate the React Native SDK with your iOS app

OpenWeb's React Native SDK enables you to seamlessly integrate web features and monetization strategies into your iOS app. The SDK allows you to incorporate engaging content and ads without compromising app performance or user experience.

The React Native SDK for iOS offers the following benefits:

  • Ensure smooth performance across iOS devices
  • Offer an intuitive navigation experience
  • Increase user interaction with engaging native features
  • Support ads to boost revenue

OpenWeb Native View Configuration

Follow these steps to configure the iOS native view with the React Native SDK:

  1. In the Podfile of your project, set use_frameworks!.

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

    The default React Native root ViewController 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;

Support Image Attachments

The React Native SDK enables users to add images to comments from a camera or photo library on an iOS device.

Follow this step to allow image attachments:

  1. In the project info.plist file, add NSPhotoLibraryUsageDescription and NSCameraUsageDescription.

    <string>This app wants to use your photos.</string>
    <string>This app wants to take pictures.</string>