Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
How to solve issues occurring in iOS while creating NPM package for React Native?

I have followed this article from here to create react native library. I have published the library and used it in my local project. It works fine in android but when I try to run it on iOS it throws errors like:

TypeError: null is not an object (evaluating '_exampleBridge.default.showMessage').

Uncaught error

I have already opened the library project in xcode13, it builds successfully.
Thanks in advance.

import React from 'react';
import { SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, useColorScheme, View, Button } from 'react-native';
import {Colors,Header} from 'react-native/Libraries/NewAppScreen';
import RNExampleBridge from 'example-bridge-1.0.8'

const App = () => {
  const isDarkMode = useColorScheme() === 'dark';

  const backgroundStyle = {
    backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
  };

  function showToastAlert(){
    RNExampleBridge.showMessage()
  }

  return (
    <SafeAreaView style={backgroundStyle}>
      <StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
      <ScrollView
        contentInsetAdjustmentBehavior="automatic"
        style={backgroundStyle}>
        <Header />
        <View
          style={{
            backgroundColor: isDarkMode ? Colors.black : Colors.white,
          }}>
          <View>
            <Button title="Show Native Message" onPress={() => { showToastAlert() }}/>
          </View>
        </View>
      </ScrollView>
    </SafeAreaView>
  );
};

export default App;
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!