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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:33:33+00:00 2026-06-14T04:33:33+00:00

My problem is with the groundcontrol example . When I use the default url

  • 0

My problem is with the groundcontrol example. When I use the default url to get the message greeting, it works, but when I change it to the URL of my plist on my own server. No message comes up, it is just blank.

The line I am changing to my own server is the following:

static NSString * const kGroundControlDefaultsURLString =
@"http://ground-control-demo.herokuapp.com/defaults.plist";

I have tried downloading the exact plist file and uploading it to my server, but that doesn’t even work.

I noticed one difference when going to the file in the browser, on the example link above it would automatically download, but on my own server it would open in the server.

So then I tried adding the following to my .httaccess file to make the file on my own server also automatically download, which it did after adding this, but also did not work from app.

<FilesMatch "\.(?i:plist)$">
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>

the debugger spits out nothing when it fails, when it works (from the example URL) it spits out the following:

2012-11-11 17:18:40.163 GroundControl Example[13804:f803] 
NSUserDefaultsDidChangeNotification: NSConcreteNotification 0x68b9e40 {name = 
NSUserDefaultsDidChangeNotification; object = <NSUserDefaults: 0x6e83400>}

So this is my problem, and essentially what I would like to be able to do is get the file working just by uploading a .plist file to my server and use ground control to work with it.

Thanks for the help Stackoverflow.

Here is some of the groundControl code if that helps..

-from AppDelegate.m

static NSString * const kGroundControlDefaultsURLString = @"http://ground-control-demo.herokuapp.com/defaults.plist";

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [[NSUserDefaults standardUserDefaults] registerDefaultsWithURL:[NSURL URLWithString:kGroundControlDefaultsURLString]];

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];

    return YES;
}

-from ViewController.m

@implementation ViewController

- (void)updateValues {
    self.greetingLabel.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"Greeting"];
}

#pragma mark - UIViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [[NSNotificationCenter defaultCenter] addObserverForName:NSUserDefaultsDidChangeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
        NSLog(@"NSUserDefaultsDidChangeNotification: %@", notification);
        [self updateValues];
    }];

    [self updateValues];
}

SOLUTION

Based on Jake Bonham’s comment,

Changing this line in my .httaccess file on my server worked, with GroundControl classes and all.

ForceType application/octet-stream   

octet-stream to x-plist

<FilesMatch "\.(?i:plist)$">
  ForceType application/x-plist
  Header set Content-Disposition attachment
</FilesMatch>

Also maybe this helped

Loading the plist into a dictionary first worked.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

//THIS IS THE PART THAT I CHANGED
 NSURL* url = [NSURL URLWithString:@"http://mydomain.org/defaults.plist"];
 NSDictionary* dict = [NSDictionary dictionaryWithContentsOfURL:url];
    [[NSUserDefaults standardUserDefaults] registerDefaults:dict];
//AND FINALLY LOAD dict INTO NSUserDefaults


    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];

    return YES;
}
  • 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-14T04:33:34+00:00Added an answer on June 14, 2026 at 4:33 am

    I just ran into this issue also. Logging out the error response said it was expecting type “application/x-plist” and got “application/octet-stream” from my saved .plist file.

    Your solution removes the GroundControl classes. You are loading the url into a dict then saving that to user defaults. So it works. Just not using GroundControl.

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

Sidebar

Related Questions

Problem: Visitors open the url website.com/?i=133r534|213213|12312312 but this url isn't valid anymore and they
Problem I change my approach... My url : passing my_code on it (r'^test_form_2/(?P<my_code>\d+)/$', TestForm_2),
Problem: Been struggling to get my code to load external shaders and it is
Problem: I have a table that prints out vertical but I would like it
Problem: I need to get a random element for a container and also delete
Problem Description: Multi-player Game that works over the some kind of network, in game
Problem : Need onclick event to pause/unpause a Youtube video, but impossible to add
Problem: I have a list containg hours, for example: 08:15:00 08:45:00 09:00:00 12:00:00 ...
Problem: I can set the exposureMode property of AVCaptureDevice, but it does not stay
Problem is I can see already the value of my json through firebug but

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.