firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Remote config conditionals created with user properties does not work

Open adrianortuzar opened this issue 6 years ago • 8 comments

Step 0: Are you in the right place?

  • For issues or feature requests related to the code in this repository file a Github issue.
    • If this is a feature request please use the Feature Request template.
  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general (non-iOS) Firebase discussion, use the firebase-talk google group.
  • For backend issues, console issues, and other non-SDK help that does not fall under one of the above categories, reach out to Firebase Support.
  • Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.3.1
  • Firebase SDK version: 6.18.0
  • Firebase Component: RemoteConfig
  • Component version: 6.18.0
  • Installation method: CocoaPods

[REQUIRED] Step 2: Describe the problem

Remote config conditionals created with user properties does not work.

Steps to reproduce:

We create a user property called version_code is a integer. We also create a conditional based on this property, exact matches Our app does not catch the correct condition. We tested through the debug view and the property version_code is set up correctly.

Relevant Code:

// TODO(you): code here to reproduce the problem

adrianortuzar avatar Mar 13 '20 12:03 adrianortuzar

Thanks for reporting. Can your enable logs with debug mode for analytics (https://firebase.google.com/docs/analytics/debugview) and post those here? Also note that analytics sdk might take a while to log events to the backend. You can make sure events are uploaded by backgrounding and foregrounding the app. The upload details will also be logged.

dmandar avatar Mar 13 '20 18:03 dmandar

thanks @dmandar , did not find better way to paste the logs here than in a picture. Better way to do it, please let me know.

Screenshot 2020-03-17 at 11 04 51

Also the condition that does not work in Remote Config

Screenshot 2020-03-17 at 11 31 15

adrianortuzar avatar Mar 17 '20 10:03 adrianortuzar

Hi, after some testing I discovered that when fetching and activate RemoteConfig with setAnalyticsCollectionEnabled = false, the Remote Config conditions does not work. Not the case when is set as true.

FirebaseApp.configure()
Analytics.setAnalyticsCollectionEnabled(false)
remoteConfig().fetchAndActivate(completionHandler: nil)

adrianortuzar avatar Mar 19 '20 08:03 adrianortuzar

@adrianortuzar Thanks for sharing your investigation.

@dmandar @morganchen12 Does documentation need to be improved?

paulb777 avatar Mar 19 '20 14:03 paulb777

This sounds like intended behavior @dmandar can you confirm? If so I'll update the docs.

morganchen12 avatar Mar 19 '20 16:03 morganchen12

Yes please. User properties and audiences only work when analytics is enabled.

dmandar avatar Mar 19 '20 20:03 dmandar

Thanks, I'll update the docs.

morganchen12 avatar Mar 19 '20 20:03 morganchen12

Googlers-only: docs updated in internal change cl/324093625.

morganchen12 avatar Jul 30 '20 22:07 morganchen12