mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Build scripts
This commit is contained in:
parent
2d1edc9f4a
commit
d04bde4030
@ -44,6 +44,8 @@ BUILD_CONFIGURATION="$1"
|
||||
|
||||
if [ "$BUILD_CONFIGURATION" == "hockeyapp" ]; then
|
||||
CODESIGNING_SUBPATH="transient-data/codesigning"
|
||||
elif [ "$BUILD_CONFIGURATION" == "testinghockeyapp" ]; then
|
||||
CODESIGNING_SUBPATH="transient-data/codesigning"
|
||||
elif [ "$BUILD_CONFIGURATION" == "appstore" ]; then
|
||||
CODESIGNING_SUBPATH="transient-data/codesigning"
|
||||
elif [ "$BUILD_CONFIGURATION" == "verify" ]; then
|
||||
@ -65,7 +67,7 @@ fi
|
||||
|
||||
BASE_DIR=$(pwd)
|
||||
|
||||
if [ "$BUILD_CONFIGURATION" == "hockeyapp" ] || [ "$BUILD_CONFIGURATION" == "appstore" ]; then
|
||||
if [ "$BUILD_CONFIGURATION" == "hockeyapp" ] || [ "$BUILD_CONFIGURATION" == "testinghockeyapp" ] || [ "$BUILD_CONFIGURATION" == "appstore" ]; then
|
||||
if [ ! `which setup-telegram-build.sh` ]; then
|
||||
echo "setup-telegram-build.sh not found in PATH $PATH"
|
||||
exit 1
|
||||
|
@ -10,10 +10,14 @@ if [ -z "COMMIT_ID" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" == "hockeyapp" ]; then
|
||||
if [ "$1" == "hockeyapp" ] || [ "$1" == "testinghockeyapp" ]; then
|
||||
FASTLANE_BUILD_CONFIGURATION="internalhockeyapp"
|
||||
CERTS_PATH="codesigning_data/certs"
|
||||
PROFILES_PATH="codesigning_data/profiles"
|
||||
elif [ "$1" == "testinghockeyapp-local" ]; then
|
||||
FASTLANE_BUILD_CONFIGURATION="testinghockeyapp"
|
||||
CERTS_PATH="codesigning_data/certs"
|
||||
PROFILES_PATH="codesigning_data/profiles"
|
||||
elif [ "$1" == "appstore" ]; then
|
||||
FASTLANE_BUILD_CONFIGURATION="testflight_llc"
|
||||
if [ -z "$TELEGRAM_BUILD_APPSTORE_PASSWORD" ]; then
|
||||
|
@ -36,14 +36,14 @@ using tonlib_api::make_object;
|
||||
|
||||
@interface TONReceiveThreadParams : NSObject
|
||||
|
||||
@property (nonatomic, readonly) tonlib::Client *client;
|
||||
@property (nonatomic, readonly) std::shared_ptr<tonlib::Client> client;
|
||||
@property (nonatomic, copy, readonly) void (^received)(tonlib::Client::Response &);
|
||||
|
||||
@end
|
||||
|
||||
@implementation TONReceiveThreadParams
|
||||
|
||||
- (instancetype)initWithClient:(tonlib::Client *)client received:(void (^)(tonlib::Client::Response &))received {
|
||||
- (instancetype)initWithClient:(std::shared_ptr<tonlib::Client>)client received:(void (^)(tonlib::Client::Response &))received {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
_client = client;
|
||||
@ -85,7 +85,7 @@ using tonlib_api::make_object;
|
||||
@end
|
||||
|
||||
@interface TON () {
|
||||
tonlib::Client *_client;
|
||||
std::shared_ptr<tonlib::Client> _client;
|
||||
uint64_t _nextRequestId;
|
||||
NSLock *_requestHandlersLock;
|
||||
NSMutableDictionary<NSNumber *, TONRequestHandler *> *_requestHandlers;
|
||||
@ -114,7 +114,7 @@ using tonlib_api::make_object;
|
||||
_initialized.sink(@false);
|
||||
_nextRequestId = 1;
|
||||
|
||||
_client = new tonlib::Client;
|
||||
_client = std::make_shared<tonlib::Client>();
|
||||
|
||||
NSLock *requestHandlersLock = _requestHandlersLock;
|
||||
NSMutableDictionary *requestHandlers = _requestHandlers;
|
||||
@ -139,10 +139,6 @@ using tonlib_api::make_object;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
delete _client;
|
||||
}
|
||||
|
||||
- (MTSignal *)requestInitWithConfigString:(NSString *)configString keystoreDirectory:(NSString *)keystoreDirectory {
|
||||
return [[[[MTSignal alloc] initWithGenerator:^id<MTDisposable>(MTSubscriber *subscriber) {
|
||||
uint64_t requestId = _nextRequestId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user