I am not able to compile my project through expo.I have followed all steps to eject expo for run the app in iOS.Please find below error screen shot for your reference.enter link description here
There was problem loading requested app.it looks like you may be using LAN URL
Recommend shortcut in Siri after creating Siri shortcut - React Native
I have successfully implemented shortcut in React Native project via react-native-siri-shortcut
npm.
I am able to see all those shortcuts in Shortcut app(in iOS).
When I open Siri and speak them, Siri just opens my app.
I have added SiriShortcutListener in my app, and just displayed alert.
I don't know how to make Siri recommend some stuff or perform the action as I want it to.
Do I have to make any UI for that? Also, how activityType
should be used?
Any proper link or tutorial/help will be appreciated.
Icons from react-native-vector-icons onpress needs to click twice to work
I use react-native-vector-icons.
- Click the input
- Keyboard goes up
- When pressing the icon, icon doesn't trigger, the keyboard will go down first rather than the onpress method icon triggers while having the keyboard is on
Expected Result would like a live chat, while keyboard is up submit icon will always trigger.
I tried to enwrap it in scrollview with keyboardshouldpersisttaps and it doesn't work.
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : null}
style={{ flex: 1 }}
keyboardVerticalOffset={64}
>
<View style={styles.slide} key={i}>
<TouchableHighlight
style={styles.video}
onPress={this.handleDoubleTap}
onLongPress={this.handlePlayAndPause}
>
<ViewportAwareVideo
key={i}
source={{ uri: firstVideoUri }}
shouldPlay={this.state.shouldPlay}
isLooping
preTriggerRatio={-0.4} // default is 0
retainOnceInViewport={false} // default is false
style={styles.video}
onPlaybackStatusUpdate={this._onPlaybackStatusUpdate}
progressUpdateIntervalMillis={1000}
resizeMode='contain'
innerRef={ref => (this._videoRef = ref)}
onViewportEnter={() => {
this.setState({ shouldPlay: true });
}}
onViewportLeave={() => {
this.setState({ shouldPlay: false });
}}
/>
</TouchableHighlight>
{this.state.shouldPlay ? null : (
<TouchableHighlight
onPress={this.handlePlayAndPause}
style={styles.pauseBtn}
>
<IconComponent name='play-circle' size={50} color='black' />
</TouchableHighlight>
)}
<CopilotStep
name='swipeUp'
text='Swipe up to view next video'
order={5}
>
<WalkthroughableView style={styles.topSection}>
<Text style={styles.imageHeadingText}>{product.name}</Text>
{product.short_description === '' ? null : (
<HTML
html={product.short_description}
imagesMaxWidth={Dimensions.get('window').width}
containerStyle={styles.imageDescText}
baseFontStyle={styles.htmlStyle}
/>
)}
<CopilotStep
name='swipeRight'
text='Swipe right to view product details'
order={6}
>
<WalkthroughableView
style={{
flexDirection: 'row',
flexWrap: 'wrap',
paddingHorizontal: 20,
paddingVertical: 5
}}
>
{product.tags.map((value, index) => {
return (
<Text key={index} style={styles.tagText}>
{value.name.charAt(0) === '#'
? value.name
: '#' + value.name}
</Text>
);
})}
</WalkthroughableView>
</CopilotStep>
{product.total_sales > 0 ? (
<View
style={{
flexDirection: 'row',
flexWrap: 'wrap',
paddingHorizontal: 20,
paddingVertical: 5
}}
>
<Text style={styles.totalSales}>
{product.total_sales +
(product.total_sales > 100
? '+ bought'
: ' bought in the last 24 hours')}
</Text>
</View>
) : null}
</WalkthroughableView>
</CopilotStep>
<View style={styles.bottomSection}>
<View style={{ flex: 1, justifyContent: 'flex-end', height: 30 }}>
{this.state.messages.map((message, index) => (
<React.Fragment key={index}>
<View
key={index}
style={{
flexDirection: 'row',
alignItems: 'center',
marginHorizontal: 5,
marginVertical: 5,
paddingLeft: 10,
height: 20
}}
>
<Image
style={{ width: 20, height: 20, borderRadius: 20 / 2 }}
source={{ uri: 'https://picsum.photos/20/20' }}
/>
<Text
style={{
fontFamily: Constants.fontHeader,
marginHorizontal: 5,
color: '#007AFF'
}}
>
{message.user.name}
</Text>
<Text
style={{
fontFamily: Constants.fontHeader,
marginHorizontal: 5,
color: 'white'
}}
>
{message.text}
</Text>
</View>
</React.Fragment>
))}
</View>
<CopilotStep
name='chatOnFeed'
text='Click here to chat on video feed'
order={7}
>
<WalkthroughableTextInput
style={{
// position: 'absolute',
// bottom: 0,
// left: 0,
fontFamily: Constants.fontFamily,
marginBottom: 110,
marginHorizontal: 5,
marginVertical: 5,
paddingRight: 35,
paddingLeft: 20,
height: 35,
width: width - 60,
backgroundColor: 'white',
borderRadius: 25
}}
onChangeText={messageText => this.setState({ messageText })}
value={this.state.messageText}
placeholder='Share your thoughts'
placeholderTextColor='#9B9B9B'
/>
</CopilotStep>
<IconComponent
style={{ position: 'absolute', bottom: 115, right: 10 }}
name='arrow-right'
size={25}
color='black'
onPress={product => this.sendMessage(product)}
/>
</View>
<View style={styles.iconBar}>
<CopilotStep
name='productDetail'
text='Click here to got to product details'
order={8}
>
<WalkthroughableText>
<IconComponent
style={styles.iconBarIcon}
name='shopping-cart'
size={iconSize}
color='white'
onPress={() => {
this.props.onViewProductScreen({ product });
this.setState({ shouldPlay: false });
}}
/>
</WalkthroughableText>
</CopilotStep>
<Text style={styles.iconBarText}>Shop</Text>
<CopilotStep
name='like'
text='Click here to like this product'
order={9}
>
<WalkthroughableText>
<Entypo
style={styles.iconBarIcon}
name='heart'
size={30}
color={this.state.isInWishList ? 'red' : 'white'}
onPress={() => {
this.state.isInWishList
? this.props.removeWishListItem(product)
: this.props.addWishListItem(product);
this.setState(prevState => ({
isInWishList: !prevState.isInWishList
}));
}}
/>
</WalkthroughableText>
</CopilotStep>
<Text style={styles.iconBarText}>Like</Text>
<CopilotStep
name='share'
text='Click here to share this product'
order={10}
>
<WalkthroughableText>
<IconComponent
style={styles.iconBarIcon}
name='share'
size={iconSize}
color='white'
onPress={this.onShare}
/>
</WalkthroughableText>
</CopilotStep>
<Text style={styles.iconBarText}>Share</Text>
<CopilotStep
name='fullChat'
text='Click here to view full chat'
order={11}
>
<WalkthroughableText>
<IconComponent
style={[styles.iconBarIcon, { paddingTop: 4 }]}
name='message-circle'
size={iconSize}
color='white'
onPress={product => this.sendChat(product)}
/>
</WalkthroughableText>
</CopilotStep>
</View>
</View>
</KeyboardAvoidingView>
);
You can see my problem is on IconComponent after the WalkthroughableTextInput
React native: No active iOS device found
Xcode 11.2.1 (11B500)
React Native 0.61.5
After launching iOS app running npm run start
and npm run start:ios
from the terminal. The app builds successfully and launches on the iOS simulator (iPhone 11 - 13.2.2) but an error appears underneath with 'No active iOS device found'.
Why is this error showing even though the app launches and runs?
Download image not working on IOS device - React Native
I implemented functionality for download image in React Native using RNFetchBlob Its Working fine with android but on IOS device it's not working.
Following is my react native code for download functionality.
downloadImg = (url) => {
var that = this;
async function requestCameraPermission() {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,
{
title: 'Test App',
message: 'Test App needs access to your gallery ',
}
);
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
that.actualDownload(url);
} else {
Alert.alert('Permission Denied!', 'You need to give storage permission to download the file');
}
}
if (Platform.OS === 'android') {
requestCameraPermission();
} else {
this.actualDownload(url);
}
}
actualDownload = (url) => {
var date = new Date();
var image_URL = url;
var ext = this.getExtention(image_URL);
ext = "." + ext[0];
const { config, fs } = RNFetchBlob;
let PictureDir = Platform.OS === 'ios' ? fs.dirs.DocumentDir : fs.dirs.PictureDir;
let options = {
fileCache: true,
addAndroidDownloads: {
useDownloadManager: true,
notification: true,
path: PictureDir + "/Images/image_" + Math.floor(date.getTime()
+ date.getSeconds() / 2) + ext,
description: 'Image'
}
}
config(options).fetch('GET', image_URL).then((res) => {
console.log("Thank you","Image Downloaded Successfully.");
});
}
FB Login not working with React Native iOS v13+
I've a project with following configuration.
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-fbsdk": "^0.8.0"
I've setup Facebook login successfully with manually installed SDK components (i.e. FBSDK Core, Login, Share, ...). It worked completely fine with Android and iOS v12 but since iOS updated to v13, it is having Login isCancelled
in iOS 13+. I tried to update FBSDK to newer version using pod but it caused duplicate dependencies error.
Following is the error log from GraphRequest
on initiation
{
...
code: "ECOM.FACEBOOK.SDK.CORE8"
domain: "com.facebook.sdk.core"
message: "The operation couldn’t be completed. (com.facebook.sdk.core error 8.)"
...
}
And this is the error on LoginButton
press
{
declinedPermissions: null,
grantedPermissions: null,
isCancelled: true
}
I've tried multiple solutions available on stackoverflow& github like updating version, changing loginWithPermission
props etc but nothing work for me.
Kindly give me a suitable solution with manually updating the FBSDK version rather than pod
.
How to pass a state through tabnavigator react-native
I've been trying to implement an authentification system for my app using JWT. However when I can't figure out how can I pass my state through a navigator? This state will contain the token for the user. What I did is a easy system that check if the user has a token or not if he does not have one it will be redirected to the login page where he can either log in or register. If he choses to login I give him a token and then he's redirected to my homescreen using the Tab navigator I created. I know how to pass function through props using the navigator however I don't know when it comes to state. Here are some parts of code This is the logic of authentification part
newJWT(jwt){
this.setState({
jwt:jwt
});
}
render(){
if(this.state.isLoading){
return(
<View style={{flex:1,alignItems:'center',justifyContent:'center'}}>
<Loading size={'large'} />
</View>
);
}
else if(!this.state.jwt){
return(
<Auth newJWT={this.newJWT}
/>
)
}
else if (this.state.jwt){
return(
<Navigator
deleteJWT={this.deleteJWT}
/>
)
}
}
}
const TabNavigator = createBottomTabNavigator(
{
Home: {screen : HomeScreen,
navigationOptions :{
tabBarIcon : ({tintColor}) => (
<Icon
name='star'
type='material'
size={22}
color={tintColor}
/>
)
}
},
Profile: {screen : ProfileScreen,
navigationOptions :{
tabBarIcon : ({tintColor}) => (
<Icon
name='pencil-outline'
type='material-community'
size={22}
color={tintColor}
/>
)
}
}
},
}
);
const Nav = createAppContainer(TabNavigator)
export default class Navigator extends React.Component{
render(){
return <Nav
screenProps={{deleteJWT : this.props.deleteJWT}}
/>
}
}
Here I am I tried to pass it as a props but it does not work... I don't really know what to do here. I know that if I pass it through a direct component such as my homescreen it works but I would lose my navigator.
Thanks in advance
React Native 60 and above margin issue in iOS - Ignoring bogus layer size
I have used margin style in older react native projects, no issues with that. Now I am creating new RN project - 0.60.5 version.
return(
<ImageBackground
style={{ flex: 1, alignItems: "center", justifyContent: "center" }}
source={require('../images/bgImage.png')}
>
<View style={{backgroundColor:"white",height:"8%",
borderRadius:5,width:"70%",marginTop:10}}>
</View>
</ImageBackground>
)
In above code, after adding marginTop
in View
component iOS app hang and displayed the log as
Ignoring bogus layer size (179769313), contentsScale 1.000000, backing store size
If I remove the marginTop
style , then the UI will be rendered.
Have anyone has idea about it in React Native iOS? How to solve this?
Error while integrating RN FFMPEG in react native
**[!] There are multiple dependencies with different sources for `react-native-ffmpeg` in `Podfile`:
- react-native-ffmpeg (from `../node_modules/react-native-ffmpeg/ios`)
- react-native-ffmpeg (from `../node_modules/react-native-ffmpeg/ios/react-native-ffmpeg.podspec`)**
Getting this error.
- react-native-ffmpeg (from `../node_modules/react-native-ffmpeg/ios/react-native-ffmpeg.podspec`)
I need this in podfile but the previous
- react-native-ffmpeg (from
../node_modules/react-native-ffmpeg/ios
) is not even present in my podfile.
When I try to add a path it throws me the error. Please help
React/RCTBundleURLProvider.h file not found in library / extension
RN version 0.61 Trying to add today widget using ref:
https://medium.com/@maximtoyberman/building-a-react-native-today-widget-in-ios-102830825e42
Here, not able to access any react files at the extension level.
I am not facing any issue in AppDelgate.h as it's at the project level but in React/RCTBundleURLProvider.h which is in library folder.
Unable to scroll pdf file in android app used react-native-pdf
I have used react-native-pdf in my app and we want to scroll that pdf within the app however it is working fine in on ios but in android, it is not scrolling completely scroll up to 4 pages. there are 20 pages in the pdf. I have used the below code in my app:-
render () {
const source = require('./../../../assets/assets/pdfs/pdfname.pdf');
return (
<View style={styles.container}>
<Pdf
source={source}
onLoadComplete={(numberOfPages,filePath)=>{
console.log(`number of pages: ${numberOfPages}`);
}}
onPageChanged={(page,numberOfPages)=>{
console.log(`current page: ${page}`);
}}
onError={(error)=>{
console.log(error);
}}
style={styles.pdf}/>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'flex-start',
alignItems: 'center',
marginTop: 5,
},
pdf: {
flex:1,
width:Dimensions.get('window').width - 20,
}
});
render () {
const source = require('./../../../assets/assets/pdfs/ebook_1.pdf');
return (
<View style={styles.container}>
<Pdf
source={source}
onLoadComplete={(numberOfPages,filePath)=>{
console.log(`number of pages: ${numberOfPages}`);
}}
onPageChanged={(page,numberOfPages)=>{
console.log(`current page: ${page}`);
}}
onError={(error)=>{
console.log(error);
}}
style={styles.pdf}/>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'flex-start',
alignItems: 'center',
marginTop: 5,
},
pdf: {
flex:1,
width:Dimensions.get('window').width - 20,
}
});
I expect that my pdf scroll completely within the app.
Share video to Instagram on IOS with react-native-share
I'm using "rn-fetch-blob", "react-native-fs" and "react-native-share" to share video to instagram. Video is downloaded from server, stored in cache, then path provided to shareOptions.
On Andrid works perfectly but on IOS post in Instagram have black preview screen. I know that Instagram takes first frame from video to make preview and my video haven't any black frames. I suppose it's something wrong with "react-native-share" library, but i can't understand what is the problem
Here is the code I`m using
RNFetchBlob.config({
fileCache: true,
appendExt: "mp4" })
.fetch("GET", data.video)
.then(async res => {
const path = await res.path()
const shareOptions = {
url: path,
}
try {
await Share.open(shareOptions)
....
bundle id strategy when app is deleted and re-added for review
I think that the standard naming convention for app Bundle ID's is com.CompanyName.AppName. I submitted my first app via App Store Connect for review. But there were some problems that Apple reported that I needed to fix. It seems that, if the initial app is rejected by Apple, I have to delete the entire app from App Store Connect and then re-add it from scratch. But when I do this, it seems that the bundle ID associated with the deleted app remains associated/reserved for that deleted app. So I can no longer use the standard bundle ID that I used for the original app upload for review. I tried to prefix the new bid like: "com.CompanyName.bid2.AppName" but Apple returned the following error message:
"An App ID with Identifier 'com.MyCompany.bid2.MyApp' is not available. Please enter a different string."
I thought that I might have accidentally submitted that bid already so I tried com.MyCompany.bid3.MyApp but Apple returned the same error message. So I'm guessing that there may be a RegEx which enforces a max of 2 periods in a bid. Is my RegEx assumption correct? Is this a common scenario where the initial app gets rejected and then a new bid is required in order to continue with Apple review for the app fixes? Or did I do something incorrectly in my attempt to submit an update of the app for review? What are some common strategies for updating the bid when you get stuck in this type of scenario?
How To Fix JSON value '' of type NSNull cannot be converted to NSString in iOS React Native
How to resolve JSON value '' of NSNull type cannot be converted to NSString on react native ios, here I use React Native version: "0.61.5"
And this is my json library package. Can be seen in below.
Please help and the solution, thank you.
How to place floating action button in bottom right in React Native
I am trying to place a floating action button in the lower right corner of my app but it is placing it in the top left way off screen.
Returned view:
<View>
<View style={{flexDirection: 'row'}}>
<TouchableOpacity onPress={this.onPress} activeOpacity={.5} >
<Image
source={require('./assets/images/hamburger.png')}
style={{ width: 30, height: 25, marginLeft: 15}}
/>
</TouchableOpacity>
</View>
<FloatingAction style={styles.bottom}/>
</View>
Styles:
const styles = StyleSheet.create({
bottom: {
flex: 1,
position: 'absolute',
bottom: 10,
right:10
},
});
My current view displays a header and a bottom tab view. I am able to place multiple FAB's in each tab screen but that produces an undesirable behavior. Thank you for any help.
How to solve an error in Xcode 10: Multiple commands produce....../Fonts
I have React Native App. And I installed react-native-vector-icons library. And after I get this error in Xcode:
Multiple commands produce '/Users/jocoders/Library/Developer/Xcode/DerivedData/openCalls-gtlsipogexxyteffomqvumgwiihd/Build/Products/Debug-iphonesimulator/openCalls.app/Fonts':
- Target 'openCalls' (project 'openCalls') has copy command from '/Users/jocoders/openCalls/node_modules/react-native-vector-icons/Fonts' to '/Users/jocoders/Library/Developer/Xcode/DerivedData/openCalls-gtlsipogexxyteffomqvumgwiihd/Build/Products/Debug-iphonesimulator/openCalls.app/Fonts'
- Target 'openCalls' (project 'openCalls') has copy command from '/Users/jocoders/openCalls/node_modules/react-native-vector-icons/Fonts/Fonts' to '/Users/evgeniykireev/Library/Developer/Xcode/DerivedData/openCalls-gtlsipogexxyteffomqvumgwiihd/Build/Products/Debug-iphonesimulator/openCalls.app/Fonts'
How do I create typescript type definitions for react-native native ui component?
Let us say that I have a react native native UI component like the one in this example. How do I create a typescript type definition for it, like the ones that can be imported, for example with 'npm i @types/somelib'? I didn't find explanations about how to do this in the documentation.
The idea is to be able to use the native component seamlessly in a react-native typescript project and for that I need to create the type definition for native components. So, how do I create typescript type definitions for native components?
The iOS/objc side
- FoobarView.h:
#ifndef FoobarView_h
#define FoobarView_h
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface FoobarView : UITextView
@property (nonatomic, assign) BOOL teste;
@end
#endif
- FoobarView.m:
#import "FoobarView.h"
@implementation FoobarView
-(void) setTeste:(BOOL)teste
{
if (teste == YES)
{
[self setText:@"é true"];
}else
{
[self setText:@"é false"];
}
}
-(BOOL)getTeste
{
if ([[self text] isEqual:@"é true"])
{
return YES;
}else
{
return NO;
}
}
@end
- FoobarManager.m
#import <Foundation/Foundation.h>
#import <React/RCTViewManager.h>
#import "FoobarView.h"
@interface FooManager : RCTViewManager
@end
@implementation FooManager
RCT_EXPORT_MODULE(FoobarView)
RCT_EXPORT_VIEW_PROPERTY(teste, BOOL)
+(BOOL) requiresMainQueueSetup
{
return YES;
}
- (UIView*)view
{
FoobarView *v = [[FoobarView alloc]init];
return v;
}
@end
So, FoobarView is a native iOS view, written in objc. It is not a react native ui component. I am using a simple descendent from UITextView but it could be anything, like a SceneKit view.
To use it in the javascript side of react native, I'm using this code in FoobarView.js:
import { requireNativeComponent } from 'react-native';
module.exports = requireNativeComponent('FoobarView');
And, finally, i can use FoobarView in a render block:
<FoobarView style={{width:'100%', height:30}} teste={true} />
My question is: How can I define that FoobarView, something defined in the ios, has the property teste, and that teste is a boolean?
regenerating Android & IOS folders inside react native project
I removed Android & IOS folder , to recreate them again
however I can't find a way in RN version 0.61.5 to return these folders again
react-native eject
> is not working
react-native upgrade --legacy true
> error: unknown option `--legacy'
react-native upgrade > Specified version "0.61.5" is already installed in node_modules and it satisfies "0.61.5" semver range. No need to upgrade
any modern solution ?
React Native Firebase ios onNotification doesn't trigger
My project is importing 'react-native-firebase' and I'm trying sending test messages through firebase console using a device token. The method firebase.notifications().onNotification((notification)=>{}) triggers on android devices, but doesn't trigger on ios devices. Notifications don't pop up both on foreground and background. I've tried 'console.log' in the method but doesn't present anything. please let me know what the problem is. I tried 'onMessage()' but it triggers on foreground only.
here's my code:
if (Platform.OS == 'android') {
this.notificationListener = firebase.notifications().onNotification((notification: Notification) => {
console.log("onNotification");
console.log(notification);
notification
.setSound("default")
.android.setChannelId('default')
.android.setBigText(notification.body, notification.title, '')
// .android.setSmallIcon('@mipmap/icon_noti');
firebase.notifications().displayNotification(notification);
});
}
else {
this.notificationListener = firebase.notifications().onNotification((notification) => {
notification.setNotificationId(notification.messageId)
notification.setSound("default");
notification.setTitle(notification.data.title)
notification.ios.setBadge(notification.ios.badge ? notification.ios.badge + 1 : 0);
firebase.notifications().displayNotification(notification);
});
appDelegate.m:
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <GoogleMaps/GoogleMaps.h>
#import <Firebase.h>
#import <FirebaseMessaging.h>
#import "RNFirebaseNotifications.h"
#import "RNFirebaseMessaging.h"
#import "RNSplashScreen.h"
@import Firebase;
@import UserNotifications;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[GMSServices provideAPIKey:@"aasdfsafdadgadgadfasf"];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"asdb"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
[FIRApp configure];
[RNFirebaseNotifications configure];
[RNSplashScreen show];
[[UIApplication sharedApplication] registerForRemoteNotifications];
[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
return YES;
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
[[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
[[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
[[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end