urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

Unable to enable more features via plist #330

Closed marcoreni closed 2 years ago

marcoreni commented 2 years ago

❗For how-to inquiries involving Airship functionality or use cases, please contact (support)[https://support.airship.com/].

Preliminary Info

What Airship dependencies are you using?

AirshipCore 16.5.1

What are the versions of any relevant development tools you are using?

-

Report

What unexpected behavior are you seeing?

If we add new enabledFeatures to the AirshipConfig.plist file, this is not read from the application. It seems that on first launch features are persisted on the datastore and are then always retrieved from there. The only way we found to add/remove features is to add/remove them programmatically via enableFeatures(), but this is not clear from the docs and forces us to split the configuration.

What is the expected behavior?

It should be possible to add and remove features from the application with app updates.

What are the steps to reproduce the unexpected behavior?

  1. Configure a basic application
  2. Open the application
  3. Add a new feature through the AirshipConfig.plist file
  4. Update the application on the device The new feature is not active.

Do you have logging for the issue?

-

oristanovic commented 2 years ago

Hello, AirshipConfig.plistshould only be used to declare default enabled features (that are applied on the first run). Any subsequent change (after user consent for instance) needs to happen via enableFeatures().

marcoreni commented 2 years ago

What if we add a new "default" feature? For example, we may release a version_1 of the app with push notifications, then implement in-app automation and message center in version_2 / version_3.

Shouldn't this be stated in the docs? Developers may not notice this since they uninstall and reinstall the application every time, but an end-user may not see the new functionality because of this.

oristanovic commented 2 years ago

Are you using feature enabling in the context of data collection? If not, you do not need to enable features that you’re using since they're all enabled by default. The plist is generally used to disable the features by default so that you can ask for user consent afterwards.