mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge branch 'release/2.5.1'
This commit is contained in:
commit
b44f28719d
@ -93,6 +93,7 @@ static NSString *kBITCrashManagerStatus = @"BITCrashManagerStatus";
|
||||
NSURLConnection *_urlConnection;
|
||||
|
||||
BOOL _sendingInProgress;
|
||||
BOOL _isSetup;
|
||||
}
|
||||
|
||||
|
||||
|
@ -75,6 +75,7 @@
|
||||
|
||||
_delegate = nil;
|
||||
_showAlwaysButton = NO;
|
||||
_isSetup = NO;
|
||||
|
||||
_crashIdenticalCurrentVersion = YES;
|
||||
_urlConnection = nil;
|
||||
@ -117,7 +118,7 @@
|
||||
[_fileManager removeItemAtPath:_analyzerInProgressFile error:&error];
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startManager) name:BITHockeyNetworkDidBecomeReachableNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(invokeDelayedProcessing) name:BITHockeyNetworkDidBecomeReachableNotification object:nil];
|
||||
|
||||
if (!BITHockeyBundle()) {
|
||||
NSLog(@"WARNING: %@ is missing, will send reports automatically!", BITHOCKEYSDK_BUNDLE);
|
||||
@ -422,18 +423,29 @@
|
||||
- (void)startManager {
|
||||
if (_crashManagerStatus == BITCrashManagerStatusDisabled) return;
|
||||
|
||||
PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
|
||||
NSError *error = NULL;
|
||||
|
||||
// Check if we previously crashed
|
||||
if ([crashReporter hasPendingCrashReport]) {
|
||||
_didCrashInLastSession = YES;
|
||||
[self handleCrashReport];
|
||||
if (!_isSetup) {
|
||||
PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
|
||||
NSError *error = NULL;
|
||||
|
||||
// Check if we previously crashed
|
||||
if ([crashReporter hasPendingCrashReport]) {
|
||||
_didCrashInLastSession = YES;
|
||||
[self handleCrashReport];
|
||||
}
|
||||
|
||||
// PLCrashReporter is throwing an NSException if it is being enabled again
|
||||
// even though it already is enabled
|
||||
@try {
|
||||
// Enable the Crash Reporter
|
||||
if (![crashReporter enableCrashReporterAndReturnError: &error])
|
||||
NSLog(@"WARNING: Could not enable crash reporter: %@", [error localizedDescription]);
|
||||
}
|
||||
@catch (NSException * e) {
|
||||
NSLog(@"WARNING: %@", [e reason]);
|
||||
}
|
||||
|
||||
_isSetup = YES;
|
||||
}
|
||||
|
||||
// Enable the Crash Reporter
|
||||
if (![crashReporter enableCrashReporterAndReturnError: &error])
|
||||
NSLog(@"WARNING: Could not enable crash reporter: %@", [error localizedDescription]);
|
||||
|
||||
[self performSelector:@selector(invokeDelayedProcessing) withObject:nil afterDelay:0.5];
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
@interface BITHockeyManager ()
|
||||
|
||||
- (BOOL)shouldUseLiveIdenfitier;
|
||||
- (BOOL)shouldUseLiveIdentifier;
|
||||
|
||||
- (void)configureJMC;
|
||||
|
||||
@ -117,7 +117,7 @@
|
||||
_delegate = delegate;
|
||||
[_appIdentifier release];
|
||||
|
||||
if ([self shouldUseLiveIdenfitier]) {
|
||||
if ([self shouldUseLiveIdentifier]) {
|
||||
_appIdentifier = [liveIdentifier copy];
|
||||
}
|
||||
else {
|
||||
@ -178,10 +178,10 @@
|
||||
|
||||
#pragma mark - Private Instance Methods
|
||||
|
||||
- (BOOL)shouldUseLiveIdenfitier {
|
||||
- (BOOL)shouldUseLiveIdentifier {
|
||||
BOOL delegateResult = NO;
|
||||
if ([_delegate respondsToSelector:@selector(shouldUseLiveIdenfitier)]) {
|
||||
delegateResult = [(NSObject <BITHockeyManagerDelegate>*)_delegate shouldUseLiveIdenfitier];
|
||||
if ([_delegate respondsToSelector:@selector(shouldUseLiveIdentifier)]) {
|
||||
delegateResult = [(NSObject <BITHockeyManagerDelegate>*)_delegate shouldUseLiveIdentifier];
|
||||
}
|
||||
|
||||
return (delegateResult) || (_appStoreEnvironment);
|
||||
@ -201,7 +201,7 @@
|
||||
|
||||
BITHockeyLog(@"Setup UpdateManager");
|
||||
_updateManager = [[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_appStoreEnvironment];
|
||||
_crashManager.delegate = _delegate;
|
||||
_updateManager.delegate = _delegate;
|
||||
|
||||
// Only if JMC is part of the project
|
||||
if ([[self class] isJMCPresent]) {
|
||||
|
@ -46,13 +46,13 @@
|
||||
the App Store.
|
||||
|
||||
Example:
|
||||
- (BOOL)shouldUseLiveIdenfitier {
|
||||
- (BOOL)shouldUseLiveIdentifier {
|
||||
#ifdef (CONFIGURATION_Release)
|
||||
return YES;
|
||||
#endif
|
||||
return NO;
|
||||
}
|
||||
*/
|
||||
- (BOOL)shouldUseLiveIdenfitier;
|
||||
- (BOOL)shouldUseLiveIdentifier;
|
||||
|
||||
@end
|
@ -6,30 +6,35 @@ Pod::Spec.new do |s|
|
||||
s.summary = 'Distribute beta apps and collect crash reports with HockeyApp.'
|
||||
s.homepage = 'http://hockeyapp.net/'
|
||||
s.author = { 'Andreas Linde' => 'mail@andreaslinde.de', 'Thomas Dohmke' => "thomas@dohmke.de" }
|
||||
s.source = { :git => 'https://github.com/bitstadium/HockeySDK-iOS', :tag => '2.5.0' }
|
||||
s.source = { :git => 'https://github.com/bitstadium/HockeySDK-iOS.git', :tag => '2.5.1' }
|
||||
|
||||
s.description = 'HockeyApp is a server to distribute beta apps and collect crash reports. ' \
|
||||
'It improves the testing process dramatically and can be used for both beta ' \
|
||||
'and App Store builds. Only beta builds will notify users about a new version ' \
|
||||
'NOTE: You will need to add a dependency on JSONKit, SBJson or YAJL yourself. If you ' \
|
||||
'want the framework to try again when a network is available, add a dependency ' \
|
||||
s.description = 'HockeyApp is a server to distribute beta apps and collect crash reports. ' \
|
||||
'It improves the testing process dramatically and can be used for both beta ' \
|
||||
'and App Store builds. Only beta builds will notify users about a new version ' \
|
||||
'NOTE: You will need to add a dependency on JSONKit, SBJson or YAJL yourself. If you ' \
|
||||
'want the framework to try again when a network is available, add a dependency ' \
|
||||
'on Reachability and send a notification with the name `BITHockeyNetworkDidBecomeReachable` ' \
|
||||
'yourself when the network becomse reachable.'
|
||||
|
||||
s.source_files = 'Classes'
|
||||
s.requires_arc = false
|
||||
s.resources = 'Resources/HockeySDKResources.bundle'
|
||||
s.frameworks = 'QuartzCore', 'SystemConfiguration', 'CrashReporter', 'CoreGraphics.framework', 'UIKit.framework'
|
||||
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(BUILT_PRODUCTS_DIR)/Pods/Frameworks"' }
|
||||
s.preserve_paths = 'Resources', 'Support', 'Vendor'
|
||||
s.frameworks = 'QuartzCore', 'SystemConfiguration', 'CrashReporter', 'CoreGraphics', 'UIKit'
|
||||
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(PODS_ROOT)/HockeySDK/Vendor"',
|
||||
'GCC_PREPROCESSOR_DEFINITIONS' => %{BITHOCKEY_VERSION="@\\"#{s.version}\\""} }
|
||||
|
||||
def s.post_install(target_installer)
|
||||
# Add a copy build phase and make it copy the CrashReporter.framework to the shared BUILT_PRODUCTS_DIR,
|
||||
# so that both the Pods project and the user's project will pick it up.
|
||||
phase = target_installer.target.buildPhases.add(Xcodeproj::Project::PBXCopyFilesBuildPhase, 'dstPath' => 'Pods/Frameworks')
|
||||
file = target_installer.project.main_group.files.new('path' => 'HockeySDK/Vendor/CrashReporter.framework')
|
||||
phase.files << file.buildFiles.new
|
||||
phases = target_installer.target.attributes['buildPhases']
|
||||
phases.delete(phase.uuid)
|
||||
phases.insert(1, phase.uuid)
|
||||
end
|
||||
end
|
||||
puts "\nGenerating HockeySDK resources bundle\n".yellow if config.verbose?
|
||||
Dir.chdir File.join(config.project_pods_root, 'HockeySDK/Support') do
|
||||
command = "xcodebuild -project HockeySDK.xcodeproj -target HockeySDKResources CONFIGURATION_BUILD_DIR=../Resources"
|
||||
command << " 2>&1 > /dev/null" unless config.verbose?
|
||||
unless system(command)
|
||||
raise ::Pod::Informative, "Failed to generate HockeySDK resources bundle"
|
||||
end
|
||||
end
|
||||
File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
|
||||
file.puts "install_resource 'HockeySDK/Resources/HockeySDKResources.bundle'"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
14
README.md
14
README.md
@ -38,7 +38,19 @@ This documentation provides integrated help in Xcode for all public APIs and a s
|
||||
|
||||
## Changelog
|
||||
|
||||
### Version 2.5
|
||||
### Version 2.5.1
|
||||
|
||||
- General:
|
||||
|
||||
- [BUGFIX] Typo in delegate `shouldUseLiveIdentifier` of `BITHockeyManagerDelegate`
|
||||
- [BUGFIX] Default updateManager delegate wasn't set
|
||||
|
||||
- Crash Reporting:
|
||||
|
||||
- [BUGFIX] Crash when developer sends the notification `BITHockeyNetworkDidBecomeReachableNotification`
|
||||
|
||||
|
||||
### Version 2.5.0
|
||||
|
||||
- General:
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
BUILD_NUMBER = 1
|
||||
VERSION_STRING = 2.5.0
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\"2.5.0\""
|
||||
BUILD_NUMBER = 2
|
||||
VERSION_STRING = 2.5.1
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\"2.5.1\""
|
||||
|
@ -1,3 +1,15 @@
|
||||
## Version 2.5.1
|
||||
|
||||
- General:
|
||||
|
||||
- [BUGFIX] Typo in delegate `shouldUseLiveIdentifier` of `BITHockeyManagerDelegate`
|
||||
- [BUGFIX] Default updateManager delegate wasn't set
|
||||
|
||||
- Crash Reporting:
|
||||
|
||||
- [BUGFIX] Crash when developer sends the notification `BITHockeyNetworkDidBecomeReachableNotification`
|
||||
|
||||
|
||||
## Version 2.5
|
||||
|
||||
- General:
|
||||
|
@ -100,6 +100,12 @@ Now follow the steps described in our [setup guide](http://support.hockeyapp.net
|
||||
|
||||
After you have finished the setup guide make sure everything works as expected and then delete the out commented lines from above.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### ld: warning: directory not found for option '....QuincyKit.....'
|
||||
|
||||
This warning means there is still a `Framework Search Path` pointing to the folder of the old SDK. Open the `Project Navigator` (⌘+1) and go to the tab `Build Settings`. In the search field enter the name of the folder mentioned in the warning (for example "QuincyKit") . If the search finds something in `Framework Search Paths` you should double click that entry and remove the line which points to the old folder.
|
||||
|
||||
## Advanced Migration
|
||||
|
||||
If you used any optional API calls, for example adding a custom description to a crash report, migrating those would exceed the scope of this guide. Please have a look at the [API documentation](https://github.com/bitstadium/HockeySDK-iOS/downloads).
|
||||
|
Loading…
x
Reference in New Issue
Block a user