mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Add SDK version number to source and send it to the server, together with the SDK name
This commit is contained in:
parent
b9efccfbc6
commit
50e028c9ae
@ -40,6 +40,9 @@
|
||||
#define BETA_UPDATE_TIMESTAMP @"timestamp"
|
||||
#define BETA_UPDATE_APPSIZE @"appsize"
|
||||
|
||||
#define SDK_NAME @"HockeySDK"
|
||||
#define SDK_VERSION @"2.2.4"
|
||||
|
||||
@interface BWHockeyManager ()
|
||||
- (NSString *)getDevicePlatform_;
|
||||
- (id)parseJSONResultString:(NSString *)jsonString;
|
||||
@ -734,9 +737,11 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
|
||||
- (void)checkForAuthorization {
|
||||
NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@", [self encodedAppIdentifier_]];
|
||||
|
||||
[parameter appendFormat:@"?format=json&authorize=yes&app_version=%@&udid=%@",
|
||||
[parameter appendFormat:@"?format=json&authorize=yes&app_version=%@&udid=%@&sdk=%@&sdk_version=%@",
|
||||
[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] bw_URLEncodedString],
|
||||
([self isAppStoreEnvironment] ? @"appstore" : [[self deviceIdentifier] bw_URLEncodedString])
|
||||
([self isAppStoreEnvironment] ? @"appstore" : [[self deviceIdentifier] bw_URLEncodedString]),
|
||||
SDK_NAME,
|
||||
SDK_VERSION
|
||||
];
|
||||
|
||||
// build request & send
|
||||
|
@ -35,6 +35,9 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <inttypes.h> //needed for PRIx64 macro
|
||||
|
||||
#define SDK_NAME @"HockeySDK"
|
||||
#define SDK_VERSION @"2.2.4"
|
||||
|
||||
NSBundle *quincyBundle(void) {
|
||||
static NSBundle* bundle = nil;
|
||||
if (!bundle) {
|
||||
@ -606,11 +609,13 @@ NSString *BWQuincyLocalize(NSString *stringToken) {
|
||||
|
||||
if (self.appIdentifier) {
|
||||
request = [NSMutableURLRequest requestWithURL:
|
||||
[NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes",
|
||||
self.submissionURL,
|
||||
[self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
|
||||
]
|
||||
]];
|
||||
[NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes?sdk=%@&sdk_version=%@",
|
||||
self.submissionURL,
|
||||
[self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
|
||||
SDK_NAME,
|
||||
SDK_VERSION
|
||||
]
|
||||
]];
|
||||
} else {
|
||||
request = [NSMutableURLRequest requestWithURL:url];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user