-
Notifications
You must be signed in to change notification settings - Fork 76
NBUKit Installation
Ernesto Rivera edited this page May 28, 2013
·
5 revisions
For versions 1.9.0 and up
- Install Cocoapods if not already done.
$ [sudo] gem install cocoapods
$ pod setup
- Add
pod 'NBUKit'
to your Podfile. - Install the dependencies for your project.
$ pod install
If you have a problem try gem update cocoapods
first.
For versions 1.5.x and up to 1.8.x
-
Drag
NBUKit.xcodeproj
and.xcconfig
files from the Finder to your project.
-
Uncheck the
Add to targets
option.
- Choose the
NBUKit_Debug
,NBUKit_Testing
orNBUKit_Production
for each configuration.
-
Add
NBUKit
as a Target dependency.
-
Add a new
Run Script
build phase:
# Copy NBUKit.framework resources to NBUKitResources.bundle
echo "Copy NBUKit.framework resources..."
SOURCE_PATH="${DEPENDENCIES_BUILD_DIR}/NBUKit.framework/Resources/"
if [ ! -d "$SOURCE_PATH" ]; then
SOURCE_PATH="${TARGET_BUILD_DIR}/NBUKit.framework/Resources/"
fi
echo "From: $SOURCE_PATH"
TARGET_PATH="${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/NBUKitResources.bundle"
echo "To: $TARGET_PATH"
mkdir -p "$TARGET_PATH"
cp -R "$SOURCE_PATH" "$TARGET_PATH"
-
Set your
Bundle display name
andBundle identifier
to${DISPLAYNAME}
and${BUNDLEID}
respectively.
-
You can customize the settings for each configuration.
- Import
NBUKit.h
in yourPrefix.pch
file to have access to all NBUKit classes from all your files.
// Prefix.pch
#import <Availability.h>
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <NBUKit/NBUKit.h>
#endif
- Or manually import headers.
// AppDelegate.m
#import "AppDelegate.h"
#import <NBUKit/NBUMailComposeViewController.h>
#import <NBUKit/UIImage+NBUAdditions.h>