Skip to content

Commit

Permalink
fix(ios): use UIApplicationStateBackground to detact bg status
Browse files Browse the repository at this point in the history
workaround some ipad in error UIApplicationStateInactive status

Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai authored and kongjianneu committed Aug 24, 2020
1 parent 018270e commit cab40e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/Apple/source/CicadaPlayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ - (instancetype)init:(NSString*)traceID opt:(NSDictionary *)opt {
name:UIApplicationWillTerminateNotification
object:nil];

if (UIApplicationStateActive != [[UIApplication sharedApplication] applicationState]) {
if (UIApplicationStateBackground == [[UIApplication sharedApplication] applicationState]) {
self.player->EnterBackGround(true);
}
#endif // TARGET_OS_IPHONE
Expand Down

0 comments on commit cab40e5

Please sign in to comment.