Skip to main content

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:

  1. Clearing build directory
flutter clean
  1. Deleting pub cache (it will redownload every package)
flutter pub cache repair
  1. Deleting Podfile.lock
cd ios && rm Podfile.lock && cd ../
  1. (optional) Deleting pubspec.lock
rm pubspec.lock
  1. Fetching dependencies
flutter pub get
  1. Fetching pods
cd ios && pod install --repo-update && cd ../

If you still experience build failure, please create a new issue in our repository.