Skip to content

FetchAndActivate is asynchronously executed? #5897

Closed
@shuniiiig

Description

@shuniiiig

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.5
  • Firebase SDK version: 6.27.0
  • Firebase Component:
    FirebaseAnalyticsBinary 6.27.0
    FirebaseDatabaseBinary 6.27.0
    FirebaseDynamicLinksBinary 6.27.0
    FirebaseMessagingBinary 6.27.0
    FirebaseProtobufBinary 6.27.0
    FirebaseRemoteConfigBinary 6.27.0
  • Installation method: Carthage

[REQUIRED] Step 2: Describe the problem

I called "fetchAndActivateWithCompletionHandler" in AppDelegate, after callback, I tried to present ViewController from root in AppDelegate, I got this error below.

[Animation] +[UIView setAnimationsEnabled:] being called from a background thread. Performing any operation from a background thread on UIView or a subclass is not supported and may result in unexpected and insidious behavior. trace=(
0 UIKitCore 0x00000001a54670d4 BD57BD6E-12B4-3F92-85CA-754932DA499D + 15552724
1 libdispatch.dylib 0x000000010b4fb730 dispatch_client_callout + 16
2 libdispatch.dylib 0x000000010b4fd044 dispatch_once_callout + 84
3 UIKitCore 0x00000001a5467038 BD57BD6E-12B4-3F92-85CA-754932DA499D + 15552568
4 UIKitCore 0x00000001a54671c0 BD57BD6E-12B4-3F92-85CA-754932DA499D + 15552960
5 UIKitCore 0x00000001a498f9c4 BD57BD6E-12B4-3F92-85CA-754932DA499D + 4184516
6 UIKitCore 0x00000001a498fe64 BD57BD6E-12B4-3F92-85CA-754932DA499D + 4185700
7 UIKitCore 0x00000001a498f8ac BD57BD6E-12B4-3F92-85CA-754932DA499D + 4184236
8 UIKitCore 0x00000001a498fb18 BD57BD6E-12B4-3F92-85CA-754932DA499D + 4184856
9 cast beta 0x0000000101232bbc $s4cast11AppDelegateC23setupRootViewController33_8F4EC175BF072ACA9581F0048C6E0225LLyyF + 1668
10 cast beta 0x0000000101231d54 $s4cast11AppDelegateC22latestVersionInstalled33_8F4EC175BF072ACA9581F0048C6E0225LLyyF + 60
11 cast beta 0x0000000101232130 $s4cast11AppDelegateC08checkNewB33VersionAndSetUpRootViewController33_8F4EC175BF072ACA9581F0048C6E0225LLyyFyAA20FirebaseRemoteConfigC13ConfigurationVSgcfU
+ 972
12 cast beta 0x00000001026879e8 $s4cast20FirebaseRemoteConfigC5fetch6resultyyAC13ConfigurationVSgc_tFZySo09FIRRemoteD22FetchAndActivateStatusV_s5Error_pSgtcfU
+ 1724
13 cast beta 0x0000000102687b48 $sSo37FIRRemoteConfigFetchAndActivateStatusVs5Error_pSgIegyg_ABSo7NSErrorCSgIeyByy_TR + 136
14 libdispatch.dylib 0x000000010b4fa338 _dispatch_call_block_and_release + 24
15 libdispatch.dylib 0x000000010b4fb730 _dispatch_client_callout + 16
16 libdispatch.dylib 0x000000010b4fde88 _dispatch_queue_override_invoke + 872
17 libdispatch.dylib 0x000000010b50cd74 _dispatch_root_queue_drain + 376
18 libdispatch.dylib 0x000000010b50d698 _dispatch_worker_thread2 + 152
19 libsystem_pthread.dylib 0x00000001a0c30b38 _pthread_wqthread + 212
20 libsystem_pthread.dylib 0x00000001a0c33740 start_wqthread + 8
)

DispatchQueue.main.async {
rootViewController.present(appTitleVC, animated: true)
}

To avoid this error, I wrote the code above.

I would like to ask remoteConfig.fetchAndActivate is changed to asynchronous?

Thank you.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions