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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:00:36+00:00 2026-06-15T23:00:36+00:00

Possible Duplicate: Not able to write to Plist I have this problem. I have

  • 0

Possible Duplicate:
Not able to write to Plist

I have this problem. I have a plist file named ‘instellingen’. In the file, different settings are stored. For example, displaying the games rules at startup. This works just fine on the simulator but when i tested it on my iPad, the plist dat wont get saved.

here is my code:

- (void)viewDidLoad
{
    [super viewDidLoad];

    plistPath = [[NSBundle mainBundle] pathForResource:@"instellingen" ofType:@"plist"];
    instellingen = [NSMutableDictionary dictionaryWithContentsOfFile:plistPath];

    if ([[instellingen objectForKey:@"regelAtRuntime"] boolValue] == TRUE) {
        [self.showRulesButton setTitle:@"Spelregels niet meer tonen" forState:UIControlStateNormal];
    }else{
        [self.showRulesButton setTitle:@"Spelregels wel tonen" forState:UIControlStateNormal];
    }

    [self.mainContent flashScrollIndicators];

}

- (IBAction)dismissRules:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (IBAction)dontShowRegels:(id)sender {

    if ([[instellingen objectForKey:@"regelAtRuntime"] boolValue] == TRUE) {
        [instellingen setValue:@"0" forKey:@"regelAtRuntime"];
    }else{
        [instellingen setValue:@"1" forKey:@"regelAtRuntime"];
    }

    [instellingen writeToFile:plistPath atomically:YES];
}

Reading the rules from a dire rent VC seems to work fine, with this pice of code:

NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"instellingen" ofType:@"plist"];
    instellingen = [NSDictionary dictionaryWithContentsOfFile:plistPath];

    if ([[instellingen objectForKey:@"regelAtRuntime"] boolValue] == TRUE) {
        NSLog(@"We're in!");
        [self performSegueWithIdentifier:@"showRulesSegue" sender:self];
    }

Does anyone know what i’m doing wrong? I’ve tried running a clean build (Product Clean).

Any help means a lot!

  • 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-15T23:00:38+00:00Added an answer on June 15, 2026 at 11:00 pm

    The app bundle is read-write on Simulator but read-only on device. When your app is first launched, you should copy the plist to the Documents directory (if it needs to be backed up) or Library/Caches (if it doesn’t), then use that version in your app.

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

Sidebar

Related Questions

Possible Duplicate: SmartGWT Dialog title not set correctly I have a problem, is that
Possible Duplicate: Invalid read/write sometimes creates segmentation fault and sometimes does not I have
Possible Duplicate: Not possible to launch a file on a network using Java Desktop?
Possible Duplicate: cmake is not working in opencv c++ project I have a huge
Possible Duplicate: Not Able To Install Apache Cordova for Windows Phone7 Im trying to
Possible Duplicate: Basic Recursion, Check Balanced Parenthesis I came across this problem in Algorithm
Possible Duplicate JavaScript: Changing src-attribute of a embed-tag but this is not working for
Possible Duplicate: Not able to launch android emulator After downloading Eclipse indigo, and updating
Possible Duplicate: Replacing unquoted words only in Python This is what I have right
Possible Duplicate: Activity not started, its current task has been brought to the front

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.