FAQ
Logger implementation
To obtain a detailed list of events, requests and errors from native iOS/Android SDK, you can implement a custom logger after initializing SDK:
Future<void> initSdk() async {
await _inAppStoryPlugin.initWith(apiKey, userId);
InAppStoryManager.instance.logger = IASLogger.create(
onDebugLog: (tag, message) {
print('$tag: $message');
},
onErrorLog: (tag, message) {
print('$tag: $message');
},
printToConsole: true,
);
}
Build failure
Sometimes incorrect Gradle cache, Pub cache or Cocoapods cache cause errors when building an application:
// ...
e: file:///.../inappstory_plugin-0.5.0/android/src/main/kotlin/com/inappstory/inappstory_plugin/adaptors/IASSdkModuleAdaptor.kt:26:46 Unresolved reference 'IASStatisticsManagerAdaptor'.
e: file:///.../inappstory_plugin-0.5.0/android/src/main/kotlin/com/inappstory/inappstory_plugin/adaptors/IASSdkModuleAdaptor.kt:32:42 Unresolved reference 'IASSingleStoryAdaptor'.
// ...
To fix these errors, you need to run the following commands in your project directory:
- Clearing build directory
flutter clean
- Deleting pub cache (it will redownload every package)
flutter pub cache repair
- Deleting
Podfile.lock
cd ios && rm Podfile.lock && cd ../
- (optional) Deleting
pubspec.lock
rm pubspec.lock
- Fetching dependencies
flutter pub get
- Fetching pods
cd ios && pod install --repo-update && cd ../
If you still experience build failure, please create a new issue in our repository.