Latest 0.0.4
Homepage https://github.com/NZN/NZBundle
License MIT
Platforms ios 5.0, requires ARC
Authors

NZBundle License MIT

NZBundle

Easily access and manipulate the the Info.plist file of your project.

It can be used, for example, to add some alphanumeric values ​​in the version of the application APIs that are used by track view analysis.

Build Status
Cocoapods
Cocoapods
Analytics

Requirements

NZBundle works on iOS 5.0+ version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

  • Foundation.framework

You will need LLVM 3.0 or later in order to build NZBundle.

Adding NZBundle to your project

Cocoapods

CocoaPods is the recommended way to add NZBundle to your project.

  • Add a pod entry for NZBundle to your Podfile:
pod 'NZBundle'
  • Install the pod(s) by running:
pod install

Source files

Alternatively you can directly add source files to your project.

  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.
  2. Open your project in Xcode, then drag and drop all files at NZBundle folder onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.

Usage

  • Setup version name with default values (a = Apple):
    • Debug / Relase: X.X.Xa alpha
    • Distribution: X.X.Xa
#import "NZBundle.h"
...
[NZBundle setupShortVersion];
  • Setup custom version name:
#import "NZBundle.h"
...
[NZBundle setShortVersionForDevelopment:@"dev" andDistribution:@"prd"];
  • Acess Info.plist values:
#import "NZBundle.h"
...

// CFBundleInitialShortVersionString (custom key)
// this key is created to save initial short value
NSString shortVersion = [NZBundle initialShortVersion];

// CFBundleShortVersionString
NSString shortVersion = [NZBundle shortVersion];

// UIMainStoryboardFile
NSString phoneStoryboard = [NZBundle mainStoryboardFileName];

// UIMainStoryboardFile~ipad
NSString padStoryboard = [NZBundle mainStoryboardFilePadName];

Log

To enable the logs in debug/release mode, add #define NZDEBUG at *-Prefix.pch file in your project.

License

This code is distributed under the terms and conditions of the MIT license.

Change-log

A brief summary of each NZBundle release can be found on the wiki.

Latest podspec

{
    "name": "NZBundle",
    "version": "0.0.4",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "Easily access and manipulate the the Info.plist file of your project.",
    "homepage": "https://github.com/NZN/NZBundle",
    "screenshots": "http://s24.postimg.org/r7y1jch1h/NZBundle.png",
    "requires_arc": true,
    "platforms": {
        "ios": "5.0"
    },
    "authors": {
        "Bruno Tortato Furtado": "[email protected]"
    },
    "source_files": "NZBundle/*.{h,m}",
    "source": {
        "git": "https://github.com/NZN/NZBundle.git",
        "tag": "0.0.4"
    }
}

Pin It on Pinterest

Share This