Merge branch 'master' into compressed-animations

This commit is contained in:
Peter 2019-06-21 12:31:22 +02:00
commit 05425b680a
360 changed files with 6446 additions and 11348 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
Telegram-iOS/BlackFilledIconIpad@2x.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

0
Telegram-iOS/BlackIconIpad.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
Telegram-iOS/BlackIconIpad@2x.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

0
Telegram-iOS/BlackIconLargeIpad@2x.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
Telegram-iOS/BlueIconIpad.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
Telegram-iOS/BlueIconIpad@2x.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
Telegram-iOS/BlueIconLargeIpad@2x.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -3,109 +3,109 @@
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon1@40x40-1.png",
"filename" : "Simple@40x40.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon1@60x60.png",
"filename" : "Simple@60x60.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon1@58x58.png",
"filename" : "Simple@58x58.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon1@87x87.png",
"filename" : "Simple@87x87.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon1@80x80.png",
"filename" : "Simple@80x80.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon1@120x120.png",
"filename" : "BlueIcon@2x-1.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon1@120x120-1.png",
"filename" : "BlueIcon@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon1@180x180.png",
"filename" : "BlueIcon@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon1@20x20.png",
"filename" : "Simple@20x20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon1@40x40.png",
"filename" : "Simple@40x40-2.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon1@29x29.png",
"filename" : "Simple@29x29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon1@58x58-1.png",
"filename" : "Simple@58x58-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon1@40x40-2.png",
"filename" : "Simple@40x40-1.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon1@80x80-1.png",
"filename" : "Simple@80x80-1.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon1@76x76.png",
"filename" : "BlueIconIpad.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon1@152x152.png",
"filename" : "BlueIconIpad@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon1@167x167.png",
"filename" : "BlueIconLargeIpad@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon1-iTunesArtwork.png",
"filename" : "Simple-iTunesArtwork.png",
"scale" : "1x"
}
],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -1532,7 +1532,7 @@
"Forward.ChannelReadOnly" = "Sorry, you can't post to this channel.";
"Channel.ErrorAccessDenied" = "Sorry, this channel is private.";
"Group.ErrorAccessDenied" = "Sorry, this channel is private.";
"Group.ErrorAccessDenied" = "Sorry, this group is private.";
"Conversation.InputTextBroadcastPlaceholder" = "Broadcast";
"Channel.NotificationLoading" = "Loading...";
@ -4387,6 +4387,7 @@ Any member of this group will be able to see messages in the channel.";
"Channel.OwnershipTransfer.ChangeOwner" = "Change Owner";
"Channel.OwnershipTransfer.ErrorPublicChannelsTooMuch" = "Sorry, the target user has too many public groups or channels already. Please ask them to make one of their existing groups or channels private first.";
"Group.OwnershipTransfer.ErrorLocatedGroupsTooMuch" = "Sorry, the target user has too many location-based groups already. Please ask them to delete or transfer one of their existing ones first.";
"Group.OwnershipTransfer.ErrorAdminsTooMuch" = "Sorry, this group has too many admins and the new owner can't be added. Please remove one of the existing admins first.";
"Channel.OwnershipTransfer.ErrorAdminsTooMuch" = "Sorry, this channel has too many admins and the new owner can't be added. Please remove one of the existing admins first.";
@ -4403,12 +4404,12 @@ Any member of this group will be able to see messages in the channel.";
"Contacts.AddPeopleNearby" = "Add People Nearby";
"PeopleNearby.Title" = "People Nearby";
"PeopleNearby.Description" = "Use this section to quickly find people and groups near you.";
"PeopleNearby.Users" = "People Around You";
"PeopleNearby.UsersEmpty" = "No one else is viewing \"People Nearby\" around you now";
"PeopleNearby.Groups" = "Groups Around You";
"PeopleNearby.CreateGroup" = "Start a Group Chat Here";
"PeopleNearby.Channels" = "Channels Around You";
"PeopleNearby.Description" = "Ask your friend nearby to open this page to exchange phone numbers.";
"PeopleNearby.Users" = "People Nearby";
"PeopleNearby.UsersEmpty" = "Looking for users around you...";
"PeopleNearby.Groups" = "Groups Nearby";
"PeopleNearby.CreateGroup" = "Create a Group Here";
"PeopleNearby.NoMembers" = "no members";
"Channel.Management.LabelOwner" = "Owner";
"Channel.Management.LabelAdministrator" = "Administrator";
@ -4417,18 +4418,13 @@ Any member of this group will be able to see messages in the channel.";
"Common.ActionNotAllowedError" = "Sorry, you are not allowed to do this.";
"Group.Location.Title" = "Location";
"Group.Location.SetLocation" = "Set Location";
"Group.Location.ChangeLocation" = "Change Location";
"Group.Location.RemoveLocation" = "Remove Location";
"Group.Location.Info" = "People will be able to find your group in the Groups Nearby section (Contacts > Add People Nearby).";
"Group.Username.Title" = "Username";
"Group.Location.Info" = "People can find your group using People Nearby section.";
"Channel.AdminLog.MessageTransferedName" = "transferred ownership to %1$@";
"Channel.AdminLog.MessageTransferedNameUsername" = "transferred ownership to %1$@ (%2$@)";
"Channel.AdminLog.MessageChangedGroupGeoLocation" = "changed group location to \"%@\"";
"Channel.AdminLog.MessageRemovedGroupGeoLocation" = "%@ removed group location";
"Map.SetThisLocation" = "Set This Location";
@ -4437,9 +4433,24 @@ Any member of this group will be able to see messages in the channel.";
"Permissions.PeopleNearbyAllow.v0" = "Allow Access";
"Permissions.PeopleNearbyAllowInSettings.v0" = "Allow in Settings";
"Conversation.ReportGroupLocation" = "Group unrelated to tocation?";
"Conversation.ReportGroupLocation" = "Group unrelated to location?";
"ReportGroupLocation.Title" = "Report Unrelated Group";
"ReportGroupLocation.Text" = "Please tell us if this group is not related to this location.";
"ReportGroupLocation.Report" = "Report";
"Group.Setup.TypePublicWithLocationHelp" = "Public groups can be found in search, chat history is available to everyone and anyone can join.\n\nTo make your group public, set a username or add a location.";
"LocalGroup.Title" = "Create a Local Group";
"LocalGroup.Text" = "Anyone close to this location (neighbors, co-workers, fellow students, event attendees, visitors of a venue) will see your group in the People Nearby section.";
"LocalGroup.ButtonTitle" = "Start Group";
"LocalGroup.IrrelevantWarning" = "If you start an unrelated group at this location, you may get restricted in creating new location-based groups.";
"GroupInfo.Location" = "Location";
"GroupInfo.PublicLink" = "Public Link";
"GroupInfo.PublicLinkAdd" = "Add";
"Group.PublicLink.Title" = "Public Link";
"Group.PublicLink.Placeholder" = "link";
"Group.PublicLink.Info" = "People can share this link with others and find your group using Telegram search.\n\nYou can use **a-z**, **0-9** and underscores. Minimum length is **5** characters.";
"CreateGroup.ErrorLocatedGroupsTooMuch" = "Sorry, you have too many location-based groups already. Please delete one of your existing ones first.";
"GroupInfo.LabelOwner" = "owner";

