ios-unity/Classes_cocos/AppleSignIn.h
2022-11-28 21:53:04 +08:00

28 lines
698 B
Objective-C

//
// AppleSignIn.h
// Unity-iPhone
//
// Created by zhl on 2022/11/28.
//
#import <Foundation/Foundation.h>
#import <AuthenticationServices/AuthenticationServices.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^AppleSignInCompletion)(NSString *_Nullable idToken, NSError *_Nullable error);
@interface AppleSignIn : NSObject<ASAuthorizationControllerDelegate>
@property(nonatomic, nullable) AppleSignInCompletion completion;
@property(nonatomic, nullable) NSString *funid;
+ (instancetype)sharedInstance;
- (void)signIn:(NSString *)funid presentingViewController:(UIViewController *)presentingViewController completion:(nullable AppleSignInCompletion)completion;
@end
NS_ASSUME_NONNULL_END