@capillarytech/react-native-hydra-lib 1.7.0-beta.9 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -438
- package/android/build.gradle +17 -8
- package/android/libs/repo/com/capillarytech/hydra-anonymous/1.10.0/hydra-anonymous-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-anonymous/1.10.0/hydra-anonymous-1.10.0.module +114 -0
- package/android/libs/repo/com/capillarytech/hydra-anonymous/1.10.0/hydra-anonymous-1.10.0.pom +73 -0
- package/android/libs/repo/com/capillarytech/hydra-core/1.10.0/hydra-core-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-core/1.10.0/hydra-core-1.10.0.module +195 -0
- package/android/libs/repo/com/capillarytech/hydra-core/1.10.0/hydra-core-1.10.0.pom +122 -0
- package/android/libs/repo/com/capillarytech/hydra-firebase/1.10.0/hydra-firebase-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-firebase/1.10.0/hydra-firebase-1.10.0.module +139 -0
- package/android/libs/repo/com/capillarytech/hydra-firebase/1.10.0/hydra-firebase-1.10.0.pom +96 -0
- package/android/libs/repo/com/capillarytech/hydra-gamification/1.10.0/hydra-gamification-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-gamification/1.10.0/hydra-gamification-1.10.0.module +114 -0
- package/android/libs/repo/com/capillarytech/hydra-gamification/1.10.0/hydra-gamification-1.10.0.pom +73 -0
- package/android/libs/repo/com/capillarytech/hydra-gamification-ui/1.10.0/hydra-gamification-ui-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-gamification-ui/1.10.0/hydra-gamification-ui-1.10.0.module +163 -0
- package/android/libs/repo/com/capillarytech/hydra-gamification-ui/1.10.0/hydra-gamification-ui-1.10.0.pom +109 -0
- package/android/libs/repo/com/capillarytech/hydra-inapp/1.10.0/hydra-inapp-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-inapp/1.10.0/hydra-inapp-1.10.0.module +172 -0
- package/android/libs/repo/com/capillarytech/hydra-inapp/1.10.0/hydra-inapp-1.10.0.pom +128 -0
- package/android/libs/repo/com/capillarytech/hydra-inbox-core/1.10.0/hydra-inbox-core-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-inbox-core/1.10.0/hydra-inbox-core-1.10.0.module +111 -0
- package/android/libs/repo/com/capillarytech/hydra-inbox-core/1.10.0/hydra-inbox-core-1.10.0.pom +68 -0
- package/android/libs/repo/com/capillarytech/hydra-inbox-ui/1.10.0/hydra-inbox-ui-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-inbox-ui/1.10.0/hydra-inbox-ui-1.10.0.module +132 -0
- package/android/libs/repo/com/capillarytech/hydra-inbox-ui/1.10.0/hydra-inbox-ui-1.10.0.pom +86 -0
- package/android/libs/repo/com/capillarytech/hydra-pushbase/1.10.0/hydra-pushbase-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-pushbase/1.10.0/hydra-pushbase-1.10.0.module +172 -0
- package/android/libs/repo/com/capillarytech/hydra-pushbase/1.10.0/hydra-pushbase-1.10.0.pom +128 -0
- package/android/libs/repo/com/capillarytech/hydra-richnotification/1.10.0/hydra-richnotification-1.10.0.aar +0 -0
- package/android/libs/repo/com/capillarytech/hydra-richnotification/1.10.0/hydra-richnotification-1.10.0.module +172 -0
- package/android/libs/repo/com/capillarytech/hydra-richnotification/1.10.0/hydra-richnotification-1.10.0.pom +128 -0
- package/android/src/main/java/com/hydralib/eventemitter/HydraEventEmitter.kt +31 -1
- package/android/src/main/java/com/hydralib/eventemitter/HydraEventType.kt +3 -1
- package/android/src/main/java/com/hydralib/gamification/GamificationBannerViewManager.kt +3 -3
- package/android/src/main/java/com/hydralib/gamification/GamificationEmbedViewManager.kt +3 -3
- package/android/src/main/java/com/hydralib/gamification/GamificationLoyaltyViewManager.kt +2 -2
- package/android/src/main/java/com/hydralib/hydrasdk/HydraCore.kt +6 -0
- package/ios/EventEmitter/HydraEventType.swift +1 -0
- package/ios/HydraSDK/HydraSDKCore.swift +38 -0
- package/lib/commonjs/hydra-apis/HydraNativeEventEmitter.js +5 -0
- package/lib/commonjs/hydra-apis/HydraNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/models/HydraNativeEvent.js +1 -0
- package/lib/commonjs/models/HydraNativeEvent.js.map +1 -1
- package/lib/module/hydra-apis/HydraNativeEventEmitter.js +5 -0
- package/lib/module/hydra-apis/HydraNativeEventEmitter.js.map +1 -1
- package/lib/module/models/HydraNativeEvent.js +1 -0
- package/lib/module/models/HydraNativeEvent.js.map +1 -1
- package/lib/typescript/commonjs/src/hydra-apis/HydraNativeEventEmitter.d.ts +1 -0
- package/lib/typescript/commonjs/src/hydra-apis/HydraNativeEventEmitter.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/HydraNativeEvent.d.ts +2 -1
- package/lib/typescript/commonjs/src/models/HydraNativeEvent.d.ts.map +1 -1
- package/lib/typescript/module/src/hydra-apis/HydraNativeEventEmitter.d.ts +1 -0
- package/lib/typescript/module/src/hydra-apis/HydraNativeEventEmitter.d.ts.map +1 -1
- package/lib/typescript/module/src/models/HydraNativeEvent.d.ts +2 -1
- package/lib/typescript/module/src/models/HydraNativeEvent.d.ts.map +1 -1
- package/package.json +1 -1
- package/sbom.spdx.json +4 -4
- package/scripts/HydraPods.rb +1 -1
- package/src/hydra-apis/HydraNativeEventEmitter.ts +11 -0
- package/src/models/HydraNativeEvent.ts +1 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @capillarytech/react-native-hydra-lib
|
|
2
2
|
|
|
3
|
-
[](https://badge.fury.io/js/@capillarytech%2Freact-native-hydra-lib)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](http://www.typescriptlang.org/)
|
|
6
6
|
[](https://reactnative.dev/)
|
|
@@ -12,16 +12,6 @@ A comprehensive React Native library that provides seamless integration with Hyd
|
|
|
12
12
|
- [Features](#features)
|
|
13
13
|
- [Requirements](#requirements)
|
|
14
14
|
- [Installation](#installation)
|
|
15
|
-
- [Quick Start](#quick-start)
|
|
16
|
-
- [API Reference](#api-reference)
|
|
17
|
-
- [Platform-Specific Setup](#platform-specific-setup)
|
|
18
|
-
- [Security & Compliance](#security--compliance)
|
|
19
|
-
- [Development](#development)
|
|
20
|
-
- [Contributing](#contributing)
|
|
21
|
-
- [Troubleshooting](#troubleshooting)
|
|
22
|
-
- [Changelog](#changelog)
|
|
23
|
-
- [Support](#support)
|
|
24
|
-
- [License](#license)
|
|
25
15
|
|
|
26
16
|
## Features
|
|
27
17
|
|
|
@@ -49,443 +39,23 @@ A comprehensive React Native library that provides seamless integration with Hyd
|
|
|
49
39
|
|
|
50
40
|
| Platform | Version |
|
|
51
41
|
| ---------------- | ----------------------- |
|
|
52
|
-
| **React Native** | >= 0.
|
|
53
|
-
| **iOS** | >=
|
|
42
|
+
| **React Native** | >= 0.77.0 |
|
|
43
|
+
| **iOS** | >= 15.0 |
|
|
54
44
|
| **Android** | >= API 21 (Android 5.0) |
|
|
55
45
|
| **Node.js** | >= 18.0.0 |
|
|
56
|
-
| **targetSdk** | >=
|
|
57
|
-
| **compileSdk** | >=
|
|
46
|
+
| **targetSdk** | >= 31 |
|
|
47
|
+
| **compileSdk** | >= 31 |
|
|
58
48
|
|
|
59
49
|
## Installation
|
|
60
50
|
|
|
61
51
|
### Using npm
|
|
62
52
|
|
|
63
53
|
```bash
|
|
64
|
-
npm install @
|
|
54
|
+
npm install @capillarytech/react-native-hydra-lib
|
|
65
55
|
```
|
|
66
56
|
|
|
67
|
-
## Project Setup
|
|
68
|
-
|
|
69
|
-
Before you start development, you need to set up your environment:
|
|
70
|
-
|
|
71
|
-
1. Create a `.env` file in the project root with the following variables:
|
|
72
|
-
|
|
73
|
-
```sh
|
|
74
|
-
HYDRA_GITHUB_USER_NAME=your_github_username
|
|
75
|
-
HYDRA_IOS_GITHUB_PAT=your_github_personal_access_token
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
2. Run the setup script:
|
|
79
|
-
|
|
80
|
-
```sh
|
|
81
|
-
./scripts/setup_local.sh
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
This script will:
|
|
85
|
-
|
|
86
|
-
- Configure your GitHub credentials for accessing private repositories
|
|
87
|
-
- Set up necessary environment variables
|
|
88
|
-
- Configure Git authentication for Capillary repositories
|
|
89
|
-
|
|
90
|
-
Note: The setup script will run automatically when you install dependencies in the example app.
|
|
91
|
-
|
|
92
57
|
### Using yarn
|
|
93
58
|
|
|
94
59
|
```bash
|
|
95
|
-
yarn add @
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Post-Installation Setup
|
|
99
|
-
|
|
100
|
-
After installation, the library automatically generates SBOM (Software Bill of Materials) files for security and compliance tracking.
|
|
101
|
-
|
|
102
|
-
#### iOS Setup
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
cd ios && pod install
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
#### Android Setup
|
|
109
|
-
|
|
110
|
-
No additional setup required for Android.
|
|
111
|
-
|
|
112
|
-
## Quick Start
|
|
113
|
-
|
|
114
|
-
### Basic Integration
|
|
115
|
-
|
|
116
|
-
```typescript
|
|
117
|
-
import { HydraLib } from '@capillary/react-native-hydra-lib';
|
|
118
|
-
|
|
119
|
-
// Initialize using Firebase Remote Config
|
|
120
|
-
// This is the recommended way to initialize the SDK
|
|
121
|
-
const initializeHydra = async () => {
|
|
122
|
-
try {
|
|
123
|
-
await HydraLib.setFirebaseRemoteConfigKeys({
|
|
124
|
-
keyForAccountId: 'hydra_account_id',
|
|
125
|
-
keyForBaseUrl: 'hydra_base_url',
|
|
126
|
-
keyForSsl: 'hydra_ssl_public_key',
|
|
127
|
-
keyForRemoteLogLevel: 'hydra_remote_log_level'
|
|
128
|
-
});
|
|
129
|
-
console.log('Hydra SDK initialized successfully');
|
|
130
|
-
} catch (error) {
|
|
131
|
-
console.error('Failed to initialize Hydra SDK:', error);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
// Alternative: Initialize using Account Config directly
|
|
136
|
-
const initializeWithAccountConfig = async () => {
|
|
137
|
-
try {
|
|
138
|
-
await HydraLib.setHydraAccountConfig({
|
|
139
|
-
accountId: 'your-account-id',
|
|
140
|
-
baseUrl: 'your-base-url',
|
|
141
|
-
sslPublicKey: 'your-ssl-public-key',
|
|
142
|
-
remoteDebugLevel: 4 // 0-5, where 0 is off and 5 is verbose
|
|
143
|
-
});
|
|
144
|
-
console.log('Hydra SDK initialized successfully');
|
|
145
|
-
} catch (error) {
|
|
146
|
-
console.error('Failed to initialize Hydra SDK:', error);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// Call during app startup
|
|
151
|
-
initializeHydra();
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
## API Reference
|
|
156
|
-
|
|
157
|
-
### Core Methods
|
|
158
|
-
|
|
159
|
-
#### `setFirebaseRemoteConfigKeys(keys: HydraFirebaseRemoteConfigKeys): Promise<void>`
|
|
160
|
-
|
|
161
|
-
Initializes the Hydra SDK using Firebase Remote Config keys.
|
|
162
|
-
|
|
163
|
-
**Parameters:**
|
|
164
|
-
|
|
165
|
-
- `keys`: Object containing Firebase Remote Config key names
|
|
166
|
-
- `keyForAccountId`: Key for account ID in Firebase Remote Config
|
|
167
|
-
- `keyForBaseUrl`: Key for base URL in Firebase Remote Config
|
|
168
|
-
- `keyForSsl`: Key for SSL public key in Firebase Remote Config
|
|
169
|
-
- `keyForRemoteLogLevel`: Key for remote debug level in Firebase Remote Config
|
|
170
|
-
|
|
171
|
-
**Example:**
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
await HydraLib.setFirebaseRemoteConfigKeys({
|
|
175
|
-
keyForAccountId: 'hydra_account_id',
|
|
176
|
-
keyForBaseUrl: 'hydra_base_url',
|
|
177
|
-
keyForSsl: 'hydra_ssl_public_key',
|
|
178
|
-
keyForRemoteLogLevel: 'hydra_remote_log_level'
|
|
179
|
-
});
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
#### `setHydraAccountConfig(config: HydraAccountConfig): Promise<void>`
|
|
183
|
-
|
|
184
|
-
Sets the Hydra account configuration directly without using Firebase Remote Config.
|
|
185
|
-
|
|
186
|
-
**Parameters:**
|
|
187
|
-
|
|
188
|
-
- `config`: Account configuration object
|
|
189
|
-
- `accountId`: Your Hydra account ID
|
|
190
|
-
- `baseUrl`: Base URL for the Hydra API
|
|
191
|
-
- `sslPublicKey`: SSL public key for secure communication
|
|
192
|
-
- `remoteDebugLevel`: Debug level (0-5, where 0 is off and 5 is verbose)
|
|
193
|
-
|
|
194
|
-
**Example:**
|
|
195
|
-
|
|
196
|
-
```typescript
|
|
197
|
-
await HydraLib.setHydraAccountConfig({
|
|
198
|
-
accountId: 'your-account-id',
|
|
199
|
-
baseUrl: 'your-base-url',
|
|
200
|
-
sslPublicKey: 'your-ssl-public-key',
|
|
201
|
-
remoteDebugLevel: 4
|
|
202
|
-
});
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
#### `signIn(userDetails: UserDetails, customData?: object): Promise<void>`
|
|
206
|
-
|
|
207
|
-
Signs in a user with the provided details.
|
|
208
|
-
|
|
209
|
-
**Parameters:**
|
|
210
|
-
|
|
211
|
-
- `userDetails`: User profile information
|
|
212
|
-
- `customData`: Optional custom attributes
|
|
213
|
-
|
|
214
|
-
**Example:**
|
|
215
|
-
|
|
216
|
-
```typescript
|
|
217
|
-
await HydraLib.signIn({
|
|
218
|
-
userId: 'user123',
|
|
219
|
-
email: 'user@example.com'
|
|
220
|
-
}, {
|
|
221
|
-
preferences: ['tech', 'mobile']
|
|
222
|
-
});
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
#### `signOut(customerId: string): Promise<void>`
|
|
226
|
-
|
|
227
|
-
Signs out the user with the specified customer ID.
|
|
228
|
-
|
|
229
|
-
**Parameters:**
|
|
230
|
-
|
|
231
|
-
- `customerId`: The ID of the customer to sign out
|
|
232
|
-
|
|
233
|
-
**Example:**
|
|
234
|
-
|
|
235
|
-
```typescript
|
|
236
|
-
await HydraLib.signOut('user123');
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
### Messaging Methods
|
|
240
|
-
|
|
241
|
-
#### `showNotificationCenter(): Promise<void>`
|
|
242
|
-
|
|
243
|
-
Displays the notification center UI.
|
|
244
|
-
|
|
245
|
-
#### `hideNotificationCenterIfShowing(): Promise<void>`
|
|
246
|
-
|
|
247
|
-
Hides the notification center if it's currently visible.
|
|
248
|
-
|
|
249
|
-
#### `getInboxMessages(): Promise<void>`
|
|
250
|
-
|
|
251
|
-
Retrieves the list of inbox messages.
|
|
252
|
-
|
|
253
|
-
#### `getUnreadInboxMessagesCount(): Promise<number>`
|
|
254
|
-
|
|
255
|
-
Returns the number of unread inbox messages.
|
|
256
|
-
|
|
257
|
-
### Utility Methods
|
|
258
|
-
|
|
259
|
-
#### `getSDKVersion(): Promise<string>`
|
|
260
|
-
|
|
261
|
-
Returns the current SDK version.
|
|
262
|
-
|
|
263
|
-
#### `isInitialized(): Promise<boolean>`
|
|
264
|
-
|
|
265
|
-
Checks if the SDK is properly initialized.
|
|
266
|
-
|
|
267
|
-
## Platform-Specific Setup
|
|
268
|
-
|
|
269
|
-
### iOS Configuration
|
|
270
|
-
|
|
271
|
-
Add the following to your `ios/YourApp/Info.plist`:
|
|
272
|
-
|
|
273
|
-
```xml
|
|
274
|
-
<key>NSLocationWhenInUseUsageDescription</key>
|
|
275
|
-
<string>This app uses location for personalized content</string>
|
|
276
|
-
<key>NSUserNotificationUsageDescription</key>
|
|
277
|
-
<string>This app sends notifications for important updates</string>
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
### Android Configuration
|
|
281
|
-
|
|
282
|
-
Add permissions to `android/app/src/main/AndroidManifest.xml`:
|
|
283
|
-
|
|
284
|
-
```xml
|
|
285
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
286
|
-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
287
|
-
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false" />
|
|
60
|
+
yarn add @capillarytech/react-native-hydra-lib
|
|
288
61
|
```
|
|
289
|
-
|
|
290
|
-
## Security & Compliance
|
|
291
|
-
|
|
292
|
-
### SBOM (Software Bill of Materials)
|
|
293
|
-
|
|
294
|
-
This library automatically generates SBOM files for security and compliance tracking:
|
|
295
|
-
|
|
296
|
-
- **Main Project SBOM**: `sbom.spdx.json` (generated in project root)
|
|
297
|
-
- **Example Project SBOM**: `example/example_sbom.spdx.json`
|
|
298
|
-
|
|
299
|
-
#### SBOM Generation
|
|
300
|
-
|
|
301
|
-
The SBOM is automatically generated during:
|
|
302
|
-
|
|
303
|
-
- Package installation (`postinstall` script)
|
|
304
|
-
- Manual execution: `npm run generate-sbom`
|
|
305
|
-
|
|
306
|
-
#### SBOM Features
|
|
307
|
-
|
|
308
|
-
- ✅ **SPDX 2.3 Compliant**: Industry standard format
|
|
309
|
-
- ✅ **Comprehensive Coverage**: All dependencies tracked
|
|
310
|
-
- ✅ **Automatic Updates**: Regenerated when dependencies change
|
|
311
|
-
- ✅ **Supply Chain Security**: Complete dependency lineage
|
|
312
|
-
- ✅ **Enterprise Ready**: Compliance with security requirements
|
|
313
|
-
|
|
314
|
-
### Deprecation Policy
|
|
315
|
-
|
|
316
|
-
We follow a structured deprecation policy to ensure smooth transitions:
|
|
317
|
-
|
|
318
|
-
- **📅 Advance Notice**: 6-12 months before removal
|
|
319
|
-
- **🔄 Migration Support**: Comprehensive guides and examples
|
|
320
|
-
- **⚠️ Clear Warnings**: Development-time deprecation warnings
|
|
321
|
-
- **📚 Documentation**: Detailed migration paths
|
|
322
|
-
|
|
323
|
-
For complete details, see our [Deprecation Policy](./DEPRECATION_POLICY.md).
|
|
324
|
-
|
|
325
|
-
## Development
|
|
326
|
-
|
|
327
|
-
### Running the Example App
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
# Install dependencies
|
|
331
|
-
yarn install
|
|
332
|
-
|
|
333
|
-
# iOS
|
|
334
|
-
yarn example ios
|
|
335
|
-
|
|
336
|
-
# Android
|
|
337
|
-
yarn example android
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
### Building the Library
|
|
341
|
-
|
|
342
|
-
```bash
|
|
343
|
-
# Build TypeScript
|
|
344
|
-
yarn prepare
|
|
345
|
-
|
|
346
|
-
# Run tests
|
|
347
|
-
yarn test
|
|
348
|
-
|
|
349
|
-
# Lint code
|
|
350
|
-
yarn lint
|
|
351
|
-
|
|
352
|
-
# Type checking
|
|
353
|
-
yarn typecheck
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Scripts
|
|
357
|
-
|
|
358
|
-
| Script | Description |
|
|
359
|
-
| -------------------- | ------------------------ |
|
|
360
|
-
| `yarn test` | Run tests |
|
|
361
|
-
| `yarn typecheck` | TypeScript type checking |
|
|
362
|
-
| `yarn lint` | ESLint code linting |
|
|
363
|
-
| `yarn prepare` | Build the library |
|
|
364
|
-
| `yarn generate-sbom` | Generate SBOM files |
|
|
365
|
-
| `yarn clean` | Clean build artifacts |
|
|
366
|
-
|
|
367
|
-
## Contributing
|
|
368
|
-
|
|
369
|
-
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
|
|
370
|
-
|
|
371
|
-
### Development Workflow
|
|
372
|
-
|
|
373
|
-
1. **Fork** the repository
|
|
374
|
-
2. **Clone** your fork
|
|
375
|
-
3. **Create** a feature branch
|
|
376
|
-
4. **Make** your changes
|
|
377
|
-
5. **Test** your changes
|
|
378
|
-
6. **Submit** a pull request
|
|
379
|
-
|
|
380
|
-
### Code Standards
|
|
381
|
-
|
|
382
|
-
- **TypeScript**: All code must be TypeScript
|
|
383
|
-
- **ESLint**: Follow our linting rules
|
|
384
|
-
- **Testing**: Add tests for new features
|
|
385
|
-
- **Documentation**: Update docs for API changes
|
|
386
|
-
|
|
387
|
-
## Troubleshooting
|
|
388
|
-
|
|
389
|
-
### Common Issues
|
|
390
|
-
|
|
391
|
-
#### Installation Issues
|
|
392
|
-
|
|
393
|
-
**Problem**: `pod install` fails on iOS
|
|
394
|
-
|
|
395
|
-
```bash
|
|
396
|
-
# Solution: Clean and reinstall
|
|
397
|
-
cd ios
|
|
398
|
-
rm -rf Pods Podfile.lock
|
|
399
|
-
pod install
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
**Problem**: Android build fails
|
|
403
|
-
|
|
404
|
-
```bash
|
|
405
|
-
# Solution: Clean and rebuild
|
|
406
|
-
cd android
|
|
407
|
-
./gradlew clean
|
|
408
|
-
cd ..
|
|
409
|
-
yarn android
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
#### Runtime Issues
|
|
413
|
-
|
|
414
|
-
**Problem**: SDK initialization fails
|
|
415
|
-
|
|
416
|
-
- Verify your API key is correct
|
|
417
|
-
- Check network connectivity
|
|
418
|
-
- Ensure required permissions are granted
|
|
419
|
-
|
|
420
|
-
**Problem**: TypeScript errors
|
|
421
|
-
|
|
422
|
-
```bash
|
|
423
|
-
# Solution: Regenerate types
|
|
424
|
-
yarn prepare
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
### Getting Help
|
|
428
|
-
|
|
429
|
-
1. **Check Documentation**: Review this README and guides
|
|
430
|
-
2. **Search Issues**: Look for existing solutions in GitHub issues
|
|
431
|
-
3. **Ask Questions**: Create a new issue with detailed information
|
|
432
|
-
4. **Community Support**: Join our discussions
|
|
433
|
-
|
|
434
|
-
## Changelog & Release Notes
|
|
435
|
-
|
|
436
|
-
### Quick Links
|
|
437
|
-
|
|
438
|
-
- 📋 **[Changelog](./CHANGELOG.md)**: Complete change history in standard format
|
|
439
|
-
- 📝 **[Release Notes](./RELEASE_NOTES.md)**: Detailed release information with examples
|
|
440
|
-
- 🔄 **[Migration Guide](./MIGRATION.md)**: Version upgrade instructions
|
|
441
|
-
- 📚 **[Deprecation Policy](./DEPRECATION_POLICY.md)**: How we handle deprecations
|
|
442
|
-
|
|
443
|
-
### Recent Updates
|
|
444
|
-
|
|
445
|
-
- **v1.3.0**: Added SBOM generation, multi-instance support, enhanced security
|
|
446
|
-
- **v1.2.x**: Enhanced iOS and Android SDK integration, Firebase Remote Config
|
|
447
|
-
- **v1.1.x**: Initial stable release with core features
|
|
448
|
-
|
|
449
|
-
## Support
|
|
450
|
-
|
|
451
|
-
### Documentation
|
|
452
|
-
|
|
453
|
-
- 📚 **API Reference**: Detailed API documentation
|
|
454
|
-
- 🎯 **Examples**: Working code examples
|
|
455
|
-
- 🔧 **Platform Guides**: iOS and Android specific setup
|
|
456
|
-
- 📋 **Migration Guides**: Version upgrade instructions
|
|
457
|
-
|
|
458
|
-
### Community
|
|
459
|
-
|
|
460
|
-
- 🐛 **Issues**: [GitHub Issues](https://github.com/Capillary/react-native-hydra-lib/issues)
|
|
461
|
-
- 💬 **Discussions**: [GitHub Discussions](https://github.com/Capillary/react-native-hydra-lib/discussions)
|
|
462
|
-
- 📧 **Contact**: [rakesh.ostwal@capillarytech.com](mailto:rakesh.ostwal@capillarytech.com)
|
|
463
|
-
|
|
464
|
-
### Enterprise Support
|
|
465
|
-
|
|
466
|
-
For enterprise customers, we provide:
|
|
467
|
-
|
|
468
|
-
- Priority support and SLA
|
|
469
|
-
- Custom integration assistance
|
|
470
|
-
- Security and compliance consulting
|
|
471
|
-
- Training and onboarding
|
|
472
|
-
|
|
473
|
-
Contact us at [enterprise@capillarytech.com](mailto:enterprise@capillarytech.com)
|
|
474
|
-
|
|
475
|
-
## License
|
|
476
|
-
|
|
477
|
-
MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
478
|
-
|
|
479
|
-
---
|
|
480
|
-
|
|
481
|
-
## About Capillary Technologies
|
|
482
|
-
|
|
483
|
-
[Capillary Technologies](https://www.capillarytech.com/) is a leading provider of customer engagement and commerce solutions. Our Hydra SDK enables businesses to create personalized, omnichannel experiences that drive customer loyalty and growth.
|
|
484
|
-
|
|
485
|
-
---
|
|
486
|
-
|
|
487
|
-
**Made with ❤️ by the Capillary Technologies team**
|
|
488
|
-
|
|
489
|
-
_This library was created using [create-react-native-library](https://github.com/callstack/react-native-builder-bob)_
|
|
490
|
-
|
|
491
|
-
|
package/android/build.gradle
CHANGED
|
@@ -163,8 +163,17 @@ android {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
def hydraLocalRepo = "${project.projectDir}/libs/repo"
|
|
167
|
+
|
|
168
|
+
// Consuming apps resolve these transitive AARs with their own repositories, so expose the bundled repo to them too.
|
|
169
|
+
rootProject.allprojects {
|
|
170
|
+
repositories {
|
|
171
|
+
maven { url uri(hydraLocalRepo) }
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
166
175
|
repositories {
|
|
167
|
-
|
|
176
|
+
maven { url uri(hydraLocalRepo) }
|
|
168
177
|
mavenCentral()
|
|
169
178
|
google()
|
|
170
179
|
}
|
|
@@ -179,14 +188,14 @@ dependencies {
|
|
|
179
188
|
//noinspection GradleDependency
|
|
180
189
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
181
190
|
|
|
182
|
-
implementation "com.capillarytech:hydra-core:1.
|
|
183
|
-
implementation "com.capillarytech:hydra-pushbase:1.
|
|
184
|
-
implementation "com.capillarytech:hydra-firebase:1.
|
|
185
|
-
implementation "com.capillarytech:hydra-richnotification:1.
|
|
191
|
+
implementation "com.capillarytech:hydra-core:1.10.0"
|
|
192
|
+
implementation "com.capillarytech:hydra-pushbase:1.10.0"
|
|
193
|
+
implementation "com.capillarytech:hydra-firebase:1.10.0"
|
|
194
|
+
implementation "com.capillarytech:hydra-richnotification:1.10.0"
|
|
186
195
|
|
|
187
|
-
implementation "com.capillarytech:hydra-inbox-core:1.
|
|
188
|
-
implementation "com.capillarytech:hydra-inbox-ui:1.
|
|
189
|
-
implementation "com.capillarytech:hydra-inapp:1.
|
|
196
|
+
implementation "com.capillarytech:hydra-inbox-core:1.10.0"
|
|
197
|
+
implementation "com.capillarytech:hydra-inbox-ui:1.10.0"
|
|
198
|
+
implementation "com.capillarytech:hydra-inapp:1.10.0"
|
|
190
199
|
implementation "com.google.firebase:firebase-messaging-ktx:24.1.0"
|
|
191
200
|
|
|
192
201
|
implementation "com.google.code.gson:gson:2.11.0"
|
|
Binary file
|
package/android/libs/repo/com/capillarytech/hydra-anonymous/1.10.0/hydra-anonymous-1.10.0.module
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"formatVersion": "1.1",
|
|
3
|
+
"component": {
|
|
4
|
+
"group": "com.capillarytech",
|
|
5
|
+
"module": "hydra-anonymous",
|
|
6
|
+
"version": "1.10.0",
|
|
7
|
+
"attributes": {
|
|
8
|
+
"org.gradle.status": "release"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"createdBy": {
|
|
12
|
+
"gradle": {
|
|
13
|
+
"version": "7.3.3"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"variants": [
|
|
17
|
+
{
|
|
18
|
+
"name": "releaseVariantReleaseApiPublication",
|
|
19
|
+
"attributes": {
|
|
20
|
+
"org.gradle.category": "library",
|
|
21
|
+
"org.gradle.dependency.bundling": "external",
|
|
22
|
+
"org.gradle.libraryelements": "aar",
|
|
23
|
+
"org.gradle.usage": "java-api"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": [
|
|
26
|
+
{
|
|
27
|
+
"group": "org.jetbrains.kotlin",
|
|
28
|
+
"module": "kotlin-stdlib-jdk8",
|
|
29
|
+
"version": {
|
|
30
|
+
"requires": "1.7.0"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"files": [
|
|
35
|
+
{
|
|
36
|
+
"name": "hydra-anonymous-1.10.0.aar",
|
|
37
|
+
"url": "hydra-anonymous-1.10.0.aar",
|
|
38
|
+
"size": 126548,
|
|
39
|
+
"sha512": "5eadbd67aceb09c179b7b1b4bd299f951ebb5d19521ce4af35cfcd76c03d8c876f5539823f9638f44542d043fff28f415094d611d9247ad83e102360f787c46a",
|
|
40
|
+
"sha256": "6c9a10f6e079645463ff827722236f2743beadb2bedf16d6092afbd98c232e91",
|
|
41
|
+
"sha1": "8f1c36bedf0294e57c922301bbed92a701e03cf5",
|
|
42
|
+
"md5": "5fa6d5f3af471311aae8cc2f675e6d76"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "releaseVariantReleaseRuntimePublication",
|
|
48
|
+
"attributes": {
|
|
49
|
+
"org.gradle.category": "library",
|
|
50
|
+
"org.gradle.dependency.bundling": "external",
|
|
51
|
+
"org.gradle.libraryelements": "aar",
|
|
52
|
+
"org.gradle.usage": "java-runtime"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": [
|
|
55
|
+
{
|
|
56
|
+
"group": "org.jetbrains.kotlin",
|
|
57
|
+
"module": "kotlin-parcelize-runtime",
|
|
58
|
+
"version": {
|
|
59
|
+
"requires": "1.7.0"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"group": "org.jetbrains.kotlin",
|
|
64
|
+
"module": "kotlin-stdlib-jdk8",
|
|
65
|
+
"version": {
|
|
66
|
+
"requires": "1.7.0"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"group": "androidx.core",
|
|
71
|
+
"module": "core-ktx",
|
|
72
|
+
"version": {
|
|
73
|
+
"requires": "1.8.0"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"group": "org.jetbrains.kotlin",
|
|
78
|
+
"module": "kotlin-bom",
|
|
79
|
+
"version": {
|
|
80
|
+
"requires": "1.8.0"
|
|
81
|
+
},
|
|
82
|
+
"attributes": {
|
|
83
|
+
"org.gradle.category": "platform"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"group": "androidx.appcompat",
|
|
88
|
+
"module": "appcompat",
|
|
89
|
+
"version": {
|
|
90
|
+
"requires": "1.5.0"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"group": "com.google.android.material",
|
|
95
|
+
"module": "material",
|
|
96
|
+
"version": {
|
|
97
|
+
"requires": "1.6.1"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"files": [
|
|
102
|
+
{
|
|
103
|
+
"name": "hydra-anonymous-1.10.0.aar",
|
|
104
|
+
"url": "hydra-anonymous-1.10.0.aar",
|
|
105
|
+
"size": 126548,
|
|
106
|
+
"sha512": "5eadbd67aceb09c179b7b1b4bd299f951ebb5d19521ce4af35cfcd76c03d8c876f5539823f9638f44542d043fff28f415094d611d9247ad83e102360f787c46a",
|
|
107
|
+
"sha256": "6c9a10f6e079645463ff827722236f2743beadb2bedf16d6092afbd98c232e91",
|
|
108
|
+
"sha1": "8f1c36bedf0294e57c922301bbed92a701e03cf5",
|
|
109
|
+
"md5": "5fa6d5f3af471311aae8cc2f675e6d76"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
4
|
+
<!-- This module was also published with a richer model, Gradle metadata, -->
|
|
5
|
+
<!-- which should be used instead. Do not delete the following line which -->
|
|
6
|
+
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
|
7
|
+
<!-- that they should prefer consuming it instead. -->
|
|
8
|
+
<!-- do_not_remove: published-with-gradle-metadata -->
|
|
9
|
+
<modelVersion>4.0.0</modelVersion>
|
|
10
|
+
<groupId>com.capillarytech</groupId>
|
|
11
|
+
<artifactId>hydra-anonymous</artifactId>
|
|
12
|
+
<version>1.10.0</version>
|
|
13
|
+
<packaging>aar</packaging>
|
|
14
|
+
<name>hydra-anonymous</name>
|
|
15
|
+
<description>Capillary Hydra Anonymous SDK</description>
|
|
16
|
+
<url>https://github.com/Capillary/hydra-sdk-android</url>
|
|
17
|
+
<licenses>
|
|
18
|
+
<license>
|
|
19
|
+
<name>The Apache Software License, Version 2.0</name>
|
|
20
|
+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
|
21
|
+
</license>
|
|
22
|
+
</licenses>
|
|
23
|
+
<developers>
|
|
24
|
+
<developer>
|
|
25
|
+
<id>capillary</id>
|
|
26
|
+
<name>Capillary</name>
|
|
27
|
+
<email>support@capillarytech.com</email>
|
|
28
|
+
</developer>
|
|
29
|
+
</developers>
|
|
30
|
+
<dependencyManagement>
|
|
31
|
+
<dependencies>
|
|
32
|
+
<dependency>
|
|
33
|
+
<groupId>org.jetbrains.kotlin</groupId>
|
|
34
|
+
<artifactId>kotlin-bom</artifactId>
|
|
35
|
+
<version>1.8.0</version>
|
|
36
|
+
<type>pom</type>
|
|
37
|
+
<scope>import</scope>
|
|
38
|
+
</dependency>
|
|
39
|
+
</dependencies>
|
|
40
|
+
</dependencyManagement>
|
|
41
|
+
<dependencies>
|
|
42
|
+
<dependency>
|
|
43
|
+
<groupId>org.jetbrains.kotlin</groupId>
|
|
44
|
+
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
|
45
|
+
<version>1.7.0</version>
|
|
46
|
+
<scope>compile</scope>
|
|
47
|
+
</dependency>
|
|
48
|
+
<dependency>
|
|
49
|
+
<groupId>org.jetbrains.kotlin</groupId>
|
|
50
|
+
<artifactId>kotlin-parcelize-runtime</artifactId>
|
|
51
|
+
<version>1.7.0</version>
|
|
52
|
+
<scope>runtime</scope>
|
|
53
|
+
</dependency>
|
|
54
|
+
<dependency>
|
|
55
|
+
<groupId>androidx.core</groupId>
|
|
56
|
+
<artifactId>core-ktx</artifactId>
|
|
57
|
+
<version>1.8.0</version>
|
|
58
|
+
<scope>runtime</scope>
|
|
59
|
+
</dependency>
|
|
60
|
+
<dependency>
|
|
61
|
+
<groupId>androidx.appcompat</groupId>
|
|
62
|
+
<artifactId>appcompat</artifactId>
|
|
63
|
+
<version>1.5.0</version>
|
|
64
|
+
<scope>runtime</scope>
|
|
65
|
+
</dependency>
|
|
66
|
+
<dependency>
|
|
67
|
+
<groupId>com.google.android.material</groupId>
|
|
68
|
+
<artifactId>material</artifactId>
|
|
69
|
+
<version>1.6.1</version>
|
|
70
|
+
<scope>runtime</scope>
|
|
71
|
+
</dependency>
|
|
72
|
+
</dependencies>
|
|
73
|
+
</project>
|