Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: iOS Remote configs are not loading with a first load #364

Closed
4 of 13 tasks
prajapatijay95 opened this issue Apr 19, 2023 · 2 comments · Fixed by #365
Closed
4 of 13 tasks

bug: iOS Remote configs are not loading with a first load #364

prajapatijay95 opened this issue Apr 19, 2023 · 2 comments · Fixed by #365
Labels
bug/fix Something isn't working package: remote-config platform: ios iOS platform

Comments

@prajapatijay95
Copy link

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Messaging
  • Performance
  • Remote Config

Did you test the latest version?

  • I use the latest version

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

App is not loading the remote config with a fresh install and first load.

Expected behavior

App must always load the remote config even with the first load.

Reproduction

none

Steps to reproduce

Uninstall the existing app if any.
Install the fresh app and load the firebase remote config, it's getting loaded with the static (default) values and not fetching it from the server.
Close the app and open it again, it works.

await FirebaseRemoteConfig.fetchConfig({ minimumFetchIntervalInSeconds: 1200, });
await FirebaseRemoteConfig.activate();
const { value } = await FirebaseRemoteConfig.getString({ key: 'key', });

The value is empty.

Other information

image

In iOS methods, after the implementation it's calling call.resolve() which is causing this issue and not waiting to complete the fetch or activate.

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 4.7.3
@capacitor/core: 4.7.3
@capacitor/android: 4.7.3
@capacitor/ios: 4.7.3

Installed Dependencies:

@capacitor/cli: 4.7.1
@capacitor/core: 4.7.1
@capacitor/android: 4.7.3
@capacitor/ios: 4.7.1

[success] iOS looking great! 👌

Before submitting

  • I understand that incomplete issues (e.g. without reproduction) are closed.
@prajapatijay95 prajapatijay95 added bug/fix Something isn't working needs: triage labels Apr 19, 2023
@prajapatijay95 prajapatijay95 changed the title bug: bug: iOS Remote configs are not loading with a first load Apr 19, 2023
@robingenz
Copy link
Member

Thank you for reporting this.
I released a dev version for Capacitor 4:

npm i @capacitor-firebase/remote-config@1.4.0-dev.5d562ff.1681878046

The fix will be included in the next official release (Capacitor 5).

@prajapatijay95
Copy link
Author

Thanks @robingenz for a quick response.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/fix Something isn't working package: remote-config platform: ios iOS platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants