Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:10:34+00:00 2026-06-04T07:10:34+00:00

I have set up my application so that every the application enters the foreground,

  • 0

I have set up my application so that every the application enters the foreground, it does a web call which calls information from a web server, where it receives and parses JSON, then stores it offline.

My application is a tabbed application, and each screen the information is set up from the JSON, and the images are also pulled from a server. So I want the information on each page to update after this is done, but its not updating.

I am running my application from the simulator for the time being incase that makes any difference. At present only way I can get the information to update is either use that viewDidAppear or stop and start the application again from xCode.

I tried calling the classes viewDidLoad from the AppDelegates

 - (void)applicationWillEnterForeground:(UIApplication *)application
{
    /*
     Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
     */

   WebCalls *wc = [[WebCalls alloc] init];

    DashboardVC *db = [[DashboardVC alloc] init];

    [wc setWebCallDidFinish:^(NSString * json, NSString *ID) {

        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *docDir = [paths objectAtIndex: 0];
        NSString *docFile = [docDir stringByAppendingPathComponent: @"json.txt"];
        [json writeToFile:docFile atomically:NO encoding:NSUTF8StringEncoding error:Nil];

        NSString *docDir2 = [paths objectAtIndex: 0];
        NSString *docFile2 = [docDir2 stringByAppendingPathComponent: @"theID.txt"];
        [ID writeToFile:docFile2 atomically:NO encoding:NSUTF8StringEncoding error:Nil];

        [db testme];
    }];
    [wc getData];


}

This calls the viewDidLoad again, but the information doesn’t update. Any ideas why?

Edit: In that class, it reads the JSON like this

  NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *docDir = [paths objectAtIndex: 0];
        NSString *docFile = [docDir stringByAppendingPathComponent: @"json.txt"];
        [json writeToFile:docFile atomically:NO encoding:NSUTF8StringEncoding error:Nil];

I can print the JSON out, and the JSON is definitely updating, but the information on the screen is not.

Edit: Updated with web call

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:10:36+00:00Added an answer on June 4, 2026 at 7:10 am

    Fixed this issue. Set up periodic web call in application and when web call is made, calls refresh method in the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that has one set of files used by 50+
I have a web application that is polling a web service on another server.
I have a sample Rails 3.1.1 application that I have set devise up to
I have set in my mastersite of my asp.net application the following that the
I have a small shell application that embeds Tcl to execute some set of
I have a very large set of permissions in my application that I represent
In my application I have a custom model binder that I set to the
Do EMF files have a DPI that can be set? I have an application
As part of our web application's build process, I have set up our XSLT
I have an application that does a large amount of number crunching on an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.