0

Hi in my application i am playing one Video and when its playing if user click on HomeButton app should not minimise.Is there any way to achieve this and will it create any issues for APP Approval?

I try to make app Active inside applicationWillResignActive method.

- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.

//    //home button press programmatically
    UIApplication *app = [UIApplication sharedApplication];
    [app performSelector:@selector(active)];

}

App should not close when click on Home Button while playing a Video in AvPlayerViewController.

Deviyani Swami
  • 749
  • 8
  • 17
Naresh G
  • 117
  • 1
  • 10
  • I dont think you can ever override a basic iOS workflow. Why does your use case require you to do this? – Yash Tamakuwala May 08 '19 at 07:10
  • There is emergency message will come in the form of video. If that is playing and user click on Home Button then don't close the app this is the requirement from client. – Naresh G May 08 '19 at 07:22
  • Not possible, and if you somehow manage to do this, your app might get rejected from Apple. Alternatively send some push notifications(Local or Remote) informing user about some task that is getting performed and they have to keep the app active. – manishsharma93 May 08 '19 at 09:50
  • Can you please provide any reference link for the same. Because client need few reference links to say this cannot achieve. – Naresh G May 08 '19 at 10:01

0 Answers0