From 08e7e12f456508ec554a286485958f7cbdb40de4 Mon Sep 17 00:00:00 2001 From: Loren Posen Date: Thu, 23 Jan 2025 17:11:41 -0800 Subject: [PATCH 1/3] chore: removed console statement --- example/src/components/App/App.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/example/src/components/App/App.tsx b/example/src/components/App/App.tsx index 11fd485ba..42769db1d 100644 --- a/example/src/components/App/App.tsx +++ b/example/src/components/App/App.tsx @@ -1,5 +1,4 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack'; -import { Iterable } from '@iterable/react-native-sdk'; import { Route } from '../../constants/routes'; import { useIterableApp } from '../../hooks/useIterableApp'; @@ -10,7 +9,6 @@ import type { RootStackParamList } from '../../types'; const Stack = createNativeStackNavigator(); export const App = () => { - console.log('Iterable.version', Iterable.getVersionFromPackageJson()); const { isLoggedIn } = useIterableApp(); return ( From 24d8d244a5c59d7ab22dff118c2406d97ef518d4 Mon Sep 17 00:00:00 2001 From: Loren Posen Date: Thu, 23 Jan 2025 17:12:08 -0800 Subject: [PATCH 2/3] fix: removed indicator --- example/src/components/App/Main.tsx | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/example/src/components/App/Main.tsx b/example/src/components/App/Main.tsx index 15a5c1fb5..55b0d74e2 100644 --- a/example/src/components/App/Main.tsx +++ b/example/src/components/App/Main.tsx @@ -1,7 +1,4 @@ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; -import { useState, useEffect } from 'react'; - -import { Iterable } from '@iterable/react-native-sdk'; import { colors, Route } from '../../constants'; import type { MainScreenParamList } from '../../types'; @@ -17,27 +14,10 @@ const Tab = createBottomTabNavigator(); export const Main = () => { const { isInboxTab, - isLoggedIn, - loginInProgress, returnToInboxTrigger, setIsInboxTab, setReturnToInboxTrigger, - userId, } = useIterableApp(); - const [unreadMessageCount, setUnreadMessageCount] = useState(0); - - useEffect(() => { - if (loginInProgress) return; - if (isLoggedIn) { - Iterable.inAppManager - .getMessages() - .then((messages) => setUnreadMessageCount(messages.length)) - .catch((error) => console.error('Failed to get messages:', error)); - } else { - // Reset unread message count when user logs out - setUnreadMessageCount(0); - } - }, [isLoggedIn, loginInProgress, userId]); return ( <> @@ -55,9 +35,6 @@ export const Main = () => { ({ tabPress: () => { if (isInboxTab) { From 334b74b2324ba98cb50654ed16b8798f1cc8f7a4 Mon Sep 17 00:00:00 2001 From: Loren Posen Date: Fri, 24 Jan 2025 11:01:45 -0800 Subject: [PATCH 3/3] docs: added common error to readme --- example/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/README.md b/example/README.md index 2ad816768..3d309305b 100644 --- a/example/README.md +++ b/example/README.md @@ -196,6 +196,10 @@ There are two ways to fix this: sdk.dir=/path/to/Android/SDK # EG: sdk.dir=/Users/My.Name/Library/Android/sdk ``` +## Error: `bundler: failed to load command: pod` +Run `bundle install` in the _example app directory_. You can also try running +it in _ios_ in the _example app directory_. + ## Other If things are not working and you are stumped as to why, try running the following in the _example app directory_: