mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Various documentation fixes and updates
This commit is contained in:
parent
67a4e1b6f9
commit
d7ae69860d
@ -31,6 +31,9 @@
|
|||||||
@class BITAuthenticator;
|
@class BITAuthenticator;
|
||||||
@class BITHockeyAppClient;
|
@class BITHockeyAppClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View controller handling user interaction for `BITAuthenticator`
|
||||||
|
*/
|
||||||
@interface BITAuthenticationViewController : UITableViewController
|
@interface BITAuthenticationViewController : UITableViewController
|
||||||
|
|
||||||
- (instancetype) initWithDelegate:(id<BITAuthenticationViewControllerDelegate>) delegate;
|
- (instancetype) initWithDelegate:(id<BITAuthenticationViewControllerDelegate>) delegate;
|
||||||
@ -61,6 +64,9 @@
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BITAuthenticationViewController protocol
|
||||||
|
*/
|
||||||
@protocol BITAuthenticationViewControllerDelegate<NSObject>
|
@protocol BITAuthenticationViewControllerDelegate<NSObject>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -30,19 +30,47 @@
|
|||||||
|
|
||||||
#import "BITHockeyBaseManager.h"
|
#import "BITHockeyBaseManager.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auth types
|
||||||
|
*/
|
||||||
typedef NS_ENUM(NSUInteger, BITAuthenticatorAuthType) {
|
typedef NS_ENUM(NSUInteger, BITAuthenticatorAuthType) {
|
||||||
|
/**
|
||||||
|
* Ask for the HockeyApp account email
|
||||||
|
*/
|
||||||
BITAuthenticatorAuthTypeEmail,
|
BITAuthenticatorAuthTypeEmail,
|
||||||
|
/**
|
||||||
|
* Ask for the HockeyApp account email and password
|
||||||
|
*/
|
||||||
BITAuthenticatorAuthTypeEmailAndPassword,
|
BITAuthenticatorAuthTypeEmailAndPassword,
|
||||||
|
/**
|
||||||
|
* Request the device UDID
|
||||||
|
*/
|
||||||
BITAuthenticatorAuthTypeUDIDProvider,
|
BITAuthenticatorAuthTypeUDIDProvider,
|
||||||
//TODO: add Facebook?
|
//TODO: add Facebook?
|
||||||
};
|
};
|
||||||
|
|
||||||
//TODO: think about name. call it registration?!
|
//TODO: think about name. call it registration?!
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validation types
|
||||||
|
*/
|
||||||
typedef NS_ENUM(NSUInteger, BITAuthenticatorValidationType) {
|
typedef NS_ENUM(NSUInteger, BITAuthenticatorValidationType) {
|
||||||
BITAuthenticatorValidationTypeNever = 0, //never try to validate the current installation
|
/**
|
||||||
BITAuthenticatorValidationTypeOptional, //asks the user if he wants to authenticate himself
|
* never try to validate the current installation
|
||||||
BITAuthenticatorValidationTypeOnFirstLaunch, //checks if the user is authenticated first time a new version is run
|
*/
|
||||||
BITAuthenticatorValidationTypeOnAppActive, //checks if the user is authenticated everytime the app becomes active
|
BITAuthenticatorValidationTypeNever = 0,
|
||||||
|
/**
|
||||||
|
* asks the user if he wants to authenticate himself
|
||||||
|
*/
|
||||||
|
BITAuthenticatorValidationTypeOptional,
|
||||||
|
/**
|
||||||
|
* checks if the user is authenticated first time a new version is run
|
||||||
|
*/
|
||||||
|
BITAuthenticatorValidationTypeOnFirstLaunch,
|
||||||
|
/**
|
||||||
|
* checks if the user is authenticated everytime the app becomes active
|
||||||
|
*/
|
||||||
|
BITAuthenticatorValidationTypeOnAppActive,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void(^tAuthenticationCompletion)(NSString* authenticationToken, NSError *error);
|
typedef void(^tAuthenticationCompletion)(NSString* authenticationToken, NSError *error);
|
||||||
@ -116,13 +144,7 @@ typedef void(^tValidationCompletion)(BOOL validated, NSError *error);
|
|||||||
@property (nonatomic, strong) NSURL *webpageURL;
|
@property (nonatomic, strong) NSURL *webpageURL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* should be used by the app-delegate to forward handle application:openURL:sourceApplication:annotation calls
|
* should be used by the app-delegate to forward handle application:openURL:sourceApplication:annotation: calls
|
||||||
*
|
|
||||||
* @param url URL that was passed to the app
|
|
||||||
* @param sourceApplication sourceApplication that was passed to the app
|
|
||||||
* @param annotation annotation that was passed to the app
|
|
||||||
*
|
|
||||||
* @return YES if the URL request was handled, NO if the URL could not be handled/identified
|
|
||||||
*
|
*
|
||||||
* Sample usage (in AppDelegate)
|
* Sample usage (in AppDelegate)
|
||||||
* - (BOOL)application:(UIApplication *)application
|
* - (BOOL)application:(UIApplication *)application
|
||||||
@ -136,6 +158,12 @@ typedef void(^tValidationCompletion)(BOOL validated, NSError *error);
|
|||||||
* //do your own URL handling, return appropriate valu
|
* //do your own URL handling, return appropriate valu
|
||||||
* }
|
* }
|
||||||
* return NO;
|
* return NO;
|
||||||
|
*
|
||||||
|
* @param url The URL that was passed to the app
|
||||||
|
* @param sourceApplication sourceApplication that was passed to the app
|
||||||
|
* @param annotation annotation that was passed to the app
|
||||||
|
*
|
||||||
|
* @return YES if the URL request was handled, NO if the URL could not be handled/identified
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
- (BOOL) handleOpenURL:(NSURL *) url
|
- (BOOL) handleOpenURL:(NSURL *) url
|
||||||
@ -144,6 +172,9 @@ typedef void(^tValidationCompletion)(BOOL validated, NSError *error);
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BITAuthenticator protocol
|
||||||
|
*/
|
||||||
@protocol BITAuthenticatorDelegate <NSObject>
|
@protocol BITAuthenticatorDelegate <NSObject>
|
||||||
|
|
||||||
@optional
|
@optional
|
||||||
|
|||||||
@ -170,7 +170,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
if(nil == jsonObject) {
|
if(nil == jsonObject) {
|
||||||
if(error) {
|
if(error) {
|
||||||
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
||||||
code:BITAuthenticatorAPIServerReturnedInvalidRespone
|
code:BITAuthenticatorAPIServerReturnedInvalidResponse
|
||||||
userInfo:(jsonParseError ? @{NSUnderlyingErrorKey : jsonParseError} : nil)];
|
userInfo:(jsonParseError ? @{NSUnderlyingErrorKey : jsonParseError} : nil)];
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
@ -178,7 +178,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
if(![jsonObject isKindOfClass:[NSDictionary class]]) {
|
if(![jsonObject isKindOfClass:[NSDictionary class]]) {
|
||||||
if(error) {
|
if(error) {
|
||||||
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
||||||
code:BITAuthenticatorAPIServerReturnedInvalidRespone
|
code:BITAuthenticatorAPIServerReturnedInvalidResponse
|
||||||
userInfo:nil];
|
userInfo:nil];
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
@ -204,7 +204,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
} else {
|
} else {
|
||||||
if(error) {
|
if(error) {
|
||||||
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
||||||
code:BITAuthenticatorAPIServerReturnedInvalidRespone
|
code:BITAuthenticatorAPIServerReturnedInvalidResponse
|
||||||
userInfo:nil];
|
userInfo:nil];
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
@ -321,7 +321,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
typeof (self) strongSelf = weakSelf;
|
typeof (self) strongSelf = weakSelf;
|
||||||
if(nil == response) {
|
if(nil == response) {
|
||||||
NSError *error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
NSError *error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
||||||
code:BITAuthenticatorAPIServerReturnedInvalidRespone
|
code:BITAuthenticatorAPIServerReturnedInvalidResponse
|
||||||
userInfo:@{
|
userInfo:@{
|
||||||
NSLocalizedDescriptionKey : BITHockeyLocalizedString(@"HockeyAuthenticationViewControllerNetworkError")
|
NSLocalizedDescriptionKey : BITHockeyLocalizedString(@"HockeyAuthenticationViewControllerNetworkError")
|
||||||
}];
|
}];
|
||||||
@ -410,7 +410,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
if(nil == jsonObject) {
|
if(nil == jsonObject) {
|
||||||
if(error) {
|
if(error) {
|
||||||
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
||||||
code:BITAuthenticatorAPIServerReturnedInvalidRespone
|
code:BITAuthenticatorAPIServerReturnedInvalidResponse
|
||||||
userInfo:(jsonParseError ? @{NSUnderlyingErrorKey : jsonParseError} : nil)];
|
userInfo:(jsonParseError ? @{NSUnderlyingErrorKey : jsonParseError} : nil)];
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
@ -418,7 +418,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
if(![jsonObject isKindOfClass:[NSDictionary class]]) {
|
if(![jsonObject isKindOfClass:[NSDictionary class]]) {
|
||||||
if(error) {
|
if(error) {
|
||||||
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
||||||
code:BITAuthenticatorAPIServerReturnedInvalidRespone
|
code:BITAuthenticatorAPIServerReturnedInvalidResponse
|
||||||
userInfo:nil];
|
userInfo:nil];
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
@ -427,7 +427,7 @@ static NSString* const kBITAuthenticatorDidSkipOptionalLogin = @"BITAuthenticato
|
|||||||
if(nil == status) {
|
if(nil == status) {
|
||||||
if(error) {
|
if(error) {
|
||||||
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
*error = [NSError errorWithDomain:kBITAuthenticatorErrorDomain
|
||||||
code:BITAuthenticatorAPIServerReturnedInvalidRespone
|
code:BITAuthenticatorAPIServerReturnedInvalidResponse
|
||||||
userInfo:nil];
|
userInfo:nil];
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
|
|||||||
@ -82,13 +82,16 @@
|
|||||||
/**
|
/**
|
||||||
* if set, this serves as the installationIdentifier.
|
* if set, this serves as the installationIdentifier.
|
||||||
* This is retrieved from the hockeyApp backend
|
* This is retrieved from the hockeyApp backend
|
||||||
* @see installationIdentifier
|
* @see installationIdentification
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, readonly) NSString *authenticationToken;
|
@property (nonatomic, readonly) NSString *authenticationToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* store the authentication token with the given type
|
* store the authentication token with the given type
|
||||||
* if authToken is not nil, authentikationTokenType must also be non nil
|
* if authToken is not nil, authentikationTokenType must also be non nil
|
||||||
|
*
|
||||||
|
* @param authenticationToken The authentication token
|
||||||
|
* @param authenticationTokenType The authentication token type
|
||||||
*/
|
*/
|
||||||
- (void)setAuthenticationToken:(NSString *)authenticationToken withType:(NSString*) authenticationTokenType;
|
- (void)setAuthenticationToken:(NSString *)authenticationToken withType:(NSString*) authenticationTokenType;
|
||||||
|
|
||||||
@ -107,11 +110,15 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* method registered as observer for applicationWillBecomeInactive events
|
* method registered as observer for applicationWillBecomeInactive events
|
||||||
|
*
|
||||||
|
* @param note NSNotification
|
||||||
*/
|
*/
|
||||||
- (void) applicationWillResignActive:(NSNotification*) note;
|
- (void) applicationWillResignActive:(NSNotification*) note;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* method registered as observer for applicationsDidBecomeActive events
|
* method registered as observer for applicationsDidBecomeActive events
|
||||||
|
*
|
||||||
|
* @param note NSNotification
|
||||||
*/
|
*/
|
||||||
- (void) applicationDidBecomeActive:(NSNotification*) note;
|
- (void) applicationDidBecomeActive:(NSNotification*) note;
|
||||||
|
|
||||||
|
|||||||
@ -8,16 +8,25 @@
|
|||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The users action when composing a message
|
||||||
|
*/
|
||||||
typedef NS_ENUM(NSUInteger, BITFeedbackComposeResult) {
|
typedef NS_ENUM(NSUInteger, BITFeedbackComposeResult) {
|
||||||
BITFeedbackComposeResultCancelled, //user hit cancel
|
/**
|
||||||
BITFeedbackComposeResultSubmitted, //user hit submit
|
* user hit cancel
|
||||||
|
*/
|
||||||
|
BITFeedbackComposeResultCancelled,
|
||||||
|
/**
|
||||||
|
* user hit submit
|
||||||
|
*/
|
||||||
|
BITFeedbackComposeResultSubmitted,
|
||||||
};
|
};
|
||||||
|
|
||||||
@class BITFeedbackComposeViewController;
|
@class BITFeedbackComposeViewController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The `BITFeedbackComposeViewControllerDelegate` formal protocol defines methods further configuring
|
* The `BITFeedbackComposeViewControllerDelegate` formal protocol defines methods further configuring
|
||||||
the behaviour of `BITFeedbackComposeViewController`.
|
* the behaviour of `BITFeedbackComposeViewController`.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@protocol BITFeedbackComposeViewControllerDelegate <NSObject>
|
@protocol BITFeedbackComposeViewControllerDelegate <NSObject>
|
||||||
@ -29,18 +38,23 @@ typedef NS_ENUM(NSUInteger, BITFeedbackComposeResult) {
|
|||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Invoked once the compose screen is finished via send or cancel
|
* Invoked once the compose screen is finished via send or cancel
|
||||||
|
*
|
||||||
If this is implemented, it's the responsibility of this method to dismiss the presented
|
* If this is implemented, it's the responsibility of this method to dismiss the presented
|
||||||
`BITFeedbackComposeViewController`
|
* `BITFeedbackComposeViewController`
|
||||||
|
*
|
||||||
@param composeViewController The `BITFeedbackComposeViewController` instance invoking this delegate
|
* @param composeViewController The `BITFeedbackComposeViewController` instance invoking this delegate
|
||||||
|
* @param composeResult The user action the lead to closing the compose view
|
||||||
*/
|
*/
|
||||||
- (void)feedbackComposeViewController:(BITFeedbackComposeViewController *)composeViewController
|
- (void)feedbackComposeViewController:(BITFeedbackComposeViewController *)composeViewController
|
||||||
didFinishWithResult:(BITFeedbackComposeResult) composeResult;
|
didFinishWithResult:(BITFeedbackComposeResult) composeResult;
|
||||||
|
|
||||||
#pragma mark - Deprecated methods
|
#pragma mark - Deprecated methods
|
||||||
|
|
||||||
/** this method is deprecated. If feedbackComposeViewController:didFinishWithResult: is implemented, this will not be called */
|
/**
|
||||||
|
* This method is deprecated. If feedbackComposeViewController:didFinishWithResult: is implemented, this will not be called
|
||||||
|
*
|
||||||
|
* @param composeViewController The `BITFeedbackComposeViewController` instance invoking this delegate
|
||||||
|
*/
|
||||||
- (void)feedbackComposeViewControllerDidFinish:(BITFeedbackComposeViewController *)composeViewController __attribute__((deprecated("Use feedbackComposeViewController:didFinishWithResult: instead")));
|
- (void)feedbackComposeViewControllerDidFinish:(BITFeedbackComposeViewController *)composeViewController __attribute__((deprecated("Use feedbackComposeViewController:didFinishWithResult: instead")));
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -41,11 +41,23 @@
|
|||||||
#define BITHockeyFeedbackMessagesLoadingFinished @"BITHockeyFeedbackMessagesLoadingFinished"
|
#define BITHockeyFeedbackMessagesLoadingFinished @"BITHockeyFeedbackMessagesLoadingFinished"
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
/**
|
||||||
BITFeedbackUserDataElementDontShow = 0, // don't ask for this user data element at all
|
* Defines if behavior of the user data field
|
||||||
BITFeedbackUserDataElementOptional = 1, // the user may provide it, but does not have to
|
*/
|
||||||
BITFeedbackUserDataElementRequired = 2 // the user has to provide this to continue
|
typedef NS_ENUM(NSInteger, BITFeedbackUserDataElement) {
|
||||||
} BITFeedbackUserDataElement;
|
/**
|
||||||
|
* don't ask for this user data element at all
|
||||||
|
*/
|
||||||
|
BITFeedbackUserDataElementDontShow = 0,
|
||||||
|
/**
|
||||||
|
* the user may provide it, but does not have to
|
||||||
|
*/
|
||||||
|
BITFeedbackUserDataElementOptional = 1,
|
||||||
|
/**
|
||||||
|
* the user has to provide this to continue
|
||||||
|
*/
|
||||||
|
BITFeedbackUserDataElementRequired = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@class BITFeedbackMessage;
|
@class BITFeedbackMessage;
|
||||||
@ -195,7 +207,7 @@ typedef enum {
|
|||||||
@see requireUserName
|
@see requireUserName
|
||||||
@see requireUserEmail
|
@see requireUserEmail
|
||||||
@see showFeedbackComposeView
|
@see showFeedbackComposeView
|
||||||
@see feedbackComposeViewController:
|
@see feedbackComposeViewController
|
||||||
@see showFeedbackListView
|
@see showFeedbackListView
|
||||||
@see feedbackListViewController:
|
@see feedbackListViewController:
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -29,20 +29,35 @@
|
|||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
typedef enum {
|
/**
|
||||||
// default and new messages from SDK per default
|
* Status for each feedback message
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSInteger, BITFeedbackMessageStatus) {
|
||||||
|
/**
|
||||||
|
* default and new messages from SDK per default
|
||||||
|
*/
|
||||||
BITFeedbackMessageStatusSendPending = 0,
|
BITFeedbackMessageStatusSendPending = 0,
|
||||||
// message is in conflict, happens if the message is already stored on the server and tried sending it again
|
/**
|
||||||
|
* message is in conflict, happens if the message is already stored on the server and tried sending it again
|
||||||
|
*/
|
||||||
BITFeedbackMessageStatusInConflict = 1,
|
BITFeedbackMessageStatusInConflict = 1,
|
||||||
// sending of message is in progress
|
/**
|
||||||
|
* sending of message is in progress
|
||||||
|
*/
|
||||||
BITFeedbackMessageStatusSendInProgress = 2,
|
BITFeedbackMessageStatusSendInProgress = 2,
|
||||||
// new messages from server
|
/**
|
||||||
|
* new messages from server
|
||||||
|
*/
|
||||||
BITFeedbackMessageStatusUnread = 3,
|
BITFeedbackMessageStatusUnread = 3,
|
||||||
// messages from server once read and new local messages once successful send from SDK
|
/**
|
||||||
|
* messages from server once read and new local messages once successful send from SDK
|
||||||
|
*/
|
||||||
BITFeedbackMessageStatusRead = 4,
|
BITFeedbackMessageStatusRead = 4,
|
||||||
// message is archived, happens if the thread is deleted from the server
|
/**
|
||||||
|
* message is archived, happens if the thread is deleted from the server
|
||||||
|
*/
|
||||||
BITFeedbackMessageStatusArchived = 5
|
BITFeedbackMessageStatusArchived = 5
|
||||||
} BITFeedbackMessageStatus;
|
};
|
||||||
|
|
||||||
@interface BITFeedbackMessage : NSObject {
|
@interface BITFeedbackMessage : NSObject {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,9 @@
|
|||||||
|
|
||||||
#import "BITHTTPOperation.h" //needed for typedef
|
#import "BITHTTPOperation.h" //needed for typedef
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic Hockey API client
|
||||||
|
*/
|
||||||
@interface BITHockeyAppClient : NSObject
|
@interface BITHockeyAppClient : NSObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -26,10 +26,13 @@
|
|||||||
/** Check if the device is running an iOS version previous to iOS 7 */
|
/** Check if the device is running an iOS version previous to iOS 7 */
|
||||||
- (BOOL)isPreiOS7Environment;
|
- (BOOL)isPreiOS7Environment;
|
||||||
|
|
||||||
/** by default, just logs the message
|
/**
|
||||||
|
* by default, just logs the message
|
||||||
can be overriden by subclasses to do their own error handling,
|
*
|
||||||
e.g. to show UI
|
* can be overriden by subclasses to do their own error handling,
|
||||||
|
* e.g. to show UI
|
||||||
|
*
|
||||||
|
* @param error NSError
|
||||||
*/
|
*/
|
||||||
- (void)reportError:(NSError *)error;
|
- (void)reportError:(NSError *)error;
|
||||||
|
|
||||||
@ -40,19 +43,19 @@
|
|||||||
*/
|
*/
|
||||||
- (NSString *)encodedAppIdentifier;
|
- (NSString *)encodedAppIdentifier;
|
||||||
|
|
||||||
/** device / application helpers */
|
// device / application helpers
|
||||||
- (NSString *)getDevicePlatform;
|
- (NSString *)getDevicePlatform;
|
||||||
- (NSString *)executableUUID;
|
- (NSString *)executableUUID;
|
||||||
|
|
||||||
/** UI helpers */
|
// UI helpers
|
||||||
- (UINavigationController *)customNavigationControllerWithRootViewController:(UIViewController *)viewController presentationStyle:(UIModalPresentationStyle)presentationStyle;
|
- (UINavigationController *)customNavigationControllerWithRootViewController:(UIViewController *)viewController presentationStyle:(UIModalPresentationStyle)presentationStyle;
|
||||||
- (UIWindow *)findVisibleWindow;
|
- (UIWindow *)findVisibleWindow;
|
||||||
- (void)showView:(UIViewController *)viewController;
|
- (void)showView:(UIViewController *)viewController;
|
||||||
|
|
||||||
/** Date helpers */
|
// Date helpers
|
||||||
- (NSDate *)parseRFC3339Date:(NSString *)dateString;
|
- (NSDate *)parseRFC3339Date:(NSString *)dateString;
|
||||||
|
|
||||||
/** keychain helpers */
|
// keychain helpers
|
||||||
- (BOOL)addStringValueToKeychain:(NSString *)stringValue forKey:(NSString *)key;
|
- (BOOL)addStringValueToKeychain:(NSString *)stringValue forKey:(NSString *)key;
|
||||||
- (NSString *)stringValueFromKeychainForKey:(NSString *)key;
|
- (NSString *)stringValueFromKeychainForKey:(NSString *)key;
|
||||||
- (BOOL)removeKeyFromKeychain:(NSString *)key;
|
- (BOOL)removeKeyFromKeychain:(NSString *)key;
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
[[BITHockeyManager sharedHockeyManager] startManager];
|
[[BITHockeyManager sharedHockeyManager] startManager];
|
||||||
|
|
||||||
@warning When also using the SDK for updating app versions (AdHoc or Enterprise) and collecting
|
@warning When also using the SDK for updating app versions (AdHoc or Enterprise) and collecting
|
||||||
beta usage analytics, you also have to use `[BITAuthenticator]`!
|
beta usage analytics, you also have to use `BITAuthenticator`!
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -236,7 +236,7 @@
|
|||||||
@see configureWithIdentifier:delegate:
|
@see configureWithIdentifier:delegate:
|
||||||
@see configureWithBetaIdentifier:liveIdentifier:delegate:
|
@see configureWithBetaIdentifier:liveIdentifier:delegate:
|
||||||
@see startManager
|
@see startManager
|
||||||
@see disableStoreUpdateManager
|
@see enableStoreUpdateManager
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, strong, readonly) BITStoreUpdateManager *storeUpdateManager;
|
@property (nonatomic, strong, readonly) BITStoreUpdateManager *storeUpdateManager;
|
||||||
|
|
||||||
|
|||||||
@ -50,19 +50,21 @@
|
|||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Implement to force the usage of the live identifier
|
* Implement to force the usage of the live identifier
|
||||||
|
*
|
||||||
This is useful if you are e.g. distributing an enterprise app inside your company
|
* This is useful if you are e.g. distributing an enterprise app inside your company
|
||||||
and want to use the `liveIdentifier` for that even though it is not running from
|
* and want to use the `liveIdentifier` for that even though it is not running from
|
||||||
the App Store.
|
* the App Store.
|
||||||
|
*
|
||||||
Example:
|
* Example:
|
||||||
- (BOOL)shouldUseLiveIdentifierForHockeyManager:(BITHockeyManager *)hockeyManager {
|
* - (BOOL)shouldUseLiveIdentifierForHockeyManager:(BITHockeyManager *)hockeyManager {
|
||||||
#ifdef (CONFIGURATION_AppStore)
|
* #ifdef (CONFIGURATION_AppStore)
|
||||||
return YES;
|
* return YES;
|
||||||
#endif
|
* #endif
|
||||||
return NO;
|
* return NO;
|
||||||
}
|
* }
|
||||||
|
*
|
||||||
|
* @param hockeyManager BITHockeyManager instance
|
||||||
*/
|
*/
|
||||||
- (BOOL)shouldUseLiveIdentifierForHockeyManager:(BITHockeyManager *)hockeyManager;
|
- (BOOL)shouldUseLiveIdentifierForHockeyManager:(BITHockeyManager *)hockeyManager;
|
||||||
|
|
||||||
|
|||||||
@ -31,11 +31,23 @@
|
|||||||
#import "BITHockeyBaseManager.h"
|
#import "BITHockeyBaseManager.h"
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
/**
|
||||||
|
* Defines the update check intervals
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSInteger, BITStoreUpdateSetting) {
|
||||||
|
/**
|
||||||
|
* Check every day
|
||||||
|
*/
|
||||||
BITStoreUpdateCheckDaily = 0,
|
BITStoreUpdateCheckDaily = 0,
|
||||||
|
/**
|
||||||
|
* Check every week
|
||||||
|
*/
|
||||||
BITStoreUpdateCheckWeekly = 1,
|
BITStoreUpdateCheckWeekly = 1,
|
||||||
|
/**
|
||||||
|
* Check manually
|
||||||
|
*/
|
||||||
BITStoreUpdateCheckManually = 2
|
BITStoreUpdateCheckManually = 2
|
||||||
} BITStoreUpdateSetting;
|
};
|
||||||
|
|
||||||
@protocol BITStoreUpdateManagerDelegate;
|
@protocol BITStoreUpdateManagerDelegate;
|
||||||
|
|
||||||
@ -142,7 +154,7 @@ typedef enum {
|
|||||||
the user about a new update being available in the App Store.
|
the user about a new update being available in the App Store.
|
||||||
|
|
||||||
If disabled, you need to implement the `BITStoreUpdateManagerDelegate` protocol with
|
If disabled, you need to implement the `BITStoreUpdateManagerDelegate` protocol with
|
||||||
the method `[BITStoreUpdateManagerDelegate detectUpdateFromStoreUpdateManager:version:]`
|
the method `[BITStoreUpdateManagerDelegate detectedUpdateFromStoreUpdateManager:newVersion:storeURL:]`
|
||||||
to be notified about new version and proceed yourself.
|
to be notified about new version and proceed yourself.
|
||||||
The manager will consider this identical to an `Ignore` user action using the alert
|
The manager will consider this identical to an `Ignore` user action using the alert
|
||||||
and not inform about this particular version any more, unless the app is updated
|
and not inform about this particular version any more, unless the app is updated
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
@implementation BITStoreUpdateManager {
|
@implementation BITStoreUpdateManager {
|
||||||
NSString *_newStoreVersion;
|
NSString *_newStoreVersion;
|
||||||
NSString *_appStoreURL;
|
NSString *_appStoreURLString;
|
||||||
NSString *_currentUUID;
|
NSString *_currentUUID;
|
||||||
|
|
||||||
BOOL _updateAlertShowing;
|
BOOL _updateAlertShowing;
|
||||||
@ -92,7 +92,7 @@
|
|||||||
_updateAlertShowing = NO;
|
_updateAlertShowing = NO;
|
||||||
_updateUIEnabled = YES;
|
_updateUIEnabled = YES;
|
||||||
_newStoreVersion = nil;
|
_newStoreVersion = nil;
|
||||||
_appStoreURL = nil;
|
_appStoreURLString = nil;
|
||||||
_currentUUID = [[self executableUUID] copy];
|
_currentUUID = [[self executableUUID] copy];
|
||||||
_countryCode = nil;
|
_countryCode = nil;
|
||||||
|
|
||||||
@ -162,7 +162,7 @@
|
|||||||
_lastCheckFailed = NO;
|
_lastCheckFailed = NO;
|
||||||
|
|
||||||
_newStoreVersion = [(NSDictionary *)[(NSArray *)[dictionary objectForKey:@"results"] objectAtIndex:0] objectForKey:@"version"];
|
_newStoreVersion = [(NSDictionary *)[(NSArray *)[dictionary objectForKey:@"results"] objectAtIndex:0] objectForKey:@"version"];
|
||||||
_appStoreURL = [(NSDictionary *)[(NSArray *)[dictionary objectForKey:@"results"] objectAtIndex:0] objectForKey:@"trackViewUrl"];
|
_appStoreURLString = [(NSDictionary *)[(NSArray *)[dictionary objectForKey:@"results"] objectAtIndex:0] objectForKey:@"trackViewUrl"];
|
||||||
|
|
||||||
NSString *ignoredVersion = nil;
|
NSString *ignoredVersion = nil;
|
||||||
if ([self.userDefaults objectForKey:kBITStoreUpdateIgnoreVersion]) {
|
if ([self.userDefaults objectForKey:kBITStoreUpdateIgnoreVersion]) {
|
||||||
@ -170,7 +170,7 @@
|
|||||||
BITHockeyLog(@"INFO: Ignored version: %@", ignoredVersion);
|
BITHockeyLog(@"INFO: Ignored version: %@", ignoredVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_newStoreVersion || !_appStoreURL) {
|
if (!_newStoreVersion || !_appStoreURLString) {
|
||||||
return NO;
|
return NO;
|
||||||
} else if (ignoredVersion && [ignoredVersion isEqualToString:_newStoreVersion]) {
|
} else if (ignoredVersion && [ignoredVersion isEqualToString:_newStoreVersion]) {
|
||||||
return NO;
|
return NO;
|
||||||
@ -273,7 +273,7 @@
|
|||||||
|
|
||||||
if ([self isUpdateAvailable]) {
|
if ([self isUpdateAvailable]) {
|
||||||
if (self.delegate && [self.delegate respondsToSelector:@selector(detectedUpdateFromStoreUpdateManager:newVersion:storeURL:)]) {
|
if (self.delegate && [self.delegate respondsToSelector:@selector(detectedUpdateFromStoreUpdateManager:newVersion:storeURL:)]) {
|
||||||
[self.delegate detectedUpdateFromStoreUpdateManager:self newVersion:_newStoreVersion storeURL:_appStoreURL];
|
[self.delegate detectedUpdateFromStoreUpdateManager:self newVersion:_newStoreVersion storeURL:[NSURL URLWithString:_appStoreURLString]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.updateUIEnabled && BITHockeyBundle()) {
|
if (self.updateUIEnabled && BITHockeyBundle()) {
|
||||||
@ -425,8 +425,8 @@
|
|||||||
[self.userDefaults setObject:_newStoreVersion forKey:kBITStoreUpdateIgnoreVersion];
|
[self.userDefaults setObject:_newStoreVersion forKey:kBITStoreUpdateIgnoreVersion];
|
||||||
[self.userDefaults synchronize];
|
[self.userDefaults synchronize];
|
||||||
|
|
||||||
if (_appStoreURL) {
|
if (_appStoreURLString) {
|
||||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:_appStoreURL]];
|
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:_appStoreURLString]];
|
||||||
} else {
|
} else {
|
||||||
BITHockeyLog(@"WARNING: The app store page couldn't be opened, since we did not get a valid URL from the store API.");
|
BITHockeyLog(@"WARNING: The app store page couldn't be opened, since we did not get a valid URL from the store API.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
@param newVersion The new version string reported by the App Store
|
@param newVersion The new version string reported by the App Store
|
||||||
@param storeURL The App Store URL for this app that could be invoked to let them perform the update.
|
@param storeURL The App Store URL for this app that could be invoked to let them perform the update.
|
||||||
*/
|
*/
|
||||||
-(void)detectedUpdateFromStoreUpdateManager:(BITStoreUpdateManager *)storeUpdateManager newVersion:(NSString *)newVersion storeURL:(NSString *)storeURL;
|
-(void)detectedUpdateFromStoreUpdateManager:(BITStoreUpdateManager *)storeUpdateManager newVersion:(NSString *)newVersion storeURL:(NSURL *)storeURL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -32,11 +32,23 @@
|
|||||||
#import "BITHockeyBaseManager.h"
|
#import "BITHockeyBaseManager.h"
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
/**
|
||||||
|
* Update check interval
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM (NSUInteger, BITUpdateSetting) {
|
||||||
|
/**
|
||||||
|
* On every startup or or when the app comes to the foreground
|
||||||
|
*/
|
||||||
BITUpdateCheckStartup = 0,
|
BITUpdateCheckStartup = 0,
|
||||||
|
/**
|
||||||
|
* Once a day
|
||||||
|
*/
|
||||||
BITUpdateCheckDaily = 1,
|
BITUpdateCheckDaily = 1,
|
||||||
|
/**
|
||||||
|
* Manually
|
||||||
|
*/
|
||||||
BITUpdateCheckManually = 2
|
BITUpdateCheckManually = 2
|
||||||
} BITUpdateSetting;
|
};
|
||||||
|
|
||||||
@protocol BITUpdateManagerDelegate;
|
@protocol BITUpdateManagerDelegate;
|
||||||
|
|
||||||
|
|||||||
@ -34,13 +34,31 @@
|
|||||||
|
|
||||||
#import "BITStoreButton.h"
|
#import "BITStoreButton.h"
|
||||||
|
|
||||||
typedef enum {
|
/**
|
||||||
|
* Button states
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSUInteger, AppStoreButtonState) {
|
||||||
|
/**
|
||||||
|
* Offline
|
||||||
|
*/
|
||||||
AppStoreButtonStateOffline,
|
AppStoreButtonStateOffline,
|
||||||
|
/**
|
||||||
|
* Check
|
||||||
|
*/
|
||||||
AppStoreButtonStateCheck,
|
AppStoreButtonStateCheck,
|
||||||
|
/**
|
||||||
|
* Searching
|
||||||
|
*/
|
||||||
AppStoreButtonStateSearching,
|
AppStoreButtonStateSearching,
|
||||||
|
/**
|
||||||
|
* Update
|
||||||
|
*/
|
||||||
AppStoreButtonStateUpdate,
|
AppStoreButtonStateUpdate,
|
||||||
|
/**
|
||||||
|
* Installing
|
||||||
|
*/
|
||||||
AppStoreButtonStateInstalling
|
AppStoreButtonStateInstalling
|
||||||
} AppStoreButtonState;
|
};
|
||||||
|
|
||||||
|
|
||||||
@class BITUpdateManager;
|
@class BITUpdateManager;
|
||||||
|
|||||||
@ -67,55 +67,132 @@
|
|||||||
#define BITHockeyNetworkDidBecomeReachableNotification @"BITHockeyNetworkDidBecomeReachable"
|
#define BITHockeyNetworkDidBecomeReachableNotification @"BITHockeyNetworkDidBecomeReachable"
|
||||||
|
|
||||||
|
|
||||||
// hockey crash reporting api error domain
|
/**
|
||||||
typedef enum {
|
* HockeySDK Crash Reporter error domain
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM (NSInteger, BITCrashErrorReason) {
|
||||||
|
/**
|
||||||
|
* Unknown error
|
||||||
|
*/
|
||||||
BITCrashErrorUnknown,
|
BITCrashErrorUnknown,
|
||||||
|
/**
|
||||||
|
* API Server rejected app version
|
||||||
|
*/
|
||||||
BITCrashAPIAppVersionRejected,
|
BITCrashAPIAppVersionRejected,
|
||||||
|
/**
|
||||||
|
* API Server returned empty response
|
||||||
|
*/
|
||||||
BITCrashAPIReceivedEmptyResponse,
|
BITCrashAPIReceivedEmptyResponse,
|
||||||
|
/**
|
||||||
|
* Connection error with status code
|
||||||
|
*/
|
||||||
BITCrashAPIErrorWithStatusCode
|
BITCrashAPIErrorWithStatusCode
|
||||||
} BITCrashErrorReason;
|
};
|
||||||
extern NSString *const __attribute__((unused)) kBITCrashErrorDomain;
|
extern NSString *const __attribute__((unused)) kBITCrashErrorDomain;
|
||||||
|
|
||||||
// hockey update api error domain
|
/**
|
||||||
typedef enum {
|
* HockeySDK Update error domain
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM (NSInteger, BITUpdateErrorReason) {
|
||||||
|
/**
|
||||||
|
* Unknown error
|
||||||
|
*/
|
||||||
BITUpdateErrorUnknown,
|
BITUpdateErrorUnknown,
|
||||||
|
/**
|
||||||
|
* API Server returned invalid status
|
||||||
|
*/
|
||||||
BITUpdateAPIServerReturnedInvalidStatus,
|
BITUpdateAPIServerReturnedInvalidStatus,
|
||||||
|
/**
|
||||||
|
* API Server returned invalid data
|
||||||
|
*/
|
||||||
BITUpdateAPIServerReturnedInvalidData,
|
BITUpdateAPIServerReturnedInvalidData,
|
||||||
|
/**
|
||||||
|
* API Server returned empty response
|
||||||
|
*/
|
||||||
BITUpdateAPIServerReturnedEmptyResponse,
|
BITUpdateAPIServerReturnedEmptyResponse,
|
||||||
|
/**
|
||||||
|
* Authorization secret missing
|
||||||
|
*/
|
||||||
BITUpdateAPIClientAuthorizationMissingSecret,
|
BITUpdateAPIClientAuthorizationMissingSecret,
|
||||||
|
/**
|
||||||
|
* No internet connection
|
||||||
|
*/
|
||||||
BITUpdateAPIClientCannotCreateConnection
|
BITUpdateAPIClientCannotCreateConnection
|
||||||
} BITUpdateErrorReason;
|
};
|
||||||
extern NSString *const __attribute__((unused)) kBITUpdateErrorDomain;
|
extern NSString *const __attribute__((unused)) kBITUpdateErrorDomain;
|
||||||
|
|
||||||
|
|
||||||
// hockey feedback api error domain
|
/**
|
||||||
typedef enum {
|
* HockeySDK Feedback error domain
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSInteger, BITFeedbackErrorReason) {
|
||||||
|
/**
|
||||||
|
* Unknown error
|
||||||
|
*/
|
||||||
BITFeedbackErrorUnknown,
|
BITFeedbackErrorUnknown,
|
||||||
|
/**
|
||||||
|
* API Server returned invalid status
|
||||||
|
*/
|
||||||
BITFeedbackAPIServerReturnedInvalidStatus,
|
BITFeedbackAPIServerReturnedInvalidStatus,
|
||||||
|
/**
|
||||||
|
* API Server returned invalid data
|
||||||
|
*/
|
||||||
BITFeedbackAPIServerReturnedInvalidData,
|
BITFeedbackAPIServerReturnedInvalidData,
|
||||||
|
/**
|
||||||
|
* API Server returned empty response
|
||||||
|
*/
|
||||||
BITFeedbackAPIServerReturnedEmptyResponse,
|
BITFeedbackAPIServerReturnedEmptyResponse,
|
||||||
|
/**
|
||||||
|
* Authorization secret missing
|
||||||
|
*/
|
||||||
BITFeedbackAPIClientAuthorizationMissingSecret,
|
BITFeedbackAPIClientAuthorizationMissingSecret,
|
||||||
|
/**
|
||||||
|
* No internet connection
|
||||||
|
*/
|
||||||
BITFeedbackAPIClientCannotCreateConnection
|
BITFeedbackAPIClientCannotCreateConnection
|
||||||
} BITFeedbackErrorReason;
|
};
|
||||||
extern NSString *const __attribute__((unused)) kBITFeedbackErrorDomain;
|
extern NSString *const __attribute__((unused)) kBITFeedbackErrorDomain;
|
||||||
|
|
||||||
// hockey Authenticator error domain
|
/**
|
||||||
|
* HockeySDK Authenticator error domain
|
||||||
|
*/
|
||||||
typedef NS_ENUM(NSInteger, BITAuthenticatorReason) {
|
typedef NS_ENUM(NSInteger, BITAuthenticatorReason) {
|
||||||
|
/**
|
||||||
|
* Unknown error
|
||||||
|
*/
|
||||||
BITAuthenticatorErrorUnknown,
|
BITAuthenticatorErrorUnknown,
|
||||||
|
/**
|
||||||
|
* Network error
|
||||||
|
*/
|
||||||
BITAuthenticatorNetworkError,
|
BITAuthenticatorNetworkError,
|
||||||
BITAuthenticatorAPIServerReturnedInvalidRespone,
|
/**
|
||||||
|
* API Server returned invalid response
|
||||||
|
*/
|
||||||
|
BITAuthenticatorAPIServerReturnedInvalidResponse,
|
||||||
|
/**
|
||||||
|
* Not Authorized
|
||||||
|
*/
|
||||||
BITAuthenticatorNotAuthorized,
|
BITAuthenticatorNotAuthorized,
|
||||||
|
/**
|
||||||
|
* Authorization canceleed
|
||||||
|
*/
|
||||||
BITAuthenticatorAuthenticationCancelled,
|
BITAuthenticatorAuthenticationCancelled,
|
||||||
|
/**
|
||||||
|
* Authoraization secret missing
|
||||||
|
*/
|
||||||
BITAuthenticatorAuthorizationSecretMissing,
|
BITAuthenticatorAuthorizationSecretMissing,
|
||||||
};
|
};
|
||||||
extern NSString *const __attribute__((unused)) kBITAuthenticatorErrorDomain;
|
extern NSString *const __attribute__((unused)) kBITAuthenticatorErrorDomain;
|
||||||
|
|
||||||
// HockeySDK
|
/**
|
||||||
|
* HockeySDK global error domain
|
||||||
typedef enum {
|
*/
|
||||||
BITHockeyErrorUnknown,
|
typedef NS_ENUM(NSInteger, BITHockeyErrorReason) {
|
||||||
HockeyAPIClientMissingJSONLibrary
|
/**
|
||||||
} BITHockeyErrorReason;
|
* Unknown error
|
||||||
|
*/
|
||||||
|
BITHockeyErrorUnknown
|
||||||
|
};
|
||||||
extern NSString *const __attribute__((unused)) kBITHockeyErrorDomain;
|
extern NSString *const __attribute__((unused)) kBITHockeyErrorDomain;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -807,7 +807,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/usr/local/bin/appledoc \\\n --output \"${SOURCE_ROOT}/../documentation\" \\\n --ignore Vendor \\\n --ignore Products \\\n --ignore .m \\\n --create-html \\\n --create-docset \\\n --install-docset \\\n --keep-intermediate-files \\\n --project-name \"${HOCKEYSDK_DOCSET_NAME} ${VERSION_STRING}\" \\\n --project-version \"${VERSION_STRING}\" \\\n --project-company \"BitStadium GmbH\" \\\n --company-id \"de.bitstadium\" \\\n --docset-bundle-name \"${HOCKEYSDK_DOCSET_NAME} ${VERSION_STRING}\" \\\n --docset-feed-name \"${HOCKEYSDK_DOCSET_NAME}\" \\\n --docset-desc \"\" \\\n --docset-platform-family \"iphoneos\" \\\n --index-desc \"${SOURCE_ROOT}/../docs/index.md\" \\\n --include \"${SOURCE_ROOT}/../docs/index.html\" \\\n --include \"${SOURCE_ROOT}/../docs/\" \\\n --merge-categories \\\n --no-repeat-first-par \\\n --warn-undocumented-object \\\n --warn-undocumented-member \\\n --warn-empty-description \\\n --warn-unknown-directive \\\n --warn-invalid-crossref \\\n --warn-missing-arg \\\n --logformat xcode \\\n --exit-threshold 2 \\\n \"${SOURCE_ROOT}/../\"\n";
|
shellScript = "/usr/local/bin/appledoc \\\n --output \"${SOURCE_ROOT}/../documentation\" \\\n --ignore Vendor \\\n --ignore Products \\\n --ignore Support \\\n --ignore .m \\\n --create-html \\\n --create-docset \\\n --install-docset \\\n --keep-intermediate-files \\\n --project-name \"${HOCKEYSDK_DOCSET_NAME} ${VERSION_STRING}\" \\\n --project-version \"${VERSION_STRING}\" \\\n --project-company \"BitStadium GmbH\" \\\n --company-id \"de.bitstadium\" \\\n --docset-bundle-name \"${HOCKEYSDK_DOCSET_NAME} ${VERSION_STRING}\" \\\n --docset-feed-name \"${HOCKEYSDK_DOCSET_NAME}\" \\\n --docset-desc \"\" \\\n --docset-platform-family \"iphoneos\" \\\n --index-desc \"${SOURCE_ROOT}/../docs/index.md\" \\\n --include \"${SOURCE_ROOT}/../docs/index.html\" \\\n --include \"${SOURCE_ROOT}/../docs/\" \\\n --merge-categories \\\n --no-repeat-first-par \\\n --warn-undocumented-object \\\n --warn-undocumented-member \\\n --warn-empty-description \\\n --warn-unknown-directive \\\n --warn-invalid-crossref \\\n --warn-missing-arg \\\n --logformat xcode \\\n --exit-threshold 2 \\\n \"${SOURCE_ROOT}/../\"\n";
|
||||||
};
|
};
|
||||||
1EE9071A16F6871F003DDE1D /* ShellScript */ = {
|
1EE9071A16F6871F003DDE1D /* ShellScript */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|||||||
@ -12,7 +12,6 @@ This document contains the following sections:
|
|||||||
- [Set up Git submodule](#download)
|
- [Set up Git submodule](#download)
|
||||||
- [Set up Xcode](#xcode)
|
- [Set up Xcode](#xcode)
|
||||||
- [Modify Code](#modify)
|
- [Modify Code](#modify)
|
||||||
- [Submit the UDID](#udid)
|
|
||||||
- [Mac Desktop Uploader](#mac)
|
- [Mac Desktop Uploader](#mac)
|
||||||
- [Xcode Documentation](#documentation)
|
- [Xcode Documentation](#documentation)
|
||||||
|
|
||||||
@ -136,22 +135,6 @@ If you need support for iOS 3.x, please check out [HockeyKit](http://support.hoc
|
|||||||
|
|
||||||
*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.
|
*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="udid"></a>
|
|
||||||
## Submit the UDID
|
|
||||||
|
|
||||||
If you only want crash reporting, you can skip this step. If you want to use HockeyApp for beta distribution and analyze which testers have installed your app, you need to implement an additional delegate method in your AppDelegate.m:
|
|
||||||
|
|
||||||
#pragma mark - BITUpdateManagerDelegate
|
|
||||||
- (NSString *)customDeviceIdentifierForUpdateManager:(BITUpdateManager *)updateManager {
|
|
||||||
#ifndef CONFIGURATION_AppStore
|
|
||||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)])
|
|
||||||
return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)];
|
|
||||||
#endif
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
The method only returns the UDID when the build is not targeted to the App Sore. This assumes that a preprocessor macro name CONFIGURATION_AppStore exists and is set for App Store builds. The macros are already defined in `HockeySDK.xcconfig` or can be set manually by setting `GCC_PREPROCESSOR_DEFINITIONS` in your build configurations to `CONFIGURATION_$(CONFIGURATION)`.
|
|
||||||
|
|
||||||
<a id="mac"></a>
|
<a id="mac"></a>
|
||||||
## Mac Desktop Uploader
|
## Mac Desktop Uploader
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ This document contains the following sections:
|
|||||||
- [Download & Extract](#download)
|
- [Download & Extract](#download)
|
||||||
- [Set up Xcode](#xcode)
|
- [Set up Xcode](#xcode)
|
||||||
- [Modify Code](#modify)
|
- [Modify Code](#modify)
|
||||||
- [Submit the UDID](#udid)
|
|
||||||
- [Mac Desktop Uploader](#mac)
|
- [Mac Desktop Uploader](#mac)
|
||||||
- [Xcode Documentation](#documentation)
|
- [Xcode Documentation](#documentation)
|
||||||
|
|
||||||
@ -107,22 +106,6 @@ If you need support for iOS 3.x, please check out [HockeyKit](http://support.hoc
|
|||||||
*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.
|
*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="udid"></a>
|
|
||||||
## Submit the UDID
|
|
||||||
|
|
||||||
If you only want crash reporting, you can skip this step. If you want to use HockeyApp for beta distribution and analyze which testers have installed your app, you need to implement an additional delegate method in your AppDelegate.m:
|
|
||||||
|
|
||||||
#pragma mark - BITUpdateManagerDelegate
|
|
||||||
- (NSString *)customDeviceIdentifierForUpdateManager:(BITUpdateManager *)updateManager {
|
|
||||||
#ifndef CONFIGURATION_AppStore
|
|
||||||
if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)])
|
|
||||||
return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)];
|
|
||||||
#endif
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
The method only returns the UDID when the build is not targeted to the App Sore. This assumes that a preprocessor macro name CONFIGURATION_AppStore exists and is set for App Store builds. The macros are already defined in `HockeySDK.xcconfig` or can be set manually by setting `GCC_PREPROCESSOR_DEFINITIONS` in your build configurations to `CONFIGURATION_$(CONFIGURATION)`.
|
|
||||||
|
|
||||||
<a id="mac"></a>
|
<a id="mac"></a>
|
||||||
## Mac Desktop Uploader
|
## Mac Desktop Uploader
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user