UIApplication delegate must be used from main thread only - SwiftHow to call Objective-C code from SwiftReceive answer from a delegate method on main threadWhy ios objective-c delegate are always called from the main thread?Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]-[UIApplication delegate] must be called from main thread onlySolve “Main Thread Checker: UI API called on a background thread: -[UIApplication setNetworkActivityIndicatorVisible:]” in UITestsXcode UIView.init(frame:) must be used from main thread onlyMain Thread Checker: UI API called on a background thread: -[UIApplication delegate] Freezes the applicationUIApplication.delegate must be used from main thread onlyXcode Error for iOS app: [UI Application Delegate] must be called from main thread only
Help, I cannot decide when to start the story
Why does the standard fingering / strumming for a D maj chord leave out the 5th string?
The cat exchanges places with a drawing of the cat
Programming of ICs in general (MCU / FPGA / Serdes IC)
What are these funnel-looking green things in my yard?
A continuous water "planet" ring around a star
Can I enter the USA with an E-2 visa and a one way flight ticket?
Why aren’t there water shutoff valves for each room?
What is the farthest a camera can see?
Using hearing aids on the sabbath?
My cat is a houdini
Are differences between uniformly distributed numbers uniformly distributed?
How to Check all AD userers for "blank" password?
Update Office without opening an Office application
The cat ate your input again!
Running code generated in realtime in JavaScript with eval()
Why aren't rainbows blurred-out into nothing after they are produced?
Website error: "Walmart can’t use this browser"
An equality about sin function?
What is the difference between 王 and 皇?
Why command hierarchy, if the chain of command is standing next to each other?
If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?
Do I have to cite common CS algorithms?
How far did Gandalf and the Balrog drop from the bridge in Moria?
UIApplication delegate must be used from main thread only - Swift
How to call Objective-C code from SwiftReceive answer from a delegate method on main threadWhy ios objective-c delegate are always called from the main thread?Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]-[UIApplication delegate] must be called from main thread onlySolve “Main Thread Checker: UI API called on a background thread: -[UIApplication setNetworkActivityIndicatorVisible:]” in UITestsXcode UIView.init(frame:) must be used from main thread onlyMain Thread Checker: UI API called on a background thread: -[UIApplication delegate] Freezes the applicationUIApplication.delegate must be used from main thread onlyXcode Error for iOS app: [UI Application Delegate] must be called from main thread only
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am getting "runtime: UI API called from background thread: -[UIApplication delegate] must be used from main thread only
" runtime issue for Fabric initialisation line. Not sure how to solve it. Please help
Thanks
Fabric.with([Crashlytics.self,Zendesk.self])
ios swift google-fabric
|
show 4 more comments
I am getting "runtime: UI API called from background thread: -[UIApplication delegate] must be used from main thread only
" runtime issue for Fabric initialisation line. Not sure how to solve it. Please help
Thanks
Fabric.with([Crashlytics.self,Zendesk.self])
ios swift google-fabric
check once in your app where you used thisUIApplication delegate]
and[UIApplication applicationState]
– Anbu.Karthik
Mar 27 at 10:26
I have checked and its no where used
– Priyanka
Mar 27 at 10:29
then its the bug in Fabric,
– Anbu.Karthik
Mar 27 at 10:32
application.statusbarStyle
must be on main thread.
– dahiya_boy
Mar 27 at 10:36
@Priyanka The issue is related to firebase which firebase version you are using ?
– Muhammad Waqas Bhati
Mar 27 at 10:40
|
show 4 more comments
I am getting "runtime: UI API called from background thread: -[UIApplication delegate] must be used from main thread only
" runtime issue for Fabric initialisation line. Not sure how to solve it. Please help
Thanks
Fabric.with([Crashlytics.self,Zendesk.self])
ios swift google-fabric
I am getting "runtime: UI API called from background thread: -[UIApplication delegate] must be used from main thread only
" runtime issue for Fabric initialisation line. Not sure how to solve it. Please help
Thanks
Fabric.with([Crashlytics.self,Zendesk.self])
ios swift google-fabric
ios swift google-fabric
edited Mar 28 at 9:35
Vadim Kotov
5,3307 gold badges36 silver badges49 bronze badges
5,3307 gold badges36 silver badges49 bronze badges
asked Mar 27 at 10:20
PriyankaPriyanka
807 bronze badges
807 bronze badges
check once in your app where you used thisUIApplication delegate]
and[UIApplication applicationState]
– Anbu.Karthik
Mar 27 at 10:26
I have checked and its no where used
– Priyanka
Mar 27 at 10:29
then its the bug in Fabric,
– Anbu.Karthik
Mar 27 at 10:32
application.statusbarStyle
must be on main thread.
– dahiya_boy
Mar 27 at 10:36
@Priyanka The issue is related to firebase which firebase version you are using ?
– Muhammad Waqas Bhati
Mar 27 at 10:40
|
show 4 more comments
check once in your app where you used thisUIApplication delegate]
and[UIApplication applicationState]
– Anbu.Karthik
Mar 27 at 10:26
I have checked and its no where used
– Priyanka
Mar 27 at 10:29
then its the bug in Fabric,
– Anbu.Karthik
Mar 27 at 10:32
application.statusbarStyle
must be on main thread.
– dahiya_boy
Mar 27 at 10:36
@Priyanka The issue is related to firebase which firebase version you are using ?
– Muhammad Waqas Bhati
Mar 27 at 10:40
check once in your app where you used this
UIApplication delegate]
and [UIApplication applicationState]
– Anbu.Karthik
Mar 27 at 10:26
check once in your app where you used this
UIApplication delegate]
and [UIApplication applicationState]
– Anbu.Karthik
Mar 27 at 10:26
I have checked and its no where used
– Priyanka
Mar 27 at 10:29
I have checked and its no where used
– Priyanka
Mar 27 at 10:29
then its the bug in Fabric,
– Anbu.Karthik
Mar 27 at 10:32
then its the bug in Fabric,
– Anbu.Karthik
Mar 27 at 10:32
application.statusbarStyle
must be on main thread.– dahiya_boy
Mar 27 at 10:36
application.statusbarStyle
must be on main thread.– dahiya_boy
Mar 27 at 10:36
@Priyanka The issue is related to firebase which firebase version you are using ?
– Muhammad Waqas Bhati
Mar 27 at 10:40
@Priyanka The issue is related to firebase which firebase version you are using ?
– Muhammad Waqas Bhati
Mar 27 at 10:40
|
show 4 more comments
1 Answer
1
active
oldest
votes
It's because you are trying to access the UI from background thread. Just call the UI change in main thread.
DispatchQueue.main.async
application.statusBarStyle = UIStatusBarStyle.lightContent
UI process are maintained under main thread.
I have Tried it but same issue @fAiSaL
– Priyanka
Mar 27 at 10:55
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374819%2fuiapplication-delegate-must-be-used-from-main-thread-only-swift%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's because you are trying to access the UI from background thread. Just call the UI change in main thread.
DispatchQueue.main.async
application.statusBarStyle = UIStatusBarStyle.lightContent
UI process are maintained under main thread.
I have Tried it but same issue @fAiSaL
– Priyanka
Mar 27 at 10:55
add a comment |
It's because you are trying to access the UI from background thread. Just call the UI change in main thread.
DispatchQueue.main.async
application.statusBarStyle = UIStatusBarStyle.lightContent
UI process are maintained under main thread.
I have Tried it but same issue @fAiSaL
– Priyanka
Mar 27 at 10:55
add a comment |
It's because you are trying to access the UI from background thread. Just call the UI change in main thread.
DispatchQueue.main.async
application.statusBarStyle = UIStatusBarStyle.lightContent
UI process are maintained under main thread.
It's because you are trying to access the UI from background thread. Just call the UI change in main thread.
DispatchQueue.main.async
application.statusBarStyle = UIStatusBarStyle.lightContent
UI process are maintained under main thread.
answered Mar 27 at 10:46
fAiSaLfAiSaL
4317 silver badges23 bronze badges
4317 silver badges23 bronze badges
I have Tried it but same issue @fAiSaL
– Priyanka
Mar 27 at 10:55
add a comment |
I have Tried it but same issue @fAiSaL
– Priyanka
Mar 27 at 10:55
I have Tried it but same issue @fAiSaL
– Priyanka
Mar 27 at 10:55
I have Tried it but same issue @fAiSaL
– Priyanka
Mar 27 at 10:55
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374819%2fuiapplication-delegate-must-be-used-from-main-thread-only-swift%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
check once in your app where you used this
UIApplication delegate]
and[UIApplication applicationState]
– Anbu.Karthik
Mar 27 at 10:26
I have checked and its no where used
– Priyanka
Mar 27 at 10:29
then its the bug in Fabric,
– Anbu.Karthik
Mar 27 at 10:32
application.statusbarStyle
must be on main thread.– dahiya_boy
Mar 27 at 10:36
@Priyanka The issue is related to firebase which firebase version you are using ?
– Muhammad Waqas Bhati
Mar 27 at 10:40