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 639137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:48:34+00:00 2026-05-13T20:48:34+00:00

I have successfully created an app that reads from a bundled .plist file and

  • 0

I have successfully created an app that reads from a bundled .plist file and displays the contents in a UITableView. I would like to move that plist to an external site, as it is updated frequently. even better, I would love to have it generated with PHP. I have got the server side working, but the Objective C is giving me a headache…

My code used to read like this:

NSString *myfile = [[NSBundle mainBundle] pathForResource:@"notices" ofType:@"plist"];

according to various google searches, my code should now look something like this:

NSString *myfile = [NSDictionary dictionaryWithContentsOfURL:[NSURL URLWithString:@"http://localhost/plistgen1.php"]];

Obviously this is not going to work, mixing NSString with NSDictionary, but I have tried (and failed) to get it to work properly. does anyone have a solution, or a different way to approach the problem? The data I am using is on a mysql server, and the plistgen1.php just “fills in the blanks” in the plist file and echoes it out…

I may have got this all wrong, don’t shoot me 🙂

  • 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-05-13T20:48:34+00:00Added an answer on May 13, 2026 at 8:48 pm

    The first case (“My code used to read like this”) gives you the local filesystem path to the bundled plist file and saves it to the variable myfile. In the second case you’re downloading the plist file’s contents from the server and creating a dictionary from that.

    You probably have some code after the assignment of the file path to myfile that reads the contents of that file into an NSDictionary. You need to replace both the assignment to myfile and that statement with the second example.

    So you’d replace something like this:

    // determine filesystem path to bundled plist file
    NSString *myfile = [[NSBundle mainBundle] pathForResource:@"notices" ofType:@"plist"];
    // read contents of that plist file and parse them into a dictionary
    NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:myfile];
    

    With this:

    // download plist file contents from URL and parse them into a dictionary
    NSDictionary *dict = [NSDictionary dictionaryWithContentsOfURL:[NSURL URLWithString:@"http://localhost/plistgen1.php"]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully created an Android app that calculates prices and then is able
I have successfully created a feature in sharepoint that modifies the existing edit dialog
I have a c# app (Windows Service) that fires a timer event that reads
I've successfully created an app that minimizes to the tray using a NotifyIcon. When
I'm creating a Silverlight App. I have successfully created the data, bound it to
I have an application that reads large files from a server and hangs frequently
Good morning, I've successfully created a little app that registers itself under a custom
I've successfully created an ad-hoc file for over-the-air installation of my app for beta
I have successfully created a custom Facebook open graph action, and have been able
i have successfully created distribution profiles and installed on my xcode organiser, but this

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.