This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 265
Fix/access applicationstate on main thread #484
Closed
ElektrojungeAtWork
wants to merge
13
commits into
master
from
fix/access-applicationstate-on-main-thread
Closed
Fix/access applicationstate on main thread #484
ElektrojungeAtWork
wants to merge
13
commits into
master
from
fix/access-applicationstate-on-main-thread
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ataItemQueueWithBackgroundTask to block
MatkovIvan
suggested changes
Dec 7, 2017
Classes/BITMetricsManager.m
Outdated
@@ -197,7 +198,8 @@ - (void)trackEventWithName:(nonnull NSString *)eventName { | |||
|
|||
// If the app is running in the background. | |||
UIApplication *application = [UIApplication sharedApplication]; | |||
if (application && application.applicationState == UIApplicationStateBackground) { | |||
BOOL applicationIsInBackground = ([BITHockeyHelper applicationState] == BITApplicationStateBackground) ? YES : NO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ? YES : NO
Classes/BITMetricsManager.m
Outdated
@@ -222,7 +224,7 @@ - (void)trackEventWithName:(nonnull NSString *)eventName properties:(nullable NS | |||
|
|||
// If the app is running in the background. | |||
UIApplication *application = [UIApplication sharedApplication]; | |||
if (application && application.applicationState == UIApplicationStateBackground) { | |||
BOOL applicationIsInBackground = ([BITHockeyHelper applicationState] == BITApplicationStateBackground) ? YES : NO; if (application && applicationIsInBackground) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ? YES : NO
Missing line break
MatkovIvan
reviewed
Dec 7, 2017
Classes/BITChannel.m
Outdated
if (strongSelf.dataItemCount >= strongSelf.maxBatchSize || | ||
(application && application.applicationState == UIApplicationStateBackground)) { | ||
(application && applicationIsInBackground)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just applicationIsInBackground
, no need to check application
here
…ionstate-on-main-thread # Conflicts: # Classes/BITChannel.m # Classes/BITMetricsManager.m
This includes:
|
MatkovIvan
reviewed
Dec 11, 2017
* Workaround for exporting symbols from category object files. | ||
* See article https://medium.com/ios-os-x-development/categories-in-static-libraries-78e41f8ddb96#.aedfl1kl0 | ||
*/ | ||
__attribute__((used)) static void importCategories() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work. #486 fixes it.
Part of #485 |
ElektrojungeAtWork
deleted the
fix/access-applicationstate-on-main-thread
branch
December 11, 2017 17:59
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.