AppMetrica Blog

AppMetrica SDK: highlights from the latest updates

Crashes and errors

Have you already seen the newly designed reports on crashes and errors? We couldn't update reports without updating the SDK as well — after all, to get the reports, the data has to first be sent from the app.

New methods for working with crashes have been added in recent versions of the SDK. But what is more important is that the old ones have stopped working in iOS. When you update AppMetrica, make sure that errors and crashes are collected correctly. For more information about these methods, see our documentation for Android and iOS.

AppMetrica also uses the crash plugin to collect information about native and java crashes. Information about crashes on Android can be sent in obfuscated form.

To use the new methods for collecting crashes and errors, update the Android SDK to a version no lower than 3.14.2 and update the iOS SDK to 3.11.1 or later.

R8 and crash environment in Android

We noticed that developers are increasingly using the R8 obfuscator from Google instead of ProGuard. R8 shortens and optimizes Java bytecode. The plugin for uploading mapping files now supports R8. Just make sure that your SDK version is 3.8.0 or later.

Android support also includes the crash environment. It is attached to the stack trace of each Java crash:

You can use this to send useful information that rarely changes, but that will help you investigate the incident and fix the problem:

·       ID of the experimental group when working with A/B tests.

·       The actual value of important options that affect the app, like energy-saving mode, running in the background, using a proxy, and so on.

·       Versions of connected third-party libraries.

Android: added support for deferred deeplinks and discontinued support for broadcast

In addition to crashes and errors, there are a couple of important changes in the Android version.

Deferred deep links

Starting with version 3.14.2, the Android SDK has a new DeferredDeeplinkListener interface for receiving a deferred deeplink. Now you can send a deeplink to the app even before it's installed. For instance, automatically give the user a promo code if they install the app using the promotion banner. For examples of using the method, see the documentation.

Discontinued support for broadcasts

Google no longer sends broadcasts, so we have discontinued support for the registerReferrerBroadcastReceivers method.

Kids apps in iOS

In order to protect children's data privacy, apps designed for kids can no longer:

·       Use third-party advertising or analytics.

·       Transfer data to third parties.

Sometimes third-party analytics are still allowed, if the services do not collect and transmit IDFA or other identifying information about children such as name, date of birth, email, and location. This also includes any information about the device, network, or anything else that could be used to identify users, even if only in combination with other data.

To pass moderation in the App Store, enable the SDK version 3.11.1 or later. If you are releasing an app in the "Kids" category, use the new appForKids property in the SDK to avoid problems. Such apps are specially designed for children 11 and under.

For examples of using the appForKids property, see the documentation.

Unity plugin: kids' apps, support for referral URL, Search Ads, iAd, and improved revenue calculation

The Unity plugin now supports the appForKids property. But there are other important updates:

·       The ReportReferralUrl method is back.

·       The ReportAppOpen method is now available. You can track when the app was opened via deeplink. This is useful when transmitting promo codes in remarketing, or when tracking Facebook campaigns.

·       The iAd framework is now easier to connect with a simplified scenario. Just add the APP_METRICA_ADD_IAD_FRAMEWORK directive in Settings → Other Settings → Scripting Define → Symbols.

·       Added the PriceDecimal property to the YandexAppMetricaRevenue class. We strongly recommend using it in place of the deprecated Price property — this will make your revenue data more accurate. The deprecated property used double format, which stored decimals incorrectly.

Support for React Native

The long-awaited plugin for React Native has been released. You don't need to write your own wrappers anymore — we'll handle the support for this.

--
Check your SDK's expiration date!
— The AppMetrica Team