How to legally run app frequently in the background in iOS 12 and Swift 4












0















Is there a good/safe/legal/responsible way for me to run code indefinitely at a scheduled interval while the app is in the background or while it's quitted? I'm trying to build a feature into my app where the user can start a logging system that continuously grabs (local) data and send notifications depending on the data, even while the app is in the background or the device is asleep. My app will also send notifications depending on this data. My app is not pulling/fetching data from an internet/push source.



I've read Apple's documentation on Background Execution and this tutorial on iOS Background Modes. I understand the various types of background modes supported in iOS. What I'm looking for is similar to the Background Fetch feature or the "Whatever" feature, but neither does exactly what I'm looking for (one is scheduled by iOS's own system while other one ends after a finite length).



Thanks in advance for your help!










share|improve this question


















  • 1





    What sort of “(local) data” are you grabbing? As you know from the documents you’ve read that Apple doesn’t permit indefinite scheduled interval background operation, but there are all sorts of special mechanisms for particular purposes. If you can tell us what you’re trying to “grab”, we might be able to help you...

    – Rob
    Jan 2 at 1:08











  • I would like to log the amount of bits that flow from the wwan and WiFi atenae.

    – Microbob
    Jan 3 at 11:02











  • Unfortunately you may be out of luck, then. Sorry.

    – Rob
    Jan 3 at 15:20











  • Alright, thanks for your help!

    – Microbob
    Jan 4 at 19:22
















0















Is there a good/safe/legal/responsible way for me to run code indefinitely at a scheduled interval while the app is in the background or while it's quitted? I'm trying to build a feature into my app where the user can start a logging system that continuously grabs (local) data and send notifications depending on the data, even while the app is in the background or the device is asleep. My app will also send notifications depending on this data. My app is not pulling/fetching data from an internet/push source.



I've read Apple's documentation on Background Execution and this tutorial on iOS Background Modes. I understand the various types of background modes supported in iOS. What I'm looking for is similar to the Background Fetch feature or the "Whatever" feature, but neither does exactly what I'm looking for (one is scheduled by iOS's own system while other one ends after a finite length).



Thanks in advance for your help!










share|improve this question


















  • 1





    What sort of “(local) data” are you grabbing? As you know from the documents you’ve read that Apple doesn’t permit indefinite scheduled interval background operation, but there are all sorts of special mechanisms for particular purposes. If you can tell us what you’re trying to “grab”, we might be able to help you...

    – Rob
    Jan 2 at 1:08











  • I would like to log the amount of bits that flow from the wwan and WiFi atenae.

    – Microbob
    Jan 3 at 11:02











  • Unfortunately you may be out of luck, then. Sorry.

    – Rob
    Jan 3 at 15:20











  • Alright, thanks for your help!

    – Microbob
    Jan 4 at 19:22














0












0








0








Is there a good/safe/legal/responsible way for me to run code indefinitely at a scheduled interval while the app is in the background or while it's quitted? I'm trying to build a feature into my app where the user can start a logging system that continuously grabs (local) data and send notifications depending on the data, even while the app is in the background or the device is asleep. My app will also send notifications depending on this data. My app is not pulling/fetching data from an internet/push source.



I've read Apple's documentation on Background Execution and this tutorial on iOS Background Modes. I understand the various types of background modes supported in iOS. What I'm looking for is similar to the Background Fetch feature or the "Whatever" feature, but neither does exactly what I'm looking for (one is scheduled by iOS's own system while other one ends after a finite length).



Thanks in advance for your help!










share|improve this question














Is there a good/safe/legal/responsible way for me to run code indefinitely at a scheduled interval while the app is in the background or while it's quitted? I'm trying to build a feature into my app where the user can start a logging system that continuously grabs (local) data and send notifications depending on the data, even while the app is in the background or the device is asleep. My app will also send notifications depending on this data. My app is not pulling/fetching data from an internet/push source.



I've read Apple's documentation on Background Execution and this tutorial on iOS Background Modes. I understand the various types of background modes supported in iOS. What I'm looking for is similar to the Background Fetch feature or the "Whatever" feature, but neither does exactly what I'm looking for (one is scheduled by iOS's own system while other one ends after a finite length).



Thanks in advance for your help!







ios swift background-process background-fetch






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 2 at 0:41









MicrobobMicrobob

10418




10418








  • 1





    What sort of “(local) data” are you grabbing? As you know from the documents you’ve read that Apple doesn’t permit indefinite scheduled interval background operation, but there are all sorts of special mechanisms for particular purposes. If you can tell us what you’re trying to “grab”, we might be able to help you...

    – Rob
    Jan 2 at 1:08











  • I would like to log the amount of bits that flow from the wwan and WiFi atenae.

    – Microbob
    Jan 3 at 11:02











  • Unfortunately you may be out of luck, then. Sorry.

    – Rob
    Jan 3 at 15:20











  • Alright, thanks for your help!

    – Microbob
    Jan 4 at 19:22














  • 1





    What sort of “(local) data” are you grabbing? As you know from the documents you’ve read that Apple doesn’t permit indefinite scheduled interval background operation, but there are all sorts of special mechanisms for particular purposes. If you can tell us what you’re trying to “grab”, we might be able to help you...

    – Rob
    Jan 2 at 1:08











  • I would like to log the amount of bits that flow from the wwan and WiFi atenae.

    – Microbob
    Jan 3 at 11:02











  • Unfortunately you may be out of luck, then. Sorry.

    – Rob
    Jan 3 at 15:20











  • Alright, thanks for your help!

    – Microbob
    Jan 4 at 19:22








1




1





What sort of “(local) data” are you grabbing? As you know from the documents you’ve read that Apple doesn’t permit indefinite scheduled interval background operation, but there are all sorts of special mechanisms for particular purposes. If you can tell us what you’re trying to “grab”, we might be able to help you...

– Rob
Jan 2 at 1:08





What sort of “(local) data” are you grabbing? As you know from the documents you’ve read that Apple doesn’t permit indefinite scheduled interval background operation, but there are all sorts of special mechanisms for particular purposes. If you can tell us what you’re trying to “grab”, we might be able to help you...

– Rob
Jan 2 at 1:08













I would like to log the amount of bits that flow from the wwan and WiFi atenae.

– Microbob
Jan 3 at 11:02





I would like to log the amount of bits that flow from the wwan and WiFi atenae.

– Microbob
Jan 3 at 11:02













Unfortunately you may be out of luck, then. Sorry.

– Rob
Jan 3 at 15:20





Unfortunately you may be out of luck, then. Sorry.

– Rob
Jan 3 at 15:20













Alright, thanks for your help!

– Microbob
Jan 4 at 19:22





Alright, thanks for your help!

– Microbob
Jan 4 at 19:22












0






active

oldest

votes











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54000079%2fhow-to-legally-run-app-frequently-in-the-background-in-ios-12-and-swift-4%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54000079%2fhow-to-legally-run-app-frequently-in-the-background-in-ios-12-and-swift-4%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

WPF add header to Image with URL pettitions [duplicate]