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

252
Views
¿Cómo resolver los problemas que ocurren en iOS al crear el paquete NPM para React Native?

He seguido este artículo desde aquí para crear una biblioteca nativa de reacción. He publicado la biblioteca y la he usado en mi proyecto local. Funciona bien en Android, pero cuando intento ejecutarlo en iOS arroja errores como:

TypeError: null no es un objeto (evaluando '_exampleBridge.default.showMessage').

Error no detectado

Ya abrí el proyecto de la biblioteca en xcode13, se construye con éxito.
Gracias por adelantado.

 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!