- Server software available and installed
- The iOS application needs to be build with base SDK set to 4.0 or higher
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, SBJson, Yail) in your project, you should NOT copy and include these files again.
If your app is iOS 5.0 only, you don't need any 3rd party JSON frameworks, since the native implementation will always be used when running on iOS 5. (That is only true if you are not including the framework as static lib, in that case you need to have a 3rd party JSON framework!)
-
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 -
The client framework optionally watches for Reachability notifications to detect if the device is online or not. To use that, include your desired reachability framework and send a notification
NetworkDidBecomeReachableto inform the framework that the device is now online.