mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
Add sign in functionality
This commit is contained in:
parent
3824d22a56
commit
d80ad6e866
12 changed files with 314 additions and 1 deletions
1
Seedfile
1
Seedfile
|
@ -1,2 +1,3 @@
|
|||
github "thoughtbot/Curry", "master", :files => "Source/Curry.swift"
|
||||
github "Carthage/Commandant", "0.8.1", :files => "Commandant/*.swift"
|
||||
github "antitypical/Result", "1.0.0", :files => "Result/*.swift"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
30EA893640B02CCF679F9C57 /* Option.swift in Sources */ = {isa = PBXBuildFile; fileRef = AECDEA314BB1F1599638884C /* Option.swift */; };
|
||||
319FDBA6ED6443A912B9A65F /* ResultType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 580DF177A1A8B1DF500CADA7 /* ResultType.swift */; };
|
||||
345960DE661C85EB2609263C /* ArgumentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F4795E73E2065824AEDC5B /* ArgumentType.swift */; };
|
||||
3A45897E98247F74ED6D51E2 /* Curry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AE1408CEE41BD4CD64491E3 /* Curry.swift */; };
|
||||
AD0785BC0EC6BBF4ED560DCC /* ArgumentParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52882737E43AACD9AAEF5D9D /* ArgumentParser.swift */; };
|
||||
EBD6B44FDF65E0253153629F /* HelpCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7F27132AB0C6BC7BA7078EF /* HelpCommand.swift */; };
|
||||
ED031A7C1B5127C00097692E /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED031A7B1B5127C00097692E /* main.swift */; };
|
||||
|
@ -27,6 +28,7 @@
|
|||
ED0F23901B87A56F00AE40CD /* ISStoreAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0F238F1B87A56F00AE40CD /* ISStoreAccount.swift */; };
|
||||
EDA3BE521B8B84AF00C18D70 /* SSPurchase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDA3BE511B8B84AF00C18D70 /* SSPurchase.swift */; };
|
||||
EDB6CE8C1BAEC3D400648B4D /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDB6CE8B1BAEC3D400648B4D /* Version.swift */; };
|
||||
EDC90B651C70045E0019E396 /* SignIn.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDC90B641C70045E0019E396 /* SignIn.swift */; };
|
||||
EDD3B3631C34709400B56B88 /* Upgrade.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDD3B3621C34709400B56B88 /* Upgrade.swift */; };
|
||||
EDEAA0C01B51CE6200F2FC3F /* StoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDEAA0BF1B51CE6200F2FC3F /* StoreFoundation.framework */; };
|
||||
EDEAA17D1B5C579100F2FC3F /* CommerceKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDEAA17C1B5C579100F2FC3F /* CommerceKit.framework */; };
|
||||
|
@ -52,6 +54,7 @@
|
|||
7516403ABCFB43FD80CCD0DB /* Argument.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Argument.swift; path = Seeds/Commandant/Commandant/Argument.swift; sourceTree = "<group>"; };
|
||||
75F4795E73E2065824AEDC5B /* ArgumentType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ArgumentType.swift; path = Seeds/Commandant/Commandant/ArgumentType.swift; sourceTree = "<group>"; };
|
||||
9257C5FABA335E5F060CB7F7 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Seeds/Result/Result/Result.swift; sourceTree = "<group>"; };
|
||||
9AE1408CEE41BD4CD64491E3 /* Curry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Curry.swift; path = Seeds/Curry/Source/Curry.swift; sourceTree = "<group>"; };
|
||||
AECDEA314BB1F1599638884C /* Option.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Option.swift; path = Seeds/Commandant/Commandant/Option.swift; sourceTree = "<group>"; };
|
||||
B7F27132AB0C6BC7BA7078EF /* HelpCommand.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HelpCommand.swift; path = Seeds/Commandant/Commandant/HelpCommand.swift; sourceTree = "<group>"; };
|
||||
C4E553CF8A2DE31278400C3A /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Seeds/Commandant/Commandant/Errors.swift; sourceTree = "<group>"; };
|
||||
|
@ -81,7 +84,12 @@
|
|||
EDA3BE511B8B84AF00C18D70 /* SSPurchase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SSPurchase.swift; sourceTree = "<group>"; };
|
||||
EDB6CE8A1BAEB95100648B4D /* mas-cli-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "mas-cli-Info.plist"; sourceTree = "<group>"; };
|
||||
EDB6CE8B1BAEC3D400648B4D /* Version.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Version.swift; sourceTree = "<group>"; };
|
||||
EDC90B621C6FF50B0019E396 /* ISAccountService-Protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ISAccountService-Protocol.h"; sourceTree = "<group>"; };
|
||||
EDC90B641C70045E0019E396 /* SignIn.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignIn.swift; sourceTree = "<group>"; };
|
||||
EDD3B3621C34709400B56B88 /* Upgrade.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Upgrade.swift; sourceTree = "<group>"; };
|
||||
EDE2964F1C700B0300554778 /* ISAuthenticationContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISAuthenticationContext.h; sourceTree = "<group>"; };
|
||||
EDE296501C700B0300554778 /* ISServiceRemoteObject-Protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ISServiceRemoteObject-Protocol.h"; sourceTree = "<group>"; };
|
||||
EDE296511C700B0300554778 /* ISStoreClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStoreClient.h; sourceTree = "<group>"; };
|
||||
EDEAA0BF1B51CE6200F2FC3F /* StoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreFoundation.framework; path = /System/Library/PrivateFrameworks/StoreFoundation.framework; sourceTree = "<absolute>"; };
|
||||
EDEAA12C1B51CF8000F2FC3F /* mas-cli-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "mas-cli-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
EDEAA1311B5C576D00F2FC3F /* CKAccountStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKAccountStore.h; sourceTree = "<group>"; };
|
||||
|
@ -111,11 +119,20 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
A49C8EB621015CD588C621FD /* Commandant */,
|
||||
5EBA78E56DB47A91F9657FF7 /* Curry */,
|
||||
6569B225928F21A4A639BB22 /* Result */,
|
||||
);
|
||||
name = Seeds;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5EBA78E56DB47A91F9657FF7 /* Curry */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9AE1408CEE41BD4CD64491E3 /* Curry.swift */,
|
||||
);
|
||||
name = Curry;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6569B225928F21A4A639BB22 /* Result */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -179,6 +196,7 @@
|
|||
ED0F237E1B87522400AE40CD /* Install.swift */,
|
||||
ED0F23821B87533A00AE40CD /* List.swift */,
|
||||
ED0F23841B87536A00AE40CD /* Outdated.swift */,
|
||||
EDC90B641C70045E0019E396 /* SignIn.swift */,
|
||||
EDD3B3621C34709400B56B88 /* Upgrade.swift */,
|
||||
EDB6CE8B1BAEC3D400648B4D /* Version.swift */,
|
||||
);
|
||||
|
@ -212,9 +230,13 @@
|
|||
children = (
|
||||
ED1EF94D1BA6BBBF0075453C /* CKSoftwareProduct.h */,
|
||||
ED1EF94E1BA6BBBF0075453C /* CKUpdate.h */,
|
||||
EDC90B621C6FF50B0019E396 /* ISAccountService-Protocol.h */,
|
||||
EDE2964F1C700B0300554778 /* ISAuthenticationContext.h */,
|
||||
ED1EF94F1BA6BBBF0075453C /* ISOperationDelegate-Protocol.h */,
|
||||
ED1EF9501BA6BBBF0075453C /* ISServiceProxy.h */,
|
||||
EDE296501C700B0300554778 /* ISServiceRemoteObject-Protocol.h */,
|
||||
ED1EF9511BA6BBBF0075453C /* ISStoreAccount.h */,
|
||||
EDE296511C700B0300554778 /* ISStoreClient.h */,
|
||||
ED1EF9521BA6BBBF0075453C /* ISURLOperationDelegate-Protocol.h */,
|
||||
ED1EF9531BA6BBBF0075453C /* SSDownload.h */,
|
||||
ED1EF9541BA6BBBF0075453C /* SSDownloadMetadata.h */,
|
||||
|
@ -259,6 +281,7 @@
|
|||
ED031A741B5127C00097692E /* Sources */,
|
||||
ED031A751B5127C00097692E /* Frameworks */,
|
||||
ED031A761B5127C00097692E /* CopyFiles */,
|
||||
E7460A391382D898934EFFBD /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -301,6 +324,16 @@
|
|||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
E7460A391382D898934EFFBD /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
ED031A741B5127C00097692E /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
|
@ -311,6 +344,7 @@
|
|||
AD0785BC0EC6BBF4ED560DCC /* ArgumentParser.swift in Sources */,
|
||||
345960DE661C85EB2609263C /* ArgumentType.swift in Sources */,
|
||||
0C47E694564FCB59996690DD /* Command.swift in Sources */,
|
||||
3A45897E98247F74ED6D51E2 /* Curry.swift in Sources */,
|
||||
ED0F238B1B87569C00AE40CD /* Downloader.swift in Sources */,
|
||||
ED0F238D1B8756E600AE40CD /* Error.swift in Sources */,
|
||||
3053D11E74A22A4C5A6BE833 /* Errors.swift in Sources */,
|
||||
|
@ -324,6 +358,7 @@
|
|||
ED0F23891B87543D00AE40CD /* PurchaseDownloadObserver.swift in Sources */,
|
||||
0EBF5CDD379D7462C3389536 /* Result.swift in Sources */,
|
||||
319FDBA6ED6443A912B9A65F /* ResultType.swift in Sources */,
|
||||
EDC90B651C70045E0019E396 /* SignIn.swift in Sources */,
|
||||
EDA3BE521B8B84AF00C18D70 /* SSPurchase.swift in Sources */,
|
||||
15E27926A580EABEB1B218EF /* Switch.swift in Sources */,
|
||||
EDD3B3631C34709400B56B88 /* Upgrade.swift in Sources */,
|
||||
|
|
|
@ -14,4 +14,38 @@ extension ISStoreAccount {
|
|||
static var primaryAccount: ISStoreAccount? {
|
||||
return CKAccountStore.sharedAccountStore().primaryAccount
|
||||
}
|
||||
|
||||
static func signIn(username username: String, password: String) throws -> ISStoreAccount {
|
||||
var account: ISStoreAccount? = nil
|
||||
var error: NSError? = nil
|
||||
|
||||
let accountService = ISServiceProxy.genericSharedProxy().accountService
|
||||
let client = ISStoreClient(storeClientType: 0)
|
||||
accountService.setStoreClient(client)
|
||||
|
||||
let context = ISAuthenticationContext(accountID: 0)
|
||||
context.demoMode = true
|
||||
context.demoAccountName = username
|
||||
context.demoAccountPassword = password
|
||||
context.demoAutologinMode = true
|
||||
|
||||
let group = dispatch_group_create()
|
||||
dispatch_group_enter(group)
|
||||
|
||||
accountService.signInWithContext(context) { success, _account, _error in
|
||||
if success {
|
||||
account = _account
|
||||
} else {
|
||||
error = _error
|
||||
}
|
||||
dispatch_group_leave(group)
|
||||
}
|
||||
dispatch_group_wait(group, dispatch_time(DISPATCH_TIME_NOW, Int64(UInt64(15) * NSEC_PER_SEC)))
|
||||
|
||||
if let account = account {
|
||||
return account
|
||||
}
|
||||
|
||||
throw error ?? MASError(code: .SignInError)
|
||||
}
|
||||
}
|
||||
|
|
40
mas-cli/Commands/SignIn.swift
Normal file
40
mas-cli/Commands/SignIn.swift
Normal file
|
@ -0,0 +1,40 @@
|
|||
//
|
||||
// SignIn.swift
|
||||
// mas-cli
|
||||
//
|
||||
// Created by Andrew Naylor on 14/02/2016.
|
||||
// Copyright © 2016 Andrew Naylor. All rights reserved.
|
||||
//
|
||||
|
||||
struct SignInCommand: CommandType {
|
||||
typealias Options = SignInOptions
|
||||
let verb = "signin"
|
||||
let function = "Sign in to the Mac App Store"
|
||||
|
||||
func run(options: Options) -> Result<(), MASError> {
|
||||
|
||||
guard ISStoreAccount.primaryAccount == nil else {
|
||||
return .Failure(MASError.init(code: .AlreadySignedIn))
|
||||
}
|
||||
|
||||
do {
|
||||
print("==> Signing in to Apple ID: \(options.username)")
|
||||
try ISStoreAccount.signIn(username: options.username, password: options.password)
|
||||
} catch let error as NSError {
|
||||
return .Failure(MASError(code: .SignInError, sourceError: error))
|
||||
}
|
||||
|
||||
return .Success(())
|
||||
}
|
||||
}
|
||||
|
||||
struct SignInOptions: OptionsType {
|
||||
let username: String
|
||||
let password: String
|
||||
|
||||
static func evaluate(m: CommandMode) -> Result<SignInOptions, CommandantError<MASError>> {
|
||||
return curry(SignInOptions.init)
|
||||
<*> m <| Argument(usage: "Apple ID")
|
||||
<*> m <| Argument(usage: "Password")
|
||||
}
|
||||
}
|
|
@ -17,6 +17,8 @@ public enum MASErrorCode: Int {
|
|||
case NoDownloads
|
||||
case Cancelled
|
||||
case DownloadFailed
|
||||
case SignInError
|
||||
case AlreadySignedIn
|
||||
|
||||
var exitCode: Int32 {
|
||||
return Int32(self.rawValue)
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
//
|
||||
// Generated by class-dump 3.5 (64 bit).
|
||||
//
|
||||
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
|
||||
//
|
||||
|
||||
@class ISAuthenticationContext, ISAuthenticationResponse, ISStoreAccount, NSDictionary, NSNumber, NSString, NSURL;
|
||||
|
||||
@protocol ISAccountService <ISServiceRemoteObject>
|
||||
//- (void)completeSetupWithResponse:(NSDictionary *)arg1 withReply:(void (^)(BOOL, NSError *))arg2;
|
||||
//- (void)handlePushNotificationMessage:(NSDictionary *)arg1;
|
||||
//- (void)isRegisteredForAccount:(NSNumber *)arg1 andMask:(long long)arg2 withReply:(void (^)(BOOL, NSError *, BOOL))arg3;
|
||||
//- (void)disableAutoDownloadWithReply:(void (^)(BOOL, NSError *))arg1;
|
||||
//- (void)enableAutoDownloadForEnvironmentNamed:(NSString *)arg1 withReply:(void (^)(BOOL, NSError *))arg2;
|
||||
//- (void)getEnabledMediaTypesWithReply:(void (^)(BOOL, NSError *, long long))arg1;
|
||||
//- (void)registerDeviceTokenForEnvironmentNamed:(NSString *)arg1 withReply:(void (^)(BOOL, NSError *))arg2;
|
||||
//- (void)recommendedAppleIDForAccountSignIn:(void (^)(NSString *))arg1;
|
||||
//- (void)iCloudDSIDReplyBlock:(void (^)(NSString *))arg1;
|
||||
//- (void)setStoreFrontID:(NSString *)arg1;
|
||||
//- (void)storeFrontWithReplyBlock:(void (^)(NSString *))arg1;
|
||||
//- (void)shouldSendGUIDWithRequestForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2;
|
||||
//- (void)consumeCookiesWithHTTPHeaders:(NSDictionary *)arg1 fromURL:(NSURL *)arg2;
|
||||
//- (void)httpHeadersForURL:(NSURL *)arg1 forDSID:(NSNumber *)arg2 includeADIHeaders:(BOOL)arg3 withReplyBlock:(void (^)(NSDictionary *))arg4;
|
||||
//- (void)removeURLBagObserver:(id <ISURLBagObserver>)arg1;
|
||||
//- (void)addURLBagObserver:(id <ISURLBagObserver>)arg1;
|
||||
//- (void)dictionaryWithReplyBlock:(void (^)(NSDictionary *))arg1;
|
||||
//- (void)isValidWithReplyBlock:(void (^)(BOOL))arg1;
|
||||
//- (void)regexWithKey:(NSString *)arg1 matchesString:(NSString *)arg2 replyBlock:(void (^)(BOOL))arg3;
|
||||
//- (void)invalidateAllBags;
|
||||
//- (void)loadURLBagWithType:(unsigned long long)arg1 replyBlock:(void (^)(BOOL, BOOL, NSError *))arg2;
|
||||
//- (void)needsSilentADIActionForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2;
|
||||
//- (void)urlIsTrustedByURLBag:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2;
|
||||
//- (void)valueForURLBagKey:(NSString *)arg1 withReplyBlock:(void (^)(id))arg2;
|
||||
//- (void)updatePasswordSettings:(NSDictionary *)arg1 replyBlock:(void (^)(BOOL, NSError *))arg2;
|
||||
//- (void)getPasswordSettingsWithReplyBlock:(void (^)(NSDictionary *, NSError *))arg1;
|
||||
//- (void)getEligibilityForService:(NSNumber *)arg1 replyBlock:(void (^)(NSNumber *, NSError *))arg2;
|
||||
//- (void)eligibilityForService:(NSNumber *)arg1 replyBlock:(void (^)(NSNumber *))arg2;
|
||||
//- (void)retailStoreDemoModeReplyBlock:(void (^)(BOOL, NSString *, NSString *, BOOL))arg1;
|
||||
//- (void)removeAccountStoreObserver:(id <ISAccountStoreObserver>)arg1;
|
||||
//- (void)addAccountStoreObserver:(id <ISAccountStoreObserver>)arg1;
|
||||
//- (void)parseCreditStringForProtocol:(NSDictionary *)arg1;
|
||||
- (void)signOut;
|
||||
- (void)signInWithContext:(ISAuthenticationContext * __nonnull)arg1 replyBlock:(void (^ __nonnull)(BOOL, ISStoreAccount * __nullable, NSError * __nullable))arg2;
|
||||
//- (void)addAccount:(ISStoreAccount *)arg1;
|
||||
//- (void)addAccountWithAuthenticationResponse:(ISAuthenticationResponse *)arg1 makePrimary:(BOOL)arg2 replyBlock:(void (^)(ISStoreAccount *))arg3;
|
||||
//- (void)accountWithAppleID:(NSString *)arg1 replyBlock:(void (^)(ISStoreAccount *))arg2;
|
||||
//- (void)accountWithDSID:(NSNumber *)arg1 replyBlock:(void (^)(ISStoreAccount *))arg2;
|
||||
//- (void)primaryAccountWithReplyBlock:(void (^)(ISStoreAccount *))arg1;
|
||||
//- (void)authIsExpiredWithReplyBlock:(void (^)(BOOL))arg1;
|
||||
//- (void)strongTokenForAccount:(ISStoreAccount *)arg1 withReplyBlock:(void (^)(NSString *))arg2;
|
||||
//- (void)accountsWithReplyBlock:(void (^)(NSArray *))arg1;
|
||||
@end
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
//
|
||||
// Generated by class-dump 3.5 (64 bit).
|
||||
//
|
||||
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
|
||||
//
|
||||
|
||||
@class NSDictionary, NSNumber, NSString;
|
||||
|
||||
@interface ISAuthenticationContext : NSObject <NSSecureCoding>
|
||||
{
|
||||
NSNumber *_accountID;
|
||||
NSDictionary *_additionalQueryParameters;
|
||||
NSDictionary *_dialogDictionary;
|
||||
long long _bagType;
|
||||
NSDictionary *_signUpQueryParameters;
|
||||
BOOL _shouldFollowAccountButtons;
|
||||
long long _style;
|
||||
BOOL _useCachedCredentials;
|
||||
long long _authenticationReason;
|
||||
NSString *_appleIDOverride;
|
||||
BOOL _enforceAppleIDOverride;
|
||||
NSString *_applicationName;
|
||||
BOOL _demoMode;
|
||||
BOOL _demoAutologinMode;
|
||||
NSString *_demoAccountName;
|
||||
NSString *_demoAccountPassword;
|
||||
}
|
||||
|
||||
+ (BOOL)supportsSecureCoding;
|
||||
@property(retain) NSString *demoAccountPassword; // @synthesize demoAccountPassword=_demoAccountPassword;
|
||||
@property(retain) NSString *demoAccountName; // @synthesize demoAccountName=_demoAccountName;
|
||||
@property BOOL demoAutologinMode; // @synthesize demoAutologinMode=_demoAutologinMode;
|
||||
@property BOOL demoMode; // @synthesize demoMode=_demoMode;
|
||||
@property(retain) NSDictionary *dialogDictionary; // @synthesize dialogDictionary=_dialogDictionary;
|
||||
@property(retain) NSString *applicationName; // @synthesize applicationName=_applicationName;
|
||||
@property BOOL enforceAppleIDOverride; // @synthesize enforceAppleIDOverride=_enforceAppleIDOverride;
|
||||
@property(retain) NSString *appleIDOverride; // @synthesize appleIDOverride=_appleIDOverride;
|
||||
@property long long authenticationReason; // @synthesize authenticationReason=_authenticationReason;
|
||||
@property BOOL useCachedCredentials; // @synthesize useCachedCredentials=_useCachedCredentials;
|
||||
@property BOOL shouldFollowAccountButtons; // @synthesize shouldFollowAccountButtons=_shouldFollowAccountButtons;
|
||||
@property(retain) NSDictionary *signUpQueryParameters; // @synthesize signUpQueryParameters=_signUpQueryParameters;
|
||||
@property long long bagType; // @synthesize bagType=_bagType;
|
||||
@property long long authenticationStyle; // @synthesize authenticationStyle=_style;
|
||||
@property(retain) NSDictionary *additionalQueryParameters; // @synthesize additionalQueryParameters=_additionalQueryParameters;
|
||||
@property(readonly) NSNumber *accountID; // @synthesize accountID=_accountID;
|
||||
//- (void).cxx_destruct;
|
||||
- (void)encodeWithCoder:(id)arg1;
|
||||
- (id)initWithCoder:(id)arg1;
|
||||
- (id)initWithAccountID:(id)arg1;
|
||||
- (id)init;
|
||||
|
||||
@end
|
||||
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
@class ISStoreClient, NSLock, NSMutableDictionary, Protocol;
|
||||
|
||||
@protocol ISAccountService;
|
||||
|
||||
@interface ISServiceProxy : NSObject
|
||||
{
|
||||
NSLock *_serviceConnectionLock;
|
||||
|
@ -36,7 +38,7 @@ typedef void (^ISErrorHandler)(NSError * __nonnull error);
|
|||
//@property(readonly, nonatomic) id <ISDownloadService> downloadService;
|
||||
//- (id)downloadServiceWithErrorHandler:(CDUnknownBlockType)arg1;
|
||||
//- (void)accountServiceSynchronousBlock:(void (^ __nonnull)(id <ISAccountService> __nonnull))arg1;
|
||||
//@property(readonly, nonatomic) id <ISAccountService> __nonnull accountService;
|
||||
@property(readonly, nonatomic) id <ISAccountService> __nonnull accountService;
|
||||
//- (id <ISAccountService> __nonnull)accountServiceWithErrorHandler:(ISErrorHandler __nonnull)arg1;
|
||||
//- (void)performSynchronousBlock:(CDUnknownBlockType)arg1 withServiceName:(id)arg2 protocol:(id)arg3 isMachService:(BOOL)arg4 interfaceClassName:(id)arg5;
|
||||
//- (id)objectProxyForServiceName:(id)arg1 protocol:(id)arg2 interfaceClassName:(id)arg3 isMachService:(BOOL)arg4 errorHandler:(CDUnknownBlockType)arg5;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
//
|
||||
// Generated by class-dump 3.5 (64 bit).
|
||||
//
|
||||
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
|
||||
//
|
||||
|
||||
@class ISStoreClient;
|
||||
|
||||
@protocol ISServiceRemoteObject <NSObject>
|
||||
- (void)startService;
|
||||
- (void)setStoreClient:(ISStoreClient *)arg1;
|
||||
@end
|
||||
|
74
mas-cli/PrivateHeaders/StoreFoundation/ISStoreClient.h
Normal file
74
mas-cli/PrivateHeaders/StoreFoundation/ISStoreClient.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
//
|
||||
// Generated by class-dump 3.5 (64 bit).
|
||||
//
|
||||
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
|
||||
//
|
||||
|
||||
@class ISStoreAccount, NSArray, NSDictionary, NSString;
|
||||
|
||||
@interface ISStoreClient : NSObject <NSSecureCoding>
|
||||
{
|
||||
BOOL __alwaysUseSandboxEnvironment;
|
||||
BOOL _isDaemon;
|
||||
unsigned long long _frameworkVersion;
|
||||
NSString *_identifier;
|
||||
long long _clientType;
|
||||
ISStoreAccount *_primaryAccount;
|
||||
NSString *_userAgentAppName;
|
||||
NSString *_userAgentAppVersion;
|
||||
NSString *_agentPreferencesDomain;
|
||||
NSString *_appPreferencesDomain;
|
||||
NSString *_storeFrontBagKey;
|
||||
NSArray *_productionBagURLs;
|
||||
NSArray *_sandboxBagURLs;
|
||||
NSString *_toolbarBagKey;
|
||||
long long _requiredBagType;
|
||||
NSString *_aslDomain;
|
||||
NSString *_storeURLScheme;
|
||||
NSString *_storeSecureURLScheme;
|
||||
NSString *_tempPathClientIdentifier;
|
||||
long long _mediaTypeMask;
|
||||
NSString *_pushServiceName;
|
||||
NSString *_appPath;
|
||||
NSDictionary *_daap;
|
||||
NSString *_displayUIHostID;
|
||||
NSString *_agentListenerName;
|
||||
}
|
||||
|
||||
+ (id)knownClientWithIdentifier:(id)arg1 frameworkVersion:(id)arg2;
|
||||
+ (BOOL)supportsSecureCoding;
|
||||
@property BOOL isDaemon; // @synthesize isDaemon=_isDaemon;
|
||||
@property(copy) NSString *agentListenerName; // @synthesize agentListenerName=_agentListenerName;
|
||||
@property(copy) NSString *displayUIHostID; // @synthesize displayUIHostID=_displayUIHostID;
|
||||
@property(copy) NSDictionary *daap; // @synthesize daap=_daap;
|
||||
@property(copy) NSString *appPath; // @synthesize appPath=_appPath;
|
||||
@property(copy) NSString *pushServiceName; // @synthesize pushServiceName=_pushServiceName;
|
||||
@property long long mediaTypeMask; // @synthesize mediaTypeMask=_mediaTypeMask;
|
||||
@property(copy) NSString *tempPathClientIdentifier; // @synthesize tempPathClientIdentifier=_tempPathClientIdentifier;
|
||||
@property(copy) NSString *storeSecureURLScheme; // @synthesize storeSecureURLScheme=_storeSecureURLScheme;
|
||||
@property(copy) NSString *storeURLScheme; // @synthesize storeURLScheme=_storeURLScheme;
|
||||
@property(setter=_setAlwaysUseSandboxEnvironment:) BOOL _alwaysUseSandboxEnvironment; // @synthesize _alwaysUseSandboxEnvironment=__alwaysUseSandboxEnvironment;
|
||||
@property(copy) NSString *aslDomain; // @synthesize aslDomain=_aslDomain;
|
||||
@property long long requiredBagType; // @synthesize requiredBagType=_requiredBagType;
|
||||
@property(copy) NSString *toolbarBagKey; // @synthesize toolbarBagKey=_toolbarBagKey;
|
||||
@property(copy) NSArray *sandboxBagURLs; // @synthesize sandboxBagURLs=_sandboxBagURLs;
|
||||
@property(copy) NSArray *productionBagURLs; // @synthesize productionBagURLs=_productionBagURLs;
|
||||
@property(copy) NSString *storeFrontBagKey; // @synthesize storeFrontBagKey=_storeFrontBagKey;
|
||||
@property(copy) NSString *appPreferencesDomain; // @synthesize appPreferencesDomain=_appPreferencesDomain;
|
||||
@property(copy) NSString *agentPreferencesDomain; // @synthesize agentPreferencesDomain=_agentPreferencesDomain;
|
||||
@property(copy) NSString *userAgentAppVersion; // @synthesize userAgentAppVersion=_userAgentAppVersion;
|
||||
@property(copy) NSString *userAgentAppName; // @synthesize userAgentAppName=_userAgentAppName;
|
||||
@property(copy) ISStoreAccount *primaryAccount; // @synthesize primaryAccount=_primaryAccount;
|
||||
@property long long clientType; // @synthesize clientType=_clientType;
|
||||
@property(copy) NSString *identifier; // @synthesize identifier=_identifier;
|
||||
@property unsigned long long frameworkVersion; // @synthesize frameworkVersion=_frameworkVersion;
|
||||
//- (void).cxx_destruct;
|
||||
- (BOOL)isEqualToStoreClient:(id)arg1;
|
||||
- (void)_cacheKnownClient:(id)arg1;
|
||||
- (id)initWithCoder:(id)arg1;
|
||||
- (void)encodeWithCoder:(id)arg1;
|
||||
- (id)initWithApplicationPath:(id)arg1;
|
||||
- (id)initWithStoreClientType:(long long)arg1;
|
||||
|
||||
@end
|
||||
|
|
@ -20,6 +20,7 @@ registry.register(AccountCommand())
|
|||
registry.register(InstallCommand())
|
||||
registry.register(ListCommand())
|
||||
registry.register(OutdatedCommand())
|
||||
registry.register(SignInCommand())
|
||||
registry.register(UpgradeCommand())
|
||||
registry.register(VersionCommand())
|
||||
registry.register(helpCommand)
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
#import <StoreFoundation/SSDownloadPhase.h>
|
||||
#import <StoreFoundation/SSDownloadStatus.h>
|
||||
#import <StoreFoundation/SSPurchaseResponse.h>
|
||||
#import <StoreFoundation/ISStoreClient.h>
|
||||
#import <StoreFoundation/ISAuthenticationContext.h>
|
||||
#import <StoreFoundation/ISServiceRemoteObject-Protocol.h>
|
||||
#import <StoreFoundation/ISAccountService-Protocol.h>
|
||||
#import <StoreFoundation/ISServiceProxy.h>
|
||||
|
||||
@protocol CKDownloadQueueObserver
|
||||
|
||||
|
|
Loading…
Reference in a new issue