- Server software available and installed
- The iOS application needs to be build with base SDK set to 4.0 or higher
Important:
This code may NEVER be used in an app version distributed to Apple!
Download the sources and drag’n’drop all files from /client/iOS/ (except Beta Automatisation and HockeyLib folders) into your project. If you already use one of the required 3rd party frameworks (JSONKit or SBJson) in your project, exclude these from the Hockey client
-
Add the following setting to your Xcode project settings Preprocessor Macros
CONFIGURATION_$(CONFIGURATION) -
Include the following frameworks into your project, if they are not yet present:
SystemConfiguration.framework QuartzCode.framework CoreGraphics.framework UIKit.framework Foundation.frameworkTo add frameworks into Xcode 4, select the project, the target, the Build Phase tab and open the Link Binaries With Libraries expander. Click on the + button to add frameworks.
-
Include the header into your UIApplicationDelegate subclass, this assumes your AppStore distribution configuration is named AppStore_Distribution
#if !defined (CONFIGURATION_AppStore_Distribution) #import "BWHockeyManager.h" #endif -
Initialize Hockey with the code below and replace the URL to point to your server hockey public URL path (without index.php !).
Optionally adjust additional Hockey parameters. The first update check will be invoked automatically in the next runloop.
// This variable is available if you add "CONFIGURATION_$(CONFIGURATION)" // to the Preprocessor Macros in the project settings to all configurations #if !defined (CONFIGURATION_AppStore_Distribution) [BWHockeyManager sharedHockeyManager].updateURL = @"http://your.server.com/"; #endif -
Optionally set the UIWindow rootViewController property (iOS 4 only, make sure it is not set on iOS 3.x if you require compatibility) which should be used to push the modal Hockey Update view onto. If it is not set Hockey will try to find the best way by itself.
if ([window respondsToSelector:@selector(setRootViewController:)]) { [window setRootViewController:YourRootViewControllerObject]; } -
If you want the update view to be accessible without a new update being actually, add the BWHockeyViewController to your In-App Settings page
#if !defined (CONFIGURATION_AppStore_Distribution) BWHockeyViewController *hockeyViewController = [[BWHockeyManager sharedHockeyManager] hockeyViewController:NO]; // ... // Pass the selected object to the new view controller. [self.navigationController pushViewController:hockeyViewController animated:YES]; #endif