sonarfit-react-native 1.0.1 → 2.1.0
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 +26 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -156,6 +156,32 @@ interface WorkoutResult {
|
|
|
156
156
|
}
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
+
## Debugging
|
|
160
|
+
|
|
161
|
+
### SDK Logging
|
|
162
|
+
|
|
163
|
+
The underlying iOS SDK supports multiple log levels for debugging. To enable logging, add this to your native iOS code (in `AppDelegate.swift` or similar):
|
|
164
|
+
|
|
165
|
+
```swift
|
|
166
|
+
import SonarFitKit
|
|
167
|
+
|
|
168
|
+
// In application(_:didFinishLaunchingWithOptions:)
|
|
169
|
+
#if DEBUG
|
|
170
|
+
SonarFitSDK.logLevel = .debug // See all logs during development
|
|
171
|
+
#else
|
|
172
|
+
SonarFitSDK.logLevel = .standard // Only errors and warnings in production
|
|
173
|
+
#endif
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Available log levels:
|
|
177
|
+
- `.none` - No logging
|
|
178
|
+
- `.minimal` - Only critical errors
|
|
179
|
+
- `.standard` - Errors and warnings (default)
|
|
180
|
+
- `.verbose` - Errors, warnings, and info messages
|
|
181
|
+
- `.debug` - All logs including motion processing and connectivity details
|
|
182
|
+
|
|
183
|
+
**Note:** Logging is controlled at the native iOS SDK level and cannot be changed from React Native JavaScript code.
|
|
184
|
+
|
|
159
185
|
## Requirements
|
|
160
186
|
|
|
161
187
|
- React Native >= 0.60
|