Skip to content

Modus-Logo-Long-BlackCreated with Sketch.

  • Services
  • Work
  • Blog
  • Resources

    OUR RESOURCES

    Innovation Podcast

    Explore transformative innovation with industry leaders.

    Guides & Playbooks

    Implement leading digital innovation with our strategic guides.

    Practical guide to building an effective AI strategy
  • Who we are

    Our story

    Learn about our values, vision, and commitment to client success.

    Open Source

    Discover how we contribute to and benefit from the global open source ecosystem.

    Careers

    Join our dynamic team and shape the future of digital transformation.

    How we built our unique culture
  • Let's talk
  • EN
  • FR

While React Native is a relatively new framework, native iOS application development has been around since March 2008. Through the years, the development community has released many open source components, companies have developed countless internal artifacts and, more importantly, Apple has provided us with a library of first party components that we can embed in our application. We’re going to take a look at how we can take an existing native iOS UI View Controller and render it inside our React Native app.

Let’s Visualize the App

For us to figure out how to render an external iOS View Controller we should visualize what our Native App will look like. On the left hand side, we have our view controller that will render and be able to communicate with our React Native code on the right.

Native App View

In order to accomplish the rendering of the view and facilitate communication to the React Native app, we need to create a React Native Module that logically encapsulates this View Controller instance.

Native App View with custom view manager highlighted

Before we continue further, we should take a look at the component structure of a standard React Native iOS application.

component structure of a standard React Native iOS application

The one important component to note here is the instance of UIViewController (named rootViewController in your AppDelegate implementation).

Our next step here is to expose our rootViewController variable as a property attached to our AppDelegate. This will allow for other classes to reference this controller, and in our case if they are an instance of UIViewController present themselves on the screen.

Our Native Module

Now that we have our rootViewController accessible from outside our AppDelegate we can create our Native Module that will wrap the view we want to display. For our example we will be using the MPMediaPickerController. This is a subclass of UIViewController that is responsible for displaying the iOS Media Library (aka iPod library). The MPMediaPickerController is an excellent example since it is a modal controller and also implements a delegate (MPMediaPickerControllerDelegate) that we will leverage.

Here is the sample MediaController class we will be implementing. Note: to support playing the audio track selected, we are including use of the AVAudioPlayer class.

The following are a few snippets that handle the two major things we need:
1) Displaying and hiding the media library

2) Communicating with our React Native application in regards to what was done in the MPMediaPickerController

Here we’re firing an event SongPlaying through the RCTBridge with the track title.

Here we are adding a listener for the event and updating our state accordingly.

For further reference, here is the full implementation of our MediaController

Posted in Application Development
Share this

Stan Bershadskiy

Stan Bershadskiy specializes in all things JavaScript with vast knowledge in Sencha frameworks. Recently, he has directed his focus towards React Native and has co-authored The React Native Cookbook. Stan is located in New York City and can be found presenting at conferences around the country. During his time with Modus Create, Stan filled the role of Architect.
Follow

Related Posts

  • React Navigation and Redux in React Native Applications
    React Navigation and Redux in React Native Applications

    In React Native, the question of “how am I going to navigate from one screen…

  • Using ES2016 Decorators in React Native
    Using ES2016 Decorators in React Native

    *picture courtesy of pixabayDecorators are a popular bit of functionality currently in Stage 1 of…

Want more insights to fuel your innovation efforts?

Sign up to receive our monthly newsletter and exclusive content about digital transformation and product development.

What we do

Our services
AI and data
Product development
Design and UX
IT modernization
Platform and MLOps
Developer experience
Security

Our partners
Atlassian
AWS
GitHub
Other partners

Who we are

Our story
Careers
Open source

Our work

Our case studies

Our resources

Blog
Innovation podcast
Guides & playbooks

Connect with us

Get monthly insights on AI adoption

© 2025 Modus Create, LLC

Privacy PolicySitemap
Scroll To Top
  • Services
  • Work
  • Blog
  • Resources
    • Innovation Podcast
    • Guides & Playbooks
  • Who we are
    • Careers
  • Let’s talk
  • EN
  • FR