Skip to content

Commit

Permalink
iOS9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
timanrebel committed Sep 25, 2015
1 parent f233bbb commit d10daaf
Show file tree
Hide file tree
Showing 161 changed files with 805 additions and 2,321 deletions.
5 changes: 4 additions & 1 deletion example/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
var hockeyapp = require('nl.rebelic.hockeyapp');
hockeyapp.start('<yourappid>');
hockeyapp.start('3fcc45ce6f74b483f14c56c91d243e83');

hockeyapp.setFeedbackScreenshotType('last');
// hockeyapp.setFeedbackScreenshotType('3finger');

var win = Ti.UI.createWindow({
backgroundColor: 'white'
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/NlRebelicHockeyappModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <HockeySDK/HockeySDK.h>


@interface NlRebelicHockeyappModule : TiModule <BITCrashManagerDelegate>
@interface NlRebelicHockeyappModule : TiModule <BITHockeyManagerDelegate, BITCrashManagerDelegate>

- (NSString *)applicationLogForCrashManager:(BITCrashManager *)crashManager;

Expand Down
23 changes: 18 additions & 5 deletions iphone/Classes/NlRebelicHockeyappModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,38 @@ -(void)start:(id)appId
ENSURE_UI_THREAD(start, appId);
ENSURE_SINGLE_ARG(appId, NSString);

[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:appId];
[[BITHockeyManager sharedHockeyManager].crashManager setDelegate:self];
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:appId delegate:self];
[[BITHockeyManager sharedHockeyManager].crashManager setCrashManagerStatus: BITCrashManagerStatusAutoSend];
[[BITHockeyManager sharedHockeyManager] startManager];
[[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];
}

-(void)setFeedbackScreenshotType:(id)args
{
ENSURE_SINGLE_ARG(args, NSString);

NSString *type = (NSString *) args;

if([type isEqual: @"last"]) {
[[BITHockeyManager sharedHockeyManager].feedbackManager setFeedbackObservationMode:BITFeedbackObservationModeOnScreenshot];
}
else if([type isEqual: @"3finger"]) {
[[BITHockeyManager sharedHockeyManager].feedbackManager setFeedbackObservationMode:BITFeedbackObservationModeThreeFingerTap];
}
}

- (void)showFeedbackListView:(id)args
-(void)showFeedbackListView:(id)args
{
[[BITHockeyManager sharedHockeyManager].feedbackManager showFeedbackListView];
}

- (void)showFeedbackComposeView:(id)args
-(void)showFeedbackComposeView:(id)args
{
[[BITHockeyManager sharedHockeyManager].feedbackManager showFeedbackComposeView];
}


- (NSString *)applicationLogForCrashManager:(BITCrashManager *)crashManager
-(NSString *)applicationLogForCrashManager:(BITCrashManager *)crashManager
{

NSString *appLog = [[NSUserDefaults standardUserDefaults] valueForKey:appCrashInfoKey];
Expand Down
24 changes: 18 additions & 6 deletions iphone/ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
BC90F7A618E2D767004C4A57 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC90F7A518E2D767004C4A57 /* Security.framework */; };
BC90F7A818E2D76B004C4A57 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC90F7A718E2D76B004C4A57 /* SystemConfiguration.framework */; };
BC90F7AA18E2D772004C4A57 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC90F7A918E2D772004C4A57 /* UIKit.framework */; };
BCB1F8A119E3D02C007E1663 /* HockeySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB1F8A019E3D02C007E1663 /* HockeySDK.framework */; };
BC9158821A7643FC00420EBF /* HockeySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC9158811A7643FC00420EBF /* HockeySDK.framework */; };
BCB327911BB58236000F837C /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB327901BB58236000F837C /* AssetsLibrary.framework */; };
BCB327931BB58248000F837C /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB327921BB58248000F837C /* MobileCoreServices.framework */; };
BCB327951BB58254000F837C /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB327941BB58254000F837C /* QuickLook.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -61,7 +64,10 @@
BC90F7A518E2D767004C4A57 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
BC90F7A718E2D76B004C4A57 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
BC90F7A918E2D772004C4A57 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
BCB1F8A019E3D02C007E1663 /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HockeySDK.framework; path = platform/HockeySDK.framework; sourceTree = "<group>"; };
BC9158811A7643FC00420EBF /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HockeySDK.framework; path = platform/HockeySDK.framework; sourceTree = "<group>"; };
BCB327901BB58236000F837C /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
BCB327921BB58248000F837C /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
BCB327941BB58254000F837C /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = System/Library/Frameworks/QuickLook.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libNlRebelicHockeyapp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libNlRebelicHockeyapp.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

Expand All @@ -70,11 +76,14 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BC90F7A618E2D767004C4A57 /* Security.framework in Frameworks */,
BCB327951BB58254000F837C /* QuickLook.framework in Frameworks */,
BCB327931BB58248000F837C /* MobileCoreServices.framework in Frameworks */,
BCB327911BB58236000F837C /* AssetsLibrary.framework in Frameworks */,
BC90F7AA18E2D772004C4A57 /* UIKit.framework in Frameworks */,
BC90F7A818E2D76B004C4A57 /* SystemConfiguration.framework in Frameworks */,
BC90F7A618E2D767004C4A57 /* Security.framework in Frameworks */,
BC90F7A418E2D762004C4A57 /* QuartzCore.framework in Frameworks */,
BCB1F8A119E3D02C007E1663 /* HockeySDK.framework in Frameworks */,
BC9158821A7643FC00420EBF /* HockeySDK.framework in Frameworks */,
BC90F7A218E2D75D004C4A57 /* CoreText.framework in Frameworks */,
BC90F7A018E2D751004C4A57 /* CoreGraphics.framework in Frameworks */,
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
Expand Down Expand Up @@ -106,7 +115,10 @@
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
BCB1F8A019E3D02C007E1663 /* HockeySDK.framework */,
BCB327941BB58254000F837C /* QuickLook.framework */,
BCB327921BB58248000F837C /* MobileCoreServices.framework */,
BCB327901BB58236000F837C /* AssetsLibrary.framework */,
BC9158811A7643FC00420EBF /* HockeySDK.framework */,
BC90F7A918E2D772004C4A57 /* UIKit.framework */,
BC90F7A718E2D76B004C4A57 /* SystemConfiguration.framework */,
BC90F7A518E2D767004C4A57 /* Security.framework */,
Expand Down Expand Up @@ -389,7 +401,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = NlRebelicHockeyapp;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion iphone/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 0.4.3
version: 0.6.0
apiversion: 2
description: Appcelerator module wrapping the HockeyApp SDK
author: Timan Rebel
Expand Down
5 changes: 2 additions & 3 deletions iphone/module.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
//
// IMPORTANT NOTE: always use $(inherited) in your overrides
//
FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/nl.rebelic.hockeyapp/0.4.3/platform
FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/nl.rebelic.hockeyapp/0.6.0/platform


OTHER_LDFLAGS=$(inherited) -framework HockeySDK -framework Foundation -framework UIKit -framework SystemConfiguration -framework QuartzCore -framework CoreGraphics
OTHER_LDFLAGS=$(inherited) -framework HockeySDK -framework AssetsLibrary -framework CoreText -framework CoreGraphics -framework Foundation -framework MobileCoreServices -framework QuartzCore -framework QuickLook -framework Security -framework SystemConfiguration -framework UIKit
Binary file added iphone/nl.rebelic.hockeyapp-iphone-0.6.0.zip
Binary file not shown.
12 changes: 12 additions & 0 deletions iphone/platform/HockeySDK.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,16 @@ framework module HockeySDK {

export *
module * { export * }

link framework "AssetsLibrary"
link framework "CoreText"
link framework "CoreGraphics"
link framework "Foundation"
link framework "MobileCoreServices"
link framework "QuartzCore"
link framework "QuickLook"
link framework "Security"
link framework "SystemConfiguration"
link framework "UIKit"
link "c++"
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
*/
BITAuthenticatorAppRestrictionEnforcementOnFirstLaunch,
/**
* Checks if the user is allowed to use the app everytime the app becomes active
* Checks if the user is allowed to use the app every time the app becomes active
*/
BITAuthenticatorAppRestrictionEnforcementOnAppActive,
};
Expand Down Expand Up @@ -198,14 +198,6 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
*/
@property (nonatomic, copy) NSString *authenticationSecret;

/**
* Delegate that can be used to do any last minute configurations on the
* presented viewController.
*
* @see BITAuthenticatorDelegate
*/
@property (nonatomic, weak) id<BITAuthenticatorDelegate> delegate;


#pragma mark - Device based identification

Expand All @@ -229,7 +221,7 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
- (NSURL*) deviceAuthenticationURL;

/**
* The url-scheme used to idenfify via `BITAuthenticatorIdentificationTypeDevice`
* The url-scheme used to identify via `BITAuthenticatorIdentificationTypeDevice`
*
* Please make sure that the URL scheme is unique and not shared with other apps.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,31 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/

#import <Foundation/Foundation.h>
#import "BITHockeyAttachment.h"

/**
* Provides support to add binary attachments to crash reports
*
* This is used by `[BITCrashManagerDelegate attachmentForCrashManager:]`
*/
@interface BITCrashAttachment : NSObject<NSCoding>

/**
* The filename the attachment should get
*/
@property (nonatomic, readonly, strong) NSString *filename;

/**
* The attachment data as NSData object
*/
@property (nonatomic, readonly, strong) NSData *crashAttachmentData;

/**
* The content type of your data as MIME type
Deprecated: Provides support to add binary attachments to crash reports
This class is not needed any longer and exists for compatibility purposes with
HockeySDK-iOS 3.5.5.
It is a subclass of `BITHockeyAttachment` which only provides an initializer
that is compatible with the one of HockeySDK-iOS 3.5.5.
This is used by `[BITCrashManagerDelegate attachmentForCrashManager:]`
@see BITHockeyAttachment
*/
@property (nonatomic, readonly, strong) NSString *contentType;
@interface BITCrashAttachment : BITHockeyAttachment

/**
* Create an BITCrashAttachment instance with a given filename and NSData object
*
* @param filename The filename the attachment should get
* @param crashAttachmentData The attachment data as NSData
* @param contentType The content type of your data as MIME type
*
* @return An instsance of BITCrashAttachment
Create an BITCrashAttachment instance with a given filename and NSData object
@param filename The filename the attachment should get
@param crashAttachmentData The attachment data as NSData
@param contentType The content type of your data as MIME type
@return An instance of BITCrashAttachment
*/
- (instancetype)initWithFilename:(NSString *)filename
crashAttachmentData:(NSData *)crashAttachmentData
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/*
* Author: Andreas Linde <[email protected]>
*
* Copyright (c) 2012-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.
*/

#import <Foundation/Foundation.h>

/**
* Provides details about the crash that occurred in the previous app session
*/
@interface BITCrashDetails : NSObject

/**
* UUID for the crash report
*/
@property (nonatomic, readonly, strong) NSString *incidentIdentifier;

/**
* UUID for the app installation on the device
*/
@property (nonatomic, readonly, strong) NSString *reporterKey;

/**
* Signal that caused the crash
*/
@property (nonatomic, readonly, strong) NSString *signal;

/**
* Exception name that triggered the crash, nil if the crash was not caused by an exception
*/
@property (nonatomic, readonly, strong) NSString *exceptionName;

/**
* Exception reason, nil if the crash was not caused by an exception
*/
@property (nonatomic, readonly, strong) NSString *exceptionReason;

/**
* Date and time the app started, nil if unknown
*/
@property (nonatomic, readonly, strong) NSDate *appStartTime;

/**
* Date and time the crash occurred, nil if unknown
*/
@property (nonatomic, readonly, strong) NSDate *crashTime;

/**
* Operation System version string the app was running on when it crashed.
*/
@property (nonatomic, readonly, strong) NSString *osVersion;

/**
* Operation System build string the app was running on when it crashed
*
* This may be unavailable.
*/
@property (nonatomic, readonly, strong) NSString *osBuild;

/**
* CFBundleShortVersionString value of the app that crashed
*
* Can be `nil` if the crash was captured with an older version of the SDK
* or if the app doesn't set the value.
*/
@property (nonatomic, readonly, strong) NSString *appVersion;

/**
* CFBundleVersion value of the app that crashed
*/
@property (nonatomic, readonly, strong) NSString *appBuild;

/**
* Identifier of the app process that crashed
*/
@property (nonatomic, readonly, assign) NSUInteger appProcessIdentifier;

/**
Indicates if the app was killed while being in foreground from the iOS
If `[BITCrashManager enableAppNotTerminatingCleanlyDetection]` is enabled, use this on startup
to check if the app starts the first time after it was killed by iOS in the previous session.
This can happen if it consumed too much memory or the watchdog killed the app because it
took too long to startup or blocks the main thread for too long, or other reasons. See Apple
documentation: https://developer.apple.com/library/ios/qa/qa1693/_index.html
See `[BITCrashManager enableAppNotTerminatingCleanlyDetection]` for more details about which kind of kills can be detected.
@warning This property only has a correct value, once `[BITHockeyManager startManager]` was
invoked! In addition, it is automatically disabled while a debugger session is active!
@see `[BITCrashManager enableAppNotTerminatingCleanlyDetection]`
@see `[BITCrashManager didReceiveMemoryWarningInLastSession]`
@return YES if the details represent an app kill instead of a crash
*/
- (BOOL)isAppKill;

@end
Loading

0 comments on commit d10daaf

Please sign in to comment.