File tree Expand file tree Collapse file tree 3 files changed +4
-25
lines changed
Expand file tree Collapse file tree 3 files changed +4
-25
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,10 @@ There are two ways to fix this:
199199 sdk.dir=/path/to/Android/SDK # EG: sdk.dir=/Users/My.Name/Library/Android/sdk
200200 ```
201201
202+ ## Error: ` bundler: failed to load command: pod `
203+ Run ` bundle install ` in the _ example app directory_ . You can also try running
204+ it in _ ios_ in the _ example app directory_ .
205+
202206## Other
203207If things are not working and you are stumped as to why, try running the
204208following in the _ example app directory_ :
Original file line number Diff line number Diff line change 11import { createNativeStackNavigator } from '@react-navigation/native-stack' ;
2- import { Iterable } from '@iterable/react-native-sdk' ;
32
43import { Route } from '../../constants/routes' ;
54import { useIterableApp } from '../../hooks/useIterableApp' ;
@@ -10,7 +9,6 @@ import type { RootStackParamList } from '../../types';
109const Stack = createNativeStackNavigator < RootStackParamList > ( ) ;
1110
1211export const App = ( ) => {
13- console . log ( 'Iterable.version' , Iterable . getVersionFromPackageJson ( ) ) ;
1412 const { isLoggedIn } = useIterableApp ( ) ;
1513
1614 return (
Original file line number Diff line number Diff line change 11import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' ;
2- import { useState , useEffect } from 'react' ;
3-
4- import { Iterable } from '@iterable/react-native-sdk' ;
52
63import { colors , Route } from '../../constants' ;
74import type { MainScreenParamList } from '../../types' ;
@@ -17,27 +14,10 @@ const Tab = createBottomTabNavigator<MainScreenParamList>();
1714export const Main = ( ) => {
1815 const {
1916 isInboxTab,
20- isLoggedIn,
21- loginInProgress,
2217 returnToInboxTrigger,
2318 setIsInboxTab,
2419 setReturnToInboxTrigger,
25- userId,
2620 } = useIterableApp ( ) ;
27- const [ unreadMessageCount , setUnreadMessageCount ] = useState < number > ( 0 ) ;
28-
29- useEffect ( ( ) => {
30- if ( loginInProgress ) return ;
31- if ( isLoggedIn ) {
32- Iterable . inAppManager
33- . getMessages ( )
34- . then ( ( messages ) => setUnreadMessageCount ( messages . length ) )
35- . catch ( ( error ) => console . error ( 'Failed to get messages:' , error ) ) ;
36- } else {
37- // Reset unread message count when user logs out
38- setUnreadMessageCount ( 0 ) ;
39- }
40- } , [ isLoggedIn , loginInProgress , userId ] ) ;
4121
4222 return (
4323 < >
@@ -55,9 +35,6 @@ export const Main = () => {
5535 < Tab . Screen
5636 name = { Route . Inbox }
5737 component = { Inbox }
58- options = {
59- unreadMessageCount ? { tabBarBadge : unreadMessageCount } : { }
60- }
6138 listeners = { ( ) => ( {
6239 tabPress : ( ) => {
6340 if ( isInboxTab ) {
You can’t perform that action at this time.
0 commit comments