View File

@ -25,7 +25,7 @@ final class AlertControllerNode: ASDisplayNode {
let dimColor = UIColor(white: 0.0, alpha: 0.5)
self.centerDimView = UIImageView()
self.centerDimView.image = generateStretchableFilledCircleImage(radius: 16.0, color: nil, backgroundColor: dimColor)
self.centerDimView.backgroundColor = dimColor
self.topDimView = UIView()
self.topDimView.backgroundColor = dimColor
@ -95,11 +95,17 @@ final class AlertControllerNode: ASDisplayNode {
self.bottomDimView.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.3)
self.leftDimView.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.3)
self.rightDimView.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.3)
self.containerNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.25)
self.containerNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.25, completion: { [weak self] _ in
self?.centerDimView.backgroundColor = nil
self?.centerDimView.image = generateStretchableFilledCircleImage(radius: 16.0, color: nil, backgroundColor: UIColor(white: 0.0, alpha: 0.5))
})
self.containerNode.layer.animateSpring(from: 0.8 as NSNumber, to: 1.0 as NSNumber, keyPath: "transform.scale", duration: 0.5, initialVelocity: 0.0, removeOnCompletion: true, additive: false, completion: nil)
}
func animateOut(completion: @escaping () -> Void) {
self.centerDimView.backgroundColor = UIColor(white: 0.0, alpha: 0.5)
self.centerDimView.image = nil
self.centerDimView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false)
self.topDimView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false)
self.bottomDimView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.3, removeOnCompletion: false)

View File

@ -14,7 +14,7 @@ typedef enum {
@interface TGLocationPickerController : TGLocationMapViewController
@property (nonatomic, copy) void (^locationPicked)(CLLocationCoordinate2D coordinate, TGVenueAttachment *venue);
@property (nonatomic, copy) void (^locationPicked)(CLLocationCoordinate2D coordinate, TGVenueAttachment *venue, NSString *address);
@property (nonatomic, copy) SSignal *(^nearbyPlacesSignal)(NSString *query, CLLocation *coordinate);

View File

@ -340,12 +340,14 @@ const CGPoint TGLocationPickerPinOffset = { 0.0f, 33.0f };
- (void)_sendLocation
{
_tableView.userInteractionEnabled = false;
CLLocationCoordinate2D coordinate = _currentUserLocation.coordinate;
if (_mapInFullScreenMode)
coordinate = [self mapCenterCoordinateForPickerPin];
if (self.locationPicked != nil)
self.locationPicked(coordinate, nil);
self.locationPicked(coordinate, nil, _customAddress);
}
- (void)searchButtonPressed
@ -520,7 +522,7 @@ const CGPoint TGLocationPickerPinOffset = { 0.0f, 33.0f };
NSString *address = @"";
if (result != nil)
address = result.displayAddress;
address = result.fullAddress;
strongSelf->_customAddress = address;
[strongSelf updateCurrentLocationCell];
@ -662,9 +664,9 @@ const CGPoint TGLocationPickerPinOffset = { 0.0f, 33.0f };
_ownLocationView.hidden = true;
_pickerPinWrapper.hidden = false;
if (_intent != TGLocationPickerControllerCustomLocationIntent) {
//if (_intent != TGLocationPickerControllerCustomLocationIntent) {
[_pickerPinView setCustomPin:true animated:true];
}
//}
_mapView.tapEnabled = false;
_mapView.longPressAsTapEnabled = false;
@ -1128,7 +1130,7 @@ const CGPoint TGLocationPickerPinOffset = { 0.0f, 33.0f };
}
if (self.locationPicked != nil)
self.locationPicked(venue.coordinate, [venue venueAttachment]);
self.locationPicked(venue.coordinate, [venue venueAttachment], _customAddress);
}
}

View File

@ -435,6 +435,7 @@ NSString *const TGLocationPinAnnotationKind = @"TGLocationPinAnnotation";
- (void)setPinRaised:(bool)raised avatar:(bool)avatar animated:(bool)animated completion:(void (^)(void))completion
{
_pinRaised = raised;
avatar = false;
[_shadowView.layer removeAllAnimations];
if (iosMajorVersion() < 7)
@ -491,6 +492,9 @@ NSString *const TGLocationPinAnnotationKind = @"TGLocationPinAnnotation";
_iconView.image = image;
[_backgroundView addSubview:_avatarView];
_avatarView.center = CGPointMake(_backgroundView.frame.size.width / 2.0f, _backgroundView.frame.size.height / 2.0f - 5.0f);
_shadowView.center = CGPointMake(TGScreenPixel, -36.0f);
_backgroundView.center = CGPointMake(_shadowView.frame.size.width / 2.0f, _shadowView.frame.size.height / 2.0f);
_iconView.center = CGPointMake(_shadowView.frame.size.width / 2.0f, _shadowView.frame.size.height / 2.0f - 5.0f);
TGDispatchAfter(0.01, dispatch_get_main_queue(), ^
{
@ -504,8 +508,11 @@ NSString *const TGLocationPinAnnotationKind = @"TGLocationPinAnnotation";
if (!customPin)
[self addSubview:_avatarView];
_animating = false;
[self setNeedsLayout];
}];
});
[self setNeedsLayout];
}
else
{

View File

@ -15,6 +15,8 @@
@property (nonatomic, readonly) NSString *district;
@property (nonatomic, readonly) NSString *street;
@property (nonatomic, readonly) NSString *fullAddress;
+ (TGLocationReverseGeocodeResult *)reverseGeocodeResultWithDictionary:(NSDictionary *)dictionary;
+ (TGLocationReverseGeocodeResult *)reverseGeocodeResultWithPlacemark:(CLPlacemark *)placemark;

View File

@ -70,4 +70,16 @@
return nil;
}
- (NSString *)fullAddress
{
NSMutableArray *components = [[NSMutableArray alloc] init];
if (self.street.length > 0)
[components addObject:self.street];
if (self.city.length > 0)
[components addObject:self.city];
if (self.country.length > 0)
[components addObject:self.country];
return [components componentsJoinedByString:@", "];
}
@end

