@luciq/react-native 18.0.0-5556-SNAPSHOT

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.
Files changed (239) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/FONTS_SETUP_GUIDE.md +521 -0
  3. package/Gemfile +1 -0
  4. package/Gemfile.lock +11 -0
  5. package/LICENSE +21 -0
  6. package/README.md +146 -0
  7. package/RNLuciq.podspec +21 -0
  8. package/android/build.gradle +88 -0
  9. package/android/gradle.properties +4 -0
  10. package/android/jacoco.gradle +52 -0
  11. package/android/native.gradle +7 -0
  12. package/android/proguard-rules.txt +1 -0
  13. package/android/sourcemaps.gradle +255 -0
  14. package/android/src/main/AndroidManifest.xml +4 -0
  15. package/android/src/main/java/ai/luciq/reactlibrary/ArgsRegistry.java +278 -0
  16. package/android/src/main/java/ai/luciq/reactlibrary/Constants.java +20 -0
  17. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciq.java +328 -0
  18. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqAPMModule.java +392 -0
  19. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqBugReportingModule.java +444 -0
  20. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqCrashReportingModule.java +169 -0
  21. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqFeatureRequestsModule.java +98 -0
  22. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqNetworkLoggerModule.java +195 -0
  23. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativeModule.java +1611 -0
  24. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativePackage.java +41 -0
  25. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqRepliesModule.java +298 -0
  26. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSessionReplayModule.java +213 -0
  27. package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSurveysModule.java +237 -0
  28. package/android/src/main/java/ai/luciq/reactlibrary/utils/ArrayUtil.java +167 -0
  29. package/android/src/main/java/ai/luciq/reactlibrary/utils/EventEmitterModule.java +35 -0
  30. package/android/src/main/java/ai/luciq/reactlibrary/utils/LuciqUtil.java +58 -0
  31. package/android/src/main/java/ai/luciq/reactlibrary/utils/MainThreadHandler.java +13 -0
  32. package/android/src/main/java/ai/luciq/reactlibrary/utils/MapUtil.java +171 -0
  33. package/android/src/main/java/ai/luciq/reactlibrary/utils/RNTouchedViewExtractor.java +167 -0
  34. package/android/src/main/java/ai/luciq/reactlibrary/utils/ReportUtil.java +67 -0
  35. package/app.plugin.js +1 -0
  36. package/babel.config.js +3 -0
  37. package/bin/commands/MigrateCommand.d.ts +6 -0
  38. package/bin/commands/UploadEasUpdatesSourcemaps.d.ts +2 -0
  39. package/bin/commands/UploadSoFiles.d.ts +6 -0
  40. package/bin/commands/UploadSourcemaps.d.ts +2 -0
  41. package/bin/config/migration-config.json +125 -0
  42. package/bin/index.d.ts +2 -0
  43. package/bin/index.js +19174 -0
  44. package/bin/upload/index.d.ts +4 -0
  45. package/bin/upload/migrate.d.ts +14 -0
  46. package/bin/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
  47. package/bin/upload/uploadSoFiles.d.ts +21 -0
  48. package/bin/upload/uploadSourcemaps.d.ts +21 -0
  49. package/cli/commands/MigrateCommand.ts +32 -0
  50. package/cli/commands/UploadEasUpdatesSourcemaps.ts +34 -0
  51. package/cli/commands/UploadSoFiles.ts +38 -0
  52. package/cli/commands/UploadSourcemaps.ts +40 -0
  53. package/cli/config/migration-config.json +125 -0
  54. package/cli/index.ts +21 -0
  55. package/cli/upload/index.ts +4 -0
  56. package/cli/upload/migrate.ts +265 -0
  57. package/cli/upload/uploadEasUpdatesSourcemaps.ts +74 -0
  58. package/cli/upload/uploadSoFiles.ts +112 -0
  59. package/cli/upload/uploadSourcemaps.ts +73 -0
  60. package/dangerfile.ts +44 -0
  61. package/dist/index.d.ts +19 -0
  62. package/dist/index.js +14 -0
  63. package/dist/models/FeatureFlag.d.ts +11 -0
  64. package/dist/models/FeatureFlag.js +1 -0
  65. package/dist/models/LuciqConfig.d.ts +42 -0
  66. package/dist/models/LuciqConfig.js +1 -0
  67. package/dist/models/NonFatalOptions.d.ts +15 -0
  68. package/dist/models/NonFatalOptions.js +1 -0
  69. package/dist/models/OverAirUpdate.d.ts +12 -0
  70. package/dist/models/OverAirUpdate.js +1 -0
  71. package/dist/models/Report.d.ts +70 -0
  72. package/dist/models/Report.js +109 -0
  73. package/dist/models/ReproConfig.d.ts +27 -0
  74. package/dist/models/ReproConfig.js +1 -0
  75. package/dist/models/SessionMetadata.d.ts +55 -0
  76. package/dist/models/SessionMetadata.js +1 -0
  77. package/dist/models/ThemeConfig.d.ts +27 -0
  78. package/dist/models/ThemeConfig.js +1 -0
  79. package/dist/models/W3cExternalTraceAttributes.d.ts +22 -0
  80. package/dist/models/W3cExternalTraceAttributes.js +1 -0
  81. package/dist/modules/APM.d.ts +77 -0
  82. package/dist/modules/APM.js +104 -0
  83. package/dist/modules/BugReporting.d.ts +138 -0
  84. package/dist/modules/BugReporting.js +202 -0
  85. package/dist/modules/CrashReporting.d.ts +19 -0
  86. package/dist/modules/CrashReporting.js +40 -0
  87. package/dist/modules/FeatureRequests.d.ts +20 -0
  88. package/dist/modules/FeatureRequests.js +28 -0
  89. package/dist/modules/Luciq.d.ts +362 -0
  90. package/dist/modules/Luciq.js +797 -0
  91. package/dist/modules/NetworkLogger.d.ts +52 -0
  92. package/dist/modules/NetworkLogger.js +208 -0
  93. package/dist/modules/Replies.d.ts +78 -0
  94. package/dist/modules/Replies.js +121 -0
  95. package/dist/modules/SessionReplay.d.ts +78 -0
  96. package/dist/modules/SessionReplay.js +98 -0
  97. package/dist/modules/Surveys.d.ts +75 -0
  98. package/dist/modules/Surveys.js +101 -0
  99. package/dist/native/NativeAPM.d.ts +18 -0
  100. package/dist/native/NativeAPM.js +4 -0
  101. package/dist/native/NativeBugReporting.d.ts +32 -0
  102. package/dist/native/NativeBugReporting.js +10 -0
  103. package/dist/native/NativeConstants.d.ts +182 -0
  104. package/dist/native/NativeConstants.js +1 -0
  105. package/dist/native/NativeCrashReporting.d.ts +18 -0
  106. package/dist/native/NativeCrashReporting.js +2 -0
  107. package/dist/native/NativeFeatureRequests.d.ts +8 -0
  108. package/dist/native/NativeFeatureRequests.js +2 -0
  109. package/dist/native/NativeLuciq.d.ts +86 -0
  110. package/dist/native/NativeLuciq.js +10 -0
  111. package/dist/native/NativeNetworkLogger.d.ts +21 -0
  112. package/dist/native/NativeNetworkLogger.js +14 -0
  113. package/dist/native/NativePackage.d.ts +21 -0
  114. package/dist/native/NativePackage.js +2 -0
  115. package/dist/native/NativeReplies.d.ts +21 -0
  116. package/dist/native/NativeReplies.js +8 -0
  117. package/dist/native/NativeSessionReplay.d.ts +16 -0
  118. package/dist/native/NativeSessionReplay.js +8 -0
  119. package/dist/native/NativeSurveys.d.ts +22 -0
  120. package/dist/native/NativeSurveys.js +9 -0
  121. package/dist/utils/AppStatesHandler.d.ts +3 -0
  122. package/dist/utils/AppStatesHandler.js +16 -0
  123. package/dist/utils/Enums.d.ts +244 -0
  124. package/dist/utils/Enums.js +266 -0
  125. package/dist/utils/FeatureFlags.d.ts +7 -0
  126. package/dist/utils/FeatureFlags.js +24 -0
  127. package/dist/utils/LuciqConstants.d.ts +14 -0
  128. package/dist/utils/LuciqConstants.js +15 -0
  129. package/dist/utils/LuciqUtils.d.ts +97 -0
  130. package/dist/utils/LuciqUtils.js +301 -0
  131. package/dist/utils/UnhandledRejectionTracking.d.ts +9 -0
  132. package/dist/utils/UnhandledRejectionTracking.js +99 -0
  133. package/dist/utils/XhrNetworkInterceptor.d.ts +39 -0
  134. package/dist/utils/XhrNetworkInterceptor.js +258 -0
  135. package/dist/utils/config.d.ts +5 -0
  136. package/dist/utils/config.js +6 -0
  137. package/dist/utils/logger.d.ts +10 -0
  138. package/dist/utils/logger.js +39 -0
  139. package/expo.d.ts +1 -0
  140. package/expo.js +1 -0
  141. package/ios/RNLuciq/ArgsRegistry.h +32 -0
  142. package/ios/RNLuciq/ArgsRegistry.m +276 -0
  143. package/ios/RNLuciq/LuciqAPMBridge.h +26 -0
  144. package/ios/RNLuciq/LuciqAPMBridge.m +99 -0
  145. package/ios/RNLuciq/LuciqBugReportingBridge.h +60 -0
  146. package/ios/RNLuciq/LuciqBugReportingBridge.m +241 -0
  147. package/ios/RNLuciq/LuciqCrashReportingBridge.h +18 -0
  148. package/ios/RNLuciq/LuciqCrashReportingBridge.m +68 -0
  149. package/ios/RNLuciq/LuciqFeatureRequestsBridge.h +30 -0
  150. package/ios/RNLuciq/LuciqFeatureRequestsBridge.m +61 -0
  151. package/ios/RNLuciq/LuciqNetworkLoggerBridge.h +44 -0
  152. package/ios/RNLuciq/LuciqNetworkLoggerBridge.m +206 -0
  153. package/ios/RNLuciq/LuciqReactBridge.h +151 -0
  154. package/ios/RNLuciq/LuciqReactBridge.m +548 -0
  155. package/ios/RNLuciq/LuciqRepliesBridge.h +40 -0
  156. package/ios/RNLuciq/LuciqRepliesBridge.m +80 -0
  157. package/ios/RNLuciq/LuciqSessionReplayBridge.h +32 -0
  158. package/ios/RNLuciq/LuciqSessionReplayBridge.m +107 -0
  159. package/ios/RNLuciq/LuciqSurveysBridge.h +46 -0
  160. package/ios/RNLuciq/LuciqSurveysBridge.m +107 -0
  161. package/ios/RNLuciq/RCTConvert+LuciqEnums.h +18 -0
  162. package/ios/RNLuciq/RCTConvert+LuciqEnums.m +127 -0
  163. package/ios/RNLuciq/RNLuciq.h +35 -0
  164. package/ios/RNLuciq/RNLuciq.m +107 -0
  165. package/ios/RNLuciq/Util/LCQAPM+PrivateAPIs.h +15 -0
  166. package/ios/RNLuciq/Util/LCQCrashReporting+CP.h +13 -0
  167. package/ios/RNLuciq/Util/LCQNetworkLogger+CP.h +68 -0
  168. package/ios/RNLuciq/Util/Luciq+CP.h +12 -0
  169. package/ios/RNLuciq.xcodeproj/project.pbxproj +352 -0
  170. package/ios/native.rb +12 -0
  171. package/ios/sourcemaps.sh +120 -0
  172. package/migrate.js +569 -0
  173. package/package.json +91 -0
  174. package/plugin/build/index.js +42078 -0
  175. package/plugin/src/index.ts +5 -0
  176. package/plugin/src/pluginProps.ts +6 -0
  177. package/plugin/src/withLuciq.ts +51 -0
  178. package/plugin/src/withLuciqAndroid.ts +99 -0
  179. package/plugin/src/withLuciqIOS.ts +109 -0
  180. package/plugin/tsconfig.json +7 -0
  181. package/react-native.config.js +16 -0
  182. package/scripts/customize-ios-endpoints.sh +28 -0
  183. package/scripts/dream-11-delete-unused-features.sh +62 -0
  184. package/scripts/find-token.js +58 -0
  185. package/scripts/find-token.sh +70 -0
  186. package/scripts/notify-github.sh +15 -0
  187. package/scripts/replace.js +58 -0
  188. package/scripts/snapshot-comment.md +15 -0
  189. package/scripts/snapshot-version.sh +11 -0
  190. package/src/index.ts +40 -0
  191. package/src/models/FeatureFlag.ts +12 -0
  192. package/src/models/LuciqConfig.ts +48 -0
  193. package/src/models/NonFatalOptions.ts +16 -0
  194. package/src/models/OverAirUpdate.ts +14 -0
  195. package/src/models/Report.ts +124 -0
  196. package/src/models/ReproConfig.ts +31 -0
  197. package/src/models/SessionMetadata.ts +57 -0
  198. package/src/models/ThemeConfig.ts +34 -0
  199. package/src/models/W3cExternalTraceAttributes.ts +22 -0
  200. package/src/modules/APM.ts +117 -0
  201. package/src/modules/BugReporting.ts +254 -0
  202. package/src/modules/CrashReporting.ts +54 -0
  203. package/src/modules/FeatureRequests.ts +32 -0
  204. package/src/modules/Luciq.ts +934 -0
  205. package/src/modules/NetworkLogger.ts +270 -0
  206. package/src/modules/Replies.ts +137 -0
  207. package/src/modules/SessionReplay.ts +111 -0
  208. package/src/modules/Surveys.ts +118 -0
  209. package/src/native/NativeAPM.ts +51 -0
  210. package/src/native/NativeBugReporting.ts +70 -0
  211. package/src/native/NativeConstants.ts +215 -0
  212. package/src/native/NativeCrashReporting.ts +29 -0
  213. package/src/native/NativeFeatureRequests.ts +12 -0
  214. package/src/native/NativeLuciq.ts +179 -0
  215. package/src/native/NativeNetworkLogger.ts +42 -0
  216. package/src/native/NativePackage.ts +25 -0
  217. package/src/native/NativeReplies.ts +34 -0
  218. package/src/native/NativeSessionReplay.ts +21 -0
  219. package/src/native/NativeSurveys.ts +34 -0
  220. package/src/promise.d.ts +11 -0
  221. package/src/utils/AppStatesHandler.ts +19 -0
  222. package/src/utils/Enums.ts +266 -0
  223. package/src/utils/FeatureFlags.ts +33 -0
  224. package/src/utils/LuciqConstants.ts +24 -0
  225. package/src/utils/LuciqUtils.ts +417 -0
  226. package/src/utils/UnhandledRejectionTracking.ts +118 -0
  227. package/src/utils/XhrNetworkInterceptor.ts +337 -0
  228. package/src/utils/config.ts +7 -0
  229. package/src/utils/logger.ts +54 -0
  230. package/tsconfig.json +32 -0
  231. package/tsconfig.test.json +4 -0
  232. package/tsconfig.upload.json +10 -0
  233. package/upload/index.d.ts +4 -0
  234. package/upload/index.js +17309 -0
  235. package/upload/migrate.d.ts +14 -0
  236. package/upload/package.json +5 -0
  237. package/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
  238. package/upload/uploadSoFiles.d.ts +21 -0
  239. package/upload/uploadSourcemaps.d.ts +21 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## [18.0.0](https://github.com/luciqai/luciq-reactnative-sdk/compare/v18.0.0...dev) (September 24, 2025)
