Files
Ilya Laktyushin 8b0f9a674a Version 1.1.0
- Added support for new scope types and the ability to provide scope with a raw JSON string.
- Replaced the payload parameter with the new parameter nonce, which serves the same function, to make the purpose more obvious.
- Updated iOS & macOS examples to support the new functionality.
- Added Persian localization.
2018-08-27 13:15:57 +03:00

34 lines
975 B
Objective-C

#import <Foundation/Foundation.h>
#import <TGPassportKit/TGPScope.h>
@interface Scope : NSObject
@property (nonatomic, readonly, strong) NSString *title;
- (NSArray<id<TGPScopeType>> *)passportScope;
@end
@interface ComplexScope : Scope
@property (nonatomic, readonly) NSArray *types;
@property (nonatomic, readonly) BOOL oneOf;
@property (nonatomic, readonly) BOOL translation;
@property (nonatomic, readonly) BOOL selfie;
- (instancetype)updateWithScope:(NSArray<id<TGPScopeType>> *)scope oneOf:(bool)oneOf translation:(bool)translation selfie:(bool)selfie;
+ (instancetype)scopeWithTitle:(NSString *)title scope:(NSArray<id<TGPScopeType>> *)scope oneOf:(bool)oneOf translation:(bool)translation selfie:(bool)selfie;
@end
@interface SwitchableScope : Scope
@property (nonatomic, readonly) bool enabled;
- (instancetype)updateWithEnabled:(bool)enabled;
+ (instancetype)scopeWithTitle:(NSString *)title scope:(id<TGPScopeType>)scope enabled:(bool)enabled;
@end