UIApplication openURL background

前端 未结 3 1622
情歌与酒
情歌与酒 2020-12-06 07:25

In my iOS 4 application, I need to open a URL from the background, at a time specified from the user. However, for some reason, I cannot launch a URL from the background fo

3条回答
  •  春和景丽
    2020-12-06 08:00

    This isn't supported by iOS. Per the relevant section of Apple's iOS Programming Guide:

    Support for some types of background execution must be declared in advance by the application that uses them [via] an array that contains one or more strings with the following values:

    • audio - The application plays audible content to the user while in the background.
    • location - The application keeps users informed of their location, even while running in the background.
    • voip - The application provides the ability for the user to make phone calls using an Internet connection.

    ...

    In addition to the preceding keys, iOS provides two other ways to do work in the background:

    • Applications can ask the system for extra time to complete a given task.
    • Applications can schedule local notifications to be delivered at a predetermined time.

    Your use does not meet any of the allowed types of multitasking.

提交回复
热议问题