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.
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.
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
Alternatively you can directly add source files to your project.
- Download the latest code version or add the repository as a git submodule to your git-tracked project.
- 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.
- Setup version name with default values (a = Apple):
- Debug / Relase:
X.X.Xa alpha
- Distribution:
X.X.Xa
- Debug / Relase:
#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];
To enable the logs in debug/release mode, add #define NZDEBUG
at *-Prefix.pch
file in your project.
This code is distributed under the terms and conditions of the MIT license.
A brief summary of each NZBundle release can be found on the wiki.