More updates on extension support

- Added iOS 8 extension setup documentation
- Added a crash reporting only framework build to the binary distribution target
This commit is contained in:
Andreas Linde 2014-09-25 17:29:45 +02:00
parent 3354a36f11
commit cdf6691579
4 changed files with 249 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,90 @@
/*
* Author: Andreas Linde <mail@andreaslinde.de>
*
* Copyright (c) 2013-2014 HockeyApp, Bit Stadium GmbH.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* This file is only used by the binary framework target when building
* and creating the crash reporting only framework
*
* Attention: Do not include this into your projects yourself!
*/
#ifndef HockeySDK_HockeySDKFeatureConfig_h
#define HockeySDK_HockeySDKFeatureConfig_h
/**
* If true, include support for handling crash reports
*
* _Default_: Enabled
*/
#ifndef HOCKEYSDK_FEATURE_CRASH_REPORTER
# define HOCKEYSDK_FEATURE_CRASH_REPORTER 1
#endif /* HOCKEYSDK_FEATURE_CRASH_REPORTER */
/**
* If true, include support for managing user feedback
*
* _Default_: Enabled
*/
#ifndef HOCKEYSDK_FEATURE_FEEDBACK
# define HOCKEYSDK_FEATURE_FEEDBACK 0
#endif /* HOCKEYSDK_FEATURE_FEEDBACK */
/**
* If true, include support for informing the user about new updates pending in the App Store
*
* _Default_: Enabled
*/
#ifndef HOCKEYSDK_FEATURE_STORE_UPDATES
# define HOCKEYSDK_FEATURE_STORE_UPDATES 0
#endif /* HOCKEYSDK_FEATURE_STORE_UPDATES */
/**
* If true, include support for authentication installations for Ad-Hoc and Enterprise builds
*
* _Default_: Enabled
*/
#ifndef HOCKEYSDK_FEATURE_AUTHENTICATOR
# define HOCKEYSDK_FEATURE_AUTHENTICATOR 0
#endif /* HOCKEYSDK_FEATURE_AUTHENTICATOR */
/**
* If true, include support for handling in-app udpates for Ad-Hoc and Enterprise builds
*
* _Default_: Enabled
*/
#ifndef HOCKEYSDK_FEATURE_UPDATES
# define HOCKEYSDK_FEATURE_UPDATES 0
#endif /* HOCKEYSDK_FEATURE_UPDATES */
#endif /* HockeySDK_HockeySDKFeatureConfig_h */

View File

@ -0,0 +1,3 @@
#include "buildnumber.xcconfig"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) HOCKEYSDK_FEATURE_CRASH_REPORTER=1 HOCKEYSDK_FEATURE_FEEDBACK=0 HOCKEYSDK_FEATURE_STORE_UPDATES=0 HOCKEYSDK_FEATURE_AUTHENTICATOR=0 HOCKEYSDK_FEATURE_UPDATES=0 BITHOCKEY_VERSION="@\""$(VERSION_STRING)"\"" BITHOCKEY_BUILD="@\""$(BUILD_NUMBER)"\"" BITHOCKEY_C_VERSION="\""$(VERSION_STRING)"\"" BITHOCKEY_C_BUILD="\""$(BUILD_NUMBER)"\""

View File

@ -10,8 +10,9 @@ This document contains the following sections:
- [Requirements](#requirements)
- [Download & Extract](#download)
- [Set up Xcode](#xcode)
- [Set up Xcode](#xcode)
- [Modify Code](#modify)
- [iOS 8 Extensions](#extension)
- [Additional Options](#options)
<a id="requirements"></a>
@ -107,6 +108,33 @@ The SDK runs on devices with iOS 6.0 or higher.
*Note:* The SDK is optimized to defer everything possible to a later time while making sure e.g. crashes on startup can also be caught and each module executes other code with a delay some seconds. This ensures that applicationDidFinishLaunching will process as fast as possible and the SDK will not block the startup sequence resulting in a possible kill by the watchdog process.
<a id="extensions"></a>
## iOS 8 Extensions
The following points need to be considered to use HockeySDK with iOS 8 Extensions:
1. Each extension is required to use the same values for version (`CFBundleShortVersionString`) and build number (`CFBundleVersion`) as the main app uses. (This is required only if you are using the same APP_IDENTIFIER for your app and extensions).
2. You need to make sure the SDK setup code is only invoked once. Since there is no `applicationDidFinishLaunching:` equivalent and `viewDidLoad` can run multiple times, you need to use a setup like the following example:
@interface TodayViewController () <NCWidgetProviding>
@property (nonatomic, assign) BOOL didSetupHockeySDK;
@end
@implementation TodayViewController
- (void)viewDidLoad {
[super viewDidLoad];
if (!self.didSetupHockeySDK) {
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"APP_IDENTIFIER"];
[[BITHockeyManager sharedHockeyManager] startManager];
self.didSetupHockeySDK = YES;
}
}
3. The binary distribution provides a special framework build in the `HockeySDKCrashOnly` folder of the distribution zip file, which only contains crash reporting functionality (also automatic sending crash reports only). You can use this to further slim down the binary size of your extensions.
<a id="options"></a>
## Additional Options