I am having two issues upgrading my app to React Native 0.71.1 and to @piwikpro/react-native-piwik-pro-sdk.
The first one is related to iOS. The build process crashes with the following errors I see from Xcode:
error build: No visible @interface for 'PiwikTracker' declares the selector 'sendExceptionWithDescription:isFatal:'
error build: No visible @interface for 'PiwikTracker' declares the selector 'sendSocialInteractionWithAction:target:network:'
error build: Implicit conversion of 'int' to 'NSString * _Nonnull' is disallowed with ARC
The second one is related to Android. The app builds but as soon as is launched I see “The app keeps stopping” on the emulator and these errors on Android Studio:
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.scaledolore7, PID: 15270
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:269)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;
at pro.piwik.sdk.Tracker$1.doInBackground(Tracker.java:311)
at pro.piwik.sdk.Tracker$1.doInBackground(Tracker.java:306)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.identifier.AdvertisingIdClient" on path: DexPathList[[zip file "/data/app/~~Tse-gpUYzVIT2rvIu7yLXA==/com.scaledolore7-qOI8VH2UxAznHh3o3ODAlQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~Tse-gpUYzVIT2rvIu7yLXA==/com.scaledolore7-qOI8VH2UxAznHh3o3ODAlQ==/lib/x86_64, /data/app/~~Tse-gpUYzVIT2rvIu7yLXA==/com.scaledolore7-qOI8VH2UxAznHh3o3ODAlQ==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at pro.piwik.sdk.Tracker$1.doInBackground(Tracker.java:311)
at pro.piwik.sdk.Tracker$1.doInBackground(Tracker.java:306)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Thanks