Is there an existing issue for this?
Which plugins are affected?
Remote Config
Which platforms are affected?
iOS
Description
When restarting the app, firebase_remote_config listener stream subscription is not canceled, resulting in duplicate calls.
Reproducing the issue
void _registerRemoteConfigListener() {
if (_remoteConfigSubscription != null) return; // 이미 등록되어 있으면 재등록 방지
final remoteConfig = getIt.get<FirebaseRemoteConfig>();
_remoteConfigSubscription = remoteConfig.onConfigUpdated.listen((event) async {
await remoteConfig.activate();
debugPrint('event: ${event}');
debugPrint('event.updatedKeys: ${event.updatedKeys}');
serverVersion = GlobalVars.platformOS == 'iPhone'
? remoteConfig.getString('Test_Flutter_IOS_BuildNumber')
: remoteConfig.getString('Test_Flutter_AOS_BuildNumber');
String currentBuildNumber = getIt.get<PackageInfo>().buildNumber;
debugPrint('[remote config listener] 서버버전: $serverVersion');
debugPrint('[remote config listener] 현재버전: $currentBuildNumber');
});
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
_linkSubscription?.cancel();
_remoteConfigSubscription?.cancel(); // 실시간 리스너 구독 해제
_remoteConfigSubscription = null;
super.dispose();
}
Firebase Core version
4.3.0
Flutter Version
3.38.6
Relevant Log Output
Flutter dependencies
Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
(#12539)
Same situation as the issue above
Is there an existing issue for this?
Which plugins are affected?
Remote Config
Which platforms are affected?
iOS
Description
When restarting the app, firebase_remote_config listener stream subscription is not canceled, resulting in duplicate calls.
Reproducing the issue
Firebase Core version
4.3.0
Flutter Version
3.38.6
Relevant Log Output
Flutter dependencies
Expand
Flutter dependenciessnippetReplace this line with the contents of your `flutter pub deps -- --style=compact`.Additional context and comments
(#12539)
Same situation as the issue above