File tree 3 files changed +4
-25
lines changed
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:
199
199
sdk.dir=/path/to/Android/SDK # EG: sdk.dir=/Users/My.Name/Library/Android/sdk
200
200
```
201
201
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
+
202
206
## Other
203
207
If things are not working and you are stumped as to why, try running the
204
208
following in the _ example app directory_ :
Original file line number Diff line number Diff line change 1
1
import { createNativeStackNavigator } from '@react-navigation/native-stack' ;
2
- import { Iterable } from '@iterable/react-native-sdk' ;
3
2
4
3
import { Route } from '../../constants/routes' ;
5
4
import { useIterableApp } from '../../hooks/useIterableApp' ;
@@ -10,7 +9,6 @@ import type { RootStackParamList } from '../../types';
10
9
const Stack = createNativeStackNavigator < RootStackParamList > ( ) ;
11
10
12
11
export const App = ( ) => {
13
- console . log ( 'Iterable.version' , Iterable . getVersionFromPackageJson ( ) ) ;
14
12
const { isLoggedIn } = useIterableApp ( ) ;
15
13
16
14
return (
Original file line number Diff line number Diff line change 1
1
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs' ;
2
- import { useState , useEffect } from 'react' ;
3
-
4
- import { Iterable } from '@iterable/react-native-sdk' ;
5
2
6
3
import { colors , Route } from '../../constants' ;
7
4
import type { MainScreenParamList } from '../../types' ;
@@ -17,27 +14,10 @@ const Tab = createBottomTabNavigator<MainScreenParamList>();
17
14
export const Main = ( ) => {
18
15
const {
19
16
isInboxTab,
20
- isLoggedIn,
21
- loginInProgress,
22
17
returnToInboxTrigger,
23
18
setIsInboxTab,
24
19
setReturnToInboxTrigger,
25
- userId,
26
20
} = 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 ] ) ;
41
21
42
22
return (
43
23
< >
@@ -55,9 +35,6 @@ export const Main = () => {
55
35
< Tab . Screen
56
36
name = { Route . Inbox }
57
37
component = { Inbox }
58
- options = {
59
- unreadMessageCount ? { tabBarBadge : unreadMessageCount } : { }
60
- }
61
38
listeners = { ( ) => ( {
62
39
tabPress : ( ) => {
63
40
if ( isInboxTab ) {
You can’t perform that action at this time.
0 commit comments