-
Notifications
You must be signed in to change notification settings - Fork 0
iOS Client
- Add the client files manually to your project
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.
- Include via static library
- iOS
Create your project as you would normally do and follow the steps below to integrate the HockeyKit functionality without including the libraries.
Create a new group and call it Dependencies (to keep things separated from the main project).
If you have the HockeyDemoWithLib Xcode project open – close it now.
Go to the HockeyKit folder and drag HockeyLib.xcodeproj from client/iOS/HockeyLib/ into the Dependencies group folder you’ve just created.
If you’re not able to see the complete hockeykit projects folder, close the project and open it again.
Okay – now the finetuning part.
Select your Xcode project and make sure you have the target selected. Go the you Build Settings, find “Other linker flags” and set it to -all_load.
Now select the HockeyLib.xcodeproj’s target HockeyLib. Go to the Build Settings, find “Skip Install” and set it to YES.
Done.
Make sure you have included the “header search paths” correctly set to the path where your ??/HockeyKit/client/iOS/** … resides.
Now you should be able to generate a valid archive.
- Include via Git submodules
t.b.d.
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 QuartzCore.framework CoreGraphics.framework UIKit.framework Foundation.framework
To 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:YourRootViewControllerClass]; }
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