As discussed in a previous blog, a critical step to take in preparing your apps for version 200 is to replace deprecated APIs with current APIs and contemporary code. This blog describes how to do this in QML.
Because QML is an interpreted language, it does not currently have a compiler, linter, or IDE tools to help you easily identify deprecated API usage. As such, we’ve introduced a property on ArcGISRuntimeEnvironment named logDeprecatedWarnings. This property logs to the console whenever a deprecated class, property, method, or signal is used in your app. The log content contains the API name that is deprecated, as well as the file and line number in some circumstances.
After identifying deprecated API usage, consult the API reference doc to find a suitable replacement and make appropriate changes to your code.
Please note that these warnings are run-time warnings, not compile-time warnings. This means the warnings will be logged throughout the lifetime of running your apps. Thus, it is important to fully test your app to ensure all code paths are run. Some common potential pitfalls include:
This property is enabled by default. It can be disabled by setting the property to false.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.