4
+
5
+ - SDK rebranded from Instabug to Luciq.
@@ -0,0 +1,521 @@
1
+ # Complete Font Setup Guide for Luciq React Native
2
+
3
+ This guide covers all ways to use fonts with the `setTheme` function in Luciq React Native, including Google Fonts, custom fonts, system fonts, and both Expo and regular React Native projects.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Overview](#overview)
8
+ 2. [Font Types Supported](#font-types-supported)
9
+ 3. [Regular React Native Setup](#regular-react-native-setup)
10
+ 4. [Expo Setup](#expo-setup)
11
+ 5. [Asset Linking Options](#asset-linking-options)
12
+ 6. [Usage Examples](#usage-examples)
13
+ 7. [Troubleshooting](#troubleshooting)
14
+ 8. [Platform Compatibility Notes](#platform-compatibility-notes)
15
+
16
+ ## Overview
17
+
18
+ The Luciq React Native bridge supports font loading from multiple sources:
19
+
20
+ - **App Bundle**: Fonts included in your app assets
21
+ - **System Fonts**: Built-in platform fonts
22
+ - **Custom Fonts**: Any TTF/OTF font files
23
+ - **Google Fonts**: Downloaded TTF files from Google Fonts
24
+
25
+ ## Font Types Supported
26
+
27
+ ### 1. Google Fonts
28
+
29
+ - Download TTF files from [Google Fonts](https://fonts.google.com/)
30
+ - Examples: Roboto, Inter, Nunito, Open Sans, Lato
31
+
32
+ ### 2. Custom Fonts
33
+
34
+ - Any TTF/OTF font files
35
+ - Commercial fonts, free fonts, custom designs
36
+
37
+ ### 3. System Fonts
38
+
39
+ - Platform default fonts
40
+ - No setup required
41
+ - Examples: San Francisco (iOS), Roboto (Android)
42
+
43
+ ## Regular React Native Setup
44
+
45
+ ### Method 1: Bundle Fonts (Recommended)
46
+
47
+ #### Step 1: Download Font Files
48
+
49
+ ```bash
50
+ # Create fonts directory
51
+ mkdir fonts
52
+
53
+ # Download your desired fonts (example with Google Fonts)
54
+ # Download from Google Fonts or any font provider
55
+ # Place TTF files in the fonts directory
56
+ ```
57
+
58
+ #### Step 2: Add to Android
59
+
60
+ ```bash
61
+ # Create assets/fonts directory
62
+ mkdir -p android/app/src/main/assets/fonts
63
+
64
+ # Copy font files
65
+ cp fonts/*.ttf android/app/src/main/assets/fonts/
66
+ ```
67
+
68
+ #### Step 3: Add to iOS
69
+
70
+ 1. **Add to Xcode Project:**
71
+ - Open your iOS project in Xcode
72
+ - Right-click on your project → "Add Files to [ProjectName]"
73
+ - Select your TTF files
74
+ - Make sure "Add to target" is checked
75
+
76
+ 2. **Update Info.plist:**
77
+
78
+ ```xml
79
+ <key>UIAppFonts</key>
80
+ <array>
81
+ <string>Roboto-Regular.ttf</string>
82
+ <string>Roboto-Bold.ttf</string>
83
+ <string>Inter-Regular.ttf</string>
84
+ <string>Inter-Bold.ttf</string>
85
+ </array>
86
+ ```
87
+
88
+ #### Step 4: Use with setTheme
89
+
90
+ ```typescript
91
+ import Luciq from '@luciq/react-native';
92
+ import { Platform } from 'react-native';
93
+
94
+ const applyCustomTheme = () => {
95
+ Luciq.setTheme({
96
+ // Colors
97
+ primaryColor: '#2196F3',
98
+ backgroundColor: '#FFFFFF',
99
+ primaryTextColor: '#333333',
100
+
101
+ // Text styles (Android only)
102
+ primaryTextStyle: 'normal',
103
+ secondaryTextStyle: 'normal',
104
+ ctaTextStyle: 'bold',
105
+
106
+ // Fonts - Android (use font paths)
107
+ ...(Platform.OS === 'android' && {
108
+ primaryFontPath: '/data/user/0/ai.yourapp/files/fonts/Roboto-Regular.ttf',
109
+ secondaryFontPath: '/data/user/0/ai.yourapp/files/fonts/Roboto-Light.ttf',
110
+ ctaFontPath: '/data/user/0/ai.yourapp/files/fonts/Roboto-Bold.ttf',
111
+ }),
112
+
113
+ // Fonts - iOS (use font paths, not assets)
114
+ ...(Platform.OS === 'ios' && {
115
+ primaryFontPath: 'fonts/Roboto-Regular.ttf',
116
+ secondaryFontPath: 'fonts/Roboto-Light.ttf',
117
+ ctaFontPath: 'fonts/Roboto-Bold.ttf',
118
+ }),
119
+ });
120
+ };
121
+ ```
122
+
123
+ ### Method 2: System Fonts Only
124
+
125
+ ```typescript
126
+ import Luciq from '@luciq/react-native';
127
+
128
+ const applySystemTheme = () => {
129
+ Luciq.setTheme({
130
+ // Colors only - uses system fonts
131
+ primaryColor: '#2196F3',
132
+ backgroundColor: '#FFFFFF',
133
+ primaryTextColor: '#333333',
134
+ secondaryTextColor: '#666666',
135
+ titleTextColor: '#000000',
136
+
137
+ // Text styles (Android only)
138
+ primaryTextStyle: 'normal',
139
+ secondaryTextStyle: 'normal',
140
+ ctaTextStyle: 'bold',
141
+
142
+ // No font paths = uses system fonts
143
+ });
144
+ };
145
+ ```
146
+
147
+ ## Expo Setup
148
+
149
+ ### Method 1: Expo Fonts (Recommended for Expo)
150
+
151
+ #### Step 1: Install Expo Fonts
152
+
153
+ ```bash
154
+ npx expo install expo-font
155
+ ```
156
+
157
+ #### Step 2: Download and Add Fonts
158
+
159
+ ```bash
160
+ # Create fonts directory
161
+ mkdir fonts
162
+
163
+ # Download your fonts and place them in the fonts directory
164
+ # Example: Roboto-Regular.ttf, Roboto-Bold.ttf, Inter-Regular.ttf
165
+ ```
166
+
167
+ #### Step 3: Configure app.json
168
+
169
+ ```json
170
+ {
171
+ "expo": {
172
+ "fonts": [
173
+ {
174
+ "asset": "./fonts/Roboto-Regular.ttf",
175
+ "family": "Roboto-Regular"
176
+ },
177
+ {
178
+ "asset": "./fonts/Roboto-Bold.ttf",
179
+ "family": "Roboto-Bold"
180
+ },
181
+ {
182
+ "asset": "./fonts/Inter-Regular.ttf",
183
+ "family": "Inter-Regular"
184
+ }
185
+ ]
186
+ }
187
+ }
188
+ ```
189
+
190
+ #### Step 4: Load Fonts in Your App
191
+
192
+ ```typescript
193
+ import * as Font from 'expo-font';
194
+ import { useEffect, useState } from 'react';
195
+
196
+ export default function App() {
197
+ const [fontsLoaded, setFontsLoaded] = useState(false);
198
+
199
+ useEffect(() => {
200
+ async function loadFonts() {
201
+ await Font.loadAsync({
202
+ 'Roboto-Regular': require('./fonts/Roboto-Regular.ttf'),
203
+ 'Roboto-Bold': require('./fonts/Roboto-Bold.ttf'),
204
+ 'Inter-Regular': require('./fonts/Inter-Regular.ttf'),
205
+ });
206
+ setFontsLoaded(true);
207
+ }
208
+ loadFonts();
209
+ }, []);
210
+
211
+ if (!fontsLoaded) {
212
+ return <LoadingScreen />;
213
+ }
214
+
215
+ return <YourApp />;
216
+ }
217
+ ```
218
+
219
+ #### Step 5: Use with setTheme
220
+
221
+ ```typescript
222
+ import Luciq from '@luciq/react-native';
223
+ import { Platform } from 'react-native';
224
+
225
+ const applyExpoTheme = () => {
226
+ Luciq.setTheme({
227
+ // Colors
228
+ primaryColor: '#2196F3',
229
+ backgroundColor: '#FFFFFF',
230
+ primaryTextColor: '#333333',
231
+
232
+ // Text styles (Android only)
233
+ primaryTextStyle: 'normal',
234
+ secondaryTextStyle: 'normal',
235
+ ctaTextStyle: 'bold',
236
+
237
+ // Fonts - use font paths for both platforms
238
+ primaryFontPath: 'fonts/Roboto-Regular.ttf',
239
+ secondaryFontPath: 'fonts/Inter-Regular.ttf',
240
+ ctaFontPath: 'fonts/Roboto-Bold.ttf',
241
+ });
242
+ };
243
+ ```
244
+
245
+ ### Method 2: Expo with Bundle Fonts
246
+
247
+ Same as Regular React Native Method 1, but fonts are automatically included in the Expo build.
248
+
249
+ ## Asset Linking Options
250
+
251
+ ### Option 1: Manual Copy (Current Method)
252
+
253
+ - Copy TTF files to native directories
254
+ - Update Info.plist manually
255
+ - Works with all setups
256
+
257
+ ### Option 2: React Native CLI Linking
258
+
259
+ ```bash
260
+ # Create a react-native.config.js file
261
+ module.exports = {
262
+ assets: ['./fonts/'],
263
+ };
264
+ ```
265
+
266
+ Then run:
267
+
268
+ ```bash
269
+ npx react-native link
270
+ ```
271
+
272
+ ### Option 3: Expo Asset Linking
273
+
274
+ ```json
275
+ {
276
+ "expo": {
277
+ "fonts": [
278
+ {
279
+ "asset": "./fonts/Roboto-Regular.ttf",
280
+ "family": "Roboto-Regular"
281
+ }
282
+ ]
283
+ }
284
+ }
285
+ ```
286
+
287
+ ### Option 4: Metro Asset Plugin
288
+
289
+ ```bash
290
+ npm install --save-dev react-native-asset
291
+ ```
292
+
293
+ Create `react-native.config.js`:
294
+
295
+ ```javascript
296
+ module.exports = {
297
+ assets: ['./fonts/'],
298
+ };
299
+ ```
300
+
301
+ ## Usage Examples
302
+
303
+ ### Example 1: Google Fonts (Roboto)
304
+
305
+ ```typescript
306
+ // Download: Roboto-Regular.ttf, Roboto-Bold.ttf, Roboto-Light.ttf
307
+ // Add to project using any method above
308
+
309
+ const applyRobotoTheme = () => {
310
+ Luciq.setTheme({
311
+ primaryColor: '#1976D2',
312
+ backgroundColor: '#FAFAFA',
313
+ primaryTextColor: '#212121',
314
+ secondaryTextColor: '#757575',
315
+ titleTextColor: '#000000',
316
+
317
+ // Text styles (Android only)
318
+ primaryTextStyle: 'normal',
319
+ secondaryTextStyle: 'normal',
320
+ ctaTextStyle: 'bold',
321
+
322
+ // Font paths for both platforms
323
+ primaryFontPath: 'fonts/Roboto-Regular.ttf',
324
+ secondaryFontPath: 'fonts/Roboto-Light.ttf',
325
+ ctaFontPath: 'fonts/Roboto-Bold.ttf',
326
+ });
327
+ };
328
+ ```
329
+
330
+ ### Example 2: Custom Fonts (Inter)
331
+
332
+ ```typescript
333
+ // Download: Inter-Regular.ttf, Inter-Bold.ttf, Inter-Medium.ttf
334
+ // Add to project using any method above
335
+
336
+ const applyInterTheme = () => {
337
+ Luciq.setTheme({
338
+ primaryColor: '#3B82F6',
339
+ backgroundColor: '#FFFFFF',
340
+ primaryTextColor: '#1F2937',
341
+ secondaryTextColor: '#6B7280',
342
+ titleTextColor: '#111827',
343
+
344
+ // Text styles (Android only)
345
+ primaryTextStyle: 'normal',
346
+ secondaryTextStyle: 'normal',
347
+ ctaTextStyle: 'bold',
348
+
349
+ // Font paths for both platforms
350
+ primaryFontPath: 'fonts/Inter-Regular.ttf',
351
+ secondaryFontPath: 'fonts/Inter-Medium.ttf',
352
+ ctaFontPath: 'fonts/Inter-Bold.ttf',
353
+ });
354
+ };
355
+ ```
356
+
357
+ ### Example 3: System Fonts Only
358
+
359
+ ```typescript
360
+ const applySystemTheme = () => {
361
+ Luciq.setTheme({
362
+ primaryColor: '#007AFF',
363
+ backgroundColor: '#F2F2F7',
364
+ primaryTextColor: '#000000',
365
+ secondaryTextColor: '#8E8E93',
366
+ titleTextColor: '#000000',
367
+
368
+ // Text styles (Android only) - no font paths = uses system fonts
369
+ primaryTextStyle: 'normal',
370
+ secondaryTextStyle: 'normal',
371
+ ctaTextStyle: 'bold',
372
+ });
373
+ };
374
+ ```
375
+
376
+ ### Example 4: Mixed Approach
377
+
378
+ ```typescript
379
+ const applyMixedTheme = () => {
380
+ Luciq.setTheme({
381
+ primaryColor: '#FF6B6B',
382
+ backgroundColor: '#FFFFFF',
383
+ primaryTextColor: '#2D3436',
384
+ secondaryTextColor: '#636E72',
385
+ titleTextColor: '#2D3436',
386
+
387
+ // Text styles (Android only)
388
+ primaryTextStyle: 'normal',
389
+ secondaryTextStyle: 'normal',
390
+ ctaTextStyle: 'bold',
391
+
392
+ // Custom font only for CTA - rest use system fonts
393
+ ctaFontPath: 'fonts/Roboto-Bold.ttf',
394
+ });
395
+ };
396
+ ```
397
+
398
+ ## Platform Compatibility Notes
399
+
400
+ ### **Important: iOS Font Asset Limitation**
401
+
402
+ The iOS implementation currently **only supports** `primaryFontPath`, `secondaryFontPath`, and `ctaFontPath` properties. The `*FontAsset` properties are **not supported** on iOS.
403
+
404
+ **Android**: Supports both `*FontPath` and `*FontAsset` properties
405
+ **iOS**: Only supports `*FontPath` properties
406
+
407
+ ### **Recommended Approach**
408
+
409
+ Use `*FontPath` properties for both platforms to ensure compatibility:
410
+
411
+ ```typescript
412
+ // ✅ Works on both platforms
413
+ Luciq.setTheme({
414
+ primaryFontPath: 'fonts/Roboto-Regular.ttf',
415
+ secondaryFontPath: 'fonts/Roboto-Light.ttf',
416
+ ctaFontPath: 'fonts/Roboto-Bold.ttf',
417
+ });
418
+
419
+ // ❌ iOS doesn't support these
420
+ Luciq.setTheme({
421
+ primaryFontAsset: 'fonts/Roboto-Regular.ttf', // iOS ignores this
422
+ secondaryFontAsset: 'fonts/Roboto-Light.ttf', // iOS ignores this
423
+ ctaFontAsset: 'fonts/Roboto-Bold.ttf', // iOS ignores this
424
+ });
425
+ ```
426
+
427
+ ### **Font Path Format**
428
+
429
+ - **Android**: Can use full paths or just filenames
430
+ - **iOS**: Use relative paths like `fonts/Roboto-Regular.ttf`
431
+
432
+ ## Troubleshooting
433
+
434
+ ### Common Issues
435
+
436
+ #### 1. Font Not Loading
437
+
438
+ **Symptoms:** Font appears as system font or doesn't change
439
+ **Solutions:**
440
+
441
+ - Check font filename matches exactly (case-sensitive)
442
+ - Verify font is added to both Android and iOS
443
+ - For iOS, check Info.plist entries
444
+ - For Expo, ensure fonts are loaded before using setTheme
445
+ - **iOS users**: Make sure you're using `*FontPath` properties, not `*FontAsset`
446
+
447
+ #### 2. Font Loading in Expo
448
+
449
+ **Symptoms:** Font works in development but not in production
450
+ **Solutions:**
451
+
452
+ - Use `expo-font` to load fonts before app starts
453
+ - Ensure fonts are included in app.json
454
+ - Test with `expo build` or EAS Build
455
+
456
+ #### 3. Font File Issues
457
+
458
+ **Symptoms:** App crashes or font doesn't load
459
+ **Solutions:**
460
+
461
+ - Verify TTF file is not corrupted
462
+ - Check file size (should be reasonable, not 0 bytes)
463
+ - Ensure font file is valid TTF/OTF format
464
+
465
+ #### 4. Performance Issues
466
+
467
+ **Symptoms:** App slow to start or font loading delays
468
+ **Solutions:**
469
+
470
+ - Use system fonts for better performance
471
+ - Limit number of custom fonts
472
+ - Preload fonts in app initialization
473
+
474
+ ### Debug Steps
475
+
476
+ 1. **Check Font Loading:**
477
+
478
+ ```typescript
479
+ // Add this to debug font loading
480
+ console.log('Available fonts:', Luciq.getAvailableFonts()); // If available
481
+ ```
482
+
483
+ 2. **Verify File Paths:**
484
+
485
+ ```bash
486
+ # Check if fonts are in the right place
487
+ ls -la android/app/src/main/assets/fonts/
488
+ ls -la ios/YourApp/
489
+ ```
490
+
491
+ 3. **Test with System Fonts First:**
492
+
493
+ ```typescript
494
+ // Test with system fonts to ensure setTheme works
495
+ Luciq.setTheme({
496
+ primaryColor: '#FF0000',
497
+ // No fontFamily = system fonts
498
+ });
499
+ ```
500
+
501
+ ## Best Practices
502
+
503
+ 1. **Use System Fonts When Possible:** Better performance and consistency
504
+ 2. **Limit Custom Fonts:** Use 1-2 custom fonts maximum
505
+ 3. **Preload Fonts:** Load fonts before app starts
506
+ 4. **Test on Both Platforms:** Fonts may behave differently on iOS vs Android
507
+ 5. **Use Standard Font Weights:** Regular, Bold, Light are most reliable
508
+ 6. **Keep Font Files Small:** Optimize TTF files for mobile
509
+ 7. **Use \*FontPath Properties:** Ensures compatibility with both platforms
510
+
511
+ ## Summary
512
+
513
+ - **Regular React Native:** Use bundle fonts or system fonts
514
+ - **Expo:** Use expo-font or bundle fonts
515
+ - **Asset Linking:** Available through CLI tools and Expo config
516
+ - **Google Fonts:** Download TTF files and add to project
517
+ - **Custom Fonts:** Any TTF/OTF file works the same way
518
+ - **System Fonts:** No setup required, best performance
519
+ - **Platform Compatibility:** Use `*FontPath` properties for both platforms
520
+
521
+ The native bridge handles all font loading automatically once fonts are properly added to your project!
package/Gemfile ADDED
@@ -0,0 +1 @@
1
+ source "https://rubygems.org"
package/Gemfile.lock ADDED
@@ -0,0 +1,11 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+
5
+ PLATFORMS
6
+ ruby
7
+
8
+ DEPENDENCIES
9
+
10
+ BUNDLED WITH
11
+ 2.4.17
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 LUCIQ
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # Luciq for React Native
2
+
3
+ [![npm](https://img.shields.io/npm/v/@luciq/react-native.svg)](https://www.npmjs.com/package/@luciq/react-native)
4
+ [![npm](https://img.shields.io/npm/dt/@luciq/react-native.svg)](https://www.npmjs.com/package/@luciq/react-native)
5
+ [![npm](https://img.shields.io/npm/l/@luciq/react-native.svg)](https://github.com/luciqai/luciq-reactnative-sdk/blob/master/LICENSE)
6
+ [![Twitter](https://img.shields.io/badge/twitter-@Luciq-blue.svg)](https://twitter.com/Luciqai)
7
+ [![Analytics](https://luciq-ga.appspot.com/UA-41982088-6/github/Luciq/@luciq/react-native?pixel)](https://luciq.ai)
8
+
9
+ Luciq is the Agentic Observability Platform built for Mobile.
10
+
11
+ Our intelligent AI agents help you capture rich, contextual data for every issue, including full session replays, console logs, and detailed network requests, to proactively detect, prioritize, and resolve problems automatically. From traditional bug reporting to proactive resolution, Luciq equips you with the building blocks to your app’s success.
12
+
13
+ Ship faster, deliver frustration-free user sessions, and focus on building what matters.
14
+
15
+ For more info, visit Luciq.ai.
16
+
17
+ ## Installation
18
+
19
+ 1. In Terminal, navigate to your React Native directory and install the `@luciq/react-native` package:
20
+
21
+ ```bash
22
+ npm install @luciq/react-native
23
+ ```
24
+
25
+ Or if you prefer to use Yarn instead of npm:
26
+
27
+ ```bash
28
+ yarn add @luciq/react-native
29
+ ```
30
+
31
+ 2. if you are using expo you need to add `@luciq/react-native` plugin to `app.json`:
32
+
33
+ ```json
34
+ "plugins" : [
35
+ [
36
+ "@luciq/react-native",
37
+ {
38
+ // optional that add Mic,Photo permission on iOS and FOREGROUND_SERVICE_MEDIA_PROJECTION on android
39
+ "addScreenRecordingBugReportingPermission": true
40
+ }
41
+ ]
42
+ ]
43
+ ```
44
+
45
+ 3. CocoaPods on iOS needs this extra step:
46
+
47
+ ```bash
48
+ cd ios && pod install && cd ..
49
+ ```
50
+
51
+ ## Initializing Luciq
52
+
53
+ To start using Luciq, import it as follows, then initialize it in the `constructor` or `componentWillMount`. This line will let the SDK work with the default behavior. The SDK will be invoked when the device is shaken. You can customize this behavior through the APIs.
54
+
55
+ ```javascript
56
+ import Luciq from '@luciq/react-native';
57
+
58
+ Luciq.init({
59
+ token: 'APP_TOKEN',
60
+ invocationEvents: [Luciq.invocationEvent.shake],
61
+ });
62
+ ```
63
+
64
+ _You can find your app token by selecting the SDK tab from your [**Luciq dashboard**](https://dashboard.luciq.ai)._
65
+
66
+ ## Microphone and Photo Library Usage Description (iOS Only)
67
+
68
+ Luciq needs access to the microphone and photo library to be able to let users add audio and video attachments. Starting from iOS 10, apps that don’t provide a usage description for those 2 permissions would be rejected when submitted to the App Store.
69
+
70
+ For your app not to be rejected, you’ll need to add the following 2 keys to your app’s info.plist file with text explaining to the user why those permissions are needed:
71
+
72
+ - `NSMicrophoneUsageDescription`
73
+ - `NSPhotoLibraryUsageDescription`
74
+
75
+ If your app doesn’t already access the microphone or photo library, we recommend using a usage description like:
76
+
77
+ - "`<app name>` needs access to the microphone to be able to attach voice notes."
78
+ - "`<app name>` needs access to your photo library for you to be able to attach images."
79
+
80
+ **The permission alert for accessing the microphone/photo library will NOT appear unless users attempt to attach a voice note/photo while using Luciq.**
81
+
82
+ ## Uploading Source Map Files for Crash Reports
83
+
84
+ For your app crashes to show up with a fully symbolicated stack trace, we will automatically generate the source map files and upload them to your dashboard on release build. To do so, we rely on your app token being explicitly added to `Luciq.init({token: 'YOUR_APP_TOKEN'})` in JavaScript.
85
+
86
+ If your app token is defined as a constant, you can set an environment variable `LUCIQ_APP_TOKEN` to be used instead.
87
+ We also automatically read your `versionName` and `versionCode` to upload your sourcemap file. alternatively, can also set the environment variables `LUCIQ_APP_VERSION_NAME` and `LUCIQ_APP_VERSION_CODE` to be used instead.
88
+
89
+ To disable the automatic upload, you can set the environment variable `LUCIQ_SOURCEMAPS_UPLOAD_DISABLE` to TRUE.
90
+
91
+ ## Network Logging
92
+
93
+ Luciq network logging is enabled by default. It intercepts any requests performed with `fetch` or `XMLHttpRequest` and attaches them to the report that will be sent to the dashboard. To disable network logs:
94
+
95
+ ```javascript
96
+ import { NetworkLogger } from '@luciq/react-native';
97
+ ```
98
+
99
+ ```javascript
100
+ NetworkLogger.setEnabled(false);
101
+ ```
102
+
103
+ ## Repro Steps
104
+
105
+ Luciq Repro Steps are enabled by default. It captures a screenshot of each screen the user navigates to. These screens are attached to the BugReport when sent.
106
+
107
+ We support the two most popular React Native navigation libraries:
108
+
109
+ - **[react-navigation](https://github.com/react-navigation/react-navigation)**
110
+ - **v5**
111
+ set the `onStateChange` to `Luciq.onStateChange` in your NavigationContainer as follows:
112
+
113
+ ```javascript
114
+ <NavigationContainer onStateChange={Luciq.onStateChange} />
115
+ ```
116
+
117
+ - **<=v4**
118
+ set the `onNavigationStateChange` to `Luciq.onNavigationStateChange` in your App wrapper as follows:
119
+
120
+ ```javascript
121
+ export default () => <App onNavigationStateChange={Luciq.onNavigationStateChange} />;
122
+ ```
123
+
124
+ - **[react-native-navigation](https://github.com/wix/react-native-navigation)**
125
+
126
+ Register `luciq.aiponentDidAppearListener` listener using:
127
+
128
+ ```javascript
129
+ Navigation.events().registerComponentDidAppearListener(luciq.aiponentDidAppearListener);
130
+ ```
131
+
132
+ Alternatively, you can report your screen changes manually using the following API
133
+
134
+ ```javascript
135
+ Luciq.reportScreenChange('screenName');
136
+ ```
137
+
138
+ You can disable Repro Steps using the following API:
139
+
140
+ ```javascript
141
+ Luciq.setReproStepsConfig({ all: ReproStepsMode.disabled });
142
+ ```
143
+
144
+ ## Documentation
145
+
146
+ For more details about the supported APIs and how to use them, check our [**Documentation**](https://docs.luciq.ai/docs/react-native-overview).