How to create a scheduled update in iOS

I want to create a schedule update to my ios, lets say for example every five days my app will fetch something to the internet and update the database I also want user to set the interval. I want to know where to start and any guides out there? Thanks in advance!

-------------Problems Reply------------

Your app won't be able to retrieve this information in the background. What you can do is set up an entry in NSUserDefaults with a UNIX timestamp of the last update and check that ever so often while the app is running or when it starts up. From there, if the timestamp is older than a week (as you mention in your question), you can just call the method that handles the updates from the server.


if (currentTimestamp - lastUpdateTimestamp <= (60 * 60 * 24 * 7)) {
[self updateFromServer];

Category:objective c Views:7 Time:2011-12-30

Related post

  • After update to iOS 8.1.3 UIImagePickerController crashes when assessing old video files only on iPhone 2015-02-11

    I hope someone can help me :) After the update to iOS 8.1.3 I can't access video files created before the update. My app freezes before I can access them. I have UIImagePickerController UIImagePickerController* myPicker= [[UIImagePickerController all

  • Creating the scheduled task and problem in updating Windows 2012-06-02

    I want to create a scheduled task to shut down my PC at 5.00 PM every day . I had created the task but it deosn't appear in the active task list and nor it works . I am having the Windows 7 Professional 32 Bit. There was error showing while updating

  • how to create php scheduled process? 2009-07-24

    I was asked to create an web apps that will send updates to user for certain time. for example user1 asking for updates every 5 minutes from June - August 2009 user2 asking for updates every 10 minutes for today only user3 asking for updates every 1

  • php script automatic scheduled update status on facebook 2010-12-04

    can you help me i am newbie in programming with API on facebook and i need create simple page ( php ) can : 1. Update status my facebook 2. if possible can automatic scheduled update..because i dont have time to update every hours.. thanks jokonardi

  • Create a schedule for Camp 2012-05-23

    I'm am the business manager for our local Girl Scout Day Camp. I already have a database of attendees. I also have a table of unit information. (the girls are assigned units of 10-12 girls each based on age level) Now my director has asked if I can c

  • Can you update an iOs app and change its platform offering from iPad/iPhone to just iPad? 2014-02-04

    When building a new app with Adobe DPS to update an existing app, can you update an iOs app and change its platform offering from iPad/iPhone to just iPad? --------------Solutions------------- Yes, you need to create a new App as iPad only App Type i

  • Creating a flexible update query 2009-03-29

    I'm trying to create an flexible update query. I have now something like this: $lsQuery = "UPDATE `"; $lsQuery .= $psTableName; $lsQuery .= " SET "; foreach($psValues as $lsKey => $lsValue) { $lsQuery .= $lsKey; $lsQuery .= " = '"; $lsQuery .= $ls

  • how to create a scheduled process in sql server 2009-05-19

    In MSSQL Server 2008, how would I go about creating a scheduled process that: Takes the sum of a float column from specific users in a user column and then comparing which is has the greatest sum and storing that number along with the user whom has t

  • Security problem when creating a scheduled task 2010-02-21

    To create a scheduled class, I call the schtasks command from my code, passing it the necessary arguments. Yet, I can't really figure out how to create a task without the user having to input his password. --------------Solutions------------- Works b

  • How do I create a scheduled task, via command line, which includes advanced options 2010-06-10

    I'm trying to create a scheduled task (in WinXP) which runs every 10 minutes, starting at 16:00:00 to 06:00:00, daily, from the command line. Currently, I can create a scheduled task which runs every 10 minutes, starting at 16:00:00, daily, by using

  • Texture2D text color changed after updating from iOS 3.0 to 4.0 2010-07-05

    I'm using an OpenGL Texture2D class and initWithString method to display strings to the user. When running with iOS 3.0 and XCode 3.1.3 all the text would appear black in the simulator and white on the phone. After updating to iOS 4.0, XCode 3.2.3, a

  • Any tips on how to create apps that run on iOS 3 and iOS 4? 2010-09-30

    Hey, I'm developing an iPhone application and my target is 3GS and 4G devices. iOS 4 introduces methods thats deal with multitasking and newer methods to deal with foreground/background lifecycle events. These new methods aren't available in iOS 3 wh

  • How to create a Scheduled Task programatically in C/C++? 2010-11-05

    I created a small application which makes some settings. I want to start this application before a user logs into windows. Unfortunately i didn't find any solution for this problem, so i thought i could create a scheduled task. Unfortunately i didn't

  • Create eclipse P2 update site from folder containing bundles? 2010-11-17

    Typically an eclipse p2 update site is created inside eclipse through the process of creating a feature project containing one or more plugins/bundles and adding this feature to an eclipse update site project. Finally the update site is build and can

  • Creating one static library for iOS and simulator for distribution 2010-12-01

    If you create a static library for iOS do you have to distribute the header file(s) with it or is there another way to get it to work? Currently I have a single my_lib.a file for both device and simulator but when I drag it into another test app to u

  • Updating an ios app that uses coredata with a version without 2011-04-29

    We are planning to update an iOS app that currently uses coredata with a complete rebuild that isn't using coredata. If the schema is not present in the update bundle will it crash on existing users devices? This is hard to test but I'm guessing as t

  • Schedule Update from Another Layer 2011-05-05

    I have an sprite the I need to rotate it with touch but it is located in a different layer. Is it possible to update it's position? E.G. Sprite has it's own layer but it's position needs to be updated within the main gamescene here is what I have so

  • Grails: can I make a validator apply to create only (not update/edit) 2011-05-09

    I have a domain class that needs to have a date after the day it is created in one of its fields. class myClass { Date startDate String iAmGonnaChangeThisInSeveralDays static constraints = { iAmGonnaChangeThisInSeveralDays(nullable:true) startDate(va

  • Need help in creating the scheduling service 2011-05-23

    I need to create a scheduling service which will poll the database after a specific time interval, pick the required objects and send it to a WCF service to perform the required task. Shall I use the windows worker thread? or is there any other ready

Copyright (C), All Rights Reserved.

processed in 0.199 (s). 11 q(s)