Skip to content

Commit e46fafc

Browse files
author
cpandya25
committed
Update Troubleshooting page in iOS.
Update Troubleshooting page in iOS.
1 parent 4b3b941 commit e46fafc

4 files changed

Lines changed: 39 additions & 3 deletions

File tree

docs/sdks/android/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can find the newest sdk version number here [Android SDK](https://github.com
2121
```groovy
2222
dependencies {
2323
// ...
24-
implementation 'com.cleverpush:cleverpush:1.35.22'
24+
implementation 'com.cleverpush:cleverpush:1.35.23'
2525
}
2626
```
2727

docs/sdks/flutter/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: Setup
88
1. Add the following code to your `pubspec.yaml` file
99
```bash
1010
dependencies:
11-
cleverpush_flutter: ^1.24.30
11+
cleverpush_flutter: ^1.24.31
1212
```
1313

1414
2. Run `flutter packages get`

docs/sdks/ios/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ title: Setup
1919
Add CleverPush to your Podfile:
2020

2121
```bash
22-
pod 'CleverPush', '~> 1.34.36'
22+
pod 'CleverPush', '~> 1.34.38'
2323
```
2424

2525
#### Swift Package Manager Setup

docs/sdks/ios/troubleshooting.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,42 @@ Avoid setting a custom delegate for UNUserNotificationCenter in your project. Th
5656

5757
To ensure seamless integration with CleverPush, remove any custom UNUserNotificationCenter delegate code from your app.
5858

59+
## Do Not Initialize the SDK Twice
60+
61+
Initializing the CleverPush SDK multiple times in your application can break the SDK's functionality and cause unexpected behavior.
62+
63+
We **do not recommend** initializing the SDK more than once, as it may lead to:
64+
65+
### Core Functionality Issues:
66+
- **Duplicate notification handling** - Notifications may be processed multiple times
67+
- **Incorrect subscription states** - Subscription ID and status may become inconsistent
68+
- **Memory leaks and performance issues** - Multiple SDK instances consuming unnecessary resources
69+
- **Conflicts in internal SDK state management** - SDK's internal state will be overwritten
70+
71+
### Callback Issues:
72+
- **Notification callbacks may not work properly** - `handleNotificationReceived`, `handleNotificationOpened`, and `handleSubscribed` callbacks may be called multiple times or not at all
73+
- **Initialization callback failures** - `handleInitialized` callback may return incorrect results
74+
- **App Banner callbacks disrupted** - `setAppBannerOpenedCallback` and banner display callbacks may not trigger as expected
75+
- **Topics change listener issues** - `setTopicsChangedListener` may not function correctly
76+
77+
### Feature-Specific Problems:
78+
- **App Banners** - May fail to display or display multiple times, banner targeting and event tracking may break
79+
- **Chat View** - URL opened callbacks and subscribe callbacks may not work properly
80+
- **Inbox View** - Notification click callbacks may fail or trigger multiple times
81+
- **Stories Widget** - Story opened callbacks and navigation may malfunction
82+
- **Live Activities** - Activity registration and token management may fail
83+
- **Event Tracking** - Events may be tracked multiple times or not tracked at all
84+
- **Deep Links** - Universal links and custom URL scheme handling may break
85+
86+
### Data Synchronization Issues:
87+
- **Tags and Attributes** - Tag and attribute management may become inconsistent
88+
- **Topics** - Topic subscriptions may not sync properly
89+
- **Badge Count** - Badge counting logic may fail, leading to incorrect badge numbers
90+
- **Notification Storage** - Local notification storage via App Groups may become corrupted
91+
92+
### Best Practice:
93+
Make sure to initialize the SDK **only once** in your app's lifecycle, typically in your AppDelegate's `application(_:didFinishLaunchingWithOptions:)` method. Avoid calling the initialization method in multiple places, view controllers, or lifecycle methods.
94+
5995
# Silent Notification Limitations and Restrictions for iOS
6096

6197
1. Silent notifications do not work on the iOS Simulator.You must test silent notifications on a **physical device** to ensure that background tasks and data processing are triggered properly.

0 commit comments

Comments
 (0)