View File

@ -3088,6 +3088,253 @@
};
name = DebugFork;
};
D0364D4722B3E35B002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_MODULES_AUTOLINK = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
SDKROOT = iphoneos;
};
name = HockeyappMacAlpha;
};
D0364D4822B3E35B002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/Telegraph-dzhgyeoibunjpxfckifwvbawfdmi/Build/Products/Debug-iphoneos",
);
GCC_NO_COMMON_BLOCKS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MtProtoKitiOS/MtProtoKit-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(PROJECT_DIR)/openssl",
);
INFOPLIST_FILE = MtProtoKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/openssl/iOS",
);
MACH_O_TYPE = staticlib;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "-lz";
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_MODULE_NAME = MtProtoKit;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = X834Q8SBVP/;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = HockeyappMacAlpha;
};
D0364D4922B3E35B002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_VERSION = A;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
"BETA=1",
);
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
INFOPLIST_FILE = MtProtoKitMac/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/openssl/OSX",
);
MACH_O_TYPE = mh_dylib;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-DMtProtoKitMacFramework=1";
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = HockeyappMacAlpha;
};
D0364D4A22B3E35B002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEPLOYMENT_POSTPROCESSING = NO;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/thirdparty",
);
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/openssl";
INFOPLIST_FILE = MtProtoKitDynamic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/openssl/iOS",
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-DMtProtoKitDynamicFramework=1";
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SEPARATE_STRIP = NO;
SKIP_INSTALL = YES;
STRIPFLAGS = "";
STRIP_STYLE = debugging;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = HockeyappMacAlpha;
};
D0364D4B22B3E35B002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_UNREACHABLE_CODE = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = MtProtoKitDynamicTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = HockeyappMacAlpha;
};
D0364D4C22B3E35B002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_UNREACHABLE_CODE = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = MtProtoKitStabilityTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.MtProtoKitStabilityTests;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = HockeyappMacAlpha;
};
D05A833A18AFB3F9007F1076 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -5354,6 +5601,7 @@
buildConfigurations = (
D003546D1C173BF0006610DA /* Debug */,
D079FD151F06BE440038FADE /* DebugHockeyapp */,
D0364D4C22B3E35B002A6EF0 /* HockeyappMacAlpha */,
D021D501219CB1CD0064BEBA /* DebugFork */,
D0DB57B51E5C4B470071854C /* DebugAppStore */,
D0ADF92D212B3ACC00310BBC /* DebugAppStoreLLC */,
@ -5374,6 +5622,7 @@
buildConfigurations = (
D05A833A18AFB3F9007F1076 /* Debug */,
D079FD101F06BE440038FADE /* DebugHockeyapp */,
D0364D4722B3E35B002A6EF0 /* HockeyappMacAlpha */,
D021D4FC219CB1CD0064BEBA /* DebugFork */,
D0DB57B01E5C4B470071854C /* DebugAppStore */,
D0ADF928212B3ACC00310BBC /* DebugAppStoreLLC */,
@ -5394,6 +5643,7 @@
buildConfigurations = (
D079ABAA1AF39B8000076F59 /* Debug */,
D079FD121F06BE440038FADE /* DebugHockeyapp */,
D0364D4922B3E35B002A6EF0 /* HockeyappMacAlpha */,
D021D4FE219CB1CD0064BEBA /* DebugFork */,
D0DB57B21E5C4B470071854C /* DebugAppStore */,
D0ADF92A212B3ACC00310BBC /* DebugAppStoreLLC */,
@ -5414,6 +5664,7 @@
buildConfigurations = (
D0CB060A1ADC4483005E298F /* Debug */,
D079FD111F06BE440038FADE /* DebugHockeyapp */,
D0364D4822B3E35B002A6EF0 /* HockeyappMacAlpha */,
D021D4FD219CB1CD0064BEBA /* DebugFork */,
D0DB57B11E5C4B470071854C /* DebugAppStore */,
D0ADF929212B3ACC00310BBC /* DebugAppStoreLLC */,
@ -5434,6 +5685,7 @@
buildConfigurations = (
D0D2251E1B4D817B0085E26D /* Debug */,
D079FD131F06BE440038FADE /* DebugHockeyapp */,
D0364D4A22B3E35B002A6EF0 /* HockeyappMacAlpha */,
D021D4FF219CB1CD0064BEBA /* DebugFork */,
D0DB57B31E5C4B470071854C /* DebugAppStore */,
D0ADF92B212B3ACC00310BBC /* DebugAppStoreLLC */,
@ -5454,6 +5706,7 @@
buildConfigurations = (
D0D225201B4D817B0085E26D /* Debug */,
D079FD141F06BE440038FADE /* DebugHockeyapp */,
D0364D4B22B3E35B002A6EF0 /* HockeyappMacAlpha */,
D021D500219CB1CD0064BEBA /* DebugFork */,
D0DB57B41E5C4B470071854C /* DebugAppStore */,
D0ADF92C212B3ACC00310BBC /* DebugAppStoreLLC */,

View File

@ -10,7 +10,7 @@ public struct MessageId: Hashable, Comparable, CustomStringConvertible {
public var description: String {
get {
return "\(namespace):\(id)"
return "\(namespace)_\(id)"
}
}

View File

@ -5,6 +5,13 @@ struct PeerIdAndNamespace: Hashable {
let namespace: MessageId.Namespace
}
private func canContainHoles(_ peerIdAndNamespace: PeerIdAndNamespace, seedConfiguration: SeedConfiguration) -> Bool {
guard let messageNamespaces = seedConfiguration.messageHoles[peerIdAndNamespace.peerId.namespace] else {
return false
}
return messageNamespaces[peerIdAndNamespace.namespace] != nil
}
private struct MessageMonthIndex: Equatable {
let year: Int32
let month: Int32
@ -279,7 +286,7 @@ private func isIndex(index: MessageIndex, closerTo anchor: HistoryViewAnchor, th
}
}
private func sampleHoleRanges(orderedEntriesBySpace: [PeerIdAndNamespace: OrderedHistoryViewEntries], holes: HistoryViewHoles, anchor: HistoryViewAnchor, tag: MessageTags?, halfLimit: Int) -> (clipRanges: [ClosedRange<MessageIndex>], sampledHole: SampledHistoryViewHole?) {
private func sampleHoleRanges(orderedEntriesBySpace: [PeerIdAndNamespace: OrderedHistoryViewEntries], holes: HistoryViewHoles, anchor: HistoryViewAnchor, tag: MessageTags?, halfLimit: Int, seedConfiguration: SeedConfiguration) -> (clipRanges: [ClosedRange<MessageIndex>], sampledHole: SampledHistoryViewHole?) {
var clipRanges: [ClosedRange<MessageIndex>] = []
var sampledHole: (distanceFromAnchor: Int?, hole: SampledHistoryViewHole)?
@ -287,6 +294,7 @@ private func sampleHoleRanges(orderedEntriesBySpace: [PeerIdAndNamespace: Ordere
if indices.isEmpty {
continue
}
assert(canContainHoles(space, seedConfiguration: seedConfiguration))
switch anchor {
case .lowerBound, .upperBound:
break
@ -628,11 +636,11 @@ struct OrderedHistoryViewEntries {
var lowerOrAtAnchor: [MutableMessageHistoryEntry]
var higherThanAnchor: [MutableMessageHistoryEntry]
mutating func fixMonotonity() {
mutating func fixMonotony() {
if self.lowerOrAtAnchor.count > 1 {
for i in 1 ..< self.lowerOrAtAnchor.count {
if self.lowerOrAtAnchor[i].index < self.lowerOrAtAnchor[i - 1].index {
//assertionFailure()
assertionFailure()
break
}
}
@ -640,7 +648,7 @@ struct OrderedHistoryViewEntries {
if self.higherThanAnchor.count > 1 {
for i in 1 ..< self.higherThanAnchor.count {
if self.higherThanAnchor[i].index < self.higherThanAnchor[i - 1].index {
// assertionFailure()
assertionFailure()
break
}
}
@ -664,7 +672,7 @@ struct OrderedHistoryViewEntries {
}
}
if fix {
//assertionFailure()
assertionFailure()
self.lowerOrAtAnchor.sort(by: { $0.index.id.id < $1.index.id.id })
self.higherThanAnchor.sort(by: { $0.index.id.id < $1.index.id.id })
}
@ -742,6 +750,7 @@ final class HistoryViewLoadedState {
let tag: MessageTags?
let statistics: MessageHistoryViewOrderStatistics
let halfLimit: Int
let seedConfiguration: SeedConfiguration
var orderedEntriesBySpace: [PeerIdAndNamespace: OrderedHistoryViewEntries]
var holes: HistoryViewHoles
var spacesWithRemovals = Set<PeerIdAndNamespace>()
@ -752,6 +761,7 @@ final class HistoryViewLoadedState {
self.tag = tag
self.statistics = statistics
self.halfLimit = halfLimit
self.seedConfiguration = postbox.seedConfiguration
self.orderedEntriesBySpace = [:]
self.holes = holes
@ -805,7 +815,7 @@ final class HistoryViewLoadedState {
if lowerOrAtAnchorMessages.count < self.halfLimit {
let nextLowerIndex: (index: MessageIndex, includeFrom: Bool)
if let lastMessage = lowerOrAtAnchorMessages.last {
if let lastMessage = lowerOrAtAnchorMessages.min(by: { $0.index < $1.index }) {
nextLowerIndex = (lastMessage.index, false)
} else {
nextLowerIndex = (anchorIndex, true)
@ -814,7 +824,7 @@ final class HistoryViewLoadedState {
}
if higherThanAnchorMessages.count < self.halfLimit {
let nextHigherIndex: MessageIndex
if let lastMessage = higherThanAnchorMessages.last {
if let lastMessage = higherThanAnchorMessages.max(by: { $0.index < $1.index }) {
nextHigherIndex = lastMessage.index
} else {
nextHigherIndex = anchorIndex
@ -872,15 +882,19 @@ final class HistoryViewLoadedState {
}
}
entries.fixMonotonity()
if canContainHoles(space, seedConfiguration: self.seedConfiguration) {
entries.fixMonotony()
}
self.orderedEntriesBySpace[space] = entries
}
func insertHole(space: PeerIdAndNamespace, range: ClosedRange<MessageId.Id>) -> Bool {
assert(canContainHoles(space, seedConfiguration: self.seedConfiguration))
return self.holes.insertHole(space: space, range: range)
}
func removeHole(space: PeerIdAndNamespace, range: ClosedRange<MessageId.Id>) -> Bool {
assert(canContainHoles(space, seedConfiguration: self.seedConfiguration))
return self.holes.removeHole(space: space, range: range)
}
@ -1097,7 +1111,7 @@ final class HistoryViewLoadedState {
self.spacesWithRemovals.removeAll()
}
let combinedSpacesAndIndicesByDirection = sampleEntries(orderedEntriesBySpace: self.orderedEntriesBySpace, anchor: self.anchor, halfLimit: self.halfLimit)
let (clipRanges, sampledHole) = sampleHoleRanges(orderedEntriesBySpace: self.orderedEntriesBySpace, holes: self.holes, anchor: self.anchor, tag: self.tag, halfLimit: self.halfLimit)
let (clipRanges, sampledHole) = sampleHoleRanges(orderedEntriesBySpace: self.orderedEntriesBySpace, holes: self.holes, anchor: self.anchor, tag: self.tag, halfLimit: self.halfLimit, seedConfiguration: self.seedConfiguration)
var holesToLower = false
var holesToHigher = false
@ -1164,20 +1178,22 @@ private func fetchHoles(postbox: Postbox, locations: MessageHistoryViewPeerIds,
var holesBySpace: [PeerIdAndNamespace: IndexSet] = [:]
var peerIds: [PeerId] = []
switch locations {
case let .single(peerId):
peerIds.append(peerId)
case let .associated(peerId, associatedId):
peerIds.append(peerId)
if let associatedId = associatedId {
peerIds.append(associatedId.peerId)
}
case let .single(peerId):
peerIds.append(peerId)
case let .associated(peerId, associatedId):
peerIds.append(peerId)
if let associatedId = associatedId {
peerIds.append(associatedId.peerId)
}
}
let holeSpace = tag.flatMap(MessageHistoryHoleSpace.tag) ?? .everywhere
for peerId in peerIds {
for namespace in postbox.messageHistoryHoleIndexTable.existingNamespaces(peerId: peerId, holeSpace: holeSpace) {
let indices = postbox.messageHistoryHoleIndexTable.closest(peerId: peerId, namespace: namespace, space: holeSpace, range: 1 ... (Int32.max - 1))
if !indices.isEmpty {
holesBySpace[PeerIdAndNamespace(peerId: peerId, namespace: namespace)] = indices
let peerIdAndNamespace = PeerIdAndNamespace(peerId: peerId, namespace: namespace)
assert(canContainHoles(peerIdAndNamespace, seedConfiguration: postbox.seedConfiguration))
holesBySpace[peerIdAndNamespace] = indices
}
}
}

View File

@ -1886,6 +1886,161 @@
};
name = DebugFork;
};
D0364D5122B3E385002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D07516491B2D9E2500AE42E0 /* Postbox.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = HockeyappMacAlpha;
};
D0364D5222B3E385002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D07516491B2D9E2500AE42E0 /* Postbox.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CODE_SIGN_STYLE = Manual;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Postbox/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = mh_dylib;
OTHER_CFLAGS = (
"-DSQLITE_HAS_CODEC=1",
"-DSQLCIPHER_CRYPTO_CC=1",
"-DSQLITE_ENABLE_FTS5",
"-DSQLITE_DEFAULT_MEMSTATUS=0",
"-DNDEBUG",
);
OTHER_SWIFT_FLAGS = "-DDEBUG";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
STRIP_SWIFT_SYMBOLS = YES;
SWIFT_COMPILATION_MODE = singlefile;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_REFLECTION_METADATA_LEVEL = all;
SWIFT_VERSION = 4.2;
};
name = HockeyappMacAlpha;
};
D0364D5322B3E385002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D07516491B2D9E2500AE42E0 /* Postbox.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"/Users/peter/Documents/PostBoxTest/submodules/SSignalKit/build/Debug-iphoneos",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = PostboxTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 3.0;
};
name = HockeyappMacAlpha;
};
D0364D5422B3E385002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
GCC_OPTIMIZATION_LEVEL = s;
INFOPLIST_FILE = PostboxMac/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/Postbox/module.private-mac.modulemap";
OTHER_CFLAGS = (
"-DSQLITE_HAS_CODEC=1",
"-DSQLCIPHER_CRYPTO_CC=1",
"-DSQLITE_ENABLE_FTS5",
"-DSQLITE_DEFAULT_MEMSTATUS=0",
"-DNDEBUG",
);
OTHER_SWIFT_FLAGS = "-DDEBUG";
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.PostboxMac;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.2;
};
name = HockeyappMacAlpha;
};
D079FD0C1F06BE070038FADE /* DebugAppStore */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D07516491B2D9E2500AE42E0 /* Postbox.xcconfig */;
@ -2769,6 +2924,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0B418181D7DFAF3004562A4 /* DebugHockeyapp */,
D0364D5422B3E385002A6EF0 /* HockeyappMacAlpha */,
D021D4FB219CB1B90064BEBA /* DebugFork */,
D079FD0F1F06BE070038FADE /* DebugAppStore */,
D0ADF927212B3AC400310BBC /* DebugAppStoreLLC */,
@ -2784,6 +2940,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0E3A75E1B28A7E300A402D9 /* DebugHockeyapp */,
D0364D5122B3E385002A6EF0 /* HockeyappMacAlpha */,
D021D4F8219CB1B90064BEBA /* DebugFork */,
D079FD0C1F06BE070038FADE /* DebugAppStore */,
D0ADF924212B3AC400310BBC /* DebugAppStoreLLC */,
@ -2799,6 +2956,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0E3A7611B28A7E300A402D9 /* DebugHockeyapp */,
D0364D5222B3E385002A6EF0 /* HockeyappMacAlpha */,
D021D4F9219CB1B90064BEBA /* DebugFork */,
D079FD0D1F06BE070038FADE /* DebugAppStore */,
D0ADF925212B3AC400310BBC /* DebugAppStoreLLC */,
@ -2814,6 +2972,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0E3A7641B28A7E300A402D9 /* DebugHockeyapp */,
D0364D5322B3E385002A6EF0 /* HockeyappMacAlpha */,
D021D4FA219CB1B90064BEBA /* DebugFork */,
D079FD0E1F06BE070038FADE /* DebugAppStore */,
D0ADF926212B3AC400310BBC /* DebugAppStoreLLC */,

View File

@ -1145,6 +1145,189 @@
};
name = DebugFork;
};
D0364D5522B3E38E002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = HockeyappMacAlpha;
};
D0364D5622B3E38E002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = YES;
INFOPLIST_FILE = SSignalKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = X834Q8SBVP/;
SKIP_INSTALL = YES;
};
name = HockeyappMacAlpha;
};
D0364D5722B3E38E002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = SSignalKitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-framework",
XCTest,
"-ObjC",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = HockeyappMacAlpha;
};
D0364D5822B3E38E002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
ARCHS = "$(ARCHS_STANDARD)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CODE_SIGN_STYLE = Manual;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = SwiftSignalKit/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_SWIFT_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_REFLECTION_METADATA_LEVEL = none;
SWIFT_VERSION = 4.0;
};
name = HockeyappMacAlpha;
};
D0364D5922B3E38E002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = SwiftSignalKitTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.telegram.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = HockeyappMacAlpha;
};
D0364D5A22B3E38E002A6EF0 /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = SwiftSignalKitMac/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.SwiftSignalKitMac;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
};
name = HockeyappMacAlpha;
};
D0445DEC1A7C2CA500267924 /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -2256,6 +2439,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0085B361B282B9800EAF753 /* DebugHockeyapp */,
D0364D5822B3E38E002A6EF0 /* HockeyappMacAlpha */,
D021D505219CB1D90064BEBA /* DebugFork */,
D0DB57B91E5C4B7A0071854C /* DebugAppStore */,
D0ADF931212B3AD400310BBC /* DebugAppStoreLLC */,
@ -2271,6 +2455,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0085B391B282B9800EAF753 /* DebugHockeyapp */,
D0364D5922B3E38E002A6EF0 /* HockeyappMacAlpha */,
D021D506219CB1D90064BEBA /* DebugFork */,
D0DB57BA1E5C4B7A0071854C /* DebugAppStore */,
D0ADF932212B3AD400310BBC /* DebugAppStoreLLC */,
@ -2286,6 +2471,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0445DEC1A7C2CA500267924 /* DebugHockeyapp */,
D0364D5522B3E38E002A6EF0 /* HockeyappMacAlpha */,
D021D502219CB1D90064BEBA /* DebugFork */,
D0DB57B61E5C4B7A0071854C /* DebugAppStore */,
D0ADF92E212B3AD400310BBC /* DebugAppStoreLLC */,
@ -2301,6 +2487,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0445DEF1A7C2CA500267924 /* DebugHockeyapp */,
D0364D5622B3E38E002A6EF0 /* HockeyappMacAlpha */,
D021D503219CB1D90064BEBA /* DebugFork */,
D0DB57B71E5C4B7A0071854C /* DebugAppStore */,
D0ADF92F212B3AD400310BBC /* DebugAppStoreLLC */,
@ -2316,6 +2503,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0445DF21A7C2CA500267924 /* DebugHockeyapp */,
D0364D5722B3E38E002A6EF0 /* HockeyappMacAlpha */,
D021D504219CB1D90064BEBA /* DebugFork */,
D0DB57B81E5C4B7A0071854C /* DebugAppStore */,
D0ADF930212B3AD400310BBC /* DebugAppStoreLLC */,
@ -2331,6 +2519,7 @@
isa = XCConfigurationList;
buildConfigurations = (
D0B417F31D7DFA63004562A4 /* DebugHockeyapp */,
D0364D5A22B3E38E002A6EF0 /* HockeyappMacAlpha */,
D021D507219CB1D90064BEBA /* DebugFork */,
D0DB57BB1E5C4B7A0071854C /* DebugAppStore */,
D0ADF933212B3AD400310BBC /* DebugAppStoreLLC */,

View File

@ -34,10 +34,10 @@ public final class Timer {
if self.`repeat` {
let time: DispatchTime = DispatchTime.now() + self.timeout
timer.scheduleRepeating(deadline: time, interval: self.timeout)
timer.schedule(deadline: time, repeating: self.timeout)
} else {
let time: DispatchTime = DispatchTime.now() + self.timeout
timer.scheduleOneshot(deadline: time)
timer.schedule(deadline: time)
}
timer.resume()

View File

@ -3073,22 +3073,6 @@ public extension Api {
})
}
public static func createChannel(flags: Int32, title: String, about: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
let buffer = Buffer()
buffer.appendInt32(-192332417)
serializeInt32(flags, buffer: buffer, boxed: false)
serializeString(title, buffer: buffer, boxed: false)
serializeString(about, buffer: buffer, boxed: false)
return (FunctionDescription(name: "channels.createChannel", parameters: [("flags", flags), ("title", title), ("about", about)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in
let reader = BufferReader(buffer)
var result: Api.Updates?
if let signature = reader.readInt32() {
result = Api.parse(reader, signature: signature) as? Api.Updates
}
return result
})
}
public static func editTitle(channel: Api.InputChannel, title: String) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
let buffer = Buffer()
buffer.appendInt32(1450044624)
@ -3241,20 +3225,6 @@ public extension Api {
})
}
public static func getAdminedPublicChannels() -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.messages.Chats>) {
let buffer = Buffer()
buffer.appendInt32(-1920105769)
return (FunctionDescription(name: "channels.getAdminedPublicChannels", parameters: []), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in
let reader = BufferReader(buffer)
var result: Api.messages.Chats?
if let signature = reader.readInt32() {
result = Api.parse(reader, signature: signature) as? Api.messages.Chats
}
return result
})
}
public static func getAdminLog(flags: Int32, channel: Api.InputChannel, q: String, eventsFilter: Api.ChannelAdminLogEventsFilter?, admins: [Api.InputUser]?, maxId: Int64, minId: Int64, limit: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.channels.AdminLogResults>) {
let buffer = Buffer()
buffer.appendInt32(870184064)
@ -3503,6 +3473,38 @@ public extension Api {
return result
})
}
public static func createChannel(flags: Int32, title: String, about: String, geoPoint: Api.InputGeoPoint?, address: String?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
let buffer = Buffer()
buffer.appendInt32(1029681423)
serializeInt32(flags, buffer: buffer, boxed: false)
serializeString(title, buffer: buffer, boxed: false)
serializeString(about, buffer: buffer, boxed: false)
if Int(flags) & Int(1 << 2) != 0 {geoPoint!.serialize(buffer, true)}
if Int(flags) & Int(1 << 2) != 0 {serializeString(address!, buffer: buffer, boxed: false)}
return (FunctionDescription(name: "channels.createChannel", parameters: [("flags", flags), ("title", title), ("about", about), ("geoPoint", geoPoint), ("address", address)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in
let reader = BufferReader(buffer)
var result: Api.Updates?
if let signature = reader.readInt32() {
result = Api.parse(reader, signature: signature) as? Api.Updates
}
return result
})
}
public static func getAdminedPublicChannels(flags: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.messages.Chats>) {
let buffer = Buffer()
buffer.appendInt32(-122669393)
serializeInt32(flags, buffer: buffer, boxed: false)
return (FunctionDescription(name: "channels.getAdminedPublicChannels", parameters: [("flags", flags)]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.messages.Chats? in
let reader = BufferReader(buffer)
var result: Api.messages.Chats?
if let signature = reader.readInt32() {
result = Api.parse(reader, signature: signature) as? Api.messages.Chats
}
return result
})
}
}
public struct payments {
public static func getPaymentForm(msgId: Int32) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.payments.PaymentForm>) {

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

View File

@ -18,6 +18,17 @@
D035734722B5C9BF00F0920D /* SecretApiLayer46.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035734422B5C9BF00F0920D /* SecretApiLayer46.swift */; };
D035734822B5C9BF00F0920D /* SecretApiLayer8.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035734522B5C9BF00F0920D /* SecretApiLayer8.swift */; };
D035734922B5C9BF00F0920D /* SecretApiLayer73.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035734622B5C9BF00F0920D /* SecretApiLayer73.swift */; };
D0CC4AC422BA46F30088F36D /* TelegramApi.h in Headers */ = {isa = PBXBuildFile; fileRef = D035732222B5C1FC00F0920D /* TelegramApi.h */; settings = {ATTRIBUTES = (Public, ); }; };
D0CC4AC622BA46F30088F36D /* SecretApiLayer46.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035734422B5C9BF00F0920D /* SecretApiLayer46.swift */; };
D0CC4AC722BA46F30088F36D /* Api1.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035733222B5C29900F0920D /* Api1.swift */; };
D0CC4AC822BA46F30088F36D /* Api0.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035733022B5C29900F0920D /* Api0.swift */; };
D0CC4AC922BA46F30088F36D /* Api3.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035733322B5C29900F0920D /* Api3.swift */; };
D0CC4ACA22BA46F30088F36D /* SecretApiLayer73.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035734622B5C9BF00F0920D /* SecretApiLayer73.swift */; };
D0CC4ACB22BA46F30088F36D /* TelegramApiLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035733A22B5C31400F0920D /* TelegramApiLogger.swift */; };
D0CC4ACC22BA46F30088F36D /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035733822B5C2E200F0920D /* Buffer.swift */; };
D0CC4ACD22BA46F30088F36D /* DeserializeFunctionResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035733C22B5C39100F0920D /* DeserializeFunctionResponse.swift */; };
D0CC4ACE22BA46F30088F36D /* SecretApiLayer8.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035734522B5C9BF00F0920D /* SecretApiLayer8.swift */; };
D0CC4ACF22BA46F30088F36D /* Api2.swift in Sources */ = {isa = PBXBuildFile; fileRef = D035733122B5C29900F0920D /* Api2.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -34,6 +45,9 @@
D035734422B5C9BF00F0920D /* SecretApiLayer46.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecretApiLayer46.swift; sourceTree = "<group>"; };
D035734522B5C9BF00F0920D /* SecretApiLayer8.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecretApiLayer8.swift; sourceTree = "<group>"; };
D035734622B5C9BF00F0920D /* SecretApiLayer73.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecretApiLayer73.swift; sourceTree = "<group>"; };
D0CC4AC122BA468D0088F36D /* TelegramApi copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "TelegramApi copy-Info.plist"; path = "/Users/keepcoder/Dropbox/Telegram-multi-acc/submodules/telegram-ios/submodules/TelegramApi/TelegramApi copy-Info.plist"; sourceTree = "<absolute>"; };
D0CC4AD922BA46F30088F36D /* TelegramApiMac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramApiMac.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D0CC4ADA22BA46F40088F36D /* TelegramApi copy2-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "TelegramApi copy2-Info.plist"; path = "/Users/keepcoder/Dropbox/Telegram-multi-acc/submodules/telegram-ios/submodules/TelegramApi/TelegramApi copy2-Info.plist"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -44,6 +58,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D0CC4AD022BA46F30088F36D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@ -53,6 +74,8 @@
D035732322B5C1FC00F0920D /* Info.plist */,
D035732122B5C1FC00F0920D /* Sources */,
D035732022B5C1FC00F0920D /* Products */,
D0CC4AC122BA468D0088F36D /* TelegramApi copy-Info.plist */,
D0CC4ADA22BA46F40088F36D /* TelegramApi copy2-Info.plist */,
);
sourceTree = "<group>";
};
@ -60,6 +83,7 @@
isa = PBXGroup;
children = (
D035731F22B5C1FC00F0920D /* TelegramApi.framework */,
D0CC4AD922BA46F30088F36D /* TelegramApiMac.framework */,
);
name = Products;
sourceTree = "<group>";
@ -93,6 +117,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D0CC4AC322BA46F30088F36D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
D0CC4AC422BA46F30088F36D /* TelegramApi.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
@ -114,6 +146,24 @@
productReference = D035731F22B5C1FC00F0920D /* TelegramApi.framework */;
productType = "com.apple.product-type.framework";
};
D0CC4AC222BA46F30088F36D /* TelegramApiMac */ = {
isa = PBXNativeTarget;
buildConfigurationList = D0CC4AD222BA46F30088F36D /* Build configuration list for PBXNativeTarget "TelegramApiMac" */;
buildPhases = (
D0CC4AC322BA46F30088F36D /* Headers */,
D0CC4AC522BA46F30088F36D /* Sources */,
D0CC4AD022BA46F30088F36D /* Frameworks */,
D0CC4AD122BA46F30088F36D /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TelegramApiMac;
productName = TelegramApi;
productReference = D0CC4AD922BA46F30088F36D /* TelegramApiMac.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@ -143,6 +193,7 @@
projectRoot = "";
targets = (
D035731E22B5C1FC00F0920D /* TelegramApi */,
D0CC4AC222BA46F30088F36D /* TelegramApiMac */,
);
};
/* End PBXProject section */
@ -155,6 +206,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D0CC4AD122BA46F30088F36D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -175,6 +233,23 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D0CC4AC522BA46F30088F36D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D0CC4AC622BA46F30088F36D /* SecretApiLayer46.swift in Sources */,
D0CC4AC722BA46F30088F36D /* Api1.swift in Sources */,
D0CC4AC822BA46F30088F36D /* Api0.swift in Sources */,
D0CC4AC922BA46F30088F36D /* Api3.swift in Sources */,
D0CC4ACA22BA46F30088F36D /* SecretApiLayer73.swift in Sources */,
D0CC4ACB22BA46F30088F36D /* TelegramApiLogger.swift in Sources */,
D0CC4ACC22BA46F30088F36D /* Buffer.swift in Sources */,
D0CC4ACD22BA46F30088F36D /* DeserializeFunctionResponse.swift in Sources */,
D0CC4ACE22BA46F30088F36D /* SecretApiLayer8.swift in Sources */,
D0CC4ACF22BA46F30088F36D /* Api2.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
@ -235,6 +310,7 @@
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
@ -292,6 +368,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
@ -414,6 +491,7 @@
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
@ -500,6 +578,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
@ -536,6 +615,384 @@
};
name = ReleaseAppStoreLLC;
};
D0CC4AA522BA44AD0088F36D /* DebugAppStore */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = DebugAppStore;
};
D0CC4AA622BA44AD0088F36D /* DebugAppStore */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugAppStore;
};
D0CC4AA722BA44B70088F36D /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = HockeyappMacAlpha;
};
D0CC4AA822BA44B70088F36D /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = HockeyappMacAlpha;
};
D0CC4AD322BA46F30088F36D /* DebugHockeyapp */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "TelegramApi copy2-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugHockeyapp;
};
D0CC4AD422BA46F30088F36D /* HockeyappMacAlpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "TelegramApi copy2-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = HockeyappMacAlpha;
};
D0CC4AD522BA46F30088F36D /* DebugAppStore */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "TelegramApi copy2-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugAppStore;
};
D0CC4AD622BA46F30088F36D /* DebugAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "TelegramApi copy2-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = DebugAppStoreLLC;
};
D0CC4AD722BA46F30088F36D /* ReleaseHockeyappInternal */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "TelegramApi copy2-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseHockeyappInternal;
};
D0CC4AD822BA46F30088F36D /* ReleaseAppStoreLLC */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "TelegramApi copy2-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MACOSX_DEPLOYMENT_TARGET = 10.11;
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramApi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = macosx;
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = ReleaseAppStoreLLC;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -543,6 +1000,8 @@
isa = XCConfigurationList;
buildConfigurations = (
D035732522B5C1FC00F0920D /* DebugHockeyapp */,
D0CC4AA722BA44B70088F36D /* HockeyappMacAlpha */,
D0CC4AA522BA44AD0088F36D /* DebugAppStore */,
D035732A22B5C23200F0920D /* DebugAppStoreLLC */,
D035732622B5C1FC00F0920D /* ReleaseHockeyappInternal */,
D035732C22B5C24100F0920D /* ReleaseAppStoreLLC */,
@ -554,6 +1013,8 @@
isa = XCConfigurationList;
buildConfigurations = (
D035732822B5C1FC00F0920D /* DebugHockeyapp */,
D0CC4AA822BA44B70088F36D /* HockeyappMacAlpha */,
D0CC4AA622BA44AD0088F36D /* DebugAppStore */,
D035732B22B5C23200F0920D /* DebugAppStoreLLC */,
D035732922B5C1FC00F0920D /* ReleaseHockeyappInternal */,
D035732D22B5C24100F0920D /* ReleaseAppStoreLLC */,
@ -561,6 +1022,19 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseHockeyappInternal;
};
D0CC4AD222BA46F30088F36D /* Build configuration list for PBXNativeTarget "TelegramApiMac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D0CC4AD322BA46F30088F36D /* DebugHockeyapp */,
D0CC4AD422BA46F30088F36D /* HockeyappMacAlpha */,
D0CC4AD522BA46F30088F36D /* DebugAppStore */,
D0CC4AD622BA46F30088F36D /* DebugAppStoreLLC */,
D0CC4AD722BA46F30088F36D /* ReleaseHockeyappInternal */,
D0CC4AD822BA46F30088F36D /* ReleaseAppStoreLLC */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = ReleaseHockeyappInternal;
};
/* End XCConfigurationList section */
};
rootObject = D035731622B5C1FC00F0920D /* Project object */;

View File

@ -3,9 +3,11 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
@ -14,7 +16,7 @@ import Foundation
import UIKit
#endif
import TelegramCorePrivateModule
import TelegramApi
public protocol AccountState: PostboxCoding {
func equalsTo(_ other: AccountState) -> Bool

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
struct PeerChatInfo {
var notificationSettings: PeerNotificationSettings

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
private enum AccountKind {
case authorized

View File

@ -1,10 +1,11 @@
import Foundation
#if os(macOS)
import PostboxMac
import TelegramApiMac
#else
import Postbox
import TelegramApi
#endif
import TelegramApi
private enum SentAuthorizationCodeTypeValue: Int32 {
case otherSession = 0

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
private func peerIdsFromUpdateGroups(_ groups: [UpdateGroup]) -> Set<PeerId> {
var peerIds = Set<PeerId>()

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
private enum AccountStateManagerOperationContent {
case pollDifference(AccountFinalStateEvents)

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
private struct LocalChatListEntryRange {
var entries: [ChatListNamespaceEntry]

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
public enum CallListViewType {
case all

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
public enum AddGroupMemberError {
case generic

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
public enum AddressNameFormatError {
case startsWithUnderscore
@ -157,8 +158,28 @@ public func updateAddressName(account: Account, domain: AddressNameDomain, name:
} |> mapError { _ -> UpdateAddressNameError in return .generic } |> switchToLatest
}
public func adminedPublicChannels(account: Account) -> Signal<[Peer], NoError> {
return account.network.request(Api.functions.channels.getAdminedPublicChannels())
public func checkPublicChannelCreationAvailability(account: Account, location: Bool = false) -> Signal<Bool, NoError> {
var flags: Int32 = (1 << 1)
if location {
flags |= (1 << 0)
}
return account.network.request(Api.functions.channels.getAdminedPublicChannels(flags: flags))
|> map { _ -> Bool in
return true
}
|> `catch` { error -> Signal<Bool, NoError> in
return .single(false)
}
}
public func adminedPublicChannels(account: Account, location: Bool = false) -> Signal<[Peer], NoError> {
var flags: Int32 = 0
if location {
flags |= (1 << 0)
}
return account.network.request(Api.functions.channels.getAdminedPublicChannels(flags: flags))
|> retryRequest
|> mapToSignal { result -> Signal<[Peer], NoError> in
var peers: [Peer] = []

View File

@ -1,11 +1,12 @@
import Foundation
#if os(macOS)
import PostboxMac
import TelegramApiMac
#else
import Postbox
import UIKit
import TelegramApi
#endif
import TelegramApi
func imageRepresentationsForApiChatPhoto(_ photo: Api.ChatPhoto) -> [TelegramMediaImageRepresentation] {
var representations: [TelegramMediaImageRepresentation] = []

View File

@ -1,10 +1,11 @@
import Foundation
#if os(macOS)
import PostboxMac
import TelegramApiMac
#else
import Postbox
import TelegramApi
#endif
import TelegramApi
public enum PeerReference: PostboxCoding, Hashable, Equatable {
case user(id: Int32, accessHash: Int64)

View File

@ -3,8 +3,10 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import TelegramApi
import SwiftSignalKit
#if BUCK
import MtProtoKit
@ -12,7 +14,6 @@ import SwiftSignalKit
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
func managedAppChangelog(postbox: Postbox, network: Network, stateManager: AccountStateManager, appVersion: String) -> Signal<Void, NoError> {
return stateManager.pollStateUpdateCompletion()

View File

@ -2,11 +2,12 @@ import Foundation
#if os(macOS)
import PostboxMac
import SwiftSignalKitMac
import TelegramApiMac
#else
import Postbox
import TelegramApi
import SwiftSignalKit
#endif
import TelegramApi
public func applyMaxReadIndexInteractively(postbox: Postbox, stateManager: AccountStateManager, index: MessageIndex) -> Signal<Void, NoError> {
return postbox.transaction { transaction -> Void in

View File

@ -2,12 +2,13 @@ import Foundation
#if os(macOS)
import PostboxMac
import SwiftSignalKitMac
import TelegramApiMac
#else
import TelegramApi
import Postbox
import SwiftSignalKit
import UIKit
#endif
import TelegramApi
func applyMediaResourceChanges(from: Media, to: Media, postbox: Postbox) {
if let fromImage = from as? TelegramMediaImage, let toImage = to as? TelegramMediaImage {

View File

@ -2,11 +2,12 @@ import Foundation
#if os(macOS)
import PostboxMac
import SwiftSignalKitMac
import TelegramApiMac
#else
import Postbox
import TelegramApi
import SwiftSignalKit
#endif
import TelegramApi
public enum ArchivedStickerPacksNamespace: Int32 {
case stickers = 0

View File

@ -3,16 +3,17 @@ import Foundation
import PostboxMac
import SwiftSignalKitMac
import MtProtoKitMac
import TelegramApiMac
#else
import Postbox
import SwiftSignalKit
import TelegramApi
#if BUCK
import MtProtoKit
#else
import MtProtoKitDynamic
#endif
#endif
import TelegramApi
public enum AuthorizationCodeRequestError {
case invalidPhoneNumber

View File

@ -2,11 +2,13 @@ import Foundation
#if os(macOS)
import PostboxMac
import SwiftSignalKitMac
import TelegramApiMac
#else
import Postbox
import TelegramApi
import SwiftSignalKit
#endif
import TelegramApi
public enum AutodownloadPreset {
case low

Some files were not shown because too many files have changed in this diff Show More