Skip to content
Permalink
Browse files

Update submodules

  • Loading branch information...
Peter
Peter committed Mar 14, 2019
1 parent e2e0c30 commit f5880c1a3c63a77179f1c4790716da0bc7e3a6c0
@@ -33,17 +33,3 @@ beta_testflight:
- fastlane testflight_llc
environment:
name: testflight_llc

beta_hockeyapp:
tags:
- ios
stage: build
only:
- beta
except:
- tags
script:
- sh ~/ios-prepare-build.sh $CI_PROJECT_DIR/..
- fastlane hockeyapp
environment:
name: hockeyapp

Large diffs are not rendered by default.

This file was deleted.

@@ -1076,8 +1076,8 @@ private final class SharedApplicationContext {
}
})

if !BuildConfig.shared().hockeyAppId.isEmpty {
BITHockeyManager.shared().configure(withIdentifier: BuildConfig.shared().hockeyAppId, delegate: self)
if let hockeyAppId = BuildConfig.shared().hockeyAppId, !hockeyAppId.isEmpty {
BITHockeyManager.shared().configure(withIdentifier: hockeyAppId, delegate: self)
BITHockeyManager.shared().crashManager.crashManagerStatus = .alwaysAsk
BITHockeyManager.shared().start()
BITHockeyManager.shared().authenticator.authenticateInstallation()
@@ -4,7 +4,7 @@

+ (instancetype _Nonnull)sharedBuildConfig;

@property (nonatomic, strong, readonly) NSString * _Nonnull hockeyAppId;
@property (nonatomic, strong, readonly) NSString * _Nullable hockeyAppId;
@property (nonatomic, readonly) int32_t apiId;
@property (nonatomic, strong, readonly) NSString * _Nonnull apiHash;
@property (nonatomic, readonly) bool isInternalBuild;
@@ -1,5 +1,13 @@
#import "BuildConfig.h"

@interface BuildConfig () {
int32_t _apiId;
NSString * _Nonnull _apiHash;
NSString * _Nullable _hockeyAppId;
}

@end

@implementation BuildConfig

+ (instancetype _Nonnull)sharedBuildConfig {
@@ -11,16 +19,80 @@ + (instancetype _Nonnull)sharedBuildConfig {
return instance;
}

- (instancetype)init {
self = [super init];
if (self != nil) {
char buf[3];
buf[2] = '\0';
NSString *hex = @(APP_CONFIG_DATA);
assert(0 == [hex length] % 2);
unsigned char *bytes = malloc([hex length]/2);
unsigned char *bp = bytes;
for (CFIndex i = 0; i < [hex length]; i += 2) {
buf[0] = [hex characterAtIndex:i];
buf[1] = [hex characterAtIndex:i+1];
char *b2 = NULL;
*bp++ = strtol(buf, &b2, 16);
assert(b2 == buf + 2);
}

NSMutableData *data = [NSMutableData dataWithBytesNoCopy:bytes length:[hex length]/2 freeWhenDone:YES];
if ([data length] == 0) {
assert(false);
}

const char *streamCode = "Cypher";
int keyLength = (int)strlen(streamCode);
int keyOffset = 0;
for (NSUInteger i = 0; i < data.length; i++) {
((uint8_t *)data.mutableBytes)[i] ^= ((uint8_t *)streamCode)[keyOffset % keyLength];
keyOffset += 1;
}

int offset = 0;
uint32_t header = 0;
[data getBytes:&header range:NSMakeRange(offset, 4)];
offset += 4;
if (header != 0xabcdef01U) {
assert(false);
}

[data getBytes:&_apiId range:NSMakeRange(offset, 4)];
offset += 4;

int32_t apiHashLength = 0;
[data getBytes:&apiHashLength range:NSMakeRange(offset, 4)];
offset += 4;

if (apiHashLength > 0) {
_apiHash = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(offset, apiHashLength)] encoding:NSUTF8StringEncoding];
offset += apiHashLength;
} else {
assert(false);
}

int32_t hockeyappIdLength = 0;
[data getBytes:&hockeyappIdLength range:NSMakeRange(offset, 4)];
offset += 4;

if (hockeyappIdLength > 0) {
_hockeyAppId = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(offset, hockeyappIdLength)] encoding:NSUTF8StringEncoding];
offset += hockeyappIdLength;
}
}
return self;
}

- (int32_t)apiId {
return APP_CONFIG_API_ID;
return _apiId;
}

- (NSString * _Nonnull)apiHash {
return @(APP_CONFIG_API_HASH);
return _apiHash;
}

- (NSString * _Nonnull)hockeyAppId {
return @(APP_CONFIG_HOCKEYAPPID);
- (NSString * _Nullable)hockeyAppId {
return _hockeyAppId;
}

- (bool)isInternalBuild {

This file was deleted.

@@ -1 +1,63 @@
fastlane_version "1.81.0"

default_platform :ios

base_app_identifier_llc = "ph.telegra.Telegraph"
app_identifier_llc = [
base_app_identifier_llc,
base_app_identifier_llc + ".Widget",
base_app_identifier_llc + ".NotificationContent",
base_app_identifier_llc + ".SiriIntents",
base_app_identifier_llc + ".Share",
base_app_identifier_llc + ".watchkitapp",
base_app_identifier_llc + ".watchkitapp.watchkitextension",
base_app_identifier_llc + ".NotificationService"
]

lane :do_build_app do |options|
gym(
workspace: "Telegram-iOS.xcworkspace",
configuration: options[:configuration],
scheme: options[:scheme],
silent: false,
clean: true,
export_method: options[:export_method],
output_name: options[:scheme],
derived_data_path: "build/" + options[:scheme] + "/DerivedData",
xcargs: "BUILD_NUMBER='" + options[:build_number] + "' " + "COMMIT_ID='" + options[:commit_id] + "'",
archive_path: "build/" + options[:scheme] + "/Archive",
export_options: {
compileBitcode: false,
iCloudContainerEnvironment: "Production",
provisioningProfiles: options[:provisioningProfiles],
stripSwiftSymbols: true,
uploadBitcode: false
}
)
end

lane :build_for_appstore do |options|
commit = last_git_commit
commit_count = sh("git rev-list --count HEAD")
commit_count_int = commit_count.to_i + 1000
commit_count_string = commit_count_int.to_s
do_build_app(
configuration: "ReleaseAppStoreLLC",
scheme: "Telegram-iOS-AppStoreLLC",
export_method: "app-store",
build_number: commit_count_string,
commit_id: commit[:commit_hash],
provisioningProfiles: {
base_app_identifier_llc => "match AppStore " + base_app_identifier_llc,
base_app_identifier_llc + ".Share" => "match AppStore " + base_app_identifier_llc + ".Share",
base_app_identifier_llc + ".SiriIntents" => "match AppStore " + base_app_identifier_llc + ".SiriIntents",
base_app_identifier_llc + ".Widget" => "match AppStore " + base_app_identifier_llc + ".Widget",
base_app_identifier_llc + ".NotificationContent" => "match AppStore " + base_app_identifier_llc + ".NotificationContent",
base_app_identifier_llc + ".watchkitapp.watchkitextension" => "match AppStore " + base_app_identifier_llc + ".watchkitapp.watchkitextension",
base_app_identifier_llc + ".watchkitapp" => "match AppStore " + base_app_identifier_llc + ".watchkitapp",
base_app_identifier_llc + ".NotificationService" => "match AppStore " + base_app_identifier_llc + ".NotificationService"
}
)
end

import "../../Telegram-iOS-Shared/fastlane/Fastfile"
Submodule TelegramUI updated from cba978 to 5b04bb

1 comment on commit f5880c1

@shivanraptor

This comment has been minimized.

Copy link

commented on f5880c1 Mar 26, 2019

What should be the value of APP_CONFIG_DATA for Telegram-Fork?

Please sign in to comment.
You can’t perform that action at this time.