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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:30:30+00:00 2026-06-10T03:30:30+00:00

We’re using the new Urban Airship iOS plugin for PhoneGap. In the plugin’s plist

  • 0

We’re using the new Urban Airship iOS plugin for PhoneGap.

In the plugin’s plist file, we’re supposed to enter the app-specific keys needed to enable push notifications.

The problem is we have two versions, free and paid, of the same app, but the plist file only accommodates one version.

Essentially, we need to modify the Objective-C code to read different plist values, depending on whether it’s the free or premium version.

We currently manage both versions with the same code base and Xcode project. Unless we change the plugin code, it seems like we need to create a new Xcode project, which we don’t want to do.

How do we adjust Urban Airship’s Objective-C files to read different values from the plsit file?

  • 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-10T03:30:32+00:00Added an answer on June 10, 2026 at 3:30 am

    Sorry to keep you waiting, I wanted to give you a very detailed answer instead of rushing last night 🙂 So here we go.

    First in your project we need to add a new target. Go to your project settings and right click your target. Click duplicate.

    Duplicate your target.

    You’ll get a new target probably named Target-copy. You’ll also get a new info.plist file just for that target.

    Xcode will automatically create a new info.plist.

    Next we’re going to edit our Pro version’s Built Settings. Scroll or search and find Apple LLVM compiler 4.0 Preprocessing. Add to both your Debug and Release configurations. I normally just go with the simple PRO=1. You also need to add PRO=0 to your lite version or it will be undefined when you try to build that version.

    Create a custom PRO preprocessor.

    Now lets look at how to add a custom plist like I’m sure you’ll need. First create two folders. Its important these are folders not groups. In each folder we can create a plist with the exact same filename.

    Add one to the Lite target.
    Add one to the Pro target

    Since Now you can add something to each of them. I just added a key property and a value pro string / lite string. Finally to the code. In the sample project I made I simple overrode viewDidLoad but obviously this will work anywhere. Since the plists have the same name you can load them with one line of code. They’ll never get mixed up because they are only copied to their respective target. If you need to do code level based logic you can use the PRO preprocessor we made.

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        // This will load the proper plist automatically.
        NSLog(@"Plist Value: %@",[[NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Property List" ofType:@"plist"]] objectForKey:@"property"]);
    
        // Also remember we set up a preprocessor PRO. you can use it as well.
        if (PRO) {
            NSLog(@"Only Show for Pro");
        } else {
            NSLog(@"Only Show for Lite");
        }
    
        NSLog(@"This will show for both");
    }
    

    This is the method I use for all my lite/pro version apps so I can share a common codebase without copying it between projects or other complicated systems. It has worked pretty well for me so far 🙂 Happy Coding!

    Source

    Figured someone may be able to use the project to look at so here it is on GitHub.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.