New file |
| | |
| | | // |
| | | // AdConstant.h |
| | | // BuWanVideo2.0 |
| | | // |
| | | // Created by developer on 2024/9/13. |
| | | // Copyright © 2024 com.yeshi.buwansheque.ios. All rights reserved. |
| | | // |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | #ifndef AdConstant_h |
| | | #define AdConstant_h |
| | | |
| | | |
| | | #endif /* AdConstant_h */ |
| | | |
| | | #define CSJ_AD_PID_SPLASH @"103139011" |
| | | |
| | | #define CSJ_AD_PID_HOME_INTERSTITIAL @"103137392" |
| | | |
| | | #define CSJ_AD_PID_HOME_DRAW @"103138446" |
| | | |
| | | #define CSJ_AD_PID_SEARCH @"103139105" |
| | | |
| | | #define CSJ_AD_PID_SEARCH_RESULT @"103137496" |
| | | |
| | | #define CSJ_AD_PID_VIDEO_DETAIL @"103138060" |
| | | |
| | | #define CSJ_AD_PID_CLASS_BANNER @"103138646" |
| | | |
| | | #define CSJ_AD_PID_VIDEO_DETAIL_DRAW @"103144328" |
| | |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import "LoggingViewController.h" |
| | | #include "CSJExpressAdManager.h" |
| | | |
| | | |
| | | @protocol YTHNetDelegateRecommend <NSObject> |
| | | |
| | |
| | | |
| | | @property (nonatomic , weak) id<YTHBacktoApplicationsDelegate> YBackAppDelegate; |
| | | |
| | | @property (nonatomic, strong) LoggingViewController *loggingViewController; |
| | | |
| | | @property (nonatomic, strong) CSJExpressAdManager *searchAdManager; |
| | | |
| | | -(void)initData; |
| | | @end |
| | | |
| | |
| | | |
| | | #import "RecommendMainController.h" |
| | | #import "RecommendController.h" |
| | | #import "recommendViewController.h" |
| | | #import "subregionViewController.h" |
| | | #import "MineViewController.h" |
| | | #import "discoverViewController.h" |
| | |
| | | //å
容èç |
| | | #import <LCDSDK/LCDSDK.h> |
| | | |
| | | #import <WXApi.h> |
| | | |
| | | #import <TencentOAuth.h> |
| | | |
| | | |
| | | #import <PangrowthDJX/DJXSDK.h> |
| | | |
| | | |
| | | |
| | | #define LECUsedBundleID @"com.yeshi.buwanshequ.ios" |
| | | |
| | | #define TICK NSDate *startTime = [NSDate date] |
| | | #define TOCK NSLog(@"Time: %f", -[startTime timeIntervalSinceNow]) |
| | | |
| | | @interface AppDelegate ()<GDTSplashAdDelegate, BUSplashAdDelegate, UINavigationControllerDelegate> |
| | | NSNotificationName _Nonnull const kLCSDJXSDKSetConfigNotification = @"kLCSDJXSDKSetConfigNotification"; |
| | | |
| | | @interface AppDelegate ()<GDTSplashAdDelegate, BUSplashAdDelegate, UINavigationControllerDelegate, WXApiDelegate, DJXAuthorityConfigDelegate> |
| | | |
| | | @property (strong,nonatomic) GDTSplashAd *gdtSplash; |
| | | |
| | |
| | | |
| | | - (void) initSDK:(BUCompletionHandler)completionHandler{ |
| | | [self requestIDFA]; |
| | | // åå§å微信 |
| | | //å¨registerä¹åæå¼log, åç»å¯ä»¥æ ¹æ®logææ¥é®é¢ |
| | | [WXApi startLogByLevel:WXLogLevelDetail logBlock:^(NSString *log) { |
| | | NSLog(@"WeChatSDK: %@", log); |
| | | }]; |
| | | [WXApi registerApp:@"wx428de66710fac55b" universalLink:@"https://universallinks.ios.yeshitv.com/wx/"]; |
| | | |
| | | _loggingViewController = [[LoggingViewController alloc] init]; |
| | | |
| | | |
| | | |
| | | //éæåç |
| | | [self setUmeng]; |
| | | //[MobClick setLogEnabled:YES]; |
| | |
| | | return; |
| | | } |
| | | _inited=true; |
| | | |
| | | if(_searchAdManager==nil){ |
| | | _searchAdManager = [[CSJExpressAdManager alloc] init]; |
| | | } |
| | | |
| | | |
| | | // [self requestIDFA]; |
| | | //æ·»å ç½ç»çæµ |
| | |
| | | UINavigationController *ndrawVC = [[UINavigationController alloc]initWithRootViewController:drawVC]; |
| | | ndrawVC.navigationBar.hidden = YES; |
| | | |
| | | //çå§ |
| | | //çå§ TODO |
| | | DYDramaVideoController *dramaVC = [[DYDramaVideoController alloc]init]; |
| | | dramaVC.tabBarItem.image = [[UIImage imageNamed:@"nav_draw_video"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; |
| | | dramaVC.tabBarItem.selectedImage = [[UIImage imageNamed:@"nav_draw_video_highlight"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; |
| | |
| | | |
| | | |
| | | self.tabBarController = [[SJTabbarViewController alloc]init]; |
| | | self.tabBarController.viewControllers = @[nrecommendVC,ndrawVC,ndramaVC,nmineVC];//nnovelVC |
| | | self.tabBarController.viewControllers = @[nrecommendVC,ndrawVC,ndramaVC,nmineVC]; |
| | | // self.tabBarController.viewControllers = @[nrecommendVC,ndrawVC,nmineVC]; |
| | | |
| | | |
| | | self.tabBarController.tabBar.tintColor = YTHColor(0, 82, 246); |
| | | self.tabBarController.tabBar.unselectedItemTintColor=YTHColor(153, 153, 153); |
| | | [self.tabBarController.tabBar setClipsToBounds:YES]; |
| | |
| | | [YTHsharedManger startManger].ad = result[@"Data"][@"adNew"]; |
| | | [[NSUserDefaults standardUserDefaults] setObject:result[@"Data"][@"vipLink"]?:@"" forKey:VIPLINK]; |
| | | [[NSUserDefaults standardUserDefaults] setObject:result[@"Data"][@"unRegisterLink"]?:@"" forKey:UNREGISTER_LINK]; |
| | | [[NSUserDefaults standardUserDefaults] setObject:result[@"Data"][@"onLining"] forKey:ONLINING]; |
| | | [[NSUserDefaults standardUserDefaults] synchronize]; |
| | | }else{ |
| | | |
| | |
| | | // BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url]; |
| | | // return result; |
| | | // } |
| | | NSLog(@"æµè¯: openURL sourceApplication %@",url); |
| | | |
| | | return YES; |
| | | |
| | | } |
| | | |
| | | - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{ |
| | | NSLog(@"æµè¯: openURL handleOpenURL %@",url); |
| | | return YES; |
| | | } |
| | | |
| | | //IOS9.0 ç³»ç»æ°çå¤çopenURL çAPI |
| | | - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options { |
| | | // æ°æ¥å£åæ³ |
| | | // if (![[UMSocialManager defaultManager] handleOpenURL:url]) { |
| | | // BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url]; |
| | | // return result; |
| | | // } |
| | | switch(_loggingViewController.loginType ){ |
| | | case LOGIN_TYPE_QQ: |
| | | return [TencentOAuth HandleOpenURL:url]; |
| | | break; |
| | | case LOGIN_TYPE_WX: |
| | | return [WXApi handleOpenURL:url delegate:self]; |
| | | break; |
| | | } |
| | | |
| | | |
| | | return YES; |
| | | } |
| | | |
| | | - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler{ |
| | | switch(_loggingViewController.loginType ){ |
| | | case LOGIN_TYPE_QQ: |
| | | if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) { |
| | | NSURL *url = userActivity.webpageURL; |
| | | if(url && [TencentOAuth CanHandleUniversalLink:url]) { |
| | | return [TencentOAuth HandleUniversalLink:url]; |
| | | } |
| | | } |
| | | break; |
| | | case LOGIN_TYPE_WX: |
| | | return [WXApi handleOpenUniversalLink:userActivity delegate:self]; |
| | | break; |
| | | } |
| | | return YES; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { |
| | | |
| | |
| | | } |
| | | //ç©¿å±±ç²å¹¿å |
| | | - (void)loadAd { |
| | | id splash=[YTHsharedManger startManger].ad[@"splash"]; |
| | | if(splash==nil|| splash==[NSNull null] ||splash[@"type"]==nil){ |
| | | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ |
| | | [self hiddenSplash]; |
| | | [self splashDisappear]; |
| | | }); |
| | | return; |
| | | } |
| | | if([[YTHsharedManger startManger].ad[@"splash"][@"type"] isEqualToString:@"csj"]){ |
| | | [self loadCSJSplashAD]; |
| | | }else{ |
| | | [self loadGDTAd]; |
| | | } |
| | | |
| | | // [BUAdSDKManager set :NO]; |
| | | // splash AD demo |
| | | |
| | | [self loadCSJSplashAD]; |
| | | // [self loadGDTAd]; |
| | | |
| | | |
| | | // |
| | | } |
| | | |
| | | - (void) initCSJAd:(BUCompletionHandler)completionHandler{ |
| | |
| | | configuration.secretKey=@"buwan_ios!@"; |
| | | configuration.useMediation = YES; |
| | | [BUAdSDKManager startWithAsyncCompletionHandler:^(BOOL success, NSError *error) { |
| | | if(success){ |
| | | NSLog(@"广å-ç©¿å±±ç²åå§åæå"); |
| | | }else{ |
| | | NSLog(@"广å-ç©¿å±±ç²åå§å失败ï¼%@",error); |
| | | } |
| | | dispatch_async(dispatch_get_main_queue(),^{ |
| | | [self initBUContent]; |
| | | completionHandler(success,error); |
| | | }); |
| | | }]; |
| | | } |
| | | static NSString * JSONConfigPath(void) { |
| | | return [[NSBundle mainBundle] pathForResource:@"SDK_Setting_5096047" ofType:@"json"]; |
| | | } |
| | | |
| | | //åå§åå
容èç |
| | | - (void)initBUContent{ |
| | | // åå§åLCDSDK |
| | | LCDConfig *config = [LCDConfig new]; |
| | | #if DEBUG |
| | | config.logLevel = LCDSDKLogLevelDebug; |
| | | #endif |
| | | // è¯·ä½¿ç¨æ¨çé
ç½®æä»¶(ä¾å¦SDK_Setting_5151488.json)åå§åSDKï¼å¹¶ç¡®ä¿é
ç½®æä»¶å·²ç»ä½ä¸ºCopy Bundle Resourceå¼å
¥å·¥ç¨ |
| | | NSString *configPath = [[NSBundle mainBundle] pathForResource:@"SDK_Setting_5096047" ofType:@"json"]; |
| | | // TODO æµè¯ |
| | | |
| | | - (void)setUpDJXSDK:(DJXStartCompletionBlock)block { |
| | | |
| | | |
| | | |
| | | [LCDManager startWithConfigPath:configPath config:config completion:^(LCDINITStatus initStatus, NSDictionary * _Nonnull userInfo) { |
| | | DJXConfig *config = [DJXConfig new]; |
| | | config.authorityDelegate = self; |
| | | #if DEBUG |
| | | config.logLevel = DJXSDKLogLevelDebug; |
| | | #endif |
| | | [NSNotificationCenter.defaultCenter postNotification:[NSNotification notificationWithName:kLCSDJXSDKSetConfigNotification object:nil userInfo:@{@"config": config}]]; |
| | | [DJXManager initializeWithConfigPath:JSONConfigPath() config:config]; |
| | | [DJXManager startWithCompleteHandler:^(BOOL initStatus, NSDictionary *userInfo) { |
| | | if (initStatus) { |
| | | NSLog(@"çå§åå§å注åæåï¼"); |
| | | } else { |
| | | NSLog(@"çå§åå§å注å失败ï¼%@", userInfo[@"msg"]); |
| | | } |
| | | if (block) { |
| | | block(initStatus, userInfo); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | - (void)setUpLCDSDK:(LCDStartCompletionBlock)block { |
| | | LCDConfig *config = [LCDConfig new]; |
| | | #if DEBUG |
| | | config.logLevel = LCDSDKLogLevelDebug; |
| | | #endif |
| | | |
| | | [LCDManager initializeWithConfigPath:JSONConfigPath() config:config]; |
| | | [LCDManager startWithCompleteHandler:^(LCDINITStatus initStatus, NSDictionary *userInfo) { |
| | | if (initStatus == LCDINITStatus_success) { |
| | | NSLog(@"åå§å注åæåï¼"); |
| | | } else { |
| | | NSLog(@"åå§å注å失败ï¼è¯·éæ°æ³¨å"); |
| | | NSLog(@"%@", userInfo[@"msg"]); |
| | | } |
| | | if (block) { |
| | | block(initStatus, userInfo); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | |
| | | //åå§åå
容èç |
| | | - (void)initBUContent{ |
| | | __weak typeof(self) weakSelf = self; |
| | | [self setUpLCDSDK:^(LCDINITStatus initStatus, NSDictionary * _Nonnull userInfo) { |
| | | // TODO æµè¯ |
| | | [weakSelf setUpDJXSDK:^(BOOL initStatus, NSDictionary * _Nonnull userInfo) { |
| | | NSLog(@""); |
| | | }]; |
| | | }]; |
| | | |
| | | } |
| | |
| | | - (void)loadCSJSplashAD { |
| | | NSLog(@"广å-å 载穿山ç²å¹¿å"); |
| | | CGRect frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - 100); |
| | | self.csjSplashAd = [[BUSplashAd alloc] initWithSlotID:@"102509668" adSize:CGSizeMake(frame.size.width, frame.size.height)]; |
| | | self.csjSplashAd = [[BUSplashAd alloc] initWithSlotID:CSJ_AD_PID_SPLASH adSize:CGSizeMake(frame.size.width, frame.size.height)]; |
| | | //self.splashAd.tolerateTimeout = 10; |
| | | self.csjSplashAd.delegate = self; |
| | | self.csjSplashAd.tolerateTimeout=3.0; |
| | |
| | | |
| | | [_gdtSplash loadAd]; |
| | | } |
| | | |
| | | |
| | | |
| | | - (void)loadCSJGlobalAd { |
| | | NSLog(@"广å-å 载穿山ç²å
¨ç广å"); |
| | | //æ ¹æ®iPhone设å¤ä¸å设置ä¸åçèæ¯å¾ |
| | | float width = [UIScreen mainScreen].bounds.size.width; |
| | | float height = [UIScreen mainScreen].bounds.size.height; |
| | | UIImageView *imageview = [[UIImageView alloc]init]; |
| | | CGFloat viewHeight = 0.0; |
| | | if (width == 320.0f && height<=480.0f) { |
| | | // iphone4 iphone4s ä¸çdefaultå¾ç |
| | | imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"320"]]; |
| | | viewHeight = 55; |
| | | }else if (width ==320.0f && height==568.0f) { |
| | | // iphone5 ä¸çdefaultå¾ç |
| | | imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"320"]]; |
| | | viewHeight = 55; |
| | | }else if (width ==375.0f) { |
| | | // iphone6 ä¸çdefaultå¾ç |
| | | imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"375"]]; |
| | | viewHeight = 63; |
| | | |
| | | }else{ |
| | | // iphone6 plus ä¸çdefaultå¾ç |
| | | imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"414"]]; |
| | | viewHeight = 69; |
| | | } |
| | | UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, KScreenH - viewHeight, KScreenW, viewHeight)]; |
| | | imageview.frame = CGRectMake(0, 12, _bottomView.frame.size.width, _bottomView.frame.size.height - 6); |
| | | |
| | | [bottomView addSubview:imageview]; |
| | | bottomView.backgroundColor = [UIColor whiteColor]; |
| | | UIView *loadView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, width, viewHeight)]; |
| | | loadView.backgroundColor = [UIColor clearColor]; |
| | | |
| | | if(_bottomView!=nil){ |
| | | _bottomView.hidden = YES; |
| | | [_bottomView removeFromSuperview]; |
| | | _bottomView = nil; |
| | | } |
| | | self.bottomView = bottomView; |
| | | // [self.window addSubview:self.bottomView]; |
| | | } |
| | | |
| | | |
| | | #pragma mark 信鸽æ¨é |
| | | - (void)registerPush{ |
| | |
| | | ///æ°çæ¬åè° |
| | | /// |
| | | - (void)splashAdLoadFail:(BUSplashAd *)splashAd error:(BUAdError *)error{ |
| | | // NSLog(@"广å-å 载穿山ç²å¹¿å失败 %@",error.description); |
| | | NSLog(@"广å-å 载穿山ç²å¹¿å失败 %@",error.description); |
| | | UIView *bottom =[[UIApplication sharedApplication].keyWindow viewWithTag:1111]; |
| | | if(bottom){ |
| | | [bottom removeFromSuperview]; |
| | | } |
| | | [self pbu_logWithSEL:_cmd msg:@""]; |
| | | [self loadGDTAd]; |
| | | if(error.code == 20001){ |
| | | [self loadCSJGlobalAd]; |
| | | }else{ |
| | | [self loadGDTAd]; |
| | | } |
| | | } |
| | | - (void)splashAdLoadSuccess:(BUSplashAd *)splashAd{ |
| | | // NSLog(@"广å-å 载穿山ç²å¹¿åæå"); |
| | |
| | | - (void)splashAdDidShow:(nonnull BUSplashAd *)splashAd { |
| | | //NSLog(@"广å-ç©¿å±±ç²å¹¿åå±ç¤º"); |
| | | [self pbu_logWithSEL:_cmd msg:@""]; |
| | | [self hiddenSplash]; |
| | | // [self hiddenSplash]; |
| | | } |
| | | |
| | | |
| | |
| | | NSLog(@"%s",__FUNCTION__); |
| | | } |
| | | |
| | | // 微信åè° |
| | | |
| | | - (void)onReq:(BaseReq *)req{ |
| | | NSLog(@"æµè¯ï»¿ï¼onReq"); |
| | | } |
| | | |
| | | - (void)onResp:(BaseResp *)resp{ |
| | | NSLog(@"æµè¯ï»¿ï¼onResp"); |
| | | if(_loggingViewController){ |
| | | [_loggingViewController onResp: resp]; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @end |
| | | |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "qq@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "qq@3x.png", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "微信@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "微信@3x.png", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "icon_password_hidden.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "icon_password_hidden@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "icon_password_hidden@3x.png", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "å½¢ç¶ 1.png", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "å½¢ç¶ 1@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "filename" : "å½¢ç¶ 1@3x.png", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | } |
| | | } |
| | |
| | | <dict> |
| | | <key>aps-environment</key> |
| | | <string>development</string> |
| | | <key>com.apple.developer.associated-domains</key> |
| | | <array> |
| | | <string>applinks:universallinks.ios.yeshitv.com</string> |
| | | </array> |
| | | <key>com.apple.developer.pass-type-identifiers</key> |
| | | <array> |
| | | <string>$(TeamIdentifierPrefix)*</string> |
New file |
| | |
| | | // |
| | | // CSJExpressAdManager.h |
| | | // BuWanVideo2.0 |
| | | // |
| | | // Created by developer on 2024/10/22. |
| | | // Copyright © 2024 com.yeshi.buwansheque.ios. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface CSJExpressAdManager : NSObject |
| | | |
| | | @property(nonatomic, strong) BUNativeAd *buNativeAd; |
| | | |
| | | -(void) preLoadSearchAd; |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // CSJExpressAdManager.m |
| | | // BuWanVideo2.0 |
| | | // |
| | | // Created by developer on 2024/10/22. |
| | | // Copyright © 2024 com.yeshi.buwansheque.ios. All rights reserved. |
| | | // |
| | | |
| | | #import "CSJExpressAdManager.h" |
| | | |
| | | @interface CSJExpressAdManager ()<BUMNativeAdsManagerDelegate> |
| | | @property (strong, nonatomic) BUNativeAdsManager *adManager; |
| | | @end |
| | | |
| | | |
| | | @implementation CSJExpressAdManager |
| | | |
| | | -(void) preLoadSearchAd{ |
| | | if(_buNativeAd==nil){ |
| | | [self loadCSJAd]; |
| | | } |
| | | } |
| | | |
| | | -(void) loadCSJAd{ |
| | | // å 载广å |
| | | BUAdSlot *slot = [[BUAdSlot alloc] init]; |
| | | slot.ID = CSJ_AD_PID_SEARCH; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | slot.adSize = CGSizeMake(KScreenW-9*2, (KScreenW-9*2)*0.6); // æç
§å®é
æ
åµè®¾ç½®å¹¿å尺寸 |
| | | slot.mediation.mutedIfCan = YES; // éé³ ï¼èååè½ï¼ |
| | | BUNativeAdsManager *adManager = [[BUNativeAdsManager alloc] initWithSlot:slot]; |
| | | self.adManager = adManager; |
| | | self.adManager.delegate = self; |
| | | [self.adManager loadAdDataWithCount:1]; // å è½½å¹¿åæ°éï¼æ¯æ1~3个 |
| | | } |
| | | |
| | | |
| | | - (void)nativeAdsManagerSuccessToLoad:(BUNativeAdsManager *)adsManager nativeAds:(NSArray<BUNativeAd *> *)nativeAdDataArray{ |
| | | NSLog(@"æç´¢ï»¿é¡µï»¿å¹¿å请æ±ï»¿æåï¼%.0f", [[NSDate date] timeIntervalSince1970] * 1000); |
| | | for (BUNativeAd *model in nativeAdDataArray) { |
| | | self.buNativeAd = model; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | |
| | | @end |
| | |
| | | #import "UIViewController+Tools.h" |
| | | #import "BSKImagesPageView.h" |
| | | #import "NoNetworkView.h" |
| | | #import "AdConstant.h" |
| | | |
| | | //åçå享 |
| | | #define YMWXKEY @"wx428de66710fac55b" |
| | |
| | | |
| | | #define UNREGISTER_LINK @"unRegisterLink" |
| | | |
| | | #define ONLINING @"onLining" |
| | | |
| | | //设置éé¢çwebç½é¡µé¾æ¥ |
| | | #define changjianwenti [NSString stringWithFormat:@"http://video.yeshitv.com:8089/BuWan/api_question_ios.jsp?package=%@",[[NSBundle mainBundle] bundleIdentifier]]//常è§é®é¢ |
| | | #define guanyuwomen [NSString stringWithFormat:@"http://video.yeshitv.com:8089/BuWan/api_about_us_ios.jsp?package=%@",[[NSBundle mainBundle] bundleIdentifier]]//å
³äºæä»¬ |
| | |
| | | #import "MainBaseController.h" |
| | | #import <LCDSDK/LCDSDK.h> |
| | | |
| | | @interface DYDramaVideoController :MainBaseController <LCDPlayletInterfaceProtocol,LCDDrawVideoViewControllerDelegate> |
| | | @interface DYDramaVideoController :MainBaseController <LCDDrawVideoViewControllerDelegate , LCDAdvertCallBackProtocol> |
| | | |
| | | @end |
| | |
| | | // |
| | | |
| | | #import "DYDramaVideoController.h" |
| | | #import <LCDSDK/LCDSDK.h> |
| | | #import <PangrowthDJX/DJXSDK.h> |
| | | |
| | | @interface DYDramaVideoController ()<LCDDrawVideoViewControllerDelegate , LCDAdvertCallBackProtocol> |
| | | |
| | | @property |
| | | LCDDrawVideoViewController *vc; |
| | | @interface DYDramaVideoController ()<LCDDrawVideoViewControllerDelegate , LCDAdvertCallBackProtocol, DJXDrawVideoViewControllerDelegate> |
| | | |
| | | @property(nonatomic, strong) DJXDrawVideoViewController *vc; |
| | | |
| | | @end |
| | | |
| | |
| | | } |
| | | |
| | | - (void) viewDidLoad{ |
| | | [self buildCells]; |
| | | |
| | | //çå§ |
| | | [DJXManager startWithCompleteHandler:^(BOOL initStatus, NSDictionary *userInfo) { |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | [self buildCells]; |
| | | }); |
| | | }]; |
| | | } |
| | | |
| | | |
| | | |
| | | - (void)viewDidAppear:(BOOL)animated{ |
| | | // if(self.vc!=nil){ |
| | | // [self.vc drawVideoViewControllerDidAppear]; |
| | | // } |
| | | if(self.vc!=nil){ |
| | | [self.vc drawVideoViewControllerDidAppear]; |
| | | } |
| | | } |
| | | |
| | | - (void)viewDidDisappear:(BOOL)animated{ |
| | | //if(self.vc!=nil){ |
| | | // [self.vc drawVideoViewControllerDidDisappear]; |
| | | //} |
| | | if(self.vc!=nil){ |
| | | [self.vc drawVideoViewControllerDidDisappear]; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | - (void)buildCells { |
| | | // TODO æµè¯ï»¿æ¶ï»¿æ³¨é |
| | | UIView *tmpView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,KScreenW, KScreenH - ALTabBar_H)]; |
| | | tmpView.backgroundColor = UIColor.whiteColor; |
| | | [self.view addSubview:tmpView]; |
| | | |
| | | self.vc=[[LCDDrawVideoViewController alloc] initWithConfigBuilder:^(LCDDrawVideoVCConfig * _Nonnull config) { |
| | | LCDPlayletConfig *playletConfig = [LCDPlayletConfig new]; |
| | | playletConfig.playletMode = LCDPlayletModeOptions_Package; |
| | | playletConfig.freeEpisodesCount = 10; |
| | | _vc = [[DJXDrawVideoViewController alloc] initWithConfigBuilder:^(DJXDrawVideoVCConfig * _Nonnull config) { |
| | | DJXPlayletConfig *playletConfig = [DJXPlayletConfig new]; |
| | | playletConfig.playletUnlockADMode = DJXPlayletUnlockADMode_Common; |
| | | playletConfig.freeEpisodesCount = 5; |
| | | playletConfig.unlockEpisodesCountUsingAD = 5; |
| | | playletConfig.interfaceDelegate = self; |
| | | |
| | | config.playletConfig = playletConfig; |
| | | |
| | | |
| | | config.drawVCTabOptions = LCDDrawVideoVCTabOptions_playlet_feed | LCDDrawVideoVCTabOptions_theater; |
| | | config.viewSize=CGSizeMake(KScreenW, KScreenH - ALTabBar_H); |
| | | config.showCloseButton = NO; |
| | | //config.hiddenPlayletTitleView=YES; |
| | | config.delegate = self; |
| | | config.playletFreeCount = 10; |
| | | config.drawVCTabOptions = DJXDrawVideoVCTabOptions_playlet_feed | DJXDrawVideoVCTabOptions_theater; |
| | | config.viewSize = CGSizeMake(KScreenW, KScreenH - ALTabBar_H); |
| | | config.shouldHideTabBarView = YES; |
| | | }]; |
| | | self.vc.modalPresentationStyle = UIModalPresentationFullScreen; |
| | | [self addChildViewController:self.vc]; |
| | | [tmpView addSubview:self.vc.view]; |
| | | config.playletConfig = playletConfig; |
| | | config.delegate = self; |
| | | }]; |
| | | _vc.modalPresentationStyle = UIModalPresentationFullScreen; |
| | | [self addChildViewController:_vc]; |
| | | [tmpView addSubview:_vc.view]; |
| | | tmpView.layer.masksToBounds = YES; |
| | | } |
| | | |
| | | - (void)clickEnterView:(LCDPlayletInfoModel *)infoModel { |
| | | if (infoModel) { |
| | | LCDPlayletConfig *config = [LCDPlayletConfig new]; |
| | | config.skitId = infoModel.skit_id; |
| | | config.episode = infoModel.current_episode; |
| | | config.playletMode = LCDPlayletModeOptions_Interface; |
| | | |
| | | LCDDrawVideoViewController *vc = [[LCDPlayletManager shareInstance] playletViewControllerWithParams:config]; |
| | | vc.modalPresentationStyle = UIModalPresentationFullScreen; |
| | | [[UIViewController performSelector:@selector(lcd_topViewController)] presentViewController:vc animated:YES completion:nil]; |
| | | } |
| | | } |
| | | |
| | | - (void) hiddenNavBar{ |
| | |
| | | |
| | | //drawæµææ¾å¨åè° |
| | | - (void)drawVideoStartPlay:(UIViewController *)viewController event:(LCDEvent *)event { |
| | | NSLog(@"[çå§åè°]Drawæµ %s %@", __func__, event.description); |
| | | [self hiddenNavBar]; |
| | | NSLog(@"[çå§åè°]Drawæµ %s %@", __func__, event.description); |
| | | [self hiddenNavBar]; |
| | | } |
| | | |
| | | - (void)drawVideoOverPlay:(UIViewController *)viewController event:(LCDEvent *)event { |
| | |
| | | |
| | | - (void)pageViewControllerSwitchToIndex:(NSInteger)index { |
| | | //NSLog(@"[çå§åè°]忢tabåå° %s åå°index为%ld", __func__, index); |
| | | // è°ç¨å»¶è¿æ§è¡ |
| | | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(500 * NSEC_PER_MSEC)), dispatch_get_main_queue(), ^{ |
| | | [self hiddenNavBar]; |
| | | }); |
| | | } |
| | | |
| | | - (void)viewDidLayoutSubviews{ |
| | | [self hiddenNavBar]; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @end |
| | |
| | | <string>qq</string> |
| | | <key>CFBundleURLSchemes</key> |
| | | <array> |
| | | <string>QQ41DD148C</string> |
| | | <string>tencent1105007756</string> |
| | | </array> |
| | | </dict> |
| | | <dict> |
| | |
| | | <string>$(CURRENT_PROJECT_VERSION)</string> |
| | | <key>LSApplicationQueriesSchemes</key> |
| | | <array> |
| | | <string>weixinURLParamsAPI</string> |
| | | <string>weixinULAPI</string> |
| | | <string>tmall</string> |
| | | <string>tbopen</string> |
| | | <string>baidumobads</string> |
| | |
| | | [self performSelector:@selector(dismissAlertController:) withObject:actionController afterDelay:LGLAlertShowTime]; |
| | | }];; |
| | | [actionController addAction:alertAction]; |
| | | if (actionController.popoverPresentationController) { |
| | | // è¿éå设以å½åè§å¾çä¸å¿ä½ä¸ºå¼¹åºæ¡çæ¾ç¤ºä½ç½® |
| | | actionController.popoverPresentationController.sourceView = viewController.view; |
| | | actionController.popoverPresentationController.sourceRect = CGRectMake(viewController.view.bounds.size.width / 2.0, viewController.view.bounds.size.height / 1.0, 1.0, 1.0); |
| | | } |
| | | [viewController presentViewController:actionController animated:YES completion:nil]; |
| | | } else { |
| | | if (actionController.popoverPresentationController) { |
| | | // è¿éå设以å½åè§å¾çä¸å¿ä½ä¸ºå¼¹åºæ¡çæ¾ç¤ºä½ç½® |
| | | actionController.popoverPresentationController.sourceView = viewController.view; |
| | | actionController.popoverPresentationController.sourceRect = CGRectMake(viewController.view.bounds.size.width / 2.0, viewController.view.bounds.size.height / 1.0, 1.0, 1.0); |
| | | } |
| | | [viewController presentViewController:actionController animated:YES completion:nil]; |
| | | //å¦ææ²¡ææé®ï¼èªå¨å»¶è¿æ¶å¤± |
| | | |
| | | |
| | | [self performSelector:@selector(dismissAlertController:) withObject:actionController afterDelay:LGLAlertShowTime]; |
| | | } |
| | | } |
| | |
| | | } |
| | | va_end(args); |
| | | } |
| | | |
| | | if (actionController.popoverPresentationController) { |
| | | // è¿éå设以å½åè§å¾çä¸å¿ä½ä¸ºå¼¹åºæ¡çæ¾ç¤ºä½ç½® |
| | | actionController.popoverPresentationController.sourceView = viewController.view; |
| | | actionController.popoverPresentationController.sourceRect = CGRectMake(viewController.view.bounds.size.width / 2.0, viewController.view.bounds.size.height / 1.0, 1.0, 1.0); |
| | | } |
| | | |
| | | [viewController presentViewController:actionController animated:YES completion:nil]; |
| | | |
| | | //å¦ææ²¡ææé®ï¼èªå¨å»¶è¿æ¶å¤± |
| | |
| | | #import "LoggingViewController.h" |
| | | #import "Personal_informationViewController.h" |
| | | #import <SafariServices/SafariServices.h> |
| | | #import "AppDelegate.h" |
| | | |
| | | @interface LeftViewController ()<UITableViewDelegate,UITableViewDataSource,HXEasyCustomShareViewDelegate>{ |
| | | NSArray *_iconArr; |
| | |
| | | Personal_informationVC.hidesBottomBarWhenPushed = YES; |
| | | [self.navigationController pushViewController:Personal_informationVC animated:YES]; |
| | | }else{//è·³å
¥ç»å½çé¢ |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.hidesBottomBarWhenPushed = YES; |
| | | [self.navigationController pushViewController:loginVC animated:YES]; |
| | | } |
| | |
| | | vc.url =[[NSUserDefaults standardUserDefaults] objectForKey:VIPLINK]; |
| | | [self.navigationController pushViewController:vc animated:YES]; |
| | | }else{ |
| | | LoggingViewController *loginVC=[LoggingViewController new]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | [loginVC setHidesBottomBarWhenPushed:YES]; |
| | | [self.navigationController pushViewController:loginVC animated:YES]; |
| | | } |
| | |
| | | [nr setHidesBottomBarWhenPushed:YES]; |
| | | [self.navigationController pushViewController:nr animated:YES]; |
| | | }else{ |
| | | LoggingViewController *loginVC=[LoggingViewController new]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | [loginVC setHidesBottomBarWhenPushed:YES]; |
| | | [self.navigationController pushViewController:loginVC animated:YES]; |
| | | } |
| | |
| | | [message setHidesBottomBarWhenPushed:YES]; |
| | | [self.navigationController pushViewController:message animated:YES]; |
| | | }else{ |
| | | LoggingViewController *loginVC=[LoggingViewController new]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | [loginVC setHidesBottomBarWhenPushed:YES]; |
| | | [self.navigationController pushViewController:loginVC animated:YES]; |
| | | } |
| | |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import <WXApi.h> |
| | | #import "WechatAuthSDK.h" |
| | | #define LOGIN_TYPE_QQ 1 |
| | | #define LOGIN_TYPE_WX 2 |
| | | |
| | | @interface LoggingViewController : UIViewController |
| | | |
| | | @property (nonatomic) BOOL ispresent; |
| | | // æ¯å¦éè¦åå°è·çé¢ |
| | | @property (nonatomic, assign) BOOL backNotRoot; |
| | | |
| | | @property (nonatomic, assign) int loginType; |
| | | |
| | | - (void)onResp:(BaseResp *)resp; |
| | | |
| | | @end |
| | |
| | | #import "RegisteViewController.h" |
| | | #import "forgetPasswordViewController.h" |
| | | #import "SettingWebView.h" |
| | | #import <TencentOAuth.h> |
| | | |
| | | @interface LoggingViewController (){ |
| | | @interface LoggingViewController () <TencentSessionDelegate>{ |
| | | UITextField *accountNumber; |
| | | UITextField *PasswordNumber; |
| | | UIButton *LoginBtn; |
| | | UIImageView *showPassWordSwitch; |
| | | TencentOAuth *tencentOAuth; |
| | | UIButton *agreeBtn; |
| | | } |
| | | |
| | | @end |
| | | |
| | | @implementation LoggingViewController{ |
| | | @implementation LoggingViewController { |
| | | |
| | | |
| | | } |
| | | |
| | | - (IBAction)changePwdShow: (UITapGestureRecognizer *)gesture{ |
| | | if(showPassWordSwitch.tag == 0){ |
| | | [showPassWordSwitch setImage:[UIImage imageNamed:@"icon_password_show"]]; |
| | | showPassWordSwitch.tag = 1; |
| | | PasswordNumber.secureTextEntry = NO; |
| | | |
| | | }else{ |
| | | [showPassWordSwitch setImage:[UIImage imageNamed:@"icon_password_hidden"]]; |
| | | showPassWordSwitch.tag = 0; |
| | | PasswordNumber.secureTextEntry = YES; |
| | | } |
| | | |
| | | } |
| | | |
| | | - (void)viewDidLoad { |
| | |
| | | UILabel *password=[[UILabel alloc] init]; |
| | | //å¯ç è¾å
¥æ¡ |
| | | PasswordNumber=[[UITextField alloc] init]; |
| | | //å¯ç æ¾ç¤ºå¼å
³ |
| | | showPassWordSwitch = [[UIImageView alloc] init]; |
| | | //åå²çº¿ |
| | | UILabel *Dividing_line2=[[UILabel alloc] init]; |
| | | //æ¯å¦åæåè®® |
| | | UIButton *agreeBtn=[[UIButton alloc] init]; |
| | | agreeBtn=[[UIButton alloc] init]; |
| | | //åè®® |
| | | UIButton *agreeItem=[[UIButton alloc] init]; |
| | | //å¿è®°å¯ç |
| | |
| | | UIButton *registerBtn=[[UIButton alloc] init]; |
| | | //ç»å½ |
| | | LoginBtn=[[UIButton alloc] init]; |
| | | int START_Y = 0; |
| | | if ([UIScreen mainScreen].bounds.size.height>480.0f) {//iphone4sä»¥ä¸ |
| | | //表头å¾ç |
| | | UIImageView *titleImage=[[UIImageView alloc] initWithFrame:CGRectMake(60, 85, KScreenW-120,(KScreenW-120)/394*171)]; |
| | | titleImage.image=[UIImage imageNamed:@"ç»å½è¡¨å¤´"]; |
| | | [self.view addSubview:titleImage]; |
| | | |
| | | //è´¦å· |
| | | account.frame=CGRectMake(50, 100+(KScreenW-120)/394*171, 44,30); |
| | | account.frame=CGRectMake(50, START_Y+(KScreenW-120)/394*171, 44,30); |
| | | //è´¦å·è¾å
¥æ¡ |
| | | accountNumber.frame=CGRectMake(95, 100+(KScreenW-120)/394*171, KScreenW-145, 30); |
| | | accountNumber.frame=CGRectMake(95, START_Y+(KScreenW-120)/394*171, KScreenW-145, 30); |
| | | //åå²çº¿ |
| | | Dividing_line.frame=CGRectMake(50, 135+(KScreenW-120)/394*171, KScreenW-110, 0.5); |
| | | Dividing_line.frame=CGRectMake(50, START_Y + 35+(KScreenW-120)/394*171, KScreenW-110, 0.5); |
| | | //å¯ç |
| | | password.frame=CGRectMake(50, 140+(KScreenW-120)/394*171, 44, 30); |
| | | password.frame=CGRectMake(50, START_Y + 40 +(KScreenW-120)/394*171, 44, 30); |
| | | //å¯ç è¾å
¥æ¡ |
| | | PasswordNumber.frame=CGRectMake(95, 140+(KScreenW-120)/394*171, KScreenW-145, 30); |
| | | PasswordNumber.frame=CGRectMake(95, START_Y + 40 +(KScreenW-120)/394*171, KScreenW-185, 30); |
| | | //å¯ç æ¾ç¤ºæé® |
| | | showPassWordSwitch.frame=CGRectMake(KScreenW-80, START_Y + 40 +(KScreenW-120)/394*171 + 10, 20, 15); |
| | | //åå²çº¿ |
| | | Dividing_line2.frame=CGRectMake(50, 175+(KScreenW-120)/394*171, KScreenW-110, 0.5); |
| | | Dividing_line2.frame=CGRectMake(50, START_Y + 75 +(KScreenW-120)/394*171, KScreenW-110, 0.5); |
| | | //æ¯å¦åæåè®® |
| | | if ([UIScreen mainScreen].bounds.size.width>=375.0) { |
| | | agreeBtn.frame=CGRectMake(60, 195+(KScreenW-120)/394*171, 14, 14); |
| | | agreeBtn.frame=CGRectMake(60, START_Y + 95 +(KScreenW-120)/394*171, 14, 14); |
| | | }else{ |
| | | agreeBtn.frame=CGRectMake(KScreenW/2-80-15, 220+(KScreenW-120)/394*171, 14, 14); |
| | | agreeBtn.frame=CGRectMake(KScreenW/2-80-15, START_Y + 120 +(KScreenW-120)/394*171, 14, 14); |
| | | } |
| | | //åè®® |
| | | if ([UIScreen mainScreen].bounds.size.width>=375.0) { |
| | | agreeItem.frame=CGRectMake(75, 192+(KScreenW-120)/394*171, 160, 20); |
| | | agreeItem.frame=CGRectMake(75, START_Y + 92 +(KScreenW-120)/394*171, 160, 20); |
| | | }else{ |
| | | agreeItem.frame=CGRectMake(KScreenW/2-80, 217+(KScreenW-120)/394*171, 160, 20); |
| | | agreeItem.frame=CGRectMake(KScreenW/2-80, START_Y + 117 +(KScreenW-120)/394*171, 160, 20); |
| | | } |
| | | //å¿è®°å¯ç |
| | | if ([UIScreen mainScreen].bounds.size.width>=375.0) { |
| | | forgetedPassword.frame=CGRectMake(240, 192+(KScreenW-120)/394*171, 100, 20); |
| | | forgetedPassword.frame=CGRectMake(240, START_Y + 92 +(KScreenW-120)/394*171, 100, 20); |
| | | }else{ |
| | | forgetedPassword.frame=CGRectMake(KScreenW-150, 192+(KScreenW-120)/394*171, 100, 20); |
| | | forgetedPassword.frame=CGRectMake(KScreenW-150, START_Y + 92 +(KScreenW-120)/394*171, 100, 20); |
| | | } |
| | | //注å |
| | | registerBtn.frame=CGRectMake(60, 250+(KScreenW-120)/394*171, (KScreenW-150)/2-20, 35); |
| | | registerBtn.frame=CGRectMake(60, START_Y + 150 +(KScreenW-120)/394*171, (KScreenW-150)/2-20, 35); |
| | | //ç»å½ |
| | | LoginBtn.frame=CGRectMake(60+(KScreenW-150)/2, 250+(KScreenW-120)/394*171, (KScreenW-150)/2+40, 35); |
| | | LoginBtn.frame=CGRectMake(60+(KScreenW-150)/2, START_Y + 150 +(KScreenW-120)/394*171, (KScreenW-150)/2+40, 35); |
| | | }else{ |
| | | //è´¦å· |
| | | account.frame=CGRectMake(50, 100, 44,30); |
| | | account.frame=CGRectMake(50, START_Y, 44,30); |
| | | //è´¦å·è¾å
¥æ¡ |
| | | accountNumber.frame=CGRectMake(95, 100, KScreenW-145, 30); |
| | | accountNumber.frame=CGRectMake(95, START_Y, KScreenW-145, 30); |
| | | //åå²çº¿ |
| | | Dividing_line.frame=CGRectMake(50, 135, KScreenW-110, 0.5); |
| | | Dividing_line.frame=CGRectMake(50, START_Y + 35, KScreenW-110, 0.5); |
| | | //å¯ç |
| | | password.frame=CGRectMake(50, 140, 44, 30); |
| | | //å¯ç è¾å
¥æ¡ |
| | | PasswordNumber.frame=CGRectMake(95, 140, KScreenW-145, 30); |
| | | password.frame=CGRectMake(50, START_Y + 40, 44, 30); |
| | | // å¯ç è¾å
¥æ¡ |
| | | PasswordNumber.frame=CGRectMake(95, START_Y + 40, KScreenW-145, 30); |
| | | // å¯ç æ¾ç¤ºæé® |
| | | showPassWordSwitch.frame=CGRectMake(KScreenW-165, START_Y + 40, 20, 15); |
| | | |
| | | //åå²çº¿ |
| | | Dividing_line2.frame=CGRectMake(50, 175, KScreenW-110, 0.5); |
| | | Dividing_line2.frame=CGRectMake(50, START_Y + 75, KScreenW-110, 0.5); |
| | | //æ¯å¦åæåè®® |
| | | agreeBtn.frame=CGRectMake(KScreenW/2-80-15, 220, 14, 14); |
| | | agreeBtn.frame=CGRectMake(KScreenW/2-80-15, START_Y + 120, 14, 14); |
| | | //åè®® |
| | | agreeItem.frame=CGRectMake(KScreenW/2-80, 217, 160, 20); |
| | | agreeItem.frame=CGRectMake(KScreenW/2-80, START_Y + 117, 160, 20); |
| | | //å¿è®°å¯ç |
| | | forgetedPassword.frame=CGRectMake(KScreenW-150, 192, 100, 20); |
| | | forgetedPassword.frame=CGRectMake(KScreenW-150, START_Y + 92, 100, 20); |
| | | //注å |
| | | registerBtn.frame=CGRectMake(60, 250, (KScreenW-150)/2-20, 35); |
| | | registerBtn.frame=CGRectMake(60, START_Y + 150, (KScreenW-150)/2-20, 35); |
| | | //ç»å½ |
| | | LoginBtn.frame=CGRectMake(60+(KScreenW-150)/2, 250, (KScreenW-150)/2+40, 35); |
| | | LoginBtn.frame=CGRectMake(60+(KScreenW-150)/2, START_Y + 150, (KScreenW-150)/2+40, 35); |
| | | } |
| | | |
| | | //è´¦å· |
| | |
| | | //è´¦å·è¾å
¥æ¡ |
| | | accountNumber.keyboardType=UIKeyboardTypeEmailAddress; |
| | | accountNumber.autocorrectionType=UITextAutocorrectionTypeNo; |
| | | accountNumber.placeholder = @"请è¾å
¥é®ç®±"; |
| | | [self.view addSubview:accountNumber]; |
| | | |
| | | //åå²çº¿ |
| | |
| | | //å¯ç è¾å
¥æ¡ |
| | | PasswordNumber.secureTextEntry=YES; |
| | | [self.view addSubview:PasswordNumber]; |
| | | PasswordNumber.placeholder = @"请è¾å
¥å¯ç "; |
| | | |
| | | [self.view addSubview:showPassWordSwitch]; |
| | | [showPassWordSwitch setImage:[UIImage imageNamed:@"icon_password_hidden"]]; |
| | | showPassWordSwitch.userInteractionEnabled = YES; |
| | | showPassWordSwitch.tag = 0; |
| | | |
| | | UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(changePwdShow:)]; |
| | | [showPassWordSwitch addGestureRecognizer:singleTap]; |
| | | |
| | | //åå²çº¿ |
| | | Dividing_line2.backgroundColor=kGlobalLightGreyColor_223; |
| | |
| | | [self.view addSubview:LoginBtn]; |
| | | |
| | | // //ç¬¬ä¸æ¹ç»å½ |
| | | // UIView * thirdView=[[UIView alloc] initWithFrame:CGRectMake(0, KScreenH-170, KScreenW, 170)]; |
| | | // thirdView.backgroundColor=KGlobalLightGreyColor_255; |
| | | // [self.view addSubview:thirdView]; |
| | | // |
| | | // //ç¬¬ä¸æ¹ç»å½çæ 头 |
| | | // UIImageView *thirdtitle=[[UIImageView alloc] initWithFrame:CGRectMake((KScreenW-210)/2, 20, 210, 23)]; |
| | | // thirdtitle.image=[UIImage imageNamed:@"䏿¹ç»å½æ 头"]; |
| | | // [thirdView addSubview:thirdtitle]; |
| | | // |
| | | // //QQç»å½ |
| | | // UIButton * QQLoginButton=[[UIButton alloc] initWithFrame:CGRectMake(KScreenW/2-30, thirdView.frame.size.height/2-30, 60, 60)]; |
| | | // [QQLoginButton setBackgroundImage:[UIImage imageNamed:@"QQLogin"] forState:UIControlStateNormal]; |
| | | // [QQLoginButton addTarget:self action:@selector(ClickQQ:) forControlEvents:UIControlEventTouchUpInside]; |
| | | // [thirdView addSubview:QQLoginButton]; |
| | | // |
| | | // UILabel * QQLabel=[[UILabel alloc] initWithFrame:CGRectMake(KScreenW/2-30, thirdView.frame.size.height/2+30, 60, 40)]; |
| | | // QQLabel.textAlignment = NSTextAlignmentCenter; |
| | | // QQLabel.text=@"QQ"; |
| | | // QQLabel.font=[UIFont systemFontOfSize:17]; |
| | | // [thirdView addSubview:QQLabel]; |
| | | // |
| | | // if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]) { |
| | | // thirdView.hidden = YES; |
| | | // }else{ |
| | | // thirdView.hidden = NO; |
| | | // |
| | | // } |
| | | UIView * thirdView=[[UIView alloc] initWithFrame:CGRectMake(0, registerBtn.frame.origin.y + registerBtn.size.height + 20, KScreenW, 170)]; |
| | | thirdView.backgroundColor=KGlobalLightGreyColor_255; |
| | | [self.view addSubview:thirdView]; |
| | | |
| | | //ç¬¬ä¸æ¹ç»å½çæ 头 |
| | | UIImageView *thirdtitle=[[UIImageView alloc] initWithFrame:CGRectMake((KScreenW-210)/2, 20, 210, 23)]; |
| | | thirdtitle.image=[UIImage imageNamed:@"䏿¹ç»å½æ 头"]; |
| | | [thirdView addSubview:thirdtitle]; |
| | | |
| | | //QQç»å½ |
| | | UIButton * QQLoginButton=[[UIButton alloc] initWithFrame:CGRectMake(KScreenW/2-60-30, thirdView.frame.size.height/2-30, 60, 60)]; |
| | | [QQLoginButton setBackgroundImage:[UIImage imageNamed:@"icon_login_qq"] forState:UIControlStateNormal]; |
| | | [QQLoginButton addTarget:self action:@selector(ClickQQ:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [thirdView addSubview:QQLoginButton]; |
| | | |
| | | UILabel * QQLabel=[[UILabel alloc] initWithFrame:CGRectMake(KScreenW/2-60-30, thirdView.frame.size.height/2+30, 60, 40)]; |
| | | QQLabel.textAlignment = NSTextAlignmentCenter; |
| | | QQLabel.text=@"QQ"; |
| | | QQLabel.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1]; |
| | | QQLabel.font=[UIFont systemFontOfSize:17]; |
| | | [thirdView addSubview:QQLabel]; |
| | | |
| | | |
| | | // 微信ç»å½ |
| | | UIButton * wxLoginButton=[[UIButton alloc] initWithFrame:CGRectMake(KScreenW/2+30, thirdView.frame.size.height/2-30, 60, 60)]; |
| | | [wxLoginButton setBackgroundImage:[UIImage imageNamed:@"icon_login_wx"] forState:UIControlStateNormal]; |
| | | [wxLoginButton addTarget:self action:@selector(ClickWX:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [thirdView addSubview:wxLoginButton]; |
| | | |
| | | UILabel * wxLabel=[[UILabel alloc] initWithFrame:CGRectMake(KScreenW/2+30, thirdView.frame.size.height/2+30, 60, 40)]; |
| | | wxLabel.textAlignment = NSTextAlignmentCenter; |
| | | wxLabel.text=@"微信"; |
| | | wxLabel.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1]; |
| | | wxLabel.font=[UIFont systemFontOfSize:17]; |
| | | [thirdView addSubview:wxLabel]; |
| | | |
| | | if( [[NSUserDefaults standardUserDefaults] boolForKey:ONLINING]) |
| | | { |
| | | thirdView.hidden = YES; |
| | | }else{ |
| | | thirdView.hidden = NO; |
| | | } |
| | | |
| | | if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]) { |
| | | //thirdView.hidden = YES; |
| | | }else{ |
| | | // thirdView.hidden = NO; |
| | | } |
| | | [self .view addSubview:thirdView]; |
| | | |
| | | } |
| | | |
| | |
| | | [Share ShakeView:accountNumber WithInfomation:@"请è¾å
¥æ£ç¡®çé®ç®±å°åï¼"]; |
| | | return; |
| | | } |
| | | |
| | | if (![Share isEmailAddress:accountNumber.text]) { |
| | | //è´¦å·æ ¼å¼ä¸æ£ç¡® |
| | | [Share ShakeView:accountNumber WithInfomation:@"请è¾å
¥æ£ç¡®çé®ç®±å°åï¼"]; |
| | | }else if(PasswordNumber.text.length == 0){ |
| | | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"è´¦å·æå¯ç é误"]]; |
| | | |
| | | if(PasswordNumber.text.length == 0){ |
| | | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"请è¾å
¥ï»¿å¯ç "]]; |
| | | return; |
| | | }else{ |
| | | |
| | | } |
| | | |
| | | if( ![agreeBtn isSelected]){ |
| | | [SVProgressHUD showInfoWithStatus:@"请å
åæï»¿ï»¿âç¨æ·ï»¿ä½¿ç¨ï»¿å议&éç§ï»¿æ¡æ¬¾ï»¿ï»¿â"]; |
| | | return; |
| | | } |
| | | |
| | | if ([Share isEmailAddress:accountNumber.text]){ |
| | | [SVProgressHUD showWithStatus:@"ç»éä¸"]; |
| | | [[YTHNetInterface startInterface] getloginWithUid:[YTHsharedManger startManger].Uid WithSystem:@"1" WithEmail:accountNumber.text WithPwd:PasswordNumber.text withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | [[YTHNetInterface startInterface] loginWithEmail:[YTHsharedManger startManger].Uid WithSystem:@"1" WithEmail:accountNumber.text WithPwd:PasswordNumber.text withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSString *err=[NSString stringWithFormat:@"%@",[result objectForKey:@"Error"]]; |
| | | if (err.length==0) { |
| | | if ([[NSString stringWithFormat:@"%@",[result objectForKey:@"IsPost"]] isEqualToString:@"true"]) { |
| | | [SVProgressHUD dismiss]; |
| | | //LoginUid |
| | | [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Id"] forKey:@"LoginUid"]; |
| | |
| | | |
| | | }else{ |
| | | //ç»å½å¤±è´¥ |
| | | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"è´¦å·æå¯ç é误"]]; |
| | | [SVProgressHUD showErrorWithStatus:err]; |
| | | PasswordNumber.text=@""; |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | }]; |
| | | |
| | | } |
| | | |
| | | // else if([Share isPhone:accountNumber.text]) |
| | | // { |
| | | // [SVProgressHUD showWithStatus:@"ç»éä¸"]; |
| | | // [[YTHNetInterface startInterface] loginWithPhone:[YTHsharedManger startManger].Uid WithSystem:@"1" WithPhone:accountNumber.text WithPwd:PasswordNumber.text withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | // if (isSuccessful) { |
| | | // NSString *err=[NSString stringWithFormat:@"%@",[result objectForKey:@"Error"]]; |
| | | // if (err.length==0) { |
| | | // [SVProgressHUD dismiss]; |
| | | // //LoginUid |
| | | // [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Id"] forKey:@"LoginUid"]; |
| | | // [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Nickname"] forKey:@"QQUserName"]; |
| | | // [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Portrait"] forKey:@"iconURL"]; |
| | | // [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"userOnLine"]; |
| | | // |
| | | // [self fetchNewInfo]; |
| | | // |
| | | // }else{ |
| | | // //ç»å½å¤±è´¥ |
| | | // [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"è´¦å·æå¯ç é误"]]; |
| | | // PasswordNumber.text=@""; |
| | | // } |
| | | // |
| | | // }else{ |
| | | // [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"è´¦å·æå¯ç é误"]]; |
| | | // PasswordNumber.text=@""; |
| | | // } |
| | | // }]; |
| | | // } |
| | | |
| | | else{ |
| | | [Share ShakeView:accountNumber WithInfomation:@"请è¾å
¥æ£ç¡®çé®ç®±å°åï¼"]; |
| | | return; |
| | | } |
| | | } |
| | | |
| | |
| | | * |
| | | * @param sender QQç»å½çæé® |
| | | */ |
| | | //-(void)ClickQQ:(UIButton*)sender{ |
| | | // |
| | | // if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]){ |
| | | // [SVProgressHUD showInfoWithStatus:@"æ¨è¿æ²¡æå®è£
QQå¦"]; |
| | | // |
| | | // return; |
| | | // } |
| | | // |
| | | // [[UMSocialManager defaultManager] getUserInfoWithPlatform:UMSocialPlatformType_QQ currentViewController:nil completion:^(id result, NSError *error) { |
| | | // if (error) { |
| | | // |
| | | // }else{ |
| | | // //æç¤ºç¨æ·ï¼æ£å¨ç»éä¸ |
| | | // [SVProgressHUD showWithStatus:@"æ¼å½ç»éä¸..."]; |
| | | // |
| | | // UMSocialUserInfoResponse *snsAccount = result; |
| | | // |
| | | // [[YTHNetInterface startInterface] getThirdPartyWithWithUid:[YTHsharedManger startManger].Uid withOpenId:snsAccount.openid WithName:snsAccount.name WithPortrait:snsAccount.iconurl WithLoginType:@"1" withSystem:@"1" withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | // if (isSuccessful) { |
| | | // [SVProgressHUD dismiss]; |
| | | // //LoginUidç设置å¨YTHNetInterfaceä¸ï¼ç¹å»ä¸é¢çç请æ±å½æ°ï¼å°±å¯ä»¥çè§ï¼ |
| | | // [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"userOnLine"]; |
| | | // [self getInfoFromInternet]; |
| | | // if (_ispresent) { |
| | | // [self presentBack]; |
| | | // }else{ |
| | | // [self back]; |
| | | // } |
| | | // }else{ |
| | | // //éç¥ç¨æ·ç»å½å¤±è´¥ |
| | | // [SVProgressHUD showErrorWithStatus:@"ç»é失败ï¼"]; |
| | | // } |
| | | // }]; |
| | | // } |
| | | -(void)ClickQQ:(UIButton*)sender{ |
| | | if( ![agreeBtn isSelected]){ |
| | | [SVProgressHUD showInfoWithStatus:@"请å
åæï»¿ï»¿âç¨æ·ï»¿ä½¿ç¨ï»¿å议&éç§ï»¿æ¡æ¬¾ï»¿ï»¿â"]; |
| | | return; |
| | | } |
| | | |
| | | if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]){ |
| | | [SVProgressHUD showInfoWithStatus:@"æ¨è¿æ²¡æå®è£
QQå¦"]; |
| | | return; |
| | | } |
| | | _loginType = LOGIN_TYPE_QQ; |
| | | if(!tencentOAuth) |
| | | { |
| | | tencentOAuth = [[TencentOAuth alloc] initWithAppId:@"1105007756" andDelegate:self]; |
| | | [TencentOAuth setIsUserAgreedAuthorization:YES]; |
| | | } |
| | | NSArray *permissions = [NSArray arrayWithObjects:@"get_user_info",@"get_simple_userinfo", nil]; |
| | | [tencentOAuth authorize:permissions]; |
| | | } |
| | | |
| | | -(void)ClickWX:(UIButton*)sender{ |
| | | if( ![agreeBtn isSelected]){ |
| | | [SVProgressHUD showInfoWithStatus:@"请å
åæï»¿ï»¿âç¨æ·ï»¿ä½¿ç¨ï»¿å议&éç§ï»¿æ¡æ¬¾ï»¿ï»¿â"]; |
| | | return; |
| | | } |
| | | |
| | | //è°ç¨èªæ£å½æ° |
| | | // [WXApi checkUniversalLinkReady:^(WXULCheckStep step, WXCheckULStepResult* result) { |
| | | // NSLog(@"WeChatSDK-check %@, %u, %@, %@", @(step), result.success, result.errorInfo, result.suggestion); |
| | | // }]; |
| | | //} |
| | | if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"weixin://"]]){ |
| | | [SVProgressHUD showInfoWithStatus:@"æ¨è¿æ²¡æå®è£
微信å¦"]; |
| | | return; |
| | | } |
| | | |
| | | _loginType = LOGIN_TYPE_WX; |
| | | |
| | | //TODO 微信ç»å½ |
| | | SendAuthReq* req =[[SendAuthReq alloc] init]; |
| | | req.scope = @"snsapi_userinfo"; // åªè½å¡« snsapi_userinfo |
| | | req.state = @"ysdq_ios"; |
| | | [WXApi sendReq:req completion:^(BOOL success) { |
| | | NSLog(@"ï»¿å®æ"); |
| | | }]; |
| | | } |
| | | |
| | | /** |
| | | ä»ç½ç»è·åæ°æ® |
| | |
| | | if (isSuccessful) { |
| | | //é¦å
å¤ææ°æ®æ¯å¦è·æå |
| | | NSString *err=[NSString stringWithFormat:@"%@",[result objectForKey:@"Error"]]; |
| | | if (err.length==0) { |
| | | if ([[NSString stringWithFormat:@"%@",[result objectForKey:@"IsPost"]] isEqualToString:@"true"]) { |
| | | //è·æ°ä¸ªäººä¿¡æ¯å°å
¨å±åé |
| | | if ([[result objectForKey:@"Data"] objectForKey:@"Portrait"]!=nil) { |
| | | NSString *str=[[result objectForKey:@"Data"] objectForKey:@"Portrait"]; |
| | |
| | | }]; |
| | | } |
| | | |
| | | - (void)onResp:(BaseResp *)resp{ |
| | | NSLog(@"onResp"); |
| | | if([resp isKindOfClass:[SendAuthResp class]]){ |
| | | SendAuthResp *authResp = (SendAuthResp *)resp; |
| | | switch( authResp.errCode){ |
| | | case 0:{ |
| | | // å
è®¸ï»¿ææ |
| | | NSLog(@"微信ææï»¿æåï¼%@",authResp.code); |
| | | |
| | | [SVProgressHUD showWithStatus:@"ç»éä¸"]; |
| | | [[YTHNetInterface startInterface] loginWithWX:[YTHsharedManger startManger].Uid WithSystem:@"1" WithCode:authResp.code withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSString *err=[NSString stringWithFormat:@"%@",[result objectForKey:@"Error"]]; |
| | | if ([[NSString stringWithFormat:@"%@",[result objectForKey:@"IsPost"]] isEqualToString:@"true"]) { |
| | | [SVProgressHUD dismiss]; |
| | | //LoginUid |
| | | [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Id"] forKey:@"LoginUid"]; |
| | | [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Nickname"] forKey:@"QQUserName"]; |
| | | [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Portrait"] forKey:@"iconURL"]; |
| | | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"userOnLine"]; |
| | | [self fetchNewInfo]; |
| | | |
| | | }else{ |
| | | //ç»å½å¤±è´¥ |
| | | [SVProgressHUD showErrorWithStatus:err]; |
| | | // PasswordNumber.text=@""; |
| | | } |
| | | |
| | | }else{ |
| | | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"ç½ç»è¯·æ±å¤±è´¥ï¼è¯·ï»¿ç¨ååè¯"]]; |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | break; |
| | | case -4: |
| | | //æç»ï»¿ææ |
| | | break; |
| | | case -2: |
| | | // ï»¿åæ¶ï»¿ææ |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // QQç»å½ï»¿åè° |
| | | - (void)tencentDidLogin{ |
| | | //QQç»å½ï»¿æå |
| | | NSString *acessToken = tencentOAuth.accessToken; |
| | | NSString *openId = tencentOAuth.openId; |
| | | NSLog(@"ç»å½ï»¿æåï¼ï»¿accessToken - %@ openId - %@",acessToken,openId); |
| | | [SVProgressHUD showWithStatus:@"ç»éä¸"]; |
| | | [[YTHNetInterface startInterface] loginWithQQ:[YTHsharedManger startManger].Uid WithSystem:@"1" WithAcessToken:acessToken WithOpenid:openId withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSString *err=[NSString stringWithFormat:@"%@",[result objectForKey:@"Error"]]; |
| | | if ([[NSString stringWithFormat:@"%@",[result objectForKey:@"IsPost"]] isEqualToString:@"true"]) { |
| | | [SVProgressHUD dismiss]; |
| | | //LoginUid |
| | | [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Id"] forKey:@"LoginUid"]; |
| | | [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Nickname"] forKey:@"QQUserName"]; |
| | | [[NSUserDefaults standardUserDefaults] setObject:[[result objectForKey:@"Data"] objectForKey:@"Portrait"] forKey:@"iconURL"]; |
| | | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"userOnLine"]; |
| | | |
| | | [self fetchNewInfo]; |
| | | |
| | | }else{ |
| | | //ç»å½å¤±è´¥ |
| | | [SVProgressHUD showErrorWithStatus:err]; |
| | | } |
| | | |
| | | }else{ |
| | | [SVProgressHUD showErrorWithStatus:[NSString stringWithFormat:@"ç½ç»è¯·æ±å¤±è´¥ï¼è¯·ç¨ååè¯"]]; |
| | | } |
| | | }]; |
| | | |
| | | } |
| | | - (void)tencentDidNotLogin:(BOOL)cancelled{ |
| | | if (cancelled){ |
| | | NSLog(@"ç¨æ·åæ¶ç»å½"); |
| | | } |
| | | else{ |
| | | NSLog(@"ç»å½å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | -(void)tencentDidNotNetWork |
| | | { |
| | | NSLog(@"æ ç½ç»è¿æ¥ï¼è¯·è®¾ç½®ç½ç»"); |
| | | } |
| | | |
| | | |
| | | @end |
| | |
| | | //éä¸ç¶æ |
| | | [deleBtn setTitle:@"åæ¶" forState:UIControlStateSelected]; |
| | | |
| | | [deleBtn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal]; |
| | | |
| | | deleBtn.titleLabel.font = [UIFont systemFontOfSize:15]; |
| | | deleBtn.titleLabel.textAlignment = NSTextAlignmentCenter; |
| | | [deleBtn addTarget:self action:@selector(deletebutton:) forControlEvents:UIControlEventTouchUpInside]; |
| | |
| | | */ |
| | | -(void)CreateOperatingView{ |
| | | CGFloat height = 40; |
| | | if (KIsiPhoneX) { |
| | | height = 60; |
| | | } |
| | | allSelAndDelView = [[UIView alloc]initWithFrame:CGRectMake(0, KScreenH-height, KScreenW, 40)]; |
| | | // if (KIsiPhoneX) { |
| | | // height = 60; |
| | | // } |
| | | allSelAndDelView = [[UIView alloc]initWithFrame:CGRectMake(0, KScreenH-height - kNavigationBarH -kStatusBarH, KScreenW, 40)]; |
| | | //allSelAndDelView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, 40)]; |
| | | allSelAndDelView.hidden = YES; |
| | | allSelAndDelView.backgroundColor = [UIColor whiteColor]; |
| | | |
| | |
| | | |
| | | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ |
| | | NoteCell * cell = [tableView dequeueReusableCellWithIdentifier:@"NoteCell"]; |
| | | cell.backgroundColor = kGlobalBackgroundColor; |
| | | UIView *selectedBackgroundView = [[UIView alloc] initWithFrame:cell.bounds]; |
| | | selectedBackgroundView.backgroundColor = [UIColor whiteColor]; |
| | | cell.selectedBackgroundView = selectedBackgroundView; |
| | | cell.backgroundColor = [UIColor whiteColor]; |
| | | NSMutableDictionary * dic = [historyListDataArray objectAtIndex:indexPath.row]; |
| | | NSString *str = (NSString*)[dic objectForKey:@"Name"]; |
| | | if ( [self autoHeiWithHeight:str WithWidth:cell.name.frame.size.width]){ |
| | |
| | | } |
| | | cell.Timeupdate.text = time; |
| | | |
| | | cell.backgroundColor = [UIColor whiteColor]; |
| | | |
| | | //å¾ç |
| | | [cell.image setYthImageWithURL:[dic objectForKey:@"Hpicture"] placeholderImage:[UIImage imageNamed:@"é»è®¤å è½½å¾ç"]]; |
| | | |
| | |
| | | |
| | | #import "dsbridge.h" |
| | | #import "JSAPI.h" |
| | | #import "AppDelegate.h" |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | |
| | | @interface PPTVController () <WKNavigationDelegate, WKUIDelegate, PPTVDelegate, BUNativeExpressFullscreenVideoAdDelegate> |
| | |
| | | } |
| | | |
| | | - (void)login { |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC = ((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.backNotRoot = YES; |
| | | [self.navigationController pushViewController:loginVC animated:YES]; |
| | | } |
| | |
| | | [self presentViewController:PickerImage animated:YES completion:nil]; |
| | | }]]; |
| | | [alert addAction:[UIAlertAction actionWithTitle:@"åæ¶" style:UIAlertActionStyleCancel handler:nil]]; |
| | | |
| | | if (alert.popoverPresentationController) { |
| | | UITableViewCell *cell = [_tableView cellForRowAtIndexPath:indexPath]; |
| | | // è¿éå设以å½åè§å¾çä¸å¿ä½ä¸ºå¼¹åºæ¡çæ¾ç¤ºä½ç½® |
| | | alert.popoverPresentationController.sourceView = cell.contentView; |
| | | alert.popoverPresentationController.sourceRect = CGRectMake(cell.contentView.bounds.size.width / 2.0, cell.contentView.bounds.size.height / 1.0, 1.0, 1.0); |
| | | } |
| | | |
| | | |
| | | [self presentViewController:alert animated:YES completion:nil]; |
| | | |
| | | }else if (indexPath.section==1){ |
| | |
| | | }]; |
| | | [modifySexnameAlert addAction:cancel]; |
| | | |
| | | |
| | | if (modifySexnameAlert.popoverPresentationController) { |
| | | // è¿éå设以å½åè§å¾çä¸å¿ä½ä¸ºå¼¹åºæ¡çæ¾ç¤ºä½ç½® |
| | | UITableViewCell *cell = [_tableView cellForRowAtIndexPath:indexPath]; |
| | | // è¿éå设以å½åè§å¾çä¸å¿ä½ä¸ºå¼¹åºæ¡çæ¾ç¤ºä½ç½® |
| | | modifySexnameAlert.popoverPresentationController.sourceView = cell.contentView; |
| | | modifySexnameAlert.popoverPresentationController.sourceRect = CGRectMake(cell.contentView.bounds.size.width / 2.0, 0, 1.0, 1.0); |
| | | } |
| | | |
| | | |
| | | [self presentViewController:modifySexnameAlert animated:YES completion:^{ |
| | | |
| | | }]; |
New file |
| | |
| | | <?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>NSPrivacyCollectedDataTypes</key>
|
| | | <array/>
|
| | | <key>NSPrivacyAccessedAPITypes</key>
|
| | | <array>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>C617.1</string> |
| | | <string>æä»¬éè¦è®¿é®æä»¶æ¶é´æ³ä»¥ä¾¿ç®¡çååæ¥ç¨æ·çæ°æ®ï¼ç¡®ä¿åºç¨åè½çåç¡®æ§åä¸è´æ§ã</string>
|
| | | </array>
|
| | | </dict>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>35F9.1</string> |
| | | <string>æä»¬éè¦è®¿é®ç³»ç»å¯å¨æ¶é´ä»¥ç¡®ä¿åºç¨å¨å¯å¨æ¶è½å¤æ§è¡ç¹å®åå§åä»»å¡ï¼å¹¶ä¼åç¨æ·ä½éªã</string>
|
| | | </array>
|
| | | </dict>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>7D9E.1</string>
|
| | | <string>E174.1</string> |
| | | <string>æä»¬éè¦è®¿é®ç£ç空é´ä»¥ä¾¿ä¸ºç¨æ·ç¼åè§é¢å
容ï¼ä»èæé«ææ¾æ§è½åç¨æ·ä½éªã</string>
|
| | | </array>
|
| | | </dict>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>CA92.1</string> |
| | | <string>æä»¬ä½¿ç¨ UserDefaults æ¥åå¨ç¨æ·çå好设置ååºç¨ç¶æï¼ä»¥ä¾¿ç¨æ·ä¸æ¬¡ä½¿ç¨åºç¨æ¶å¯ä»¥å¿«éæ¢å¤å°ä¹åçç¶æã</string> |
| | | </array>
|
| | | </dict> |
| | | |
| | | |
| | | |
| | | |
| | |
|
| | | </array>
|
| | | </dict> |
| | | </plist> |
| | |
| | | _labelTitle = [[UILabel alloc] init]; |
| | | _labelTitle.font = [UIFont systemFontOfSize:16]; |
| | | _labelTitle.textAlignment = NSTextAlignmentLeft; |
| | | _labelTitle.textColor = [UIColor blackColor]; |
| | | } |
| | | return _labelTitle;; |
| | | } |
| | |
| | | const int CELL_TYPE_COMMON = 1; |
| | | const int CELL_TYPE_VIDEO_CARD = 2; |
| | | const int CELL_TYPE_AD = 3; |
| | | const float AD_SIZE_RATE = 0.72; |
| | | |
| | | @interface RecommendController () <UICollectionViewDelegate, UICollectionViewDataSource, RecommendDelegate,LCDVideoCardProviderDelegate,BUMNativeAdsManagerDelegate,BUNativeAdDelegate> |
| | | |
| | |
| | | }else if (cell_type == CELL_TYPE_AD) { |
| | | if (!self.cellRecommendAd) { |
| | | self.cellRecommendAd = [collectionView dequeueReusableCellWithReuseIdentifier:@"RecommendAdView" forIndexPath:indexPath]; |
| | | // self.cellRecommendAd.frame = CGRectMake(self.cellRecommendAd.frame.origin.x, self.cellRecommendAd.frame.origin.y, KScreenW, KScreenW*AD_SIZE_RATE); |
| | | self.cellRecommendAd.delegate = self; |
| | | } |
| | | // æ¾ç¤ºå¹¿åæ°æ® |
| | |
| | | } else if (cell_type ==CELL_TYPE_VIDEO_CARD) { |
| | | return CGSizeMake(KScreenW, KScreenW/2.4 * 1.4); |
| | | }else if (cell_type ==CELL_TYPE_AD) { |
| | | return CGSizeMake(KScreenW, KScreenW*0.6); |
| | | return CGSizeMake(KScreenW, KScreenW*AD_SIZE_RATE); |
| | | } |
| | | else { |
| | | if(self.arrayContent!=nil&&self.arrayContent.count>0){ |
| | |
| | | } |
| | | |
| | | - (void) loadAd{ |
| | | id other=[YTHsharedManger startManger].ad[@"other"]; |
| | | if(other==nil|| other==[NSNull null] ||other[@"type"]==nil){ |
| | | return; |
| | | } |
| | | |
| | | if (self.adManager) { |
| | | // 鿝䏿¬¡å¹¿å对象 èåç»´åº¦æ¹æ³ |
| | | [self.adManager.mediation destory]; |
| | | } |
| | | BUAdSlot *slot = [[BUAdSlot alloc] init]; |
| | | slot.ID = @"102509315"; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | slot.adSize = CGSizeMake(KScreenW-9*2, (KScreenW-9*2)*0.6); // æç
§å®é
æ
åµè®¾ç½®å¹¿å尺寸 |
| | | slot.ID = CSJ_AD_PID_HOME_DRAW; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | slot.adSize = CGSizeMake(KScreenW-9*2, (KScreenW-9*2)*AD_SIZE_RATE); // æç
§å®é
æ
åµè®¾ç½®å¹¿å尺寸 |
| | | slot.mediation.mutedIfCan = YES; // éé³ ï¼èååè½ï¼ |
| | | BUNativeAdsManager *adManager = [[BUNativeAdsManager alloc] initWithSlot:slot]; |
| | | self.adManager = adManager; |
| | |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | #import "DYGridVideoController.h" |
| | | #import "UIView+Toast.h" |
| | | #import "AppDelegate.h" |
| | | |
| | | @interface RecommendMainController () <ZJScrollPageViewDelegate,BUNativeExpressFullscreenVideoAdDelegate> |
| | | |
| | |
| | | |
| | | |
| | | @property (nonatomic, strong)BUNativeExpressFullscreenVideoAd *fullscreenAd; |
| | | |
| | | |
| | | @end |
| | | |
| | | @implementation RecommendMainController |
| | |
| | | } |
| | | |
| | | |
| | | -(void) requestVideoClass:(YthNetWorkBlock)block count:(int) count{ |
| | | |
| | | //NSLog(@"æµè¯ï¼è¯·æ±ç½ç»ç¬¬%d次",count); |
| | | |
| | | [[YTHNetInterface startInterface] getVideoClassWithUid:[YTHsharedManger startManger].Uid WithSystem:@"1" withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | block(isSuccessful,result,error); |
| | | } else{ |
| | | if(count > 3){ |
| | | block(isSuccessful,result,@"请æ±åºé3次"); |
| | | }else{ |
| | | [self requestVideoClass:block count:count+1]; |
| | | } |
| | | } |
| | | }]; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | -(void)loadDataFromFile { |
| | | //NSLog(@"æµè¯ï¼loadDataFromFile"); |
| | | if (_isRequest) { |
| | | return; |
| | | } |
| | | self.isRequest = YES; |
| | | //NSLog(@"æµè¯ï¼è¯·æ±ç½ç»æ°æ®-%@",[NSDate date]); |
| | | [[YTHNetInterface startInterface]cancelAll]; |
| | | |
| | | |
| | | [[YTHNetInterface startInterface] getVideoClassWithUid:[YTHsharedManger startManger].Uid WithSystem:@"1" withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | [self requestVideoClass:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | // NSLog(@"æµè¯ï¼ç½ç»è¯·æ±æå"); |
| | | [self.arrayClassName removeAllObjects]; |
| | | [self.arrayKeyName removeAllObjects]; |
| | | for (int i = 0; i < [result[@"Data"][@"data"] count]; i++) { |
| | |
| | | // [self.arrayKeyName addObject:@{@"Id":@123,@"DataType":@"gridVideo"}]; |
| | | // } |
| | | } |
| | | |
| | | |
| | | |
| | | self.primtView.hidden = YES; |
| | | [self setupViewConfig]; |
| | | self.isRequest = NO; |
| | | |
| | | } else{ |
| | | //NSLog(@"æµè¯ï¼ç½ç»è¯·æ±å¤±è´¥-%@",[NSDate date]); |
| | | //NSLog(@"æµè¯ï¼%@",error); |
| | | if ([error compare:@"ä¼¼ä¹å·²æå¼ä¸äºèç½çè¿æ¥ã"] == 0) { |
| | | [self notHaveNetWork]; |
| | | } |
| | | self.isRequest = NO; |
| | | } |
| | | }]; |
| | | } count:0]; |
| | | } |
| | | |
| | | #pragma mark æ·»å ç½ç»çæµ |
| | |
| | | - (void) reachabilityChang: (NSNotification*)note { |
| | | switch ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus) { |
| | | case AFNetworkReachabilityStatusNotReachable:{//æ ç½ |
| | | //NSLog(@"æµè¯ï¼æ ç½ç»"); |
| | | [YTHsharedManger startManger].NetworkStatus = 0; |
| | | |
| | | if (self.arrayClassName.count == 0) { |
| | |
| | | } |
| | | break; |
| | | case AFNetworkReachabilityStatusReachableViaWWAN:{//ä¸ç»´ç½ |
| | | //NSLog(@"æµè¯ï¼ä¸ç»´ç½"); |
| | | [YTHsharedManger startManger].NetworkStatus = 1; |
| | | |
| | | if (self.arrayClassName.count == 0) { |
| | |
| | | } |
| | | break; |
| | | case AFNetworkReachabilityStatusReachableViaWiFi:{// 使ç¨WiFiç½ç» |
| | | //NSLog(@"æµè¯ï¼WiFiç½ç»"); |
| | | [YTHsharedManger startManger].NetworkStatus = 2; |
| | | |
| | | if (self.arrayClassName.count == 0) { |
| | |
| | | } |
| | | break; |
| | | case AFNetworkReachabilityStatusUnknown:{// å½åç½ç»æªç¥ |
| | | //NSLog(@"æµè¯ï¼ç½ç»æªç¥"); |
| | | [YTHsharedManger startManger].NetworkStatus = 3; |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | - (void)notHaveNetWork { |
| | | //NSLog(@"æµè¯ï¼notHaveNetWork"); |
| | | self.primtView.hidden = NO; |
| | | } |
| | | |
| | |
| | | |
| | | UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(imageview.frame), KScreenW , 30)]; |
| | | label.textColor = SJColor(98, 98, 98, 1); |
| | | label.text = @"æ æ³è¿æ¥å°ç½ç»..."; |
| | | label.text = @"æ°æ®å 载失败"; |
| | | label.font = [UIFont boldSystemFontOfSize:18]; |
| | | label.textAlignment = NSTextAlignmentCenter; |
| | | [_primtView addSubview:label]; |
| | |
| | | button.frame = CGRectMake((KScreenW - KScreenW / 3) / 2, CGRectGetMaxY(label.frame) + 15, KScreenW / 3, 30); |
| | | button.backgroundColor = SJColor(25, 169, 249, 1); |
| | | button.titleLabel.font = [UIFont systemFontOfSize:16]; |
| | | [button setTitle:@"éæ°å è½½" forState:UIControlStateNormal]; |
| | | [button setTitle:@"ç¹å»éè¯" forState:UIControlStateNormal]; |
| | | button.layer.cornerRadius = 5; |
| | | button.layer.masksToBounds = YES; |
| | | [button addTarget:self action:@selector(refreshTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | |
| | | //[self.view makeToast:@"é¦é¡µæå±å¹¿å被å±è½"]; |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ |
| | | //[self.view makeToast:@"å¼å§å è½½æå±å¹¿å"]; |
| | | NSLog(@"广åå¼å§å è½½-é¦é¡µæå±"); |
| | | self.fullscreenAd = [[BUNativeExpressFullscreenVideoAd alloc] initWithSlotID:@"947698171"]; |
| | | self.fullscreenAd = [[BUNativeExpressFullscreenVideoAd alloc] initWithSlotID:CSJ_AD_PID_HOME_INTERSTITIAL]; |
| | | self.fullscreenAd.delegate = self; |
| | | [self.fullscreenAd loadAdData]; |
| | | |
| | | }); |
| | | |
| | | // é¢å 载æç´¢ï»¿é¡µï»¿å¹¿å |
| | | if(ApplicationDelegate.searchAdManager){ |
| | | if(ApplicationDelegate.searchAdManager.buNativeAd==nil){ |
| | | [ApplicationDelegate.searchAdManager preLoadSearchAd]; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //æ¤æ¹æ³å¨è§é¢å¹¿åç´ æå è½½æåæ¶è°ç¨ã |
| | | - (void)nativeExpressFullscreenVideoAdDidLoad:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd { |
| | |
| | | |
| | | //å½è§é¢å¹¿åç´ æå 载失败æ¶è°ç¨æ¤æ¹æ³ã |
| | | - (void)nativeExpressFullscreenVideoAd:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error { |
| | | NSLog(@"nativeExpressFullscreenVideoAd"); |
| | | if(error!=nil&&error.code == 20001){ |
| | | NSLog(@"ç©¿å±±ç²é¦é¡µæå±å 载失败ï¼éè¦å 载海å¤å¹¿åï¼%@",error); |
| | | } |
| | | NSLog(@"nativeExpressFullscreenVideoAdï¼%@",error); |
| | | //[self.view makeToast:@"æå±å¹¿åå 载失败"]; |
| | | } |
| | | |
| | |
| | | UITextField * FillInTheAccountNumber; |
| | | UITextField * FillInThePassWord; |
| | | UITextField * FillInTheVerificationCode; |
| | | UIImageView *showPassWordSwitch; |
| | | |
| | | UIButton * agreeBtn; |
| | | UIButton * registerBtn; |
| | | UIButton * VerificationCode; |
| | |
| | | @end |
| | | |
| | | @implementation RegisteViewController |
| | | |
| | | |
| | | - (IBAction)changePwdShow: (UITapGestureRecognizer *)gesture{ |
| | | if(showPassWordSwitch.tag == 0){ |
| | | [showPassWordSwitch setImage:[UIImage imageNamed:@"icon_password_show"]]; |
| | | showPassWordSwitch.tag = 1; |
| | | FillInThePassWord.secureTextEntry = NO; |
| | | |
| | | }else{ |
| | | [showPassWordSwitch setImage:[UIImage imageNamed:@"icon_password_hidden"]]; |
| | | showPassWordSwitch.tag = 0; |
| | | FillInThePassWord.secureTextEntry = YES; |
| | | } |
| | | |
| | | } |
| | | |
| | | - (void)viewDidLoad { |
| | | [super viewDidLoad]; |
| | |
| | | FillInTheAccountNumber=[[UITextField alloc] init]; |
| | | //å¡«åå¯ç |
| | | FillInThePassWord=[[UITextField alloc] init]; |
| | | |
| | | showPassWordSwitch = [[UIImageView alloc] init]; |
| | | |
| | | //éªè¯ç æ¡ |
| | | FillInTheVerificationCode=[[UITextField alloc] init]; |
| | | //è·åéªè¯ç çæé® |
| | |
| | | FillInTheAccountNumber.frame=CGRectMake(50, 120+(KScreenW-120)/394*171, KScreenW-100, 35); |
| | | //å¡«åå¯ç |
| | | FillInThePassWord.frame=CGRectMake(50, 178+(KScreenW-120)/394*171, KScreenW-100, 35); |
| | | |
| | | showPassWordSwitch.frame=CGRectMake(KScreenW-80, 178+(KScreenW-120)/394*171 + 10, 20, 15); |
| | | //éªè¯ç æ¡ |
| | | FillInTheVerificationCode.frame=CGRectMake(50, 236+(KScreenW-120)/394*171, 100, 35); |
| | | //è·åéªè¯ç çæé® |
| | |
| | | FillInTheAccountNumber.frame=CGRectMake(50, 120, KScreenW-100, 35); |
| | | //å¡«åå¯ç |
| | | FillInThePassWord.frame=CGRectMake(50, 178, KScreenW-100, 35); |
| | | |
| | | showPassWordSwitch.frame=CGRectMake(KScreenW-80, 178 + 10, 20, 15); |
| | | //éªè¯ç æ¡ |
| | | FillInTheVerificationCode.frame=CGRectMake(50, 236, 100, 35); |
| | | //è·åéªè¯ç çæé® |
| | |
| | | FillInThePassWord.placeholder=[NSString stringWithFormat:@"请è¾å
¥å¯ç "]; |
| | | FillInThePassWord.autocorrectionType=UITextAutocorrectionTypeNo; |
| | | FillInThePassWord.autocapitalizationType=UITextAutocapitalizationTypeNone; |
| | | FillInThePassWord.secureTextEntry = YES; |
| | | // åå§åå¯ç æ¾ç¤ºå¾ç |
| | | [showPassWordSwitch setImage:[UIImage imageNamed:@"icon_password_hidden"]]; |
| | | showPassWordSwitch.tag = 0; |
| | | showPassWordSwitch.userInteractionEnabled = YES; |
| | | |
| | | // æ·»å ç¹å»äºä»¶ |
| | | UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(changePwdShow:)]; |
| | | [showPassWordSwitch addGestureRecognizer:singleTap]; |
| | | |
| | | //åé¢ç©ºä¸ä¸ªé´è· |
| | | [self setTextFieldLeftPadding:FillInThePassWord forWidth:10.0]; |
| | | [self.view addSubview:FillInThePassWord]; |
| | | |
| | | [self.view addSubview:showPassWordSwitch]; |
| | | |
| | | //éªè¯ç æ¡ |
| | | [FillInTheVerificationCode.layer setMasksToBounds:YES]; |
| | |
| | | -(void)startTime:(UIButton *)sender{ |
| | | |
| | | if ([Share isEmailAddress:FillInTheAccountNumber.text]){ |
| | | if (![FillInTheAccountNumber.text containsString:@"@qq.com"] ) { |
| | | if (![FillInTheAccountNumber.text containsString:@"@qq.com"] &&FALSE) { |
| | | [Share ShakeView:FillInTheAccountNumber WithInfomation:@"请使ç¨QQé®ç®±æ³¨å"]; |
| | | }else |
| | | { |
| | |
| | | } |
| | | else{ |
| | | //é®ç®±æ ¼å¼ä¸æ£ç¡® |
| | | [Share ShakeView:FillInTheAccountNumber WithInfomation:@"请使ç¨QQé®ç®±æ³¨å"]; |
| | | [Share ShakeView:FillInTheAccountNumber WithInfomation:@"é®ç®±æ ¼å¼ä¸æ£ç¡®"]; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | "init": { |
| | | "site_id": "5096047", |
| | | "app_id": "300976", |
| | | "partner": "pangle_300976", |
| | | "secure_key": "ddf9a5e28cb24b2540a60b2990cd8a20" |
| | | }, |
| | | "feed": { |
| | | "news_list_ad_code_id": "947237101", |
| | | "news_first_ad_code_id": "947237102", |
| | | "news_second_ad_code_id": "947237090", |
| | | "video_first_ad_code_id": "", |
| | | "video_second_ad_code_id": "947237093", |
| | | "related_ad_code_id": "947237099", |
| | | "news_draw_ad_code_id": "947237104", |
| | | "news_draw_native_ad_code_id": "947237091", |
| | | "news_outer_list_ad_code_id": "947237110", |
| | | "news_outer_first_ad_code_id": "947237107", |
| | | "news_outer_second_ad_code_id": "947237111", |
| | | "outer_video_second_ad_code_id": "947237085", |
| | | "outer_related_ad_code_id": "947237095", |
| | | "news_outer_draw_ad_code_id": "947237112", |
| | | "news_outer_draw_native_ad_code_id": "947237096", |
| | | "news_interstitial_code_id": "947237105" |
| | | }, |
| | | "small_video": { |
| | | "draw_ad_code_id": "947237092", |
| | | "draw_native_ad_code_id": "947237086", |
| | | "grid_ad_code_id": "947237082", |
| | | "grid_draw_ad_code_id": "947237114", |
| | | "grid_draw_native_ad_code_id": "947237080", |
| | | "video_card_ad_code_id": "947237098", |
| | | "video_card_draw_ad_code_id": "947237109", |
| | | "video_card_draw_native_ad_code_id": "947237089", |
| | | "interstitial_ad_code_id": "947237087", |
| | | "interstitial_note_ad_code_id": "947237088", |
| | | "staggered_grid_ad_code_id": "947237083", |
| | | "staggered_grid_draw_ad_code_id": "947237092", |
| | | "staggered_grid_draw_native_ad_code_id": "947237086", |
| | | "draw_interstitial_ad_code_id": "947592757", |
| | | "draw_fullscreen_interstitial_ad_code_id": "947592756", |
| | | "draw_banner_code_id": "947592759" |
| | | }, |
| | | "novel": { |
| | | "status": 1, |
| | | "pre_ad_code_id": "947236550", |
| | | "mid_ad_code_id": "947236546", |
| | | "exciting_ad_code_id": "947236552", |
| | | "interstitial_code_id": "947236559", |
| | | "banner_ad_code_id": "947236561", |
| | | "end_ad_code_id": "947236562" |
| | | }, |
| | | "live": null |
| | | } |
| | | "init": { |
| | | "site_id": "5096047", |
| | | "app_id": "300976", |
| | | "partner": "pangle_300976", |
| | | "secure_key": "ddf9a5e28cb24b2540a60b2990cd8a20", |
| | | "secure_key_d": "a6958cee3ecb314361f00e4c1675a539" |
| | | }, |
| | | "feed": { |
| | | "news_list_ad_code_id": "947237101", |
| | | "news_first_ad_code_id": "947237102", |
| | | "news_second_ad_code_id": "947237090", |
| | | "video_first_ad_code_id": "", |
| | | "video_second_ad_code_id": "947237093", |
| | | "related_ad_code_id": "947237099", |
| | | "news_draw_ad_code_id": "947237104", |
| | | "news_draw_native_ad_code_id": "947237091", |
| | | "news_outer_list_ad_code_id": "947237110", |
| | | "news_outer_first_ad_code_id": "947237107", |
| | | "news_outer_second_ad_code_id": "947237111", |
| | | "outer_video_second_ad_code_id": "947237085", |
| | | "outer_related_ad_code_id": "947237095", |
| | | "news_outer_draw_ad_code_id": "947237112", |
| | | "news_outer_draw_native_ad_code_id": "947237096", |
| | | "news_interstitial_code_id": "947237105" |
| | | }, |
| | | "small_video": { |
| | | "draw_ad_code_id": "947237092", |
| | | "draw_native_ad_code_id": "947237086", |
| | | "grid_ad_code_id": "947237082", |
| | | "grid_draw_ad_code_id": "947237114", |
| | | "grid_draw_native_ad_code_id": "947237080", |
| | | "video_card_ad_code_id": "947237098", |
| | | "video_card_draw_ad_code_id": "947237109", |
| | | "video_card_draw_native_ad_code_id": "947237089", |
| | | "interstitial_ad_code_id": "947237087", |
| | | "interstitial_note_ad_code_id": "947237088", |
| | | "staggered_grid_ad_code_id": "947237083", |
| | | "staggered_grid_draw_ad_code_id": "947237092", |
| | | "staggered_grid_draw_native_ad_code_id": "947237086", |
| | | "draw_interstitial_ad_code_id": "947592757", |
| | | "draw_fullscreen_interstitial_ad_code_id": "947592756", |
| | | "draw_banner_code_id": "947592759", |
| | | "drama_rewarded_ad_code_id": "952310731", |
| | | "drama_rewarded_ad_code_id_02": "952310730", |
| | | "drama_draw_ad_code_id": "952310732", |
| | | "staggered_grid_ad_code_id_02": "961663479" |
| | | }, |
| | | "novel": { |
| | | "status": 1, |
| | | "pre_ad_code_id": "947236550", |
| | | "mid_ad_code_id": "947236546", |
| | | "exciting_ad_code_id": "947236552", |
| | | "interstitial_code_id": "947236559", |
| | | "banner_ad_code_id": "947236561", |
| | | "end_ad_code_id": "947236562" |
| | | }, |
| | | "live": null, |
| | | "license_config": [ |
| | | { |
| | | "PackageName": "com.yeshi.buwanshequ.ios", |
| | | "BundleId": "com.yeshi.buwanshequ.ios", |
| | | "StartTime": "20241126T085743Z", |
| | | "ExpireTime": "20261126T085743Z", |
| | | "CreatedTime": "20241126T085742Z", |
| | | "Signature": "lUqaILYn5v3gF4iiOP0RUjeN7dhqy1L2Ba/SO2Fcj8GBFHy9lG+8R1XyzCOQHQw99wikR4Q+Gj8XOuvSROhC2I/UKKwfq1m4WNRcZirJtFD7SPyDP4pTRJ1GQ8XX6L9Gzx26PsaCtaiQ0WRHRzll7QgKh9+ShFnD+O44ksGLxPeWPS91ciev3nyvBzR4qS+OW/d5OcfEjsSRhgndj3r1Mg5y4w1aQt1jwQv0Cdtj5Tl4osvr0UgcuXU8UL1DYkJ5Ybh5+t4XSACBcpFH7Lo3cRNx4GeMG9xK2AghfEYlO07vbxM9XFHO6ueuyc8H7za8dIM1jMAxil5rWb6LaO85dQ==", |
| | | "Content": "eyJJZCI6IjYxMzIwMTE1NCIsICJWZXJzaW9uIjoyLCAiQ2hhbm5lbCI6ImFkX2NzaiIsICJUeXBlIjoyLCAiUGFja2FnZU5hbWUiOiJjb20ueWVzaGkuYnV3YW5zaGVxdS5pb3MiLCAiQnVuZGxlSWQiOiJjb20ueWVzaGkuYnV3YW5zaGVxdS5pb3MiLCAiTW9kdWxlcyI6W3siTmFtZSI6InZvZF9wbGF5IiwgIkVkaXRpb24iOiJwcmVtaXVtX2VkaXRpb24iLCAiU3RhcnRUaW1lIjoxNzMyNjExNDYyODIyLCAiRXhwaXJlVGltZSI6MTc5NTY4MzQ2MjgyMiwgIkV4cGlyZUJ1ZmZlciI6MTU1NTIwMDAwMDB9XSwgIkZpbGVWZXJzaW9uIjoiMTczMjYxMTQ2Mjg0NTE1NjU5OSJ9", |
| | | "MainURL": "https://vod-license-m.volccdn.com/vod-license/l-613201154-ch-ad_csj-a-300976.lic?lk3s=0d9f7a7d\u0026x-expires=4886211462\u0026x-signature=YT6dftRcSwk8oQzmoViuO%2BpJtcI%3D", |
| | | "BackupURL": "https://vod-license-b.volccdn.com/vod-license/l-613201154-ch-ad_csj-a-300976.lic?lk3s=0d9f7a7d\u0026x-expires=4886211462\u0026x-signature=VU8QklZwuLPACj%2BYuV2%2FbitzIb4%3D", |
| | | "Id": "613201154" |
| | | } |
| | | ] |
| | | } |
| | |
| | | #import "UICollectionViewLeftAlignedLayout.h" |
| | | #import "GDTNativeExpressAd.h" |
| | | #import "GDTNativeExpressAdView.h" |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | |
| | | @interface SearchController () <UICollectionViewDelegate, UICollectionViewDataSource, SearchDelegate, UITableViewDelegate, UITableViewDataSource,GDTNativeExpressAdDelegete> |
| | | @interface SearchController () <UICollectionViewDelegate, UICollectionViewDataSource, SearchDelegate, UITableViewDelegate, UITableViewDataSource,GDTNativeExpressAdDelegete, BUMNativeAdsManagerDelegate, BUNativeAdDelegate> |
| | | |
| | | @property (nonatomic, strong) SearchNavView *viewSearchNav; |
| | | @property (nonatomic, nullable, strong) UICollectionView *collectionView; |
| | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *arraySearch; |
| | | |
| | | @property (nonatomic, strong) GDTNativeExpressAd *nativeExpressAd; |
| | | |
| | | @property (nonatomic) BUNativeAdsManager *adManager; |
| | | |
| | | @property (nonatomic, strong) BUNativeAd *buNativeAd; |
| | | |
| | | |
| | | @end |
| | | |
| | | @implementation SearchController |
| | |
| | | |
| | | - (void)dealloc |
| | | { |
| | | |
| | | if( ApplicationDelegate&&ApplicationDelegate.searchAdManager){ |
| | | ApplicationDelegate.searchAdManager.buNativeAd=nil; |
| | | } |
| | | } |
| | | |
| | | - (void)viewDidLoad { |
| | |
| | | |
| | | - (void)loadData { |
| | | [SVProgressHUD show]; |
| | | |
| | | |
| | | |
| | | dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); |
| | | |
| | | // å建å
¨å±å¹¶è¡ |
| | |
| | | [self.collectionView reloadData]; |
| | | }); |
| | | }); |
| | | |
| | | [self loadAd]; |
| | | [self loadCSJAd]; |
| | | } |
| | | |
| | | - (void)setupViewConfig { |
| | |
| | | [self.nativeExpressAd loadAd:1]; |
| | | } |
| | | |
| | | -(void) loadCSJAd{ |
| | | id search=[YTHsharedManger startManger].ad[@"videoSearch"]; |
| | | if(search==nil|| search==[NSNull null] ||search[@"type"]==nil){ |
| | | return; |
| | | } |
| | | |
| | | if(ApplicationDelegate.searchAdManager!=nil&&ApplicationDelegate.searchAdManager.buNativeAd!=nil){ |
| | | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | self.buNativeAd = ApplicationDelegate.searchAdManager.buNativeAd; |
| | | [self showCSJAd:self.buNativeAd]; |
| | | }); |
| | | }); |
| | | }else{ |
| | | BUAdSlot *slot = [[BUAdSlot alloc] init]; |
| | | slot.ID = CSJ_AD_PID_SEARCH; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | slot.adSize = CGSizeMake(KScreenW-9*2, (KScreenW-9*2)*0.6); // æç
§å®é
æ
åµè®¾ç½®å¹¿å尺寸 |
| | | slot.mediation.mutedIfCan = YES; // éé³ ï¼èååè½ï¼ |
| | | BUNativeAdsManager *adManager = [[BUNativeAdsManager alloc] initWithSlot:slot]; |
| | | self.adManager = adManager; |
| | | self.adManager.mediation.rootViewController = self; |
| | | self.adManager.delegate = self; |
| | | [self.adManager loadAdDataWithCount:1]; // å è½½å¹¿åæ°éï¼æ¯æ1~3个 |
| | | NSLog(@"æç´¢ï»¿é¡µï»¿å¹¿åå¼å§ï»¿è¯·æ±ï»¿ï¼%.0f", [[NSDate date] timeIntervalSince1970] * 1000); |
| | | } |
| | | } |
| | | |
| | | - (void)nativeExpressAdSuccessToLoad:(GDTNativeExpressAd |
| | | *)nativeExpressAd views:(NSArray<__kindof |
| | | GDTNativeExpressAdView *> *)views |
| | |
| | | |
| | | } |
| | | |
| | | - (void) showCSJAd:(BUNativeAd*) model{ |
| | | model.rootViewController = self; |
| | | model.delegate = self; |
| | | if (model.mediation.isExpressAd) { |
| | | [model.mediation render]; |
| | | } |
| | | if(model.mediation.canvasView){ |
| | | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:3]; |
| | | UICollectionViewCell *cell = (UICollectionViewCell *)[self.collectionView cellForItemAtIndexPath:indexPath]; |
| | | if(cell!=nil){ |
| | | // delete origin ad view |
| | | for(UIView *subview in cell.subviews){ |
| | | [subview removeFromSuperview]; |
| | | } |
| | | cell.sd_layout.leftSpaceToView(self, 10); |
| | | [cell addSubview:model.mediation.canvasView]; |
| | | // 广åä½ render åå·æ° tableView |
| | | [self.collectionView reloadData]; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | - (void)nativeAdsManagerSuccessToLoad:(BUNativeAdsManager *)adsManager nativeAds:(NSArray<BUNativeAd *> *)nativeAdDataArray{ |
| | | NSLog(@"æç´¢ï»¿é¡µï»¿å¹¿å请æ±ï»¿æåï¼%.0f", [[NSDate date] timeIntervalSince1970] * 1000); |
| | | for (BUNativeAd *model in nativeAdDataArray) { |
| | | self.buNativeAd = model; |
| | | [self showCSJAd:self.buNativeAd]; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | - (void)nativeAdsManager:(BUNativeAdsManager *)adsManager didFailWithError:(NSError *)error{ |
| | | NSLog(@"æç´¢é¡µCSJ广åå 载失败ï¼%@", error.userInfo.description); |
| | | [self loadAd]; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | - (void)nativeAdDidLoad:(BUNativeAd *)nativeAd{ |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | - (void)nativeAdDidLoad:(BUNativeAd *)nativeAd view:(UIView *_Nullable)view{ |
| | | |
| | | } |
| | | |
| | | - (void)nativeAd:(BUNativeAd *)nativeAd didFailWithError:(NSError *_Nullable)error{ |
| | | |
| | | } |
| | | |
| | | |
| | | - (void)nativeAdDidBecomeVisible:(BUNativeAd *)nativeAd{ |
| | | |
| | | } |
| | | |
| | | |
| | | - (void)nativeAdDidCloseOtherController:(BUNativeAd *)nativeAd interactionType:(BUInteractionType)interactionType{ |
| | | if( ApplicationDelegate&&ApplicationDelegate.searchAdManager){ |
| | | ApplicationDelegate.searchAdManager.buNativeAd=nil; |
| | | } |
| | | [self loadCSJAd]; |
| | | } |
| | | |
| | | |
| | | - (void)nativeAdDidClick:(BUNativeAd *)nativeAd withView:(UIView *_Nullable)view{ |
| | | |
| | | } |
| | | |
| | | |
| | | - (void)nativeAd:(BUNativeAd *_Nullable)nativeAd dislikeWithReason:(NSArray<BUDislikeWords *> *_Nullable)filterWords{ |
| | | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:3]; |
| | | UICollectionViewCell *cell = (UICollectionViewCell *)[self.collectionView cellForItemAtIndexPath:indexPath]; |
| | | for(UIView *subview in cell.subviews){ |
| | | [subview removeFromSuperview]; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | #pragma mark ---------- SearchDelegate --------- |
| | | - (void)hotSearchEvent:(NSString *)name { |
| | | [self writeSearchKey:name]; |
| | |
| | | button.frame = CGRectMake(0, 0, 32, 32); |
| | | UIBarButtonItem *iconBarItem=[[UIBarButtonItem alloc] initWithCustomView:button]; |
| | | self.navigationItem.leftBarButtonItem = iconBarItem; |
| | | |
| | | self.navigationController.navigationBar.barTintColor = [UIColor whiteColor]; |
| | | |
| | | //è®¾ç½®ä½¿ç¨æ¨¡æè·³è½¬çè¿åæé® |
| | | if(_ispresent){ |
| | | //éèç¶ææ |
| | |
| | | */ |
| | | +(BOOL)isEmailAddress:(NSString*)candidate; |
| | | |
| | | |
| | | /** |
| | | 夿æ¯å¦æ¯ï»¿çµè¯ï»¿å·ç |
| | | |
| | | @param candidate ä¼ å
¥éè¦éªè¯çé®ç®±å°å |
| | | |
| | | @return Yesä¸ºæ¯ |
| | | */ |
| | | +(BOOL)isPhone:(NSString*)candidate; |
| | | |
| | | /** |
| | | è¾å
¥æ¡è§å¾çæå¨ |
| | | |
| | |
| | | return [emailTest evaluateWithObject:candidate]; |
| | | } |
| | | |
| | | |
| | | /** |
| | | 夿æ¯å¦æ¯çµåé®ç®± |
| | | |
| | | @param candidate ä¼ å
¥éè¦éªè¯çé®ç®±å°å |
| | | |
| | | @return Yesä¸ºæ¯ |
| | | */ |
| | | +(BOOL)isPhone:(NSString*)candidate{ |
| | | NSString* regex = @"^1[3-9]\\d{9}$"; |
| | | NSPredicate* phoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; |
| | | return [phoneTest evaluateWithObject:candidate]; |
| | | } |
| | | |
| | | |
| | | /** |
| | | è¾å
¥æ¡è§å¾çæå¨ |
| | | |
| | |
| | | _webView=[[WKWebView alloc] initWithFrame:CGRectMake(0, 64 , KScreenW, KScreenH - 64 )]; |
| | | _webView.contentMode=UIViewContentModeScaleAspectFill; |
| | | _webView.configuration.allowsInlineMediaPlayback=YES; |
| | | _webView.configuration.preferences.javaScriptEnabled=YES; |
| | | |
| | | |
| | | |
| | | [_webView setNavigationDelegate:self]; |
| | | [_webView setMultipleTouchEnabled:YES]; |
| | |
| | | |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | |
| | | |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | |
| | | #define MARGIN 5 |
| | | #define BACK_WIDTH (DEVICE_TYPE_IPAD ? 30 : 20) |
| | | #define ui_round_size(x) (DEVICE_TYPE_IPAD ? ((x) < 50 ? 50 : (x)) : ((x) < 44 ? 44 : (x))) |
| | |
| | | #define BETWEEN_BOUND_FULL 100 |
| | | #define BETWEEN_BOUND_NORMAL 20 |
| | | |
| | | @interface XYRDetailViewController ()<CMuneBarDelegate,UIScrollViewDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,YTHNetDelegateRecommend,UIGestureRecognizerDelegate,YTHBacktoApplicationsDelegate,GDTNativeExpressAdDelegete,HXEasyCustomShareViewDelegate,BUNativeExpressFullscreenVideoAdDelegate>{ |
| | | @interface XYRDetailViewController ()<CMuneBarDelegate,UIScrollViewDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,YTHNetDelegateRecommend,UIGestureRecognizerDelegate,YTHBacktoApplicationsDelegate,GDTNativeExpressAdDelegete,HXEasyCustomShareViewDelegate,BUNativeExpressFullscreenVideoAdDelegate,BUMNativeAdsManagerDelegate, BUNativeAdDelegate>{ |
| | | int _gather;//éæ°å è½½æ´å¤çæ§å¶åéï¼é»è®¤ä¸º1 |
| | | int isCollectNum;//å½åéä¸çé |
| | | |
| | |
| | | @property (nonatomic, assign) CGRect playerFrame; |
| | | @property (nonatomic, assign) CGRect cloudPlayerFrame; |
| | | @property (nonatomic, strong) NSDate *startTime; |
| | | @property (nonatomic, strong) NSArray *expressAdViews; |
| | | @property (nonatomic, strong) NSMutableArray *expressAdViews; |
| | | @property (nonatomic, strong) GDTNativeExpressAd *nativeExpressAd; |
| | | @property (nonatomic, strong) NSMutableArray *buNativeAds; |
| | | |
| | | |
| | | @property (nonatomic, strong) BUNativeExpressFullscreenVideoAd *fullscreenVideoAd; |
| | | |
| | | @property (nonatomic) BUNativeAdsManager *adManager; |
| | | |
| | | @end |
| | | |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | self.fullscreenVideoAd = [[BUNativeExpressFullscreenVideoAd alloc] initWithSlotID:@"945472378"]; |
| | | self.fullscreenVideoAd = [[BUNativeExpressFullscreenVideoAd alloc] initWithSlotID:CSJ_AD_PID_VIDEO_DETAIL]; |
| | | self.fullscreenVideoAd.delegate = self; |
| | | [self.fullscreenVideoAd loadAdData]; |
| | | } |
| | |
| | | |
| | | //å½è§é¢å¹¿åç´ æå 载失败æ¶è°ç¨æ¤æ¹æ³ã |
| | | - (void)nativeExpressFullscreenVideoAd:(BUNativeExpressFullscreenVideoAd *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error { |
| | | NSLog(@"广å-详æ
页æå±ç©¿å±±ç²å 载失败ï¼%@", error); |
| | | if(error!=nil&&error.code == 20001){ |
| | | |
| | | } |
| | | } |
| | | |
| | | //æ¤æ¹æ³å¨æååç°nativeExpressAdViewæ¶è°ç¨ã |
| | |
| | | //ç½ç»ç¶æ |
| | | [self NetWorkStuas]; |
| | | } |
| | | |
| | | -(void)viewWillDisappear:(BOOL)animated{ |
| | | [super viewWillDisappear:animated]; |
| | | //å é¤éç¥ä¸å¿ççå¬ |
| | |
| | | } |
| | | }else{ |
| | | //æªç»å½ï¼å¼å¯¼ç¨æ·ç»å½ |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.modalPresentationStyle = 0; |
| | | loginVC.ispresent=YES; |
| | | [self presentViewController:loginVC animated:YES completion:^{ |
| | |
| | | }]; |
| | | }else{ |
| | | //æªç»å½ï¼å¼å¯¼ç¨æ·ç»å½ |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.modalPresentationStyle = 0; |
| | | loginVC.ispresent=YES; |
| | | [self presentViewController:loginVC animated:YES completion:^{ |
| | |
| | | [self CalculateHeightWithArray:_VideoDetailList]; |
| | | |
| | | //å 载广å |
| | | [self loadAd]; |
| | | [self loadCSJAd]; |
| | | //å è½½ç¸å
³è§é¢ |
| | | [self getRelativeVideosWithVideoId:movieid]; |
| | | //å è½½çä½ åæ¬¢ |
| | |
| | | self.nativeExpressAd.videoMuted = NO; |
| | | [self.nativeExpressAd loadAd:4]; |
| | | } |
| | | |
| | | -(void) loadCSJAd{ |
| | | id other=[YTHsharedManger startManger].ad[@"other"]; |
| | | if(other==nil|| other==[NSNull null] ||other[@"type"]==nil){ |
| | | return; |
| | | } |
| | | |
| | | |
| | | BUAdSlot *slot = [[BUAdSlot alloc] init]; |
| | | slot.ID = CSJ_AD_PID_VIDEO_DETAIL_DRAW; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | slot.adSize = CGSizeMake(KScreenW, (KScreenW-20)/16*9 + 10); |
| | | slot.mediation.mutedIfCan = YES; // éé³ ï¼èååè½ï¼ |
| | | BUNativeAdsManager *adManager = [[BUNativeAdsManager alloc] initWithSlot:slot]; |
| | | self.adManager = adManager; |
| | | self.adManager.mediation.rootViewController = self; |
| | | self.adManager.delegate = self; |
| | | [self.adManager loadAdDataWithCount:1]; // å è½½å¹¿åæ°éï¼æ¯æ1~3个 |
| | | } |
| | | |
| | | - (void)nativeAdsManagerSuccessToLoad:(BUNativeAdsManager *)adsManager nativeAds:(NSArray<BUNativeAd *> *)nativeAdDataArray{ |
| | | if(!self.buNativeAds){ |
| | | self.buNativeAds = [[NSMutableArray alloc] init]; |
| | | } |
| | | [self.buNativeAds removeAllObjects]; |
| | | if(!self.expressAdViews){ |
| | | self.expressAdViews =[[NSMutableArray alloc] init]; |
| | | } |
| | | [self.expressAdViews removeAllObjects]; |
| | | for (BUNativeAd *model in nativeAdDataArray) { |
| | | model.rootViewController = self; |
| | | model.delegate = self; |
| | | if (model.mediation.isExpressAd) { |
| | | [model.mediation render]; |
| | | } |
| | | if(model.mediation.canvasView){ |
| | | [self.expressAdViews addObject: model.mediation.canvasView]; |
| | | |
| | | } |
| | | [self.buNativeAds addObject:model]; |
| | | } |
| | | [self.collectionView reloadData]; |
| | | } |
| | | |
| | | - (void)nativeAdsManager:(BUNativeAdsManager *)adsManager didFailWithError:(NSError *)error{ |
| | | NSLog(@"æç´¢é¡µCSJ广åå 载失败ï¼%@", error.userInfo.description); |
| | | // [self loadAd]; |
| | | } |
| | | |
| | | |
| | | - (void)nativeAd:(BUNativeAd *_Nullable)nativeAd dislikeWithReason:(NSArray<BUDislikeWords *> *_Nullable)filterWords{ |
| | | |
| | | for (int i = 0; i < self.expressAdViews.count; i++) { |
| | | if([self.expressAdViews objectAtIndex:i] == nativeAd.mediation.canvasView ){ |
| | | [self.expressAdViews replaceObjectAtIndex:i withObject:[NSNull null]]; |
| | | break; |
| | | } |
| | | } |
| | | [self.collectionView reloadData]; |
| | | } |
| | | |
| | | |
| | | - (void)nativeExpressAdSuccessToLoad:(GDTNativeExpressAd |
| | | *)nativeExpressAd views:(NSArray<__kindof |
| | | GDTNativeExpressAdView *> *)views |
| | | { |
| | | if(views&&views.count>=3) |
| | | { |
| | | self.expressAdViews = [NSArray arrayWithArray:views]; |
| | | self.expressAdViews = [NSMutableArray arrayWithArray:views]; |
| | | } |
| | | if (self.expressAdViews.count) { |
| | | [self.expressAdViews enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { |
| | |
| | | [subview removeFromSuperview]; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åè§é¢çç¸å
³è§é¢ä¿¡æ¯ |
| | | * |
| | |
| | | } |
| | | }else{ |
| | | //å¦æç¨æ·æªç»å½ |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.modalPresentationStyle = 0; |
| | | loginVC.ispresent=YES; |
| | | [self presentViewController:loginVC animated:YES completion:nil]; |
| | |
| | | } cancelButtonTitle:@"åæ¶" destructiveButtonTitle:nil otherButtonTitles:@"è¥éè¯éª", @"æ·«ç§½è²æ
", @"å°åæ»å»",@"å
¶ä»çç±",nil]; |
| | | }else{ |
| | | //å¦æç¨æ·æªç»å½ |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.modalPresentationStyle = 0; |
| | | loginVC.ispresent=YES; |
| | | [self presentViewController:loginVC animated:YES completion:nil]; |
| | |
| | | #pragma mark -UICollectionViewDataSource |
| | | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ |
| | | if (section==0) { |
| | | if(self.expressAdViews.count>3){ |
| | | if(self.expressAdViews.count>0){ |
| | | return 1; |
| | | }else{ |
| | | return 0; |
| | |
| | | case 0:{ |
| | | newADCollectionViewCell *cell; |
| | | cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"newADCollectionViewCell" forIndexPath:indexPath]; |
| | | if (self.expressAdViews.count <= 3) { |
| | | if (self.expressAdViews.count < 1) { |
| | | return cell; |
| | | } |
| | | GDTNativeExpressAdView *adView = (GDTNativeExpressAdView *)self.expressAdViews[3]; |
| | | [cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; |
| | | [cell.contentView addSubview:adView]; |
| | | // GDTNativeAdData *info=nativeArray[3]; |
| | | // cell.ADtitle.text=[info.properties objectForKey:GDTNativeAdDataKeyTitle]; |
| | | // cell.ADtitle.backgroundColor=[UIColor clearColor]; |
| | | // [cell.ADimage setYthImageWithURL:[info.properties objectForKey:GDTNativeAdDataKeyImgUrl] placeholderImage:nil]; |
| | | // [_nativeAd attachAd:info toView:cell]; |
| | | UIView *adView = (UIView *)self.expressAdViews[0]; |
| | | if(adView&& ![adView isKindOfClass:[NSNull class]]){ |
| | | [cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; |
| | | [cell.contentView addSubview:adView]; |
| | | // GDTNativeAdData *info=nativeArray[3]; |
| | | // cell.ADtitle.text=[info.properties objectForKey:GDTNativeAdDataKeyTitle]; |
| | | // cell.ADtitle.backgroundColor=[UIColor clearColor]; |
| | | // [cell.ADimage setYthImageWithURL:[info.properties objectForKey:GDTNativeAdDataKeyImgUrl] placeholderImage:nil]; |
| | | // [_nativeAd attachAd:info toView:cell]; |
| | | } |
| | | return cell; |
| | | } |
| | | break; |
| | |
| | | //è¿å广åè§å¾ |
| | | if (indexPath.section>3) { |
| | | |
| | | |
| | | if(self.expressAdViews.count>0){ |
| | | NSInteger adIndex = indexPath.section-3; |
| | | if(adIndex < self.expressAdViews.count){ |
| | | ADCollectionReusableView *groupfootSection = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"ADCollectionReusableView" forIndexPath:indexPath]; |
| | | |
| | | //æbuttonè®¾ä¸ºéæ |
| | | groupfootSection.ADClickButton.backgroundColor=[UIColor clearColor]; |
| | | [groupfootSection.ADClickButton setTag:520+indexPath.section]; |
| | | [groupfootSection.ADClickButton addTarget:self action:@selector(getMoreInformation:) forControlEvents:UIControlEventTouchUpInside]; |
| | | GDTNativeExpressAdView *adView = (GDTNativeExpressAdView *)self.expressAdViews[indexPath.section-3]; |
| | | [groupfootSection addSubview:adView]; |
| | | UIView *adView = (UIView *)self.expressAdViews[adIndex]; |
| | | if(adView&& ![adView isKindOfClass:[NSNull class]]){ |
| | | [groupfootSection addSubview:adView]; |
| | | } |
| | | return groupfootSection; |
| | | }else{ |
| | | return nil; |
| | |
| | | return CGSizeMake(0, 0); |
| | | }else{ |
| | | if (section>3) { |
| | | if(self.expressAdViews.count>0){ |
| | | GDTNativeExpressAdView *adView = (GDTNativeExpressAdView *)self.expressAdViews[section-3]; |
| | | return CGSizeMake(0, adView.bounds.size.height); |
| | | NSInteger adIndex = section-3; |
| | | if(self.expressAdViews.count>0 && adIndex < self.expressAdViews.count){ |
| | | UIView *adView = (UIView *)self.expressAdViews[adIndex]; |
| | | if(adView&& ![adView isKindOfClass:[NSNull class]]){ |
| | | return CGSizeMake(0, adView.bounds.size.height); |
| | | } |
| | | else{ |
| | | return CGSizeMake(0, 0); |
| | | } |
| | | }else{ |
| | | return CGSizeMake(0, 0); |
| | | } |
| | |
| | | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ |
| | | if (indexPath.section==0) { |
| | | // return CGSizeMake(KScreenW-20, (KScreenW-20)/16*9); |
| | | GDTNativeExpressAdView *adView = (GDTNativeExpressAdView *)self.expressAdViews[indexPath.section]; |
| | | return CGSizeMake(KScreenW, adView.bounds.size.height); |
| | | UIView *adView = (UIView *)self.expressAdViews[indexPath.section]; |
| | | if(adView&& ![adView isKindOfClass:[NSNull class]]){ |
| | | return CGSizeMake(KScreenW, adView.bounds.size.height); |
| | | }else{ |
| | | return CGSizeMake(0, 0); |
| | | } |
| | | }else if (indexPath.section==1) { |
| | | return CELLSize; |
| | | }else if(indexPath.section==2){ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
| | | <device id="retina4_7" orientation="portrait"> |
| | | <adaptation id="fullscreen"/> |
| | | </device> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
| | | <device id="retina4_7" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | | <objects> |
| | |
| | | <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rbi-cV-2cd"> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rbi-cV-2cd"> |
| | | <rect key="frame" x="8" y="57" width="359" height="60"/> |
| | | <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> |
| | | <constraints> |
| | |
| | | <constraint firstItem="BSc-Ri-J22" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="zZU-M9-nYN"/> |
| | | </constraints> |
| | | <simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/> |
| | | <point key="canvasLocation" x="359.5" y="432.5"/> |
| | | <point key="canvasLocation" x="575.20000000000005" y="389.05547226386807"/> |
| | | </view> |
| | | </objects> |
| | | <resources> |
| | | <image name="å¼å§ææ¾æé®" width="79" height="55"/> |
| | | <image name="å¼å§ææ¾æé®" width="79" height="55.5"/> |
| | | <image name="详æ
页é¢è¿å" width="32" height="32"/> |
| | | <image name="é»è®¤å è½½å¾ç" width="240" height="135"/> |
| | | </resources> |
| | |
| | | /** |
| | | * é®ç®±ç»å½ |
| | | */ |
| | | -(void)getloginWithUid:(NSString *)uid WithSystem:(NSString *)system WithEmail:(NSString *)Email WithPwd:(NSString *)Pwd withBlock:(YthNetWorkBlock)block; |
| | | -(void)loginWithEmail:(NSString *)uid WithSystem:(NSString *)system WithEmail:(NSString *)Email WithPwd:(NSString *)Pwd withBlock:(YthNetWorkBlock)block; |
| | | |
| | | |
| | | /** |
| | | * ï»¿ææºï»¿å·ç»å½ |
| | | */ |
| | | -(void)loginWithPhone:(NSString *)uid WithSystem:(NSString *)system WithPhone:(NSString *)phone WithPwd:(NSString *)pwd withBlock:(YthNetWorkBlock)block; |
| | | |
| | | |
| | | /** |
| | | * QQç»å½ |
| | | */ |
| | | -(void)loginWithQQ:(NSString *)uid WithSystem:(NSString *)system WithAcessToken:(NSString *)accessToken WithOpenid:(NSString *)openId withBlock:(YthNetWorkBlock)block; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 微信ç»å½ |
| | | */ |
| | | -(void)loginWithWX:(NSString *)uid WithSystem:(NSString *)system WithCode:(NSString *)code withBlock:(YthNetWorkBlock)block; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | ä¿®æ¹ä¸ªäººä¿¡æ¯ |
| | |
| | | |
| | | NSString *url = [NSString stringWithFormat:@"%@/user",domainHTTP]; |
| | | |
| | | [self mangerPostWithURL:url WithMutableDictionary:dic withTimeout:5.0f withBlock:block]; |
| | | [self mangerPostWithURL:url WithMutableDictionary:dic withTimeout:10.0f withBlock:block]; |
| | | } |
| | | |
| | | - (void)postUserRequestDataNewWith:(NSMutableDictionary *)dic withBlock:(YthNetWorkBlock)block { |
| | |
| | | } |
| | | |
| | | #pragma mark é®ç®±ç»å½ |
| | | -(void)getloginWithUid:(NSString *)uid WithSystem:(NSString *)system WithEmail:(NSString *)Email WithPwd:(NSString *)Pwd withBlock:(YthNetWorkBlock)block{ |
| | | -(void)loginWithEmail:(NSString *)uid WithSystem:(NSString *)system WithEmail:(NSString *)Email WithPwd:(NSString *)Pwd withBlock:(YthNetWorkBlock)block{ |
| | | NSMutableDictionary *dic = [YTHNetdata loginWithUid:uid WithSystem:system WithEmail:Email WithPwd:Pwd]; |
| | | [self postUserRequestDataWith:dic withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | |
| | | }]; |
| | | } |
| | | |
| | | |
| | | |
| | | #pragma mark ææºï»¿å·ç»å½ |
| | | -(void)loginWithPhone:(NSString *)uid WithSystem:(NSString *)system WithPhone:(NSString *)phone WithPwd:(NSString *)pwd withBlock:(YthNetWorkBlock)block{ |
| | | |
| | | NSMutableDictionary *dic = [YTHNetdata loginWithUid:uid WithSystem:system WithPhone:phone WithPwd:pwd]; |
| | | [self postUserRequestDataWith:dic withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSDictionary *data = (NSDictionary *)result; |
| | | block(TRUE , data , nil); |
| | | }else{ |
| | | block(FALSE , nil , error); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | |
| | | #pragma mark QQç»å½ |
| | | -(void)loginWithQQ:(NSString *)uid WithSystem:(NSString *)system WithAcessToken:(NSString *)accessToken WithOpenid:(NSString *)openId withBlock:(YthNetWorkBlock)block{ |
| | | NSMutableDictionary *dic = [YTHNetdata loginWithUid:uid WithSystem:system WithQQ:accessToken WithOpenId:openId]; |
| | | [self postUserRequestDataWith:dic withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSDictionary *data = (NSDictionary *)result; |
| | | block(TRUE , data , nil); |
| | | }else{ |
| | | block(FALSE , nil , error); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | |
| | | #pragma mark 微信ç»å½ |
| | | -(void)loginWithWX:(NSString *)uid WithSystem:(NSString *)system WithCode:(NSString *)code withBlock:(YthNetWorkBlock)block{ |
| | | NSMutableDictionary *dic = [YTHNetdata loginWithUid:uid WithSystem:system WithWX:code]; |
| | | [self postUserRequestDataWith:dic withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSDictionary *data = (NSDictionary *)result; |
| | | block(TRUE , data , nil); |
| | | }else{ |
| | | block(FALSE , nil , error); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #pragma mark ä¿®æ¹ä¸ªäººä¿¡æ¯ |
| | | -(void)getupdateLoginUserInfoWithUid:(NSString *)uid WithSystem:(NSString *)system WithLoginUid:(NSString *)loginUid WithSex:(NSString *)sex WithBirthDay:(NSString *)birthday WithPersonalSign:(NSString *)PersonalSign WithNickName:(NSString *)NickName WithPortrait:(NSString *)Portrait withBlock:(YthNetWorkBlock)block{ |
| | | NSMutableDictionary *dic = [YTHNetdata updateLoginUserInfoWithUid:(NSString *)uid WithSystem:(NSString *)system WithLoginUid:(NSString *)loginUid WithSex:(NSString *)sex WithBirthDay:(NSString *)birthday WithPersonalSign:(NSString *)PersonalSign WithNickName:(NSString *)NickName WithPortrait:(NSString *)Portrait]; |
| | |
| | | */ |
| | | + (NSMutableDictionary *)loginWithUid:(NSString *)uid WithSystem:(NSString *)system WithEmail:(NSString *)Email WithPwd:(NSString *)Pwd; |
| | | |
| | | |
| | | /// çµè¯ï»¿å·ç ç»å½ |
| | | /// @param uid ï»¿ç¨æ·ID |
| | | /// @param system ï»¿ç³»ç» |
| | | /// @param phone çµè¯ï»¿å·ç |
| | | /// @param Pwd å¯ç |
| | | + (NSMutableDictionary *)loginWithUid:(NSString *)uid WithSystem:(NSString *)system WithPhone:(NSString *)phone WithPwd:(NSString *)Pwd; |
| | | |
| | | /// QQç»å½ |
| | | /// @param uid ï»¿ç¨æ·ID |
| | | /// @param system ï»¿ç³»ç» |
| | | /// @param accessToken QQææï»¿token |
| | | /// @param openId QQææï»¿openId |
| | | + (NSMutableDictionary *)loginWithUid:(NSString *)uid WithSystem:(NSString *)system WithQQ:(NSString *)accessToken WithOpenId:(NSString *)openId; |
| | | |
| | | |
| | | /// 微信ç»å½ |
| | | /// @param uid ï»¿ç¨æ·ID |
| | | /// @param system ï»¿ç³»ç» |
| | | /// @param code 微信ææï»¿code |
| | | + (NSMutableDictionary *)loginWithUid:(NSString *)uid WithSystem:(NSString *)system WithWX:(NSString *)code; |
| | | |
| | | |
| | | |
| | | /** |
| | | ä¿®æ¹ä¸ªäººä¿¡æ¯ |
| | | |
| | |
| | | if (Pwd != nil) { |
| | | [dic setObject:Pwd forKey:@"Pwd"]; |
| | | } |
| | | [dic setObject:@"3" forKey:@"LoginType"]; |
| | | [dic setObject:[[UIDevice currentDevice].identifierForVendor UUIDString] forKey:@"Device"]; |
| | | return dic; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | + (NSMutableDictionary *)loginWithUid:(NSString *)uid WithSystem:(NSString *)system WithPhone:(NSString *)phone WithPwd:(NSString *)Pwd{ |
| | | |
| | | NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithCapacity:0]; |
| | | [dic setObject:logins forKey:@"Method"]; |
| | | [dic setObject:@"ios" forKey:@"Platform"]; |
| | | NSString *sign; |
| | | if (uid!=nil) { |
| | | [dic setObject:uid forKey:@"Uid"]; |
| | | sign = [NSString stringWithFormat:@"%@%@%@",logins,uid,system]; |
| | | }else{ |
| | | sign = [NSString stringWithFormat:@"%@%@%@",logins,[[UIDevice currentDevice].identifierForVendor UUIDString],system]; |
| | | } |
| | | [dic setObject:[NSString md5:sign] forKey:@"Sign"]; |
| | | [dic setObject:Version forKey:@"Version"]; |
| | | [dic setObject:Package forKey:@"Package"]; |
| | | [dic setObject:system forKey:@"System"]; |
| | | if(phone != nil){ |
| | | [dic setObject:phone forKey:@"Phone"]; |
| | | } |
| | | if (Pwd != nil) { |
| | | [dic setObject:Pwd forKey:@"Pwd"]; |
| | | } |
| | | [dic setObject:@"4" forKey:@"LoginType"]; |
| | | [dic setObject:[[UIDevice currentDevice].identifierForVendor UUIDString] forKey:@"Device"]; |
| | | return dic; |
| | | |
| | | } |
| | | |
| | | |
| | | + (NSMutableDictionary *)loginWithUid:(NSString *)uid WithSystem:(NSString *)system WithQQ:(NSString *)accessToken WithOpenId:(NSString *)openId{ |
| | | NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithCapacity:0]; |
| | | [dic setObject:logins forKey:@"Method"]; |
| | | [dic setObject:@"ios" forKey:@"Platform"]; |
| | | NSString *sign; |
| | | if (uid!=nil) { |
| | | [dic setObject:uid forKey:@"Uid"]; |
| | | sign = [NSString stringWithFormat:@"%@%@%@",logins,uid,system]; |
| | | }else{ |
| | | sign = [NSString stringWithFormat:@"%@%@%@",logins,[[UIDevice currentDevice].identifierForVendor UUIDString],system]; |
| | | } |
| | | [dic setObject:[NSString md5:sign] forKey:@"Sign"]; |
| | | [dic setObject:Version forKey:@"Version"]; |
| | | [dic setObject:Package forKey:@"Package"]; |
| | | [dic setObject:system forKey:@"System"]; |
| | | if(accessToken != nil){ |
| | | [dic setObject:accessToken forKey:@"AccessToken"]; |
| | | } |
| | | if (openId != nil) { |
| | | [dic setObject:openId forKey:@"OpenId"]; |
| | | } |
| | | [dic setObject:@"1" forKey:@"LoginType"]; |
| | | [dic setObject:[[UIDevice currentDevice].identifierForVendor UUIDString] forKey:@"Device"]; |
| | | return dic; |
| | | } |
| | | |
| | | |
| | | |
| | | + (NSMutableDictionary *)loginWithUid:(NSString *)uid WithSystem:(NSString *)system WithWX:(NSString *)code{ |
| | | NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithCapacity:0]; |
| | | [dic setObject:logins forKey:@"Method"]; |
| | | [dic setObject:@"ios" forKey:@"Platform"]; |
| | | NSString *sign; |
| | | if (uid!=nil) { |
| | | [dic setObject:uid forKey:@"Uid"]; |
| | | sign = [NSString stringWithFormat:@"%@%@%@",logins,uid,system]; |
| | | }else{ |
| | | sign = [NSString stringWithFormat:@"%@%@%@",logins,[[UIDevice currentDevice].identifierForVendor UUIDString],system]; |
| | | } |
| | | [dic setObject:[NSString md5:sign] forKey:@"Sign"]; |
| | | [dic setObject:Version forKey:@"Version"]; |
| | | [dic setObject:Package forKey:@"Package"]; |
| | | [dic setObject:system forKey:@"System"]; |
| | | if(code != nil){ |
| | | [dic setObject:code forKey:@"Code"]; |
| | | } |
| | | [dic setObject:@"2" forKey:@"LoginType"]; |
| | | [dic setObject:[[UIDevice currentDevice].identifierForVendor UUIDString] forKey:@"Device"]; |
| | | return dic; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #pragma mark ä¿®æ¹ä¸ªäººä¿¡æ¯ |
| | | + (NSMutableDictionary *)updateLoginUserInfoWithUid:(NSString *)uid WithSystem:(NSString *)system WithLoginUid:(NSString *)loginUid WithSex:(NSString *)sex WithBirthDay:(NSString *)birthday WithPersonalSign:(NSString *)PersonalSign WithNickName:(NSString *)NickName WithPortrait:(NSString *)Portrait{ |
| | | NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithCapacity:0]; |
| | |
| | | #import "findcommentTableViewCell.h" |
| | | |
| | | #import "LoggingViewController.h" |
| | | #import "AppDelegate.h" |
| | | |
| | | @interface allCommentsViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,UIGestureRecognizerDelegate>{ |
| | | UITableView *_tableView; |
| | |
| | | }]; |
| | | }else{ |
| | | //æªç»å½ï¼å¼å¯¼ç¨æ·ç»å½ |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.ispresent=YES; |
| | | [self presentViewController:loginVC animated:YES completion:^{ |
| | | |
| | |
| | | #import "attentionView.h" |
| | | #import "AttentionCell.h" |
| | | #import "LoggingViewController.h" |
| | | #import "AppDelegate.h" |
| | | #import "WebControllerView.h" |
| | | #import "XYRDetailViewController.h" |
| | | |
| | |
| | | * ç»å½ |
| | | */ |
| | | -(void)ClickLogin:(id)sender{ |
| | | LoggingViewController *LG = [LoggingViewController new]; |
| | | LoggingViewController *LG = ((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | [temp.navigationController pushViewController:LG animated:YES]; |
| | | } |
| | | |
| | |
| | | #import "allCommentsViewController.h" |
| | | #import "WEBViewController.h" |
| | | #import "LoggingViewController.h" |
| | | #import "AppDelegate.h" |
| | | |
| | | //#import <AlibcTradeSDK/AlibcTradeSDK.h> |
| | | //#import <AlibcTradeSDK/AlibcTradeService.h> |
| | |
| | | }]; |
| | | }else{ |
| | | //æªç»å½ï¼å¼å¯¼ç¨æ·ç»å½ |
| | | LoggingViewController *loginVC=[[LoggingViewController alloc] init]; |
| | | LoggingViewController *loginVC=((AppDelegate*)[UIApplication sharedApplication].delegate).loggingViewController; |
| | | loginVC.ispresent=YES; |
| | | [self presentViewController:loginVC animated:YES completion:^{ |
| | | |
| | |
| | | [super viewDidLoad]; |
| | | // Do any additional setup after loading the view from its nib. |
| | | self.navigationItem.title = @"å¿è®°å¯ç "; |
| | | self.view.backgroundColor=[UIColor whiteColor]; |
| | | self.view.backgroundColor=KGlobalLightGreyColor_245; |
| | | if(@available(iOS 13.0,*)){ |
| | | self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight; |
| | | } |
| | | |
| | | //设置账å·ç»å½çå使 ·å¼ |
| | | self.navigationController.navigationBar.titleTextAttributes =@{NSFontAttributeName:[UIFont systemFontOfSize:18],NSForegroundColorAttributeName:[UIColor blackColor]}; |
| | |
| | | [FillInTheVerificationCode.layer setBorderWidth:1.0]; |
| | | [FillInTheVerificationCode.layer setBorderColor:(kGlobalLightGreyColor_210.CGColor)]; |
| | | FillInTheVerificationCode.placeholder=[NSString stringWithFormat:@"éªè¯ç "]; |
| | | FillInTheVerificationCode.secureTextEntry = YES; |
| | | |
| | | //åé¢ç©ºä¸ä¸ªé´è· |
| | | [self setTextFieldLeftPadding:FillInTheVerificationCode forWidth:10.0]; |
| | |
| | | [self setTextFieldLeftPadding:FillInThePassWord forWidth:10.0]; |
| | | [self.view addSubview:FillInThePassWord]; |
| | | //确认修æ¹çæé® |
| | | registerBtn=[[UIButton alloc] initWithFrame:CGRectMake(70, KScreenH-110, KScreenW-140, 32)]; |
| | | registerBtn=[[UIButton alloc] initWithFrame:CGRectMake(70, KScreenH-kStatusBarH - 110, KScreenW-140, 32)]; |
| | | // registerBtn=[[UIButton alloc] initWithFrame:CGRectMake(70, 0, KScreenW-140, 32)]; |
| | | [registerBtn.layer setMasksToBounds:YES]; |
| | | [registerBtn.layer setCornerRadius:5.0]; |
| | | registerBtn.backgroundColor=kGlobalYellowColor; |
| | |
| | | |
| | | #import "SearchTitleView.h" |
| | | #import "SearchNavView.h" |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | |
| | | static NSString *indentfly = @"cell"; |
| | | static NSString *indentfly2=@"searchTableViewCellID"; |
| | | |
| | | @interface searchDetailViewController ()<YTHSearchTextFieldDelegate,UITableViewDataSource,UITableViewDelegate,GDTNativeExpressAdDelegete,SearchDetailListCellDelegate,SearchTitleViewDelegate, SearchDelegate>{ |
| | | @interface searchDetailViewController ()<YTHSearchTextFieldDelegate,UITableViewDataSource,UITableViewDelegate,GDTNativeExpressAdDelegete,SearchDetailListCellDelegate,SearchTitleViewDelegate, SearchDelegate,BUMNativeAdsManagerDelegate, BUNativeAdDelegate>{ |
| | | NSInteger pagenumber; |
| | | NSInteger typenumber; |
| | | //广ç¹éåç广å |
| | |
| | | @property (nonatomic , strong) NSMutableArray *suggestSearch;//æç´¢å»ºè®® |
| | | |
| | | @property (nonatomic , strong) UITableView *DisplayTabelView;//ç¨äºæ¾ç¤ºæç´¢ç»æçå表 |
| | | @property (nonatomic, strong) NSArray *expressAdViews; |
| | | @property (nonatomic, strong) NSMutableArray *expressAdViews; |
| | | @property (nonatomic, strong) GDTNativeExpressAd *nativeExpressAd; |
| | | |
| | | @property (nonatomic, strong) SearchTitleView *viewSearchTitle; |
| | |
| | | @property (nonatomic, strong) NSArray *typeList; |
| | | |
| | | @property (nonatomic, strong) SearchNavView *viewSearchNav; |
| | | |
| | | @property (nonatomic, strong) NSMutableArray *buNativeAds; |
| | | |
| | | @property (nonatomic) BUNativeAdsManager *adManager; |
| | | |
| | | |
| | | |
| | | @end |
| | | |
| | | @implementation searchDetailViewController |
| | |
| | | [self addsuggestTableview]; |
| | | //æ·»å æç´¢ç»æçå表 |
| | | [self addTabelView]; |
| | | [self loadAd]; |
| | | |
| | | [self loadCSJAd]; |
| | | } |
| | | |
| | | - (void)viewWillAppear:(BOOL)animated { |
| | |
| | | // [self.view addSubview:self.viewSearchTitle]; |
| | | } |
| | | |
| | | -(void) loadCSJAd{ |
| | | id search=[YTHsharedManger startManger].ad[@"videoSearch"]; |
| | | if(search==nil|| search==[NSNull null] ||search[@"type"]==nil){ |
| | | return; |
| | | } |
| | | BUAdSlot *slot = [[BUAdSlot alloc] init]; |
| | | slot.ID = CSJ_AD_PID_SEARCH_RESULT; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | slot.adSize = CGSizeMake(KScreenW, KScreenW*0.3); // æç
§å®é
æ
åµè®¾ç½®å¹¿å尺寸 |
| | | slot.mediation.mutedIfCan = YES; // éé³ ï¼èååè½ï¼ |
| | | BUNativeAdsManager *adManager = [[BUNativeAdsManager alloc] initWithSlot:slot]; |
| | | _adManager = adManager; |
| | | _adManager.mediation.rootViewController = self; |
| | | _adManager.delegate = self; |
| | | [_adManager loadAdDataWithCount:1]; // å è½½å¹¿åæ°éï¼æ¯æ1~3个 |
| | | } |
| | | |
| | | |
| | | - (void)nativeAdsManagerSuccessToLoad:(BUNativeAdsManager *)adsManager nativeAds:(NSArray<BUNativeAd *> *)nativeAdDataArray{ |
| | | if(!self.buNativeAds){ |
| | | self.buNativeAds = [[NSMutableArray alloc] init]; |
| | | } |
| | | [self.buNativeAds removeAllObjects]; |
| | | if(!self.expressAdViews){ |
| | | self.expressAdViews =[[NSMutableArray alloc] init]; |
| | | } |
| | | [self.expressAdViews removeAllObjects]; |
| | | for (BUNativeAd *model in nativeAdDataArray) { |
| | | model.rootViewController = self; |
| | | model.delegate = self; |
| | | if (model.mediation.isExpressAd) { |
| | | [model.mediation render]; |
| | | } |
| | | // [model loadAdData]; |
| | | if(model.mediation.canvasView){ |
| | | [self.expressAdViews addObject: model.mediation.canvasView]; |
| | | } |
| | | [self.buNativeAds addObject:model]; |
| | | } |
| | | [self.DisplayTabelView reloadData]; |
| | | } |
| | | |
| | | - (void)nativeAdsManager:(BUNativeAdsManager *)adsManager didFailWithError:(NSError *)error{ |
| | | NSLog(@"æç´¢é¡µCSJ广åå 载失败ï¼%@", error.userInfo.description); |
| | | [self loadAd]; |
| | | } |
| | | |
| | | |
| | | - (void)nativeAd:(BUNativeAd *_Nullable)nativeAd dislikeWithReason:(NSArray<BUDislikeWords *> *_Nullable)filterWords{ |
| | | |
| | | if(nativeAd){ |
| | | [nativeAd.mediation.canvasView removeFromSuperview]; |
| | | } |
| | | for (int i = 0; i < self.expressAdViews.count; i++) { |
| | | if([self.expressAdViews objectAtIndex:i] == nativeAd.mediation.canvasView ){ |
| | | [self.expressAdViews replaceObjectAtIndex:i withObject:[NSNull null]]; |
| | | break; |
| | | } |
| | | } |
| | | [self.DisplayTabelView reloadData]; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * å 载广ç¹éåç广å |
| | | */ |
| | | -(void)loadAd{ |
| | | id search=[YTHsharedManger startManger].ad[@"videoSearch"]; |
| | | if(search==nil|| search==[NSNull null] ||search[@"type"]==nil){ |
| | | return; |
| | | } |
| | | // _nativeAd = [[GDTNativeAd alloc]initWithAppId: GDTADkey placementId:GDTYSADkey3]; |
| | | // _nativeAd.controller = self; |
| | | // _nativeAd.delegate = self; |
| | |
| | | #pragma mark -GDTNativeAdDelegate |
| | | - (void)nativeExpressAdSuccessToLoad:(GDTNativeExpressAd *)nativeExpressAd views:(NSArray<__kindof GDTNativeExpressAdView *> *)views |
| | | { |
| | | self.expressAdViews = [NSArray arrayWithArray:views]; |
| | | self.expressAdViews = [NSMutableArray arrayWithArray:views]; |
| | | if (self.expressAdViews.count) { |
| | | [self.expressAdViews enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { |
| | | GDTNativeExpressAdView *expressView = (GDTNativeExpressAdView *)obj; |
| | |
| | | } else { |
| | | infoIndex = section / 20; |
| | | } |
| | | GDTNativeExpressAdView *adView = (GDTNativeExpressAdView *)self.expressAdViews[infoIndex]; |
| | | return adView.bounds.size.height; |
| | | |
| | | UIView *adView = (UIView *)self.expressAdViews[infoIndex]; |
| | | if(adView&&![adView isKindOfClass:[NSNull class]]){ |
| | | return adView.bounds.size.height; |
| | | } |
| | | return CGFLOAT_MIN; |
| | | } else { |
| | | return CGFLOAT_MIN; |
| | | } |
| | |
| | | }else{ |
| | | infoIndex = section / 20; |
| | | } |
| | | GDTNativeExpressAdView *adView = (GDTNativeExpressAdView *)self.expressAdViews[infoIndex]; |
| | | adView.backgroundColor = kGlobalBackgroundColor; |
| | | return adView; |
| | | UIView *adView = (UIView *)self.expressAdViews[infoIndex]; |
| | | if(adView&&![adView isKindOfClass:[NSNull class]]){ |
| | | adView.backgroundColor = kGlobalBackgroundColor; |
| | | return adView; |
| | | }else{ |
| | | UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, 0)]; |
| | | return view; |
| | | } |
| | | } else { |
| | | UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, 0)]; |
| | | return view; |
| | |
| | | #import "SubregionDetailViewController.h" |
| | | //#import "GDTNativeAd.h"//广ç¹éåç广å |
| | | #import "ADCollectionReusableView.h" |
| | | #import "GDTNativeExpressAd.h" |
| | | #import "GDTNativeExpressAdView.h" |
| | | #import "FaxianCReusableView.h" |
| | | //#import "BannerViewController.h" |
| | | #import "GDTUnifiedBannerView.h" |
| | | #import <BUAdSDK/BUAdSDK.h> |
| | | |
| | | @interface subregionView ()<UICollectionViewDelegate,UICollectionViewDataSource,GDTNativeExpressAdDelegete,GDTUnifiedBannerViewDelegate>{ |
| | | @interface subregionView ()<UICollectionViewDelegate,UICollectionViewDataSource, BUNativeExpressBannerViewDelegate>{ |
| | | UICollectionView *_collview; |
| | | // GDTNativeAd *_nativeAd; //åç广åå®ä¾ |
| | | // NSArray *nativeArray;//åå¨è¯·æ±ä¸æ¥çåç广åä¿¡æ¯ |
| | |
| | | } |
| | | @property (nonatomic , strong) NSMutableArray *dataClass;//ååºæ°æ® |
| | | @property (nonatomic, strong) NSArray *expressAdViews; |
| | | @property (nonatomic, strong) GDTNativeExpressAd *nativeExpressAd; |
| | | @property (nonatomic, strong) GDTUnifiedBannerView *bannerView; |
| | | @property (nonatomic, strong) BUNativeExpressBannerView *bannerView; |
| | | |
| | | @end |
| | | @implementation subregionView |
| | |
| | | self = [super initWithFrame:frame]; |
| | | if (self) { |
| | | //ä»fileä¸è¯»åæ°æ® |
| | | [self loadAd]; |
| | | [self loadCSJAd]; |
| | | [self loadDataFromFile]; |
| | | //é
ç½®collectionViewç屿§ |
| | | UICollectionViewFlowLayout *flowlayout = [[UICollectionViewFlowLayout alloc] init]; |
| | |
| | | flowlayout.minimumInteritemSpacing=(KScreenW)/10;//itemä¹é´çè·ç¦» |
| | | flowlayout.itemSize = CGSizeMake((KScreenW)/6, (KScreenW)/6+30);//设置itmeçå¤§å° |
| | | flowlayout.sectionInset = UIEdgeInsetsMake((KScreenW)/10,(KScreenW)/9,(KScreenW)/10,(KScreenW)/9);//设置itmeä¹é´çé´è· |
| | | flowlayout.headerReferenceSize = CGSizeMake(0, 60); |
| | | flowlayout.headerReferenceSize = CGSizeMake(0, KScreenW * 0.25); |
| | | //å建collectionViewè§å¾ |
| | | if (!_collview) { |
| | | _collview = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height) collectionViewLayout:flowlayout]; |
| | |
| | | [data writeToFile:CHANNELfILE atomically:YES]; |
| | | //å·æ°collectionViewè§å¾ |
| | | [_collview reloadData]; |
| | | [self loadAd]; |
| | | [self loadCSJAd]; |
| | | }else{ |
| | | |
| | | } |
| | |
| | | //- (void)nativeAdFailToLoad:(NSError *)error{ |
| | | // NSLog(@"%@",error); |
| | | //} |
| | | /** |
| | | * å 载广ç¹éåç广å |
| | | */ |
| | | -(void)loadAd{ |
| | | // _nativeAd = [[GDTNativeAd alloc]initWithAppId: GDTADkey placementId:GDTYSADkey5]; |
| | | // _nativeAd.controller = [self topViewController]; |
| | | // _nativeAd.delegate = self; |
| | | // [_nativeAd loadAd:1]; |
| | | |
| | | // æ¯æè§é¢å¹¿åç PlacementId 伿··åºè§é¢ä¸å¾ç广å |
| | | |
| | | self.nativeExpressAd =[[GDTNativeExpressAd alloc] initWithPlacementId:@"6000418684535350" adSize:CGSizeMake(KScreenW, (KScreenW-20)/16*9 + 10)]; |
| | | self.nativeExpressAd.delegate = self; |
| | | // é
ç½®è§é¢ææ¾å±æ§ |
| | | self.nativeExpressAd.videoAutoPlayOnWWAN = YES; |
| | | self.nativeExpressAd.videoMuted = NO; |
| | | [self.nativeExpressAd loadAd:1]; |
| | | |
| | | -(void) loadCSJAd{ |
| | | [self.bannerView removeFromSuperview]; |
| | | |
| | | // éæ°é
置广åå¹¶å è½½ |
| | | CGSize adSize = CGSizeMake(KScreenW, KScreenW*0.2); // æ ¹æ®å®é
æ
åµè®¾ç½®å¹¿åå°ºå¯¸å¤§å° |
| | | BUAdSlot *slot = [[BUAdSlot alloc] init]; |
| | | slot.ID = CSJ_AD_PID_CLASS_BANNER; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | BUNativeExpressBannerView *bannerView = [[BUNativeExpressBannerView alloc] initWithSlot:slot rootViewController:self adSize:adSize]; |
| | | bannerView.delegate = self; |
| | | self.bannerView = bannerView; |
| | | [self.bannerView loadAdData]; |
| | | } |
| | | |
| | | |
| | | /******** Banner广ååè°å¤ç *********/ |
| | | #pragma BUMNativeExpressBannerViewDelegate |
| | | // 广åå è½½æå |
| | | - (void)nativeExpressBannerAdViewDidLoad:(BUNativeExpressBannerView *)bannerAdView { |
| | | |
| | | } |
| | | |
| | | // 广åå 载失败 |
| | | - (void)nativeExpressBannerAdView:(BUNativeExpressBannerView *)bannerAdView didLoadFailWithError:(NSError *)error { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | // ç¨æ·éæ©äºè´åé¦ä¿¡æ¯ |
| | | - (void)nativeExpressBannerAdView:(BUNativeExpressBannerView *)bannerAdView dislikeWithReason:(NSArray<BUDislikeWords *> *)filterwords { |
| | | |
| | | } |
| | | |
| | | // 广åè§å¾è¢«ç§»é¤ |
| | | - (void)nativeExpressBannerAdViewDidRemoved:(BUNativeExpressBannerView *)nativeExpressAdView { |
| | | |
| | | } |
| | | |
| | | - (void)nativeExpressBannerAdNeedLayoutUI:(BUNativeExpressBannerView *)bannerAd canvasView:(BUMCanvasView *)canvasView { |
| | | // ä»
å¨ä½¿ç¨èªæ¸²ææ··åºæ¶ä¼åè°è¿ä¸ªæ¹æ³ |
| | | // å¼åè
éå¨è¯¥æ¹æ³ä¸å®ç°UI渲æ |
| | | // ä»canvasViewä¸è·åUIå±ç¤ºçæ°æ®ï¼å建UIæ§ä»¶ï¼æ·»å å°canvasViewä¸ |
| | | } |
| | | |
| | | |
| | | - (void)clickRemoveAd:(id)sender { |
| | | [self.bannerView removeFromSuperview]; |
| | | self.bannerView = nil; |
| | |
| | | - (void)clickLoadAd:(id)sender { |
| | | |
| | | } |
| | | // 请æ±å¹¿åæ¡æ°æ®æååè°ç¨ |
| | | - (void)unifiedBannerViewDidLoad:(GDTUnifiedBannerView *)unifiedBannerView { |
| | | |
| | | } |
| | | // 请æ±å¹¿åæ¡æ°æ®å¤±è´¥åè°ç¨ |
| | | - (void)unifiedBannerViewFailedToLoad:(GDTUnifiedBannerView *)unifiedBannerView error:(NSError *)error { |
| | | |
| | | } |
| | | |
| | | - (GDTUnifiedBannerView *)bannerView { |
| | | - (BUNativeExpressBannerView *)bannerView { |
| | | if (_bannerView) { |
| | | return _bannerView; |
| | | } |
| | | CGRect rect = CGRectMake(0, 0, KScreenW, 60); |
| | | //_bannerView = [[GDTUnifiedBannerView alloc] initWithFrame:rect appId:GDTADkey placementId:GDTYSADkey5]; |
| | | _bannerView = [[GDTUnifiedBannerView alloc] initWithFrame:rect placementId:GDTYSADkey5 viewController:[self topViewController]]; |
| | | //设置广åè½®ææ¶é´ï¼èå´ä¸º30-120ç§ï¼0表示ä¸è½®æ |
| | | _bannerView.autoSwitchInterval = 0; |
| | | //设置Delegate |
| | | CGSize adSize = CGSizeMake(KScreenW, KScreenW * 0.25); // æ ¹æ®å®é
æ
åµè®¾ç½®å¹¿åå°ºå¯¸å¤§å° |
| | | BUAdSlot *slot = [[BUAdSlot alloc] init]; |
| | | slot.ID = CSJ_AD_PID_CLASS_BANNER; // èå维度éè¿å¹¿åä½IDå起请æ±ï¼ä»
æ¥å
¥CSJ广åéè¿ä»£ç ä½IDåèµ·è¯·æ± |
| | | _bannerView = [[BUNativeExpressBannerView alloc] initWithSlot:slot rootViewController:[self topViewController] adSize:adSize]; |
| | | _bannerView.delegate = self; |
| | | return _bannerView; |
| | | } |
| | | |
| | | - (void)nativeExpressAdSuccessToLoad:(GDTNativeExpressAd |
| | | *)nativeExpressAd views:(NSArray<__kindof |
| | | GDTNativeExpressAdView *> *)views |
| | | { |
| | | self.expressAdViews = [NSArray arrayWithArray:views]; |
| | | if (self.expressAdViews.count) { |
| | | [self.expressAdViews enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { |
| | | GDTNativeExpressAdView *expressView = (GDTNativeExpressAdView *)obj; |
| | | expressView.controller = [self topViewController];; |
| | | [expressView render]; |
| | | }]; |
| | | } |
| | | // 广åä½ render åå·æ° |
| | | [_collview reloadData]; |
| | | } |
| | | - (void)nativeExpressAdFailToLoad:(GDTNativeExpressAd *)nativeExpressAd error:(NSError *)error{ |
| | | NSLog(@"%@",error); |
| | | } |
| | | |
| | | - (UIViewController *)_topViewController:(UIViewController *)vc { |
| | |
| | | [self clickRemoveAd:nil]; |
| | | |
| | | [view addSubview:self.bannerView]; |
| | | [self.bannerView loadAdAndShow]; |
| | | [self.bannerView loadAdData]; |
| | | |
| | | } |
| | | return view; |
| | |
| | | #source 'https://gitee.com/mirrors/CocoaPods-Specs.git' |
| | | #source 'https://github.com/volcengine/volcengine-specs.git' |
| | | #source 'http://repo.baichuan-ios.taobao.com/baichuanSDK/AliBCSpecs.git' |
| | | platform :ios, '10.0' |
| | | source 'https://github.com/CocoaPods/Specs.git' |
| | | source 'https://github.com/volcengine/volcengine-specs.git' |
| | | platform :ios, '12.0' |
| | | #platform :ios, '13.0' |
| | | install! 'cocoapods', :disable_input_output_paths => true |
| | | use_frameworks! |
| | |
| | | pod 'SDAutoLayout' |
| | | pod 'IQKeyboardManager' |
| | | pod 'SVProgressHUD' |
| | | pod 'GDTMobSDK', '4.14.45' |
| | | # è
¾è®¯ï»¿å¹¿å |
| | | pod 'GDTMobSDK', '4.15.10' |
| | | # ç¾åº¦ï»¿å¹¿å |
| | | pod 'BaiduMobAdSDK', '5.370' |
| | | # 快æï»¿å¹¿å |
| | | pod 'KSAdSDK', '3.3.71' |
| | | |
| | | # GroMore SDK |
| | | pod 'Ads-Fusion-CN-Beta','5.7.0.8', :subspecs => ['BUAdSDK','CSJMediation'] |
| | | pod 'BUAdTestMeasurement','5.6.0.5', :configuration => ['Debug'] |
| | | pod 'CSJMGdtAdapter','4.14.45.0' |
| | | pod 'Ads-CN','6.6.1.0', :subspecs => ['BUAdSDK','CSJMediation'] |
| | | pod 'TTSDKFramework', '1.45.2.5-standard', :subspecs => [ 'Player-SR' ] |
| | | pod 'RangersAPM', '5.1.3', :subspecs => [ 'Crash', 'EventMonitor', 'CN' ] |
| | | pod 'RangersAppLog', '6.16.9', :subspecs => [ 'Log', 'Host/CN' ] |
| | | |
| | | pod 'GMBaiduAdapter', '5.370.1' |
| | | pod 'GMGdtAdapter', '4.15.10.0' |
| | | pod 'GMKsAdapter', '3.3.71.0' |
| | | |
| | | # LCDSDK,çæ¬å·ä»¥èµè½å¹³å°çæçPodå½ä»¤ä¸ºå |
| | | pod 'Pangrowth', '3.9.0.2', :subspecs => ['media'] |
| | | # AppLog SDK |
| | | # pod 'RangersAppLog', '~> 5.6.6', |
| | | # :subspecs => ['Core', 'Log', 'Host/CN'], |
| | | # :source=> 'https://github.com/bytedance/cocoapods_sdk_source_repo.git' |
| | | # ç©¿å±±ç²SDKï¼çæ¬å·ä»¥èµè½å¹³å°çæçPodå½ä»¤ä¸ºå |
| | | # pod 'Ads-CN' |
| | | # APMInsight SDK |
| | | pod 'RangersAPM', '3.3.1', :subspecs => [ |
| | | 'Core', |
| | | 'Public', |
| | | 'Crash', |
| | | 'HMD', |
| | | 'EventMonitor' |
| | | ], :source => 'https://github.com/volcengine/volcengine-specs.git' |
| | | |
| | | pod 'Toast', '~> 4.0.0' |
| | | # pod 'Pangrowth', '5.0.0.0', :subspecs => [ 'media', 'djx-lite', 'nov' ] |
| | | pod 'Pangrowth', '5.3.0.0', :subspecs => [ 'media' ] |
| | | pod 'PangrowthX', '2.7.0.0', :subspecs => [ 'shortplay','ministory' ] |
| | | |
| | | |
| | | |
| | | pod 'Toast', '~> 4.0.0' |
| | | # pod 'Ads-Global' |
| | | # 微信ç»å½ |
| | | pod 'WechatOpenSDK-XCFramework' |
| | | end |
| | | |
| | | def find_and_replace(dir, findstr, replacestr) |
| | |
| | | Dir[dir + '*/'].each(&method(:find_and_replace)) |
| | | end |
| | | |
| | | |
| | | post_install do |installer_representation| |
| | | |
| | | |
| | | installer_representation.generated_projects.each do |project| |
| | | project.targets.each do |target| |
| | | if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" |
| | | target.build_configurations.each do |config| |
| | | config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' |
| | | end |
| | | end |
| | | target.build_configurations.each do |config| |
| | | config.build_settings["ENABLE_MODULE_VERIFIER"] = "NO" |
| | | config.build_settings["ENABLE_USER_SCRIPT_SANDBOXING"] = "NO" |
| | | config.build_settings["CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER"] = "NO" |
| | | end |
| | | end |
| | | end |
| | | |
| | | # çç¥ |
| | | # Xcode14é®é¢è¡¥ä¸ï¼å级åå¯ä»¥ç§»é¤:https://github.com/CocoaPods/CocoaPods/pull/11828 |
| | | find_and_replace("./Pods/Target Support Files/Pods-projectName/Pods-projectName-frameworks.sh", 'source="$(readlink "${source}")"', 'source="$(readlink -f "${source}")"') |
New file |
| | |
| | | <?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>NSPrivacyCollectedDataTypes</key>
|
| | | <array/>
|
| | | <key>NSPrivacyAccessedAPITypes</key>
|
| | | <array>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>C617.1</string> |
| | | <string>æä»¬éè¦è®¿é®æä»¶æ¶é´æ³ä»¥ä¾¿ç®¡çååæ¥ç¨æ·çæ°æ®ï¼ç¡®ä¿åºç¨åè½çåç¡®æ§åä¸è´æ§ã</string>
|
| | | </array>
|
| | | </dict>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>35F9.1</string> |
| | | <string>æä»¬éè¦è®¿é®ç³»ç»å¯å¨æ¶é´ä»¥ç¡®ä¿åºç¨å¨å¯å¨æ¶è½å¤æ§è¡ç¹å®åå§åä»»å¡ï¼å¹¶ä¼åç¨æ·ä½éªã</string>
|
| | | </array>
|
| | | </dict>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>7D9E.1</string>
|
| | | <string>E174.1</string> |
| | | <string>æä»¬éè¦è®¿é®ç£ç空é´ä»¥ä¾¿ä¸ºç¨æ·ç¼åè§é¢å
容ï¼ä»èæé«ææ¾æ§è½åç¨æ·ä½éªã</string>
|
| | | </array>
|
| | | </dict>
|
| | | <dict>
|
| | | <key>NSPrivacyAccessedAPIType</key>
|
| | | <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
| | | <key>NSPrivacyAccessedAPITypeReasons</key>
|
| | | <array>
|
| | | <string>CA92.1</string> |
| | | <string>æä»¬ä½¿ç¨ UserDefaults æ¥åå¨ç¨æ·çå好设置ååºç¨ç¶æï¼ä»¥ä¾¿ç¨æ·ä¸æ¬¡ä½¿ç¨åºç¨æ¶å¯ä»¥å¿«éæ¢å¤å°ä¹åçç¶æã</string> |
| | | </array>
|
| | | </dict> |
| | | |
| | | |
| | | |
| | | |
| | |
|
| | | </array>
|
| | | </dict> |
| | | </plist> |
New file |
| | |
| | | /// |
| | | /// \file QQApiInterface.h |
| | | /// \brief QQApiæ¥å£ç®åå°è£
|
| | | /// |
| | | /// Created by Tencent on 12-5-15. |
| | | /// Copyright (c) 2012å¹´ Tencent. All rights reserved. |
| | | /// |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "QQApiInterfaceObject.h" |
| | | |
| | | typedef void (^sendResultBlock)(NSDictionary *result); |
| | | |
| | | // åéæ¶æ¯åè°æ¯å¦åéæå |
| | | typedef void(^QQApiInterfaceSendMessageResultBlock)(QQApiSendResultCode sendResultCode, NSString *message); |
| | | |
| | | /** |
| | | \brief å¤çæ¥è³QQç请æ±åååºçåè°åè®® |
| | | */ |
| | | @protocol QQApiInterfaceDelegate <NSObject> |
| | | |
| | | /** |
| | | å¤çæ¥è³QQçè¯·æ± |
| | | */ |
| | | - (void)onReq:(QQBaseReq *)req; |
| | | |
| | | /** |
| | | å¤çæ¥è³QQçååº |
| | | */ |
| | | - (void)onResp:(QQBaseResp *)resp; |
| | | |
| | | /** |
| | | å¤çQQå¨çº¿ç¶æçåè° |
| | | */ |
| | | - (void)isOnlineResponse:(NSDictionary *)response; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | \brief 对QQApiçç®åå°è£
ç±» |
| | | */ |
| | | @interface QQApiInterface : NSObject |
| | | |
| | | /** |
| | | å¤çç±æQå¤èµ·çæ®éè·³è½¬è¯·æ± |
| | | \param url å¾
å¤ççurlè·³è½¬è¯·æ± |
| | | \param delegate ç¬¬ä¸æ¹åºç¨ç¨äºå¤çæ¥è³QQ请æ±åååºçå§æå¯¹è±¡ |
| | | \return 跳转请æ±å¤çç»æï¼YES表示æåå¤çï¼NOè¡¨ç¤ºä¸æ¯æç请æ±åè®®æå¤ç失败 |
| | | */ |
| | | + (BOOL)handleOpenURL:(NSURL *)url delegate:(id<QQApiInterfaceDelegate>)delegate; |
| | | |
| | | /** |
| | | å¤çç±æQå¤èµ·çuniversallinkè·³è½¬è¯·æ± |
| | | \param universallink å¾
å¤ççuniversallinkè·³è½¬è¯·æ± |
| | | \param delegate ç¬¬ä¸æ¹åºç¨ç¨äºå¤çæ¥è³QQ请æ±åååºçå§æå¯¹è±¡ |
| | | \return 跳转请æ±å¤çç»æï¼YES表示æåå¤çï¼NOè¡¨ç¤ºä¸æ¯æç请æ±åè®®æå¤ç失败 |
| | | */ |
| | | + (BOOL)handleOpenUniversallink:(NSURL*)universallink delegate:(id<QQApiInterfaceDelegate>)delegate; |
| | | |
| | | /** |
| | | åæQåèµ·åäº«è¯·æ± |
| | | \param req å享å
容çè¯·æ± |
| | | \return 请æ±åéç»æç |
| | | */ |
| | | + (QQApiSendResultCode)sendReq:(QQBaseReq *)req; |
| | | |
| | | |
| | | /** |
| | | åæQ QZoneç»åçåèµ·åäº«è¯·æ± |
| | | \note H5åäº«åªæ¯æåå¼ ç½ç»å¾ççä¼ é |
| | | \param req å享å
容çè¯·æ± |
| | | \return 请æ±åéç»æç |
| | | */ |
| | | + (QQApiSendResultCode)SendReqToQZone:(QQBaseReq *)req; |
| | | |
| | | /** |
| | | åæQå起设置QQ头å |
| | | \param req å享å
容çè¯·æ± |
| | | \return 请æ±åéç»æç |
| | | */ |
| | | + (QQApiSendResultCode)sendMessageToQQAvatarWithReq:(QQBaseReq*)req; |
| | | |
| | | |
| | | + (QQApiSendResultCode)sendMessageToQQAuthWithReq:(QQBaseReq*)req; |
| | | |
| | | |
| | | /** |
| | | åæQåèµ·ç»ç¾¤è¯·æ± |
| | | \param req 请æ±çå
容 |
| | | \param resultBlock 请æ±åè° |
| | | */ |
| | | + (void)sendThirdAppBindGroupReq:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock; |
| | | |
| | | /** |
| | | åæQåèµ·å ç¾¤è¯·æ± |
| | | \param req 请æ±çå
容 |
| | | \param resultBlock 请æ±åè° |
| | | */ |
| | | + (void)sendThirdAppJoinGroupReq:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock; |
| | | |
| | | /** |
| | | åæQåèµ·è§£ç»ç¾¤è¯·æ± |
| | | \param req 请æ±çå
容 |
| | | \param resultBlock 请æ±åè° |
| | | */ |
| | | + (void)sendThirdAppUnBindGroupReq:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock; |
| | | |
| | | /** |
| | | åæQåèµ·å建QQé¢éçè¯·æ± |
| | | \param req 请æ±çå
容 |
| | | \param resultBlock åè°åéç»æ |
| | | \return void |
| | | */ |
| | | + (void)sendMessageToCreateQQGroupProWithMessageRequest:(SendMessageToQQReq *)messageRequest sendResultBlock:(QQApiInterfaceSendMessageResultBlock)sendResultBlock; |
| | | |
| | | |
| | | /** |
| | | åæQåèµ·å å
¥QQé¢éçè¯·æ± |
| | | \param req 请æ±çå
容 |
| | | \param resultBlock åè°åéç»æ |
| | | \return void |
| | | */ |
| | | + (void)sendMessageToJoinQQGroupProWithMessageRequest:(SendMessageToQQReq *)messageRequest sendResultBlock:(QQApiInterfaceSendMessageResultBlock)sendResultBlock; |
| | | |
| | | |
| | | /** |
| | | åæQåèµ·æ¥è¯¢QQé¢éopenIDçè¯·æ± |
| | | \param req 请æ±çå
容 |
| | | \param resultBlock 请æ±åè° |
| | | */ |
| | | + (void)sendQueryQQGroupProInfo:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock; |
| | | |
| | | /** |
| | | åæQåèµ·ç»å¾å享å°è¡¨æ
æ¶è |
| | | \param req å享å
容çè¯·æ± |
| | | \return 请æ±åéç»æç |
| | | */ |
| | | + (QQApiSendResultCode)sendMessageToFaceCollectionWithReq:(QQBaseReq*)req; |
| | | |
| | | /** |
| | | æ£æµæ¯å¦å·²å®è£
QQ |
| | | \return 妿QQå·²å®è£
åè¿åYESï¼å¦åè¿åNO |
| | | |
| | | \note SDKç®åå·²ç»æ¯æQQãTIMææç»å½åå享åè½ï¼ 伿ç
§QQ>TIMç顺åºè¿è¡è°ç¨ã |
| | | åªè¦ç¨æ·å®è£
äºQQãTIMä¸ä»»æä¸ä¸ªåºç¨ï¼é½å¯ä¸ºç¬¬ä¸æ¹åºç¨è¿è¡ææç»å½ãå享åè½ã |
| | | ç¬¬ä¸æ¹åºç¨å¨æ¥å
¥SDKæ¶ä¸éè¦å¤ææ¯å¦å®è£
QQãTIMãè¥æå¤æå®è£
QQãTIMçé»è¾å»ºè®®ç§»é¤ã |
| | | */ |
| | | + (BOOL)isQQInstalled; |
| | | |
| | | /** |
| | | æ£æµæ¯å¦å·²å®è£
TIM |
| | | \return 妿TIMå·²å®è£
åè¿åYESï¼å¦åè¿åNO |
| | | |
| | | \note SDKç®åå·²ç»æ¯æQQãTIMææç»å½åå享åè½ï¼ 伿ç
§QQ>TIMç顺åºè¿è¡è°ç¨ã |
| | | åªè¦ç¨æ·å®è£
äºQQãTIMä¸ä»»æä¸ä¸ªåºç¨ï¼é½å¯ä¸ºç¬¬ä¸æ¹åºç¨è¿è¡ææç»å½ãå享åè½ã |
| | | ç¬¬ä¸æ¹åºç¨å¨æ¥å
¥SDKæ¶ä¸éè¦å¤ææ¯å¦å®è£
QQãTIMãè¥æå¤æå®è£
QQãTIMçé»è¾å»ºè®®ç§»é¤ã |
| | | */ |
| | | + (BOOL)isTIMInstalled; |
| | | |
| | | /** |
| | | æ£æµQQæ¯å¦æ¯æAPIè°ç¨ |
| | | \return 妿å½åå®è£
QQçæ¬æ¯æAPIè°ç¨åè¿åYESï¼å¦åè¿åNO |
| | | */ |
| | | + (BOOL)isQQSupportApi; |
| | | |
| | | /** |
| | | æ£æµTIMæ¯å¦æ¯æAPIè°ç¨ |
| | | \return 妿å½åå®è£
TIMçæ¬æ¯æAPIè°ç¨åè¿åYESï¼å¦åè¿åNO |
| | | */ |
| | | + (BOOL)isTIMSupportApi __attribute__((deprecated("å·²è¿æ, 建议å é¤è°ç¨ï¼è°ç¨å°æ¹ç¨YESæ¿ä»£ã"))); |
| | | |
| | | /** |
| | | æ£æµæ¯å¦æ¯æå享 |
| | | \return 妿å½åå·²å®è£
QQä¸QQçæ¬æ¯æAPIè°ç¨ æè
å½åå·²å®è£
TIMä¸TIMçæ¬æ¯æAPIè°ç¨åè¿åYESï¼å¦åè¿åNO |
| | | */ |
| | | + (BOOL)isSupportShareToQQ; |
| | | |
| | | /** |
| | | æ£æµæ¯å¦æ¯æå享å°QQç»åçQZone |
| | | \return 妿å½åå·²å®è£
QQä¸QQçæ¬æ¯æAPIè°ç¨åè¿åYESï¼å¦åè¿åNO |
| | | */ |
| | | + (BOOL)isSupportPushToQZone; |
| | | |
| | | /** |
| | | å¯å¨QQ |
| | | \return æåè¿åYESï¼å¦åè¿åNO |
| | | */ |
| | | + (BOOL)openQQ; |
| | | |
| | | /** |
| | | å¯å¨TIM |
| | | \return æåè¿åYESï¼å¦åè¿åNO |
| | | */ |
| | | + (BOOL)openTIM; |
| | | |
| | | /** |
| | | è·åQQä¸è½½å°å |
| | | |
| | | 妿Appéè¿<code>QQApiInterface#isQQInstalled</code>å<code>QQApiInterface#isQQSupportApi</code>æ£æµåç°QQ没å®è£
æå½åçæ¬QQ䏿¯æAPIè°ç¨ï¼å¯å¼å¯¼ç¨æ·éè¿æå¼æ¤é¾æ¥ä¸è½½ææ°çQQã |
| | | \return iPhoneQQä¸è½½å°å |
| | | */ |
| | | + (NSString *)getQQInstallUrl; |
| | | |
| | | /** |
| | | è·åTIMä¸è½½å°å |
| | | |
| | | 妿Appéè¿<code>QQApiInterface#isTIMInstalled</code>æ£æµåç°TIM没å®è£
æå½åçæ¬TIM䏿¯æAPIè°ç¨ï¼å¯å¼å¯¼ç¨æ·éè¿æå¼æ¤é¾æ¥ä¸è½½ææ°çTIMã |
| | | \return iPhoneTIMä¸è½½å°å |
| | | */ |
| | | + (NSString *)getTIMInstallUrl; |
| | | |
| | | #pragma mark - Log |
| | | |
| | | /*! @brief è°ç¨æ¤å½æ°å¯ä»¥å¯¼åºQQSDKçLogå°ç¬¬ä¸æ¹ä¸ï¼ç¨äºå®ä½é®é¢ |
| | | |
| | | 注æ1:SDKä¼å¼ºå¼ç¨è¿ä¸ªblock,注æä¸è¦å¯¼è´å
åæ³æ¼,注æä¸è¦å¯¼è´å
åæ³æ¼ |
| | | 注æ2:è°ç¨è¿ä¸æ¬¡startLog by blockä¹åï¼å¦æåè°ç¨ä¸æ¬¡ä»»ææ¹å¼çstartLoad,ä¼éæ¾ä¸ä¸æ¬¡logBlockï¼ä¸ååè°ä¸ä¸ä¸ªlogBlock |
| | | * |
| | | * @param logBlock æå°logçåè°block |
| | | */ |
| | | + (void)startLogWithBlock:(QQApiLogBolock)logBlock; |
| | | |
| | | ///忢åè°æå° |
| | | + (void)stopLog; |
| | | |
| | | ///设置æå°æ¥å¿å°æä»¶å¼å
³on/offï¼å¦æä¸è®¾ç½®ï¼é»è®¤ä¸æå°å°æä»¶ |
| | | + (void)setSwitchPrintLogToFile:(BOOL)on; |
| | | |
| | | ///æ¥å¿æä»¶ç®å½ |
| | | + (NSString *)getLogFilePath; |
| | | |
| | | @end |
New file |
| | |
| | | /// |
| | | /// \file QQApiInterfaceObject.h |
| | | /// \brief QQApiInterfaceæä¾èµç请æ±ååºçæ¶æ¯å¯¹è±¡å°è£
帮å©ç±» |
| | | /// |
| | | /// Created by Tencent on 12-5-15. |
| | | /// Copyright (c) 2012å¹´ Tencent. All rights reserved. |
| | | /// |
| | | |
| | | #ifndef QQApiInterface_QQAPIOBJECT_h |
| | | #define QQApiInterface_QQAPIOBJECT_h |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | typedef NS_ENUM(NSInteger, QQApiSendResultCode) { |
| | | EQQAPISENDSUCESS = 0, |
| | | EQQAPIQQNOTINSTALLED = 1, // QQæªå®è£
|
| | | EQQAPIQQNOTSUPPORTAPI = 2, // QQ api䏿¯æ |
| | | EQQAPIMESSAGETYPEINVALID = 3, |
| | | EQQAPIMESSAGECONTENTNULL = 4, |
| | | EQQAPIMESSAGECONTENTINVALID = 5, |
| | | EQQAPIAPPNOTREGISTED = 6, |
| | | EQQAPIAPPSHAREASYNC = 7, |
| | | EQQAPIQQNOTSUPPORTAPI_WITH_ERRORSHOW = 8, // QQ api䏿¯æ && SDKæ¾ç¤ºerroræç¤ºï¼å·²åºå¼ï¼ |
| | | EQQAPIMESSAGEARKCONTENTNULL = 9, // arkå
容为空 |
| | | EQQAPIMESSAGE_MINI_CONTENTNULL = 10, // å°ç¨åºåæ°ä¸ºç©º |
| | | EQQAPISENDFAILD = -1, // åé失败 |
| | | EQQAPISHAREDESTUNKNOWN = -2, // æªæå®å享å°QQæTIM |
| | | EQQAPITIMSENDFAILD = -3, // åé失败 |
| | | EQQAPITIMNOTINSTALLED = 11, // TIMæªå®è£
|
| | | EQQAPITIMNOTSUPPORTAPI = 12, // TIM api䏿¯æ |
| | | EQQAPI_INCOMING_PARAM_ERROR = 13, // å¤é¨ä¼ åé误 |
| | | EQQAPI_THIRD_APP_GROUP_ERROR_APP_NOT_AUTHORIZIED = 14, // APPæªè·å¾ææ |
| | | EQQAPI_THIRD_APP_GROUP_ERROR_CGI_FAILED = 15, // CGI请æ±å¤±è´¥ |
| | | EQQAPI_THIRD_APP_GROUP_ERROR_HAS_BINDED = 16, // 该ç»ç»å·²ç»ç»å®ç¾¤è |
| | | EQQAPI_THIRD_APP_GROUP_ERROR_NOT_BINDED = 17, // 该ç»ç»å°æªç»å®ç¾¤è |
| | | EQQAPI_THIRD_APP_GROUP_ERROR_HAS_UNBINDED = 18, // 该ç»ç»å·²ç»è§£ç»ç¾¤è |
| | | EQQAPIQZONENOTSUPPORTTEXT = 10000, // qzoneåäº«ä¸æ¯ætextç±»åå享 |
| | | EQQAPIQZONENOTSUPPORTIMAGE = 10001, // qzoneåäº«ä¸æ¯æimageç±»åå享 |
| | | EQQAPIVERSIONNEEDUPDATE = 10002, // å½åQQçæ¬å¤ªä½ï¼éè¦æ´æ°è³æ°çæ¬æå¯ä»¥æ¯æ |
| | | ETIMAPIVERSIONNEEDUPDATE = 10004, // å½åTIMçæ¬å¤ªä½ï¼éè¦æ´æ°è³æ°çæ¬æå¯ä»¥æ¯æ |
| | | EAPPURLTYPESILLEGALITY = 20000, // (>=3.3.8)ç¬¬ä¸æ¹APPçinfo.plistä¸UrlTypesåæ®µåå¨QQçUrlScheme |
| | | EQQAPI_ERROR_USER_NOT_AGREED_AUTHORIZATION = 30001, // ç¨æ·æªåæéç§åè®®ï¼ç¨æ·åæéç§åè®®åï¼éè¦è®¾ç½®[TencentOAuth setIsUserAgreedAuthorization:YES]; |
| | | }; |
| | | |
| | | #pragma mark - QQApiObject(å享对象类å) |
| | | |
| | | // QQApiObject control flags |
| | | typedef NS_ENUM(NSUInteger,kQQAPICtrlFlag) { |
| | | kQQAPICtrlFlagQZoneShareOnStart = 0x01, |
| | | kQQAPICtrlFlagQZoneShareForbid = 0x02, //å±è½å¥½åéæ©å¨ä¸ç空é´å
¥å£ |
| | | kQQAPICtrlFlagQQShare = 0x04, |
| | | kQQAPICtrlFlagQQShareFavorites = 0x08, //æ¶è |
| | | kQQAPICtrlFlagQQShareDataline = 0x10, //æ°æ®çº¿ |
| | | kQQAPICtrlFlagQQShareEnableArk = 0x20, //æ¯æARK |
| | | kQQAPICtrlFlagQQShareEnableMiniProgram = 0x40, //æ¯æå°ç¨åº |
| | | }; |
| | | |
| | | // å享å°QQæTIM |
| | | typedef NS_ENUM(NSUInteger, ShareDestType) { |
| | | ShareDestTypeQQ = 0, |
| | | ShareDestTypeTIM, |
| | | }; |
| | | |
| | | //å°ç¨åºçç±»å |
| | | typedef NS_ENUM(NSUInteger, MiniProgramType) { |
| | | MiniProgramType_Develop = 0, // å¼åç |
| | | MiniProgramType_Test = 1, // æµè¯ç |
| | | MiniProgramType_Online = 3, // æ£å¼ç,é»è®¤ |
| | | MiniProgramType_Preview = 4, // é¢è§ç |
| | | }; |
| | | |
| | | /// æå°åè°çblock |
| | | typedef void(^QQApiLogBolock)(NSString *logStr); |
| | | |
| | | // QQApiObject |
| | | /** \brief ææå¨QQåæä»¶é´åéçæ°æ®å¯¹è±¡çæ ¹ç±»ã |
| | | */ |
| | | __attribute__((visibility("default"))) @interface QQApiObject : NSObject |
| | | |
| | | @property (nonatomic, copy) NSString *title; ///< æ é¢ï¼æé¿128个å符 |
| | | @property (nonatomic, copy) NSString *description; ///<ç®è¦æè¿°ï¼æé¿512个å符 |
| | | @property (nonatomic, copy) NSString *universalLink; ///(>=3.3.7)æ¯æç¬¬ä¸æ¹ä¼ å
¥å¨äºè弿¾å¹³å°æ³¨åçuniversallink |
| | | @property (nonatomic, assign) uint64_t cflag; |
| | | //353æ°å¢ä¸¤ä¸ªåæç»æ¸¸æä¾§ä½¿ç¨ï¼å¯¹é½å¾®ä¿¡sdk |
| | | @property (nonatomic, copy) NSString *tagName; |
| | | @property (nonatomic, copy) NSString *messageExt; |
| | | /* |
| | | * å享å°QQ/TIM |
| | | * SDKæ ¹æ®æ¯å¦å®è£
对åºå®¢æ·ç«¯è¿è¡å¤æï¼å¤æé¡ºåºï¼QQ > TIM |
| | | * é»è®¤å享å°QQï¼å¦æQQæªå®è£
æ£æµTIMæ¯å¦å®è£
|
| | | */ |
| | | @property (nonatomic, assign) ShareDestType shareDestType; |
| | | @end |
| | | |
| | | // ArkObject |
| | | /** \brief æ¯æArkçæ ¹ç±»ã |
| | | */ |
| | | __attribute__((visibility("default"))) @interface ArkObject : NSObject |
| | | @property (nonatomic, copy) NSString *arkData; ///< æ¾ç¤ºArkæéçæ°æ®ï¼json串ï¼é¿åº¦æä¸éå¶ |
| | | @property (nonatomic,assign) QQApiObject* qqApiObject; ///<åæèçæ¬çQQApiObject |
| | | |
| | | - (id)initWithData:(NSString *)arkData qqApiObject:(QQApiObject*)qqApiObject; |
| | | + (id)objectWithData:(NSString *)arkData qqApiObject:(QQApiObject*)qqApiObject; |
| | | @end |
| | | |
| | | #pragma mark QQå°ç¨åº |
| | | //å享å°ç¨åºæ¶æ¯ - QQ 8.0.8 |
| | | __attribute__((visibility("default"))) @interface QQApiMiniProgramObject : NSObject |
| | | @property (nonatomic, strong) QQApiObject* qqApiObject; //åæèçæ¬çQQApiObject |
| | | @property (nonatomic, copy) NSString *miniAppID; //å¿
å¡«ï¼å°ç¨åºçAppIdï¼æ³¨ï¼å¿
é¡»å¨QQäºèå¹³å°ä¸ï¼å°è¯¥å°ç¨åºä¸å享çAppç»å®ï¼ |
| | | @property (nonatomic, copy) NSString *miniPath; //å¿
å¡«ï¼å°ç¨åºçå±ç¤ºè·¯å¾ |
| | | @property (nonatomic, copy) NSString *webpageUrl; //å¿
å¡«ï¼å
¼å®¹ä½çæ¬çç½é¡µé¾æ¥ |
| | | @property (nonatomic,assign) MiniProgramType miniprogramType; //éå¿
å¡«ï¼å°ç¨åºçç±»åï¼é»è®¤æ£å¼ç(3)ï¼å¯éæµè¯ç(1)ãé¢è§ç(4) |
| | | @end |
| | | |
| | | //å¤èµ·å°ç¨åº - QQ 8.1.8 |
| | | __attribute__((visibility("default"))) @interface QQApiLaunchMiniProgramObject : QQApiObject |
| | | @property (nonatomic, copy) NSString *miniAppID; //å¿
å¡«ï¼å°ç¨åºçAppIdï¼æ³¨ï¼å¿
é¡»å¨QQäºèå¹³å°ä¸ï¼å°è¯¥å°ç¨åºä¸å享çAppç»å®ï¼ |
| | | @property (nonatomic, copy) NSString *miniPath; //å°ç¨åºçå±ç¤ºè·¯å¾,ä¸å¡«å±ç¤ºé»è®¤å°ç¨åºé¦é¡µ |
| | | @property (nonatomic,assign) MiniProgramType miniprogramType; //éå¿
å¡«ï¼å°ç¨åºçç±»åï¼é»è®¤æ£å¼ç(3)ï¼å¯éæµè¯ç(1)ãå¼åç(0) |
| | | @end |
| | | |
| | | //å°ç¨åºå¤èµ·ç¬¬ä¸æ¹ - SDK 3.3.9 |
| | | __attribute__((visibility("default"))) @interface QQApiMiniProgramLaunchObject : QQApiObject |
| | | @property (nonatomic, copy) NSString *appParameter; //å°ç¨åºå¸¦æ¥çæ°æ®ï¼éä¼ |
| | | + (instancetype)newWithAppParameter:(NSString *)parameter; |
| | | @end |
| | | |
| | | // QQApiResultObject |
| | | /** \brief ç¨äºè¯·æ±ååºçæ°æ®ç±»åã |
| | | <h3>å¯è½é误ç åæè¿°å¦ä¸:</h3> |
| | | <TABLE> |
| | | <TR><TD>error</TD><TD>errorDescription</TD><TD>注é</TD></TR> |
| | | <TR><TD>0</TD><TD>nil</TD><TD>æå</TD></TR> |
| | | <TR><TD>-1</TD><TD>param error</TD><TD>åæ°é误</TD></TR> |
| | | <TR><TD>-2</TD><TD>group code is invalid</TD><TD>该群ä¸å¨èªå·±ç群å表éé¢</TD></TR> |
| | | <TR><TD>-3</TD><TD>upload photo failed</TD><TD>ä¸ä¼ å¾ç失败</TD></TR> |
| | | <TR><TD>-4</TD><TD>user give up the current operation</TD><TD>ç¨æ·æ¾å¼å½åæä½</TD></TR> |
| | | <TR><TD>-5</TD><TD>client internal error</TD><TD>客æ·ç«¯å
é¨å¤çé误</TD></TR> |
| | | </TABLE> |
| | | */ |
| | | __attribute__((visibility("default"))) @interface QQApiResultObject : QQApiObject |
| | | @property (nonatomic, copy) NSString *error; ///<é误 |
| | | @property (nonatomic, copy) NSString *errorDescription; ///<é误æè¿° |
| | | @property (nonatomic, copy) NSString *extendInfo; ///<æ©å±ä¿¡æ¯ |
| | | @property (nonatomic, copy) NSDictionary *otherInfo; ///<å
¶ä»æ©å±ä¿¡æ¯ |
| | | @end |
| | | |
| | | // QQApiTextObject |
| | | /** \brief ææ¬å¯¹è±¡ |
| | | */ |
| | | @interface QQApiTextObject : QQApiObject |
| | | @property (nonatomic, copy)NSString *text; ///<ææ¬å
容ï¼å¿
å¡«ï¼æé¿1536个å符 |
| | | |
| | | - (id)initWithText:(NSString *)text; ///<åå§åæ¹æ³ |
| | | + (id)objectWithText:(NSString *)text;///<工忹æ³ï¼è·åä¸ä¸ªQQApiTextObject对象. |
| | | |
| | | @end |
| | | |
| | | // QQApiURLObject |
| | | typedef NS_ENUM(NSUInteger, QQApiURLTargetType) { |
| | | QQApiURLTargetTypeNotSpecified = 0x00, |
| | | QQApiURLTargetTypeAudio = 0x01, |
| | | QQApiURLTargetTypeVideo = 0x02, |
| | | QQApiURLTargetTypeNews = 0x03 |
| | | }; |
| | | |
| | | /** @brief URL对象类åã |
| | | |
| | | å
æ¬URLå°åï¼URLå°åææåçç®æ ç±»ååé¢è§å¾åã |
| | | */ |
| | | __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject |
| | | /** |
| | | URLå°åææåçç®æ ç±»å. |
| | | @note åè§QQApi.h ä¸ç QQApiURLTargetType å®ä¹. |
| | | */ |
| | | @property (nonatomic)QQApiURLTargetType targetContentType; |
| | | |
| | | @property (nonatomic, strong) NSURL *url; ///<URLå°å,å¿
å¡«ï¼æé¿512个å符 |
| | | @property (nonatomic, copy) NSData *previewImageData;///<é¢è§å¾åæ°æ®ï¼æå¤§1Måè |
| | | @property (nonatomic, strong) NSURL *previewImageURL; ///<é¢è§å¾åURL **é¢è§å¾åæ°æ®ä¸é¢è§å¾åURLå¯äºéä¸ |
| | | |
| | | /** |
| | | åå§åæ¹æ³ |
| | | */ |
| | | - (id)initWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data targetContentType:(QQApiURLTargetType)targetContentType; |
| | | |
| | | - (id)initWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL targetContentType:(QQApiURLTargetType)targetContentType; |
| | | /** |
| | | 工忹æ³,è·åä¸ä¸ªQQApiURLObject对象 |
| | | */ |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data targetContentType:(QQApiURLTargetType)targetContentType; |
| | | |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL targetContentType:(QQApiURLTargetType)targetContentType; |
| | | |
| | | @end |
| | | |
| | | // QQApiExtendObject |
| | | /** @brief æ©å±æ°æ®ç±»å |
| | | */ |
| | | @interface QQApiExtendObject : QQApiObject |
| | | @property (nonatomic, copy) NSData *data;///<å
·ä½æ°æ®å
容ï¼å¿
å¡«ï¼æå¤§5Måè |
| | | @property (nonatomic, copy) NSData *previewImageData;///<é¢è§å¾åï¼æå¤§1Måè |
| | | @property (nonatomic, copy) NSArray *imageDataArray;///å¾çæ°ç»(å¤å¾æåªæ¯æåäº«å°ææºQQæ¶èåè½) |
| | | |
| | | /** |
| | | åå§åæ¹æ³ |
| | | @param data æ°æ®å
容 |
| | | @param previewImageData ç¨äºé¢è§çå¾ç |
| | | @param title æ é¢ |
| | | @param description æ¤å¯¹è±¡ï¼å享çæè¿° |
| | | */ |
| | | - (id)initWithData:(NSData *)data previewImageData:(NSData *)previewImageData title:(NSString *)title description:(NSString *)description; |
| | | |
| | | /** |
| | | åå§åæ¹æ³ |
| | | @param data æ°æ®å
容 |
| | | @param title æ é¢ |
| | | @param description æ¤å¯¹è±¡ï¼å享çæè¿° |
| | | @param imageDataArray åéçå¤å¼ å¾çéå |
| | | */ |
| | | - (id)initWithData:(NSData *)data previewImageData:(NSData *)previewImageData title:(NSString *)title description:(NSString *)description imageDataArray:(NSArray *)imageDataArray; |
| | | |
| | | |
| | | /** |
| | | helperæ¹æ³è·åä¸ä¸ªautoreleaseç<code>QQApiExtendObject</code>对象 |
| | | @param data æ°æ®å
容 |
| | | @param previewImageData ç¨äºé¢è§çå¾ç |
| | | @param title æ é¢ |
| | | @param description æ¤å¯¹è±¡ï¼å享çæè¿° |
| | | @return |
| | | ä¸ä¸ªèªå¨éæ¾ç<code>QQApiExtendObject</code>å®ä¾ |
| | | */ |
| | | + (id)objectWithData:(NSData *)data previewImageData:(NSData *)previewImageData title:(NSString *)title description:(NSString *)description; |
| | | /** |
| | | helperæ¹æ³è·åä¸ä¸ªautoreleaseç<code>QQApiExtendObject</code>对象 |
| | | @param data æ°æ®å
容 |
| | | @param previewImageData ç¨äºé¢è§çå¾ç |
| | | @param title æ é¢ |
| | | @param description æ¤å¯¹è±¡ï¼å享çæè¿° |
| | | @param imageDataArray åéçå¤å¼ å¾çéå |
| | | @return |
| | | ä¸ä¸ªèªå¨éæ¾ç<code>QQApiExtendObject</code>å®ä¾ |
| | | */ |
| | | + (id)objectWithData:(NSData *)data previewImageData:(NSData *)previewImageData title:(NSString *)title description:(NSString *)description imageDataArray:(NSArray *)imageDataArray; |
| | | |
| | | |
| | | @end |
| | | |
| | | // QQApiImageObject |
| | | /** @brief å¾ç对象 |
| | | ç¨äºå享å¾çå
容çå¯¹è±¡ï¼æ¯ä¸ä¸ªæå®ä¸ºå¾çç±»åç<code>QQApiExtendObject</code> |
| | | */ |
| | | @interface QQApiImageObject : QQApiExtendObject |
| | | @end |
| | | |
| | | // QQApiImageForQQAvatarObject |
| | | /** @brief å¾ç对象 |
| | | ç¨äºè®¾ç½®QQ头åå
容çå¯¹è±¡ï¼æ¯ä¸ä¸ªæå®ä¸ºå¾çç±»åç<code>QQApiExtendObject</code> |
| | | */ |
| | | @interface QQApiImageForQQAvatarObject : QQApiExtendObject |
| | | @end |
| | | /** |
| | | * @brief è§é¢å¯¹è±¡ |
| | | * ç¨äºè®¾ç½®å¨æå¤´å |
| | | * assetURLå¯ä¼ ALAssetçALAssetPropertyAssetURLï¼æè
PHAssetçlocalIdentifier |
| | | 仿Qè¿åçé误ç ï¼ |
| | | //ç¬¬ä¸æ¹è®¾ç½®å¨æå¤´åç»æ |
| | | @"ret=0"//设置æå |
| | | @"ret=-10&error_des=user cancel"//ç¨æ·åæ¶è®¾ç½® |
| | | @"ret=-11&error_des=pasteboard have no video data"//åªåæ¿æ²¡ææ°æ® |
| | | @"ret=-12&error_des=export data failed"//ä»åªåæ¿å¯¼åºæ°æ®å°æ¬å°å¤±è´¥ |
| | | @"ret=-13&error_des=url param invalid"//sdkä¼ éè¿æ¥çæ°æ®æè¯¯ |
| | | @"ret=-14&error_des=video param invalid"//è§é¢çåæ°ä¸ç¬¦åè¦æ±ï¼æ£æµç¬¬ä¸æ¹è§é¢æºæ¹æ¡ï¼1ãå辨çè·480*480ä¿æä¸è´ï¼2ãè§é¢é¿åº¦0.5sï½8sï¼ |
| | | @"ret=-15&error_des=app authorised failed"//åºç¨é´æå¤±è´¥ |
| | | @"ret=-16&error_des=upload video failed"//设置头åï¼ä¸ä¼ å°åå°å¤±è´¥ |
| | | @"ret=-17&error_des=account diff"//è´¦å·ä¸ä¸è´ |
| | | */ |
| | | @interface QQApiVideoForQQAvatarObject : QQApiExtendObject |
| | | @property (nonatomic, copy) NSString *assetURL; |
| | | @end |
| | | |
| | | |
| | | |
| | | //QQApiAuthObject ç¨äºæèµ·æQçææè¯¦æ
页 |
| | | @interface QQApiAuthObject : QQApiObject |
| | | @end |
| | | |
| | | // QQApiImageArrayForFaceCollectionObject |
| | | /** @brief å¾çæ°ç»å¯¹è±¡ |
| | | ç¨äºå享å¾çç»å°è¡¨æ
æ¶èï¼æ¯ä¸ä¸ªæå®ä¸ºå¾çç±»åç<code>QQApiObject</code> |
| | | */ |
| | | @interface QQApiImageArrayForFaceCollectionObject : QQApiObject |
| | | |
| | | @property (nonatomic, copy) NSArray *imageDataArray;///å¾çæ°ç» |
| | | |
| | | /** |
| | | åå§åæ¹æ³ |
| | | @param imageDataArray å¾çæ°ç» |
| | | */ |
| | | - (id)initWithImageArrayData:(NSArray *)imageDataArray; |
| | | /** |
| | | helperæ¹æ³è·åä¸ä¸ªautoreleaseç<code>QQApiObject</code>对象 |
| | | @param imageDataArray åéçå¤å¼ å¾çéå |
| | | @return |
| | | ä¸ä¸ªèªå¨éæ¾ç<code>QQApiObject</code>å®ä¾ |
| | | */ |
| | | + (id)objectWithimageDataArray:(NSArray *)imageDataArray; |
| | | |
| | | @end |
| | | |
| | | // QQApiImageArrayForQZoneObject |
| | | /** @brief å¾ç对象 |
| | | ç¨äºå享å¾çå°ç©ºé´ï¼èµ°å说说路å¾ï¼æ¯ä¸ä¸ªæå®ä¸ºå¾çç±»åçï¼å½å¾çæ°ç»ä¸ºç©ºæ¶ï¼é»è®¤èµ°ææ¬å说说<code>QQApiObject</code> |
| | | */ |
| | | @interface QQApiImageArrayForQZoneObject : QQApiObject |
| | | |
| | | @property (nonatomic, copy) NSArray *imageDataArray;///å¾çæ°ç» |
| | | @property (nonatomic, copy) NSDictionary *extMap; // æ©å±å段 |
| | | |
| | | /** |
| | | åå§åæ¹æ³ |
| | | @param imageDataArray å¾çæ°ç» |
| | | @param title å说说çå
容ï¼å¯ä»¥ä¸ºç©º |
| | | @param extMap æ©å±å段 |
| | | */ |
| | | - (id)initWithImageArrayData:(NSArray *)imageDataArray title:(NSString *)title extMap:(NSDictionary *)extMap; |
| | | |
| | | /** |
| | | helperæ¹æ³è·åä¸ä¸ªautoreleaseç<code>QQApiExtendObject</code>对象 |
| | | @param title å说说çå
容ï¼å¯ä»¥ä¸ºç©º |
| | | @param imageDataArray åéçå¤å¼ å¾çéå |
| | | @param extMap æ©å±å段 |
| | | @return |
| | | ä¸ä¸ªèªå¨éæ¾ç<code>QQApiExtendObject</code>å®ä¾ |
| | | */ |
| | | + (id)objectWithimageDataArray:(NSArray *)imageDataArray title:(NSString *)title extMap:(NSDictionary *)extMap; |
| | | |
| | | @end |
| | | |
| | | // QQApiVideoForQZoneObject |
| | | /** @brief è§é¢å¯¹è±¡ |
| | | ç¨äºå享è§é¢å°ç©ºé´ï¼èµ°å说说路å¾<code>QQApiObject</code>,assetURLåvideoDataä¸¤ä¸ªåæ°å¿
须设置è³å°ä¸ä¸ªåæ°ï¼å¦æassetURL设置äºå¿½ç¥videoDataåæ° |
| | | @param assetURLå¯ä¼ ALAssetçALAssetPropertyAssetURLï¼æè
PHAssetçlocalIdentifier |
| | | @param extMap æ©å±å段 |
| | | @param videoData è§é¢æ°æ®ï¼å¤§å°ä¸è¶
è¿50M |
| | | */ |
| | | @interface QQApiVideoForQZoneObject : QQApiObject |
| | | |
| | | @property (nonatomic, copy) NSString *assetURL; |
| | | @property (nonatomic, copy) NSDictionary *extMap; // æ©å±å段 |
| | | @property (nonatomic, copy) NSData *videoData; |
| | | |
| | | - (id)initWithAssetURL:(NSString *)assetURL title:(NSString *)title extMap:(NSDictionary *)extMap; |
| | | |
| | | + (id)objectWithAssetURL:(NSString *)assetURL title:(NSString *)title extMap:(NSDictionary *)extMap; |
| | | |
| | | - (id)initWithVideoData:(NSData *)videoData title:(NSString *)title extMap:(NSDictionary *)extMap; |
| | | |
| | | + (id)objectWithVideoData:(NSData *)videoData title:(NSString *)title extMap:(NSDictionary *)extMap; |
| | | |
| | | @end |
| | | |
| | | // QQApiWebImageObject |
| | | /** @brief å¾ç对象 |
| | | ç¨äºå享ç½ç»å¾çå
容çå¯¹è±¡ï¼æ¯ä¸ä¸ªæå®ç½ç»å¾çurlç: 该类ååªå¨2.9.0çh5åäº«ä¸ææ¯æï¼ |
| | | åæçæqå享æ¯ä¸æ¯æè¯¥ç±»åçã |
| | | */ |
| | | @interface QQApiWebImageObject : QQApiObject |
| | | |
| | | @property (nonatomic, strong) NSURL *previewImageURL; ///<é¢è§å¾åURL |
| | | |
| | | /** |
| | | åå§åæ¹æ³ |
| | | @param previewImageURL ç¨äºé¢è§çå¾ç |
| | | @param title æ é¢ |
| | | @param description æ¤å¯¹è±¡ï¼å享çæè¿° |
| | | */ |
| | | - (id)initWithPreviewImageURL:(NSURL *)previewImageURL title:(NSString *)title description:(NSString *)description; |
| | | |
| | | /** |
| | | helperæ¹æ³è·åä¸ä¸ªautoreleaseç<code>QQApiWebImageObject</code>对象 |
| | | @param previewImageURL ç¨äºé¢è§çå¾ç |
| | | @param title æ é¢ |
| | | @param description æ¤å¯¹è±¡ï¼å享çæè¿° |
| | | */ |
| | | + (id)objectWithPreviewImageURL:(NSURL *)previewImageURL title:(NSString *)title description:(NSString *)description; |
| | | |
| | | @end |
| | | |
| | | |
| | | //QQApiFileObject |
| | | /** @brief æ¬å°æä»¶å¯¹è±¡(æåªæ¯æåäº«å°ææºQQæ°æ®çº¿åè½) |
| | | ç¨äºå享æä»¶å
容çå¯¹è±¡ï¼æ¯ä¸ä¸ªæå®ä¸ºæä»¶ç±»åç<code>QQApiExtendObject</code> |
| | | */ |
| | | @interface QQApiFileObject : QQApiExtendObject { |
| | | NSString *_fileName; |
| | | } |
| | | |
| | | @property (nonatomic, copy)NSString *fileName; |
| | | |
| | | @end |
| | | |
| | | // QQApiAudioObject |
| | | /** @brief é³é¢URL对象 |
| | | ç¨äºåäº«ç®æ å
容为é³é¢çURLç对象 |
| | | */ |
| | | @interface QQApiAudioObject : QQApiURLObject |
| | | |
| | | @property (nonatomic, strong) NSURL *flashURL; ///<é³é¢URLå°åï¼æé¿512个å符 |
| | | |
| | | /** |
| | | è·åä¸ä¸ªautoreleaseç<code>QQApiAudioObject</code> |
| | | @param url é³é¢å
容çç®æ URL |
| | | @param title å享å
å®¹çæ é¢ |
| | | @param description å享å
容çæè¿° |
| | | @param data å享å
容çé¢è§å¾å |
| | | @note 妿url为空ï¼è°ç¨<code>QQApi#sendMessage:</code>æ¶å°è¿åFALSE |
| | | */ |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data; |
| | | |
| | | /** |
| | | è·åä¸ä¸ªautoreleaseç<code>QQApiAudioObject</code> |
| | | @param url é³é¢å
容çç®æ URL |
| | | @param title å享å
å®¹çæ é¢ |
| | | @param description å享å
容çæè¿° |
| | | @param previewURL å享å
容çé¢è§å¾åURL |
| | | @note 妿url为空ï¼è°ç¨<code>QQApi#sendMessage:</code>æ¶å°è¿åFALSE |
| | | */ |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL; |
| | | |
| | | @end |
| | | |
| | | // QQApiVideoObject |
| | | /** @brief è§é¢URL对象 |
| | | ç¨äºåäº«ç®æ å
容为è§é¢çURLç对象 |
| | | |
| | | QQApiVideoObjectç±»åçå享ï¼ç®åå¨AndroidåPC QQ䏿¥æ¶æ¶æ¯æ¶ï¼å±ç°æå¾
å®åï¼å¾
ææºQQçæ¬ä»¥åæ´æ°æ¯æ |
| | | ç®å妿è¦å享è§é¢ï¼æ¨èä½¿ç¨ QQApiNewsObject ç±»å |
| | | */ |
| | | @interface QQApiVideoObject : QQApiURLObject |
| | | |
| | | @property (nonatomic, strong) NSURL *flashURL; ///<è§é¢URLå°åï¼æé¿512个å符 |
| | | |
| | | /** |
| | | è·åä¸ä¸ªautoreleaseç<code>QQApiVideoObject</code> |
| | | @param url è§é¢å
容çç®æ URL |
| | | @param title å享å
å®¹çæ é¢ |
| | | @param description å享å
容çæè¿° |
| | | @param data å享å
容çé¢è§å¾å |
| | | @note 妿url为空ï¼è°ç¨<code>QQApi#sendMessage:</code>æ¶å°è¿åFALSE |
| | | */ |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data; |
| | | /** |
| | | è·åä¸ä¸ªautoreleaseç<code>QQApiVideoObject</code> |
| | | @param url è§é¢å
容çç®æ URL |
| | | @param title å享å
å®¹çæ é¢ |
| | | @param description å享å
容çæè¿° |
| | | @param previewURL å享å
容çé¢è§å¾åURL |
| | | @note 妿url为空ï¼è°ç¨<code>QQApi#sendMessage:</code>æ¶å°è¿åFALSE |
| | | */ |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL; |
| | | |
| | | @end |
| | | |
| | | // QQApiNewsObject |
| | | /** @brief æ°é»URL对象 |
| | | ç¨äºåäº«ç®æ å
容为æ°é»çURLç对象 |
| | | */ |
| | | @interface QQApiNewsObject : QQApiURLObject |
| | | /** |
| | | è·åä¸ä¸ªautoreleaseç<code>QQApiNewsObject</code> |
| | | @param url è§é¢å
容çç®æ URL |
| | | @param title å享å
å®¹çæ é¢ |
| | | @param description å享å
容çæè¿° |
| | | @param data å享å
容çé¢è§å¾å |
| | | @note 妿url为空ï¼è°ç¨<code>QQApi#sendMessage:</code>æ¶å°è¿åFALSE |
| | | */ |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data; |
| | | /** |
| | | è·åä¸ä¸ªautoreleaseç<code>QQApiNewsObject</code> |
| | | @param url è§é¢å
容çç®æ URL |
| | | @param title å享å
å®¹çæ é¢ |
| | | @param description å享å
容çæè¿° |
| | | @param previewURL å享å
容çé¢è§å¾åURL |
| | | @note 妿url为空ï¼è°ç¨<code>QQApi#sendMessage:</code>æ¶å°è¿åFALSE |
| | | */ |
| | | + (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL; |
| | | |
| | | @end |
| | | |
| | | // QQApiCommonContentObject; |
| | | /** @brief éç¨æ¨¡æ¿ç±»å对象 |
| | | ç¨äºå享ä¸ä¸ªåºå®æ¾ç¤ºæ¨¡æ¿çå¾ææ··æå¯¹è±¡ |
| | | @note å¾çåè¡¨åææ¬å表ä¸è½åæ¶ä¸ºç©º |
| | | */ |
| | | @interface QQApiCommonContentObject : QQApiObject |
| | | /** |
| | | é¢å®ä¹ççé¢å¸å±ç±»å |
| | | */ |
| | | @property (nonatomic,assign) unsigned int layoutType; |
| | | @property (nonatomic, copy) NSData *previewImageData;///<é¢è§å¾ |
| | | @property (nonatomic, copy) NSArray *textArray;///<ææ¬å表 |
| | | @property (nonatomic, copy) NSArray *pictureDataArray;///<å¾çå表 |
| | | + (id)objectWithLayoutType:(int)layoutType textArray:(NSArray *)textArray pictureArray:(NSArray *)pictureArray previewImageData:(NSData *)data; |
| | | /** |
| | | å°ä¸ä¸ªNSDictionary对象转å为QQApiCommomContentObjectï¼å¦ææ æ³è½¬æ¢ï¼åè¿å空 |
| | | */ |
| | | + (id)objectWithDictionary:(NSDictionary *)dic; |
| | | - (NSDictionary *)toDictionary; |
| | | @end |
| | | |
| | | // QQApiExtraServiceObject; éç¨ä¸å¡æ¶æ¯å¤çç±»ï¼æ§çï¼åç»ä½¿ç¨QQApiCommonServiceObjectï¼ |
| | | /** |
| | | @brief OpenSDKæ©å±æ¯æçæå¡ï¼éç¨æ¥å£ï¼åç»ä¼æ©å
è½å |
| | | @param serviceID [å¿
é] æ©å±æ¯æçæå¡ç±»åIDï¼åè宿¹ææ¡£è¯´æ |
| | | @param openID [å¿
é] ææç»å½åå¯¹è¯¥ç¨æ·çå¯ä¸æ è¯ |
| | | @param toUin [å¯é] 对æ¹çQQå·ç |
| | | @param extraInfo [å¯é] æ©å±å段 |
| | | @note 该æ¥å£ç使ç¨é¡»å
ç»å½ |
| | | */ |
| | | @interface QQApiExtraServiceObject : QQApiObject |
| | | @property (nonatomic, copy) NSString *serviceID; |
| | | @property (nonatomic, copy) NSString *openID; |
| | | @property (nonatomic, copy) NSString *toUin; |
| | | @property (nonatomic, copy) NSDictionary *extraInfo; |
| | | |
| | | - (id)initWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID; |
| | | + (id)objecWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID; |
| | | @end |
| | | |
| | | |
| | | /** |
| | | * QQApiCommonServiceObject; éç¨ä¸å¡æ¶æ¯å¤çç±»ï¼æ°ï¼ï¼å¯ä»¥éç¨ææçéè¦éè¿äºèSDKåæ¶æ¯ç»æQçä¸å¡å»å¤çã |
| | | * 使ç¨åéè¦ç³è¯·serviceIDï¼æ¯ä¸ªä¸å¡åè½æä¸ªå¯¹åºçserviceID |
| | | */ |
| | | @interface QQApiCommonServiceObject : QQApiObject |
| | | |
| | | // [å¿
é] ææç»å½åå¯¹è¯¥ç¨æ·çå¯ä¸æ è¯ |
| | | @property (nonatomic, copy) NSString *openID; |
| | | |
| | | // [å¿
é] æ©å±æ¯æçæå¡ç±»åIDï¼åè宿¹ææ¡£è¯´æ |
| | | @property (nonatomic, copy) NSString *serviceID; |
| | | |
| | | // [å¯é] æ©å±å段ï¼ç±è°ç¨æ¹è·å
·ä½çä¸å¡æ¹åå®å
·ä½çåæ®µ |
| | | @property (nonatomic, copy) NSDictionary *extendInfo; |
| | | |
| | | - (instancetype)initWithOpenID:(NSString *)openID |
| | | serviceID:(NSString *)serviceID |
| | | extendInfo:(NSDictionary *)extendInfo; |
| | | |
| | | + (instancetype)objecWithOpenID:(NSString *)openID |
| | | serviceID:(NSString *)serviceID |
| | | extendInfo:(NSDictionary *)extendInfo; |
| | | |
| | | @end |
| | | |
| | | |
| | | //////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | // Ad item object definition |
| | | //////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| | | /** @brief å¹¿åæ°æ®å¯¹è±¡ |
| | | */ |
| | | @interface QQApiAdItem : NSObject |
| | | @property (nonatomic, copy) NSString *title; ///<åç§° |
| | | @property (nonatomic, copy) NSString *description;///<æè¿° |
| | | @property (nonatomic, copy) NSData *imageData;///<广åå¾ç |
| | | @property (nonatomic, strong) NSURL *target;///<广åç®æ 龿¥ |
| | | @end |
| | | |
| | | |
| | | #pragma mark - QQApiè¯·æ±æ¶æ¯ç±»å |
| | | |
| | | /** |
| | | QQApiè¯·æ±æ¶æ¯ç±»å |
| | | */ |
| | | typedef NS_ENUM(NSUInteger, QQApiInterfaceReqType) { |
| | | EGETMESSAGEFROMQQREQTYPE = 0, /// < æQ -> ç¬¬ä¸æ¹åºç¨ï¼è¯·æ±ç¬¬ä¸æ¹åºç¨åæQåéæ¶æ¯ |
| | | ESENDMESSAGETOQQREQTYPE = 1, /// < ç¬¬ä¸æ¹åºç¨ -> æQï¼ç¬¬ä¸æ¹åºç¨åæQåäº«æ¶æ¯ |
| | | ESHOWMESSAGEFROMQQREQTYPE = 2, /// < æQ -> ç¬¬ä¸æ¹åºç¨ï¼è¯·æ±ç¬¬ä¸æ¹åºç¨å±ç°æ¶æ¯ä¸çæ°æ® |
| | | ESENDMESSAGEARKTOQQREQTYPE = 3, /// < ç¬¬ä¸æ¹åºç¨ -> æQï¼ç¬¬ä¸æ¹åºç¨åæQå享Arkæ¶æ¯ |
| | | ESENDMESSAGE_MINI_TOQQREQTYPE = 4 /// < ç¬¬ä¸æ¹åºç¨ -> æQï¼ç¬¬ä¸æ¹åºç¨åæQå享å°ç¨åºæ¶æ¯ |
| | | }; |
| | | |
| | | /** |
| | | QQApiåºçæ¶æ¯ç±»å |
| | | */ |
| | | typedef NS_ENUM(NSUInteger, QQApiInterfaceRespType) { |
| | | ESHOWMESSAGEFROMQQRESPTYPE = 0, /// < ç¬¬ä¸æ¹åºç¨ -> æQï¼ç¬¬ä¸æ¹åºç¨åºçæ¶æ¯å±ç°ç»æ |
| | | EGETMESSAGEFROMQQRESPTYPE = 1, /// < ç¬¬ä¸æ¹åºç¨ -> æQï¼ç¬¬ä¸æ¹åºç¨ååºå徿Qçæ¶æ¯ |
| | | ESENDMESSAGETOQQRESPTYPE = 2 /// < æQ -> ç¬¬ä¸æ¹åºç¨ï¼æQåºçå¤çåäº«æ¶æ¯çç»æ |
| | | }; |
| | | |
| | | /** |
| | | QQApiè¯·æ±æ¶æ¯åºç±» |
| | | */ |
| | | @interface QQBaseReq : NSObject |
| | | |
| | | /** è¯·æ±æ¶æ¯ç±»åï¼åè§\ref QQApiInterfaceReqType */ |
| | | @property (nonatomic, assign) int type; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | QQApiåºçæ¶æ¯åºç±» |
| | | */ |
| | | @interface QQBaseResp : NSObject |
| | | |
| | | /** 请æ±å¤çç»æ */ |
| | | @property (nonatomic, copy) NSString *result; |
| | | |
| | | /** å
·ä½é误æè¿°ä¿¡æ¯ */ |
| | | @property (nonatomic, copy) NSString *errorDescription; |
| | | |
| | | /** åºçæ¶æ¯ç±»åï¼åè§\ref QQApiInterfaceRespType */ |
| | | @property (nonatomic, assign) int type; |
| | | |
| | | /** æ©å±ä¿¡æ¯ */ |
| | | @property (nonatomic, copy) NSString *extendInfo; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | GetMessageFromQQReq请æ±å¸®å©ç±» |
| | | */ |
| | | @interface GetMessageFromQQReq : QQBaseReq |
| | | |
| | | /** |
| | | å建ä¸ä¸ªGetMessageFromQQReq请æ±å®ä¾ |
| | | */ |
| | | + (GetMessageFromQQReq *)req; |
| | | |
| | | @end |
| | | |
| | | @interface SendMessageToQQReq : QQBaseReq |
| | | |
| | | /** |
| | | å建ä¸ä¸ªSendMessageToQQReq请æ±å®ä¾ |
| | | \param message å
·ä½åäº«æ¶æ¯å®ä¾ |
| | | \return æ°å建çSendMessageToQQReq请æ±å®ä¾ |
| | | */ |
| | | + (SendMessageToQQReq *)reqWithContent:(QQApiObject *)message; |
| | | |
| | | /** |
| | | å建ä¸ä¸ªæ¯æArkçSendMessageToQQReq请æ±å®ä¾ |
| | | \param message å
·ä½åäº«æ¶æ¯å®ä¾ |
| | | \return æ°å建çSendMessageToQQReq请æ±å®ä¾ |
| | | */ |
| | | + (SendMessageToQQReq *)reqWithArkContent:(ArkObject *)message; |
| | | /** |
| | | * å建ä¸ä¸ªæ¯æå°ç¨åºçæ¶æ¯è¯·æ±å®ä¾ |
| | | * @param miniMessage å°ç¨åºå®ä¾å¯¹è±¡ |
| | | * @return æ¶æ¯è¯·æ±å®ä¾ |
| | | */ |
| | | + (SendMessageToQQReq *)reqWithMiniContent:(QQApiMiniProgramObject *)miniMessage; |
| | | /** å
·ä½åäº«æ¶æ¯ */ |
| | | @property (nonatomic, strong) QQApiObject *apiObject; |
| | | |
| | | /** æ¯æArkçå
·ä½åäº«æ¶æ¯ */ |
| | | @property (nonatomic, strong) ArkObject *arkObject; |
| | | /** æ¯æå°ç¨åºçå
·ä½åäº«æ¶æ¯ */ |
| | | @property (nonatomic, strong) QQApiMiniProgramObject *miniProgramObject; |
| | | @end |
| | | |
| | | /** |
| | | SendMessageToQQRespåºç帮å©ç±» |
| | | */ |
| | | @interface SendMessageToQQResp : QQBaseResp |
| | | |
| | | /** å
¶ä»æ©å±ä¿¡æ¯ */ |
| | | @property (nonatomic, copy) NSDictionary *otherInfo; |
| | | |
| | | /** |
| | | å建ä¸ä¸ªSendMessageToQQRespåºçå®ä¾ |
| | | \param result 请æ±å¤çç»æ |
| | | \param errDesp å
·ä½é误æè¿°ä¿¡æ¯ |
| | | \param extendInfo æ©å±ä¿¡æ¯ |
| | | \return æ°å建çSendMessageToQQRespåºçå®ä¾ |
| | | */ |
| | | + (SendMessageToQQResp *)respWithResult:(NSString *)result errorDescription:(NSString *)errDesp extendInfo:(NSString *)extendInfo; |
| | | |
| | | + (SendMessageToQQResp *) respWithResult:(NSString *)result errorDescription:(NSString *)errDesp extendInfo:(NSString *)extendInfo otherInfo:(NSDictionary *)otherInfo; |
| | | |
| | | @end |
| | | |
| | | /** |
| | | ShowMessageFromQQReq请æ±å¸®å©ç±» |
| | | */ |
| | | @interface ShowMessageFromQQReq : QQBaseReq |
| | | |
| | | /** |
| | | å建ä¸ä¸ªShowMessageFromQQReq请æ±å®ä¾ |
| | | \param message å
·ä½å¾
å±ç°æ¶æ¯å®ä¾ |
| | | \return æ°å建çShowMessageFromQQReq请æ±å®ä¾ |
| | | */ |
| | | + (ShowMessageFromQQReq *)reqWithContent:(QQApiObject *)message; |
| | | |
| | | /** å
·ä½å¾
å±ç°æ¶æ¯ */ |
| | | @property (nonatomic, strong) QQApiObject *message; |
| | | |
| | | @end |
| | | |
| | | #pragma mark --ä¸é®å 群&建群&è§£ç»ç¾¤ |
| | | // QQApiThirdAppBindGroupObject |
| | | /** \brief ç¬¬ä¸æ¹appç»å®ç¾¤ |
| | | */ |
| | | @interface QQApiThirdAppBindGroupObject : QQApiObject |
| | | |
| | | @property (nonatomic, copy) NSString *accessToken; |
| | | @property (nonatomic, copy) NSString *payToken; |
| | | @property (nonatomic, copy) NSString *pfkey; |
| | | @property (nonatomic, copy) NSString *unionID; |
| | | @property (nonatomic, copy) NSString *appDisplayName; |
| | | |
| | | - (id)initWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID appDisplayName:(NSString *)appDisplayName; ///<åå§åæ¹æ³ |
| | | + (id)objectWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID appDisplayName:(NSString *)appDisplayName; ///<工忹æ³ï¼è·åä¸ä¸ªQQApiThirdAppBindGroupObject对象. |
| | | |
| | | @end |
| | | |
| | | // QQApiThirdAppJoinGroupObject |
| | | /** \brief ç¬¬ä¸æ¹appå å
¥ç¾¤ |
| | | */ |
| | | @interface QQApiThirdAppJoinGroupObject : QQApiObject |
| | | |
| | | @property (nonatomic, copy) NSString *accessToken; |
| | | @property (nonatomic, copy) NSString *payToken; |
| | | @property (nonatomic, copy) NSString *pfkey; |
| | | @property (nonatomic, copy) NSString *unionID; |
| | | |
| | | - (id)initWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID; ///<åå§åæ¹æ³ |
| | | |
| | | + (id)objectWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID; ///<工忹æ³ï¼è·åä¸ä¸ªQQApiThirdAppJoinGroupObject对象. |
| | | |
| | | @end |
| | | |
| | | // QQApiThirdAppUnBindGroupObject |
| | | /** \brief ç¬¬ä¸æ¹appè§£ç»ç¾¤ |
| | | */ |
| | | @interface QQApiThirdAppUnBindGroupObject : QQApiObject |
| | | |
| | | @property (nonatomic, copy) NSString *accessToken; |
| | | @property (nonatomic, copy) NSString *openId; |
| | | @property (nonatomic, copy) NSString *payToken; |
| | | @property (nonatomic, copy) NSString *pfkey; |
| | | @property (nonatomic, copy) NSString *unionID; |
| | | |
| | | - (id)initWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID openId:(NSString *)openId appId:(NSString *)appId; ///<åå§åæ¹æ³ |
| | | |
| | | + (id)objectWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID openId:(NSString *)openId appId:(NSString *)appId; ///<工忹æ³ï¼è·åä¸ä¸ªQQApiThirdAppBindGroupObject对象. |
| | | |
| | | @end |
| | | |
| | | |
| | | #endif |
New file |
| | |
| | | /// |
| | | /// \file TencentOAuth.h |
| | | /// \brief QQäºè弿¾å¹³å°ææç»å½åç¸å
³å¼æ¾æ¥å£å®ç°ç±» |
| | | /// |
| | | /// Created by Tencent on 12-12-21. |
| | | /// Copyright (c) 2012å¹´ Tencent. All rights reserved. |
| | | /// |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import "SDKDef.h" |
| | | |
| | | @protocol TencentSessionDelegate; |
| | | @protocol TencentLoginDelegate; |
| | | @protocol TencentApiInterfaceDelegate; |
| | | @protocol TencentWebViewDelegate; |
| | | |
| | | @class TencentApiReq; |
| | | @class TencentApiResp; |
| | | |
| | | typedef NS_ENUM(NSUInteger, TencentAuthorizeState) { |
| | | kTencentNotAuthorizeState, |
| | | kTencentSSOAuthorizeState, |
| | | kTencentWebviewAuthorzieState, |
| | | }; |
| | | |
| | | typedef NS_ENUM(NSUInteger, TencentAuthMode) { |
| | | kAuthModeClientSideToken, |
| | | kAuthModeServerSideCode, |
| | | }; |
| | | |
| | | #pragma mark - TencentOAuth(ææç»å½åç¸å
³å¼æ¾æ¥å£è°ç¨) |
| | | |
| | | /** |
| | | * \brief TencentOpenAPIææç»å½åç¸å
³å¼æ¾æ¥å£è°ç¨ |
| | | * |
| | | * TencentOAuthå®ç°ææç»å½é»è¾ä»¥åç¸å
³å¼æ¾æ¥å£ç请æ±è°ç¨ |
| | | */ |
| | | @interface TencentOAuth : NSObject |
| | | { |
| | | NSMutableDictionary *_apiRequests; |
| | | NSString *_accessToken; |
| | | NSDate *_expirationDate; |
| | | id<TencentSessionDelegate> _sessionDelegate; |
| | | NSString *_localAppId; |
| | | NSString *_openId; |
| | | NSString *_redirectURI; |
| | | NSArray *_permissions; |
| | | } |
| | | |
| | | /** Access Tokenåè¯ï¼ç¨äºåç»è®¿é®å弿¾æ¥å£ */ |
| | | @property(nonatomic, copy) NSString *accessToken; |
| | | |
| | | /** Access Tokençå¤±ææ */ |
| | | @property(nonatomic, copy) NSDate *expirationDate; |
| | | |
| | | /** å·²å®ç°ç弿¾æ¥å£çåè°å§æå¯¹è±¡ */ |
| | | @property(nonatomic, weak) id<TencentSessionDelegate> sessionDelegate; |
| | | |
| | | /** ç¬¬ä¸æ¹åºç¨å¨å¼åè¿ç¨ä¸è®¾ç½®çURLSchemaï¼ç¨äºæµè§å¨ç»å½ååè·³å°ç¬¬ä¸æ¹åºç¨ */ |
| | | @property(nonatomic, copy) NSString *localAppId; |
| | | |
| | | /** ç¨æ·ææç»å½åå¯¹è¯¥ç¨æ·çå¯ä¸æ è¯ */ |
| | | @property(nonatomic, copy) NSString *openId; |
| | | |
| | | /** ç¨æ·ç»å½æåè¿åç跳转页é¢å°å */ |
| | | @property(nonatomic, copy) NSString *redirectURI; |
| | | |
| | | /** ç¬¬ä¸æ¹åºç¨å¨äºè弿¾å¹³å°ç³è¯·çappID */ |
| | | @property(nonatomic, retain) NSString *appId; |
| | | |
| | | /** ç¬¬ä¸æ¹åºç¨å¨äºè弿¾å¹³å°æ³¨åçUniversalLink */ |
| | | @property(nonatomic, retain) NSString *universalLink; |
| | | |
| | | /** ä¸»è¦æ¯äºå¨±ç游æè®¾ç½®uin */ |
| | | @property(nonatomic, retain) NSString *uin; |
| | | |
| | | /** ä¸»è¦æ¯äºå¨±ç游æè®¾ç½®é´å®ç¥¨æ® */ |
| | | @property(nonatomic, retain) NSString *skey; |
| | | |
| | | /** ç»ééä¼ çæ°æ® */ |
| | | @property(nonatomic, copy) NSDictionary *passData; |
| | | |
| | | /** æææ¹å¼(Client Side Tokenæè
Server Side Code) */ |
| | | @property(nonatomic, assign) TencentAuthMode authMode; |
| | | |
| | | /** union id */ |
| | | @property(nonatomic, retain) NSString *unionid; |
| | | |
| | | /** ç¬¬ä¸æ¹å¨ææç»å½/å享 æ¶éæ© QQï¼è¿æ¯TIM ã卿æåä¸å®è¦æå®å
¶ä¸ä¸ä¸ªç±»å*/ |
| | | @property(nonatomic, assign) TencentAuthShareType authShareType; |
| | | |
| | | /** SDKæå¼webç»å½é¡µï¼æ¯æèªå¨å¡«å
è´¦å· */ |
| | | @property (nonatomic, copy) NSString *defaultUin; |
| | | |
| | | /** |
| | | * è·å䏿¬¡ç»å½å¾å°çtoken |
| | | * |
| | | **/ |
| | | - (NSString *)getCachedToken; |
| | | |
| | | /** |
| | | * è·å䏿¬¡ç»å½å¾å°çopenid |
| | | * |
| | | **/ |
| | | - (NSString *)getCachedOpenID; |
| | | |
| | | /** |
| | | * è·å䏿¬¡ç»å½çtokenè¿ææ¥æ |
| | | * |
| | | **/ |
| | | - (NSDate *)getCachedExpirationDate; |
| | | |
| | | /** |
| | | * 䏿¬¡ç»å½çtokenæ¯å¦è¿æ(æ¬å°å¤æ) |
| | | **/ |
| | | - (BOOL)isCachedTokenValid; |
| | | |
| | | /** |
| | | * å é¤ä¸æ¬¡ç»å½ç»å½çtokenä¿¡æ¯ |
| | | * |
| | | **/ |
| | | - (BOOL)deleteCachedToken; |
| | | |
| | | /** |
| | | * å é¤openid |
| | | * |
| | | **/ |
| | | - (void)deleteOpenId; |
| | | |
| | | /** |
| | | * ç¨æ¥è·å¾å½åsdkççæ¬å· |
| | | * \return è¿åsdkçæ¬å· |
| | | **/ |
| | | |
| | | + (NSString *)sdkVersion; |
| | | |
| | | /** |
| | | * ç¨æ¥è·å¾å½åsdkçå°çæ¬å· |
| | | * \return è¿åsdkå°çæ¬å· |
| | | **/ |
| | | |
| | | + (NSString *)sdkSubVersion; |
| | | |
| | | /** |
| | | * ç¨æ¥è·å¾å½åsdkçæ¯å¦ç²¾ç®ç |
| | | * \return è¿åYES表示精ç®ç |
| | | **/ |
| | | |
| | | + (BOOL)isLiteSDK; |
| | | |
| | | /** |
| | | * ä¸»è¦æ¯ç¨æ¥å¸®å©å¤ææ¯å¦æç»é被åèµ·ï¼ä½æ¯è¿æ²¡æè¿è¿åç»æ |
| | | * \return |
| | | * kTencentNotAuthorizeState:æ ææ |
| | | * kTencentSSOAuthorizeState:æäººåèµ·äºssoææä½æ è¿å |
| | | * kTencentWebviewAuthorzieState:æäººåèµ·äºwebviewææè¿æªè¿å |
| | | **/ |
| | | |
| | | + (TencentAuthorizeState *)authorizeState; |
| | | |
| | | /** |
| | | * åå§åTencentOAuth对象 |
| | | * \param appId ä¸å¯ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨å¨äºè弿¾å¹³å°ç³è¯·çå¯ä¸æ è¯ |
| | | * \param delegate ä¸å¯ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨ç¨äºæ¥æ¶è¯·æ±è¿åç»æçå§æå¯¹è±¡ |
| | | * \return åå§ååçææç»å½å¯¹è±¡ |
| | | */ |
| | | - (id)initWithAppId:(NSString *)appId |
| | | andDelegate:(id<TencentSessionDelegate>)delegate; |
| | | |
| | | /** |
| | | * åå§åTencentOAuth对象ï¼>=3.3.7ï¼ |
| | | * \param appId ä¸å¯ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨å¨äºè弿¾å¹³å°ç³è¯·çå¯ä¸æ è¯ |
| | | * \param universalLink å¯ä»¥ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨å¨äºè弿¾å¹³å°æ³¨åçUniversalLinkï¼åbundleIDä¸ä¸å¯¹åºï¼å½ä¸ºnilæ¶ï¼äºèå¹³å°ä¼æè§åçæuniversallinkï¼è¯¦è§å®ç½è¯´æï¼ |
| | | * \param delegate ä¸å¯ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨ç¨äºæ¥æ¶è¯·æ±è¿åç»æçå§æå¯¹è±¡ |
| | | * \return åå§ååçææç»å½å¯¹è±¡ |
| | | * |
| | | ****ã使ç¨è¯´æã***** |
| | | * 1ãæ¯æBundleIdä¸UniversalLinkçä¸ä¸å¯¹åºï¼ä¸»è¦ç®çâæ¯ä¸ºäºè§£å³åºç¨çiPhoneçæ¬åiPad HDçæ¬å
±ç¨åä¸ä¸ªAppIdï¼å¯¼è´åæ¶å®è£
æ
åµä¸ç跳转é®é¢"ã |
| | | * 2 ãç±äºæQçæ¬å¨ >=8.1.8 åææ¯æäºè¿ç§å¯¹åºæ¹å¼ï¼æä»¥ä¸æ¦ä½¿ç¨ï¼âå¡å¿
åå°âåæ¶ç¥ä¼ç¨æ·å级æQçæ¬ã |
| | | **** |
| | | */ |
| | | - (id)initWithAppId:(NSString *)appId |
| | | andUniversalLink:(NSString *)universalLink |
| | | andDelegate:(id<TencentSessionDelegate>)delegate; |
| | | |
| | | /** |
| | | * åå§åTencentOAuth对象ï¼>=3.3.8ï¼ |
| | | * \param appId ä¸å¯ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨å¨äºè弿¾å¹³å°ç³è¯·çå¯ä¸æ è¯ |
| | | * \param enabled é»è®¤ä¸ºNOï¼ç¬¬ä¸æ¹åºç¨æ¯å¦å°sdkåææºQQçäº¤äºæ¹å¼åæ¢ä¸ºUniversalLinkæ¹å¼ï¼å¯ç¨ååå¨iOS9å以ä¸çç³»ç»é½ä¼çæUniversalLinkæ¹å¼ï¼å¦åï¼é»è®¤ä»
å¨iOS13å以ä¸çç³»ç»çæUniversalLinkæ¹å¼ã |
| | | * \param universalLink å¯ä»¥ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨å¨äºè弿¾å¹³å°æ³¨åçUniversalLinkï¼åbundleIDä¸ä¸å¯¹åºï¼å½ä¸ºnilæ¶ï¼äºèå¹³å°ä¼æè§åçæUniversalLinkï¼è¯¦è§å®ç½è¯´æï¼ |
| | | * \param delegate ä¸å¯ä¸ºnilï¼ç¬¬ä¸æ¹åºç¨ç¨äºæ¥æ¶è¯·æ±è¿åç»æçå§æå¯¹è±¡ |
| | | * \return åå§ååçææç»å½å¯¹è±¡ |
| | | * |
| | | *****ã使ç¨è¯´æã***** |
| | | * 1ãæ¯æsdk䏿Qç交äºåæ¢ä¸ºUniversalLink模å¼ï¼ä¸»è¦ç®ç"æ¯ä¸ºäºé¿å
æQçUrlScheme被å
¶ä»åºç¨æ¢æ³¨åï¼å¯¼è´sdkæ¥å£åè½åå°å½±å"ã |
| | | * 2 ãç±äºæQçæ¬å¨ >=8.1.3 åæéé
äºUniversalLinkï¼æä»¥ä¸æ¦å¼å¯äºenabledå¼å
³ï¼âå¡å¿
åå°âåæ¶ç¥ä¼ç¨æ·å级æQçæ¬ã |
| | | ***** |
| | | */ |
| | | - (id)initWithAppId:(NSString *)appId |
| | | enableUniveralLink:(BOOL)enabled |
| | | universalLink:(NSString *)universalLink |
| | | delegate:(id<TencentSessionDelegate>)delegate; |
| | | |
| | | /** |
| | | * è®¾ç½®ç¨æ·æ¯å¦å·²ç»ææåæææéç§åè®®ï¼å¨ä¸»ä½åºç¨ä¸ï¼ç¨æ·åæææéç§åè®®åååå§åäºèSDKï¼é»è®¤æªåæææ |
| | | * 注æï¼å¦æªåæææéç§åè®®ï¼åäºèSDKçææåè½é½æ æ³ä½¿ç¨ï¼å
æ¬åå§åï¼ï¼ï¼ |
| | | * ä»3.5.7çæ¬å¼å§æ¯æè¯¥æ¹æ³ |
| | | * |
| | | * @param isAgreedAuthorization æ¯å¦å·²ç»ææï¼isAgreedAuthorization=YES, 表示已ç»åæææï¼isAgreedAuthorization=NOï¼è¡¨ç¤ºæªåæææï¼äºèSDKçææåè½é½æ æ³ä½¿ç¨ |
| | | */ |
| | | + (void)setIsUserAgreedAuthorization:(BOOL)isUserAgreedAuthorization; |
| | | |
| | | /** |
| | | * è·åå½åç¨æ·æ¯å¦å·²ç»åæææéç§åè®® |
| | | * ä»3.5.7çæ¬å¼å§æ¯æè¯¥æ¹æ³ |
| | | */ |
| | | + (BOOL)isUserAgreedAuthorization; |
| | | |
| | | /** |
| | | * å¤æç¨æ·ææºä¸æ¯å¦å®è£
ææºQQ |
| | | * \return YES:å®è£
NO:没å®è£
|
| | | * |
| | | * \note SDKç®åå·²ç»æ¯æQQãTIMææç»å½åå享åè½ï¼ 伿ç
§QQ>TIMç顺åºè¿è¡è°ç¨ã |
| | | * åªè¦ç¨æ·å®è£
äºQQãTIMä¸ä»»æä¸ä¸ªåºç¨ï¼é½å¯ä¸ºç¬¬ä¸æ¹åºç¨è¿è¡ææç»å½ãå享åè½ã |
| | | * ç¬¬ä¸æ¹åºç¨å¨æ¥å
¥SDKæ¶ä¸éè¦å¤ææ¯å¦å®è£
QQãTIMãè¥æå¤æå®è£
QQãTIMçé»è¾å»ºè®®ç§»é¤ã |
| | | */ |
| | | + (BOOL)iphoneQQInstalled; |
| | | |
| | | /** |
| | | * å¤æç¨æ·ææºä¸æ¯å¦å®è£
ææºTIM |
| | | * \return YES:å®è£
NO:没å®è£
|
| | | * |
| | | * \note SDKç®åå·²ç»æ¯æQQãTIMææç»å½åå享åè½ï¼ 伿ç
§QQ>TIMç顺åºè¿è¡è°ç¨ã |
| | | * åªè¦ç¨æ·å®è£
äºQQãTIMä¸ä»»æä¸ä¸ªåºç¨ï¼é½å¯ä¸ºç¬¬ä¸æ¹åºç¨è¿è¡ææç»å½ãå享åè½ã |
| | | * ç¬¬ä¸æ¹åºç¨å¨æ¥å
¥SDKæ¶ä¸éè¦å¤ææ¯å¦å®è£
QQãTIMãè¥æå¤æå®è£
QQãTIMçé»è¾å»ºè®®ç§»é¤ã |
| | | */ |
| | | + (BOOL)iphoneTIMInstalled; |
| | | |
| | | /** |
| | | * ç»å½ææ |
| | | * |
| | | * \param permissions ææä¿¡æ¯å |
| | | */ |
| | | - (BOOL)authorize:(NSArray *)permissions; |
| | | |
| | | /** |
| | | * ç»å½ææ |
| | | * \param permissions ææä¿¡æ¯å表 |
| | | * \param localAppId åºç¨APPID |
| | | */ |
| | | - (BOOL)authorize:(NSArray *)permissions |
| | | localAppId:(NSString *)localAppId; |
| | | |
| | | /** |
| | | * ç»å½ææ<web为äºç»´ç æ«ç æ¹å¼> |
| | | * |
| | | * \param permissions ææä¿¡æ¯å |
| | | */ |
| | | - (BOOL)authorizeWithQRlogin:(NSArray *)permissions; |
| | | |
| | | /** |
| | | * å¢éææï¼å ç¨æ·æ²¡ææäºç¸åºæ¥å£è°ç¨çæéï¼éè¦ç¨æ·ç¡®è®¤æ¯å¦ææ |
| | | * \param permissions éå¢éææçä¿¡æ¯å表 |
| | | * \return å¢éææè°ç¨æ¯å¦æå |
| | | */ |
| | | - (BOOL)incrAuthWithPermissions:(NSArray *)permissions; |
| | | |
| | | /** |
| | | * éæ°ææï¼å tokenåºé¤æå¤±æå¯¼è´æ¥å£è°ç¨å¤±è´¥ï¼éç¨æ·éæ°ææ |
| | | * \param permissions ææä¿¡æ¯å表ï¼åç»å½ææ |
| | | * \return ææè°ç¨æ¯å¦æå |
| | | */ |
| | | - (BOOL)reauthorizeWithPermissions:(NSArray *)permissions; |
| | | |
| | | /** |
| | | * è·åUnindID,å¯ä»¥æ ¹æ®UnindIDçæ¯è¾æ¥ç¡®å®OpenIDæ¯å¦å±äºåä¸ä¸ªç¨æ· |
| | | * \return NOæªç»å½ï¼ä¿¡æ¯ä¸è¶³ï¼YESæ¡ä»¶æ»¡è¶³ï¼åéè¯·æ±æåï¼è¯·çå¾
åè° |
| | | */ |
| | | - (BOOL)RequestUnionId; |
| | | |
| | | /** |
| | | * (éææ¹æ³)å¤çåºç¨æèµ·åè®® |
| | | * \param url å¤ç被å
¶ä»åºç¨å¼èµ·æ¶çé»è¾ |
| | | * \return å¤çç»æï¼YES表示æåï¼NO表示失败 |
| | | */ |
| | | + (BOOL)HandleOpenURL:(NSURL *)url; |
| | | |
| | | /** |
| | | * (éææ¹æ³)sdkæ¯å¦å¯ä»¥å¤çåºç¨æèµ·åè®® |
| | | * \param url å¤ç被å
¶ä»åºç¨å¼èµ·æ¶çé»è¾ |
| | | * \return å¤çç»æï¼YES表示å¯ä»¥ NO表示ä¸è¡ |
| | | */ |
| | | + (BOOL)CanHandleOpenURL:(NSURL *)url; |
| | | |
| | | /** |
| | | * (éææ¹æ³)å¤çåºç¨çUniversalLinkæèµ·åè®® |
| | | * \param url å¤ç被å
¶ä»åºç¨å¼èµ·æ¶çé»è¾ |
| | | * \return å¤çç»æï¼YES表示æåï¼NO表示失败 |
| | | */ |
| | | + (BOOL)HandleUniversalLink:(NSURL *)url; |
| | | |
| | | /** |
| | | * (éææ¹æ³)sdkæ¯å¦å¯ä»¥å¤çåºç¨çUniversallinkæèµ·åè®® |
| | | * \param url å¤ç被å
¶ä»åºç¨å¼èµ·æ¶çé»è¾(åºç¨çUniversallink龿¥é¡»æ»¡è¶³å®ç½æ³¨åæ¶çæ ¼å¼è¦æ±) |
| | | * \return å¤çç»æï¼YES表示å¯ä»¥ NO表示ä¸è¡ |
| | | * 注ï¼å¨è°ç¨å
¶ä»Universallinkç¸å
³å¤çæ¥å£ä¹åï¼åéè¿è¡æ¤é¡¹å¤æ |
| | | */ |
| | | + (BOOL)CanHandleUniversalLink:(NSURL *)url; |
| | | |
| | | /** |
| | | * (éææ¹æ³)è·åTencentOAuthè°ç¨çä¸ä¸æ¬¡éè¯¯ä¿¡æ¯ |
| | | */ |
| | | + (NSString *)getLastErrorMsg; |
| | | |
| | | /** |
| | | * 以Server Side Codeæ¨¡å¼ææç»å½æ¶ï¼éè¿æ¤æ¥å£è·åè¿åçcodeå¼; |
| | | * 以Client Side Tokenæ¨¡å¼ææç»å½æ¶ï¼å¿½ç¥æ¤æ¥å£ã |
| | | */ |
| | | - (NSString *)getServerSideCode; |
| | | |
| | | /** |
| | | * éåºç»å½(éåºç»å½åï¼TecentOAuth失æï¼éè¦éæ°åå§å) |
| | | * \param delegate ç¬¬ä¸æ¹åºç¨ç¨äºæ¥æ¶è¯·æ±è¿åç»æçå§æå¯¹è±¡ |
| | | */ |
| | | - (void)logout:(id<TencentSessionDelegate>)delegate; |
| | | |
| | | /** |
| | | * 夿ç»å½ææ¯å¦ææ |
| | | * \return å¤çç»æï¼YES表示ææï¼NOè¡¨ç¤ºæ æï¼è¯·ç¨æ·éæ°ç»å½ææ |
| | | */ |
| | | - (BOOL)isSessionValid; |
| | | |
| | | /** |
| | | * è·åç¨æ·ä¸ªäººä¿¡æ¯ |
| | | * \return å¤çç»æï¼YES表示APIè°ç¨æåï¼NO表示APIè°ç¨å¤±è´¥ï¼ç»å½æå¤±è´¥ï¼éæ°ç»å½ |
| | | */ |
| | | - (BOOL)getUserInfo; |
| | | |
| | | /** |
| | | * éåºæå®APIè°ç¨ |
| | | * \param userData ç¨æ·è°ç¨ææ¡APIçæ¶åä¼ å
¥çä¿çåæ° |
| | | * \return å¤çç»æï¼YES表示æå NO表示失败 |
| | | */ |
| | | - (BOOL)cancel:(id)userData; |
| | | |
| | | /** |
| | | * CGI类任å¡å建æ¥å£ |
| | | * \param apiURL CGI请æ±çURLå°å |
| | | * \param method CGIè¯·æ±æ¹å¼ï¼"GET"ï¼"POST" |
| | | * \param params CGI请æ±åæ°åå
¸ |
| | | * \param callback CGI请æ±ç»æçåè°æ¥å£å¯¹è±¡ |
| | | * \return CGI请æ±ä»»å¡å®ä¾ï¼ç¨äºåæ¶ä»»å¡ï¼è¿ånil代表任å¡å建失败 |
| | | */ |
| | | - (TCAPIRequest *)cgiRequestWithURL:(NSURL *)apiURL method:(NSString *)method params:(NSDictionary *)params callback:(id<TCAPIRequestDelegate>)callback; |
| | | |
| | | /** |
| | | * TencentOpenApiåéä»»å¡ç»ä¸æ¥å£ |
| | | * \param request 请æ±åéçä»»å¡ |
| | | * \param callback ä»»å¡åéåçåè°å°å |
| | | */ |
| | | - (BOOL)sendAPIRequest:(TCAPIRequest *)request callback:(id<TCAPIRequestDelegate>)callback; |
| | | |
| | | - (NSString *)getUserOpenID; |
| | | |
| | | /* è·åappSignToken */ |
| | | + (NSString *)getAppSignToken; |
| | | |
| | | /* 设置appSignTokenï¼è·¨è¿ç¨çåºç¨å¯ä»¥éè¿è¯¥æ¹æ³æå¨è®¾ç½®appSignToken */ |
| | | + (void)setupAppSignToken:(NSString *)appSignToken; |
| | | |
| | | @end |
| | | |
| | | #pragma mark - TencentLoginDelegate(ææç»å½åè°åè®®) |
| | | |
| | | /** |
| | | * \brief TencentLoginDelegate iOS Open SDK 1.3 APIåè°åè®® |
| | | * |
| | | * ç¬¬ä¸æ¹åºç¨å®ç°ç»å½çåè°åè®® |
| | | */ |
| | | @protocol TencentLoginDelegate <NSObject> |
| | | |
| | | @required |
| | | |
| | | /** |
| | | * ç»å½æååçåè° |
| | | */ |
| | | - (void)tencentDidLogin; |
| | | |
| | | /** |
| | | * ç»å½å¤±è´¥åçåè° |
| | | * \param cancelled ä»£è¡¨ç¨æ·æ¯å¦ä¸»å¨éåºç»å½ |
| | | */ |
| | | - (void)tencentDidNotLogin:(BOOL)cancelled; |
| | | |
| | | /** |
| | | * ç»å½æ¶ç½ç»æé®é¢çåè° |
| | | */ |
| | | - (void)tencentDidNotNetWork; |
| | | |
| | | @optional |
| | | /** |
| | | * ç»å½æ¶æéä¿¡æ¯çè·å¾ |
| | | */ |
| | | - (NSArray *)getAuthorizedPermissions:(NSArray *)permissions withExtraParams:(NSDictionary *)extraParams __attribute__((deprecated("该æ¥å£å·²è¿æ, 建议å é¤è°ç¨"))); |
| | | |
| | | /** |
| | | * unionIDè·å¾ |
| | | */ |
| | | - (void)didGetUnionID; |
| | | |
| | | /** |
| | | * 强å¶ç½é¡µç»å½ï¼å
æ¬è´¦å·å¯ç ç»å½åäºç»´ç ç»å½ |
| | | * return YESæ¶ï¼å°±ç®æ¬å°ææQä¹ä¼æå¼webçé¢ |
| | | */ |
| | | - (BOOL)forceWebLogin; |
| | | |
| | | /* è·å¾appSignTokenåè° */ |
| | | - (void)tencentDidGetAppSignToken:(NSString *)appSignToken; |
| | | |
| | | @end |
| | | |
| | | #pragma mark - TencentSessionDelegate(弿¾æ¥å£åè°åè®®) |
| | | |
| | | /** |
| | | * \brief TencentSessionDelegate iOS Open SDK 1.3 APIåè°åè®® |
| | | * |
| | | * ç¬¬ä¸æ¹åºç¨éè¦å®ç°æ¯æ¡éè¦è°ç¨çAPIçåè°åè®® |
| | | */ |
| | | @protocol TencentSessionDelegate<NSObject, TencentLoginDelegate, |
| | | TencentWebViewDelegate> |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | * éåºç»å½çåè° |
| | | */ |
| | | - (void)tencentDidLogout; |
| | | |
| | | /** |
| | | * å ç¨æ·æªæäºç¸åºæéèéè¦æ§è¡å¢éææãå¨ç¨æ·è°ç¨æä¸ªapiæ¥å£æ¶ï¼å¦ææå¡å¨è¿åæä½æªè¢«ææï¼å触å该åè°åè®®æ¥å£ï¼ç±ç¬¬ä¸æ¹å³å®æ¯å¦è·³è½¬å°å¢éææé¡µé¢ï¼è®©ç¨æ·éæ°ææã |
| | | * \param tencentOAuth ç»å½ææå¯¹è±¡ã |
| | | * \param permissions éå¢éææçæéå表ã |
| | | * \return æ¯å¦ä»ç¶åè°è¿ååå§çapi请æ±ç»æã |
| | | * \note ä¸å®ç°è¯¥åè®®æ¥å£åé»è®¤ä¸ºä¸å¼å¯å¢éæææµç¨ãè¥éè¦å¢éææè¯·è°ç¨\ref TencentOAuth#incrAuthWithPermissions: \n注æï¼å¢éæææ¶ç¨æ·å¯è½ä¼ä¿®æ¹ç»å½çå¸å· |
| | | */ |
| | | - (BOOL)tencentNeedPerformIncrAuth:(TencentOAuth *)tencentOAuth withPermissions:(NSArray *)permissions; |
| | | |
| | | /** |
| | | * [该é»è¾æªå®ç°]å token失æèéè¦æ§è¡éæ°ç»å½ææãå¨ç¨æ·è°ç¨æä¸ªapiæ¥å£æ¶ï¼å¦ææå¡å¨è¿åtoken失æï¼å触å该åè°åè®®æ¥å£ï¼ç±ç¬¬ä¸æ¹å³å®æ¯å¦è·³è½¬å°ç»å½ææé¡µé¢ï¼è®©ç¨æ·éæ°ææã |
| | | * \param tencentOAuth ç»å½ææå¯¹è±¡ã |
| | | * \return æ¯å¦ä»ç¶åè°è¿ååå§çapi请æ±ç»æã |
| | | * \note ä¸å®ç°è¯¥åè®®æ¥å£åé»è®¤ä¸ºä¸å¼å¯éæ°ç»å½æææµç¨ãè¥éè¦éæ°ç»å½ææè¯·è°ç¨\ref TencentOAuth#reauthorizeWithPermissions: \n注æï¼éæ°ç»å½æææ¶ç¨æ·å¯è½ä¼ä¿®æ¹ç»å½çå¸å· |
| | | */ |
| | | - (BOOL)tencentNeedPerformReAuth:(TencentOAuth *)tencentOAuth; |
| | | |
| | | /** |
| | | * ç¨æ·éè¿å¢éæææµç¨éæ°ææç»å½ï¼tokenåæææéçä¿¡æ¯å·²è¢«æ´æ°ã |
| | | * \param tencentOAuth tokenåæææéçä¿¡æ¯æ´æ°åçææå®ä¾å¯¹è±¡ |
| | | * \note ç¬¬ä¸æ¹åºç¨éæ´æ°å·²ä¿åçtokenåæææéçä¿¡æ¯ã |
| | | */ |
| | | - (void)tencentDidUpdate:(TencentOAuth *)tencentOAuth; |
| | | |
| | | /** |
| | | * ç¨æ·å¢éææè¿ç¨ä¸å åæ¶æç½ç»é®é¢å¯¼è´ææå¤±è´¥ |
| | | * \param reason ææå¤±è´¥åå ï¼å
·ä½å¤±è´¥åå åè§sdkdef.hæä»¶ä¸\ref UpdateFailType |
| | | */ |
| | | - (void)tencentFailedUpdate:(UpdateFailType)reason; |
| | | |
| | | /** |
| | | * è·åç¨æ·ä¸ªäººä¿¡æ¯åè° |
| | | * \param response APIè¿åç»æï¼å
·ä½å®ä¹åè§sdkdef.hæä»¶ä¸\ref APIResponse |
| | | * \remarks æ£ç¡®è¿å示ä¾: \snippet example/getUserInfoResponse.exp success |
| | | * é误è¿å示ä¾: \snippet example/getUserInfoResponse.exp fail |
| | | */ |
| | | - (void)getUserInfoResponse:(APIResponse*) response; |
| | | |
| | | /** |
| | | * 社交APIç»ä¸åè°æ¥å£ |
| | | * \param response APIè¿åç»æï¼å
·ä½å®ä¹åè§sdkdef.hæä»¶ä¸\ref APIResponse |
| | | * \param message ååºçæ¶æ¯ï¼ç®åæ¯æâSendStoryâ,âAppInvitationâï¼âAppChallengeâï¼âAppGiftRequestâ |
| | | */ |
| | | - (void)responseDidReceived:(APIResponse*)response forMessage:(NSString *)message; |
| | | |
| | | /** |
| | | * post请æ±çä¸ä¼ è¿åº¦ |
| | | * \param tencentOAuth è¿ååè°çtencentOAuth对象 |
| | | * \param bytesWritten æ¬æ¬¡åè°ä¸ä¼ çæ°æ®åèæ° |
| | | * \param totalBytesWritten æ»å
±å·²ç»ä¸ä¼ çåèæ° |
| | | * \param totalBytesExpectedToWrite æ»å
±éè¦ä¸ä¼ çåèæ° |
| | | * \param userData ç¨æ·èªå®ä¹æ°æ® |
| | | */ |
| | | - (void)tencentOAuth:(TencentOAuth *)tencentOAuth didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite userData:(id)userData; |
| | | |
| | | |
| | | /** |
| | | * éç¥ç¬¬ä¸æ¹çé¢éè¦è¢«å
³é |
| | | * \param tencentOAuth è¿ååè°çtencentOAuth对象 |
| | | * \param viewController éè¦å
³éçviewController |
| | | */ |
| | | - (void)tencentOAuth:(TencentOAuth *)tencentOAuth doCloseViewController:(UIViewController *)viewController; |
| | | |
| | | @end |
| | | |
| | | #pragma mark - TencentWebViewDelegate(H5ç»å½webviewæè½¬æ¹ååè°) |
| | | |
| | | /** |
| | | * \brief TencentWebViewDelegate: H5ç»å½webviewæè½¬æ¹ååè°åè®® |
| | | * |
| | | * ç¬¬ä¸æ¹åºç¨å¯ä»¥æ ¹æ®èªå·±APPçæè½¬æ¹åéå¶ï¼éè¿æ¤å议设置 |
| | | */ |
| | | @protocol TencentWebViewDelegate <NSObject> |
| | | @optional |
| | | - (BOOL) tencentWebViewShouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation; |
| | | - (NSUInteger) tencentWebViewSupportedInterfaceOrientationsWithWebkit; |
| | | - (BOOL) tencentWebViewShouldAutorotateWithWebkit; |
| | | @end |
New file |
| | |
| | | // |
| | | // TencentOpenApiUmbrellaHeader.h |
| | | // TencentOpenApi_IOS |
| | | // |
| | | // Created by jyukeizhang(å¼ å¨ç¥º) on 2020/7/27. |
| | | // Copyright © 2020 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #ifndef TencentOpenApiUmbrellaHeader_h |
| | | #define TencentOpenApiUmbrellaHeader_h |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | FOUNDATION_EXPORT double StaticLibraryModuleVersionNumber; |
| | | FOUNDATION_EXPORT const unsigned char StaticLibraryModuleVersionString[]; |
| | | |
| | | #import "QQApiInterface.h" |
| | | #import "QQApiInterfaceObject.h" |
| | | #import "SDKDef.h" |
| | | #import "TencentOAuth.h" |
| | | |
| | | |
| | | #endif /* TencentOpenApiUmbrellaHeader_h */ |
| | | |
New file |
| | |
| | | module TencentOpenApi{ |
| | | umbrella header "TencentOpenApiUmbrellaHeader.h" |
| | | export * |
| | | } |
New file |
| | |
| | | /// |
| | | /// \file sdkdef.h |
| | | /// \brief SDKä¸ç¸å
³å¸¸éå®ä¹ |
| | | /// |
| | | /// Created by Tencent on 12-12-25. |
| | | /// Copyright (c) 2012å¹´ Tencent. All rights reserved. |
| | | /// |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | /** |
| | | * \brief 设置sdkçlogç级 |
| | | */ |
| | | typedef enum { |
| | | TCOLogLevel_Disabled = -1, // å
³éæælog |
| | | TCOLogLevel_Error = 0, |
| | | TCOLogLevel_Warning, |
| | | TCOLogLevel_Info, |
| | | TCOLogLevel_Debug, |
| | | } TCOLogLevel; |
| | | |
| | | /** |
| | | * \breif ææ/å享 æ¹å¼ |
| | | */ |
| | | typedef enum TencentAuthShareType { |
| | | AuthShareType_QQ, |
| | | AuthShareType_TIM, |
| | | }TencentAuthShareType; |
| | | |
| | | /** |
| | | * \brief APIResponse.retCodeå¯è½çæä¸¾å¸¸é |
| | | */ |
| | | typedef enum |
| | | { |
| | | URLREQUEST_SUCCEED = 0, /**< ç½ç»è¯·æ±æååéè³æå¡å¨ï¼å¹¶ä¸æå¡å¨è¿åæ°æ®æ ¼å¼æ£ç¡® |
| | | * \note è¿éå
æ¬æè¯·æ±ä¸å¡æä½å¤±è´¥çæ
åµï¼ä¾å¦æ²¡æææçåå å¯¼è´ |
| | | */ |
| | | |
| | | URLREQUEST_FAILED = 1, /**< ç½ç»å¼å¸¸ï¼ææå¡å¨è¿åçæ°æ®æ ¼å¼ä¸æ£ç¡®å¯¼è´æ æ³è§£æ */ |
| | | } REPONSE_RESULT; |
| | | |
| | | /** |
| | | * \brief å¢éææå¤±è´¥åå |
| | | * |
| | | * \note å¢éææå¤±è´¥ä¸å½±ååtokençæææ§ï¼åtoken已失æçæ
åµé¤å¤ï¼ |
| | | */ |
| | | typedef enum |
| | | { |
| | | kUpdateFailUnknown = 1, ///< æªç¥åå |
| | | kUpdateFailUserCancel, ///< ç¨æ·åæ¶ |
| | | kUpdateFailNetwork, ///< ç½ç»é®é¢ |
| | | } UpdateFailType; |
| | | |
| | | /** |
| | | * \brief å°è£
æå¡å¨è¿åçç»æ |
| | | * |
| | | * APIResponseç¨äºå°è£
ææè¯·æ±çè¿åç»æï¼å
æ¬é误ç ãé误信æ¯ãåå§è¿åæ°æ®ä»¥åè¿åæ°æ®çjsonæ ¼å¼åå
¸ |
| | | */ |
| | | @interface APIResponse : NSObject<NSSecureCoding> { |
| | | int _detailRetCode; |
| | | int _retCode; |
| | | int _seq; |
| | | NSString *_errorMsg; |
| | | NSDictionary *_jsonResponse; |
| | | NSString *_message; |
| | | id _userData; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç详ç»é误ç \n |
| | | * detailRetCode主è¦ç¨äºåºåä¸åçé误æ
åµï¼åè§\ref OpenSDKError |
| | | */ |
| | | @property (nonatomic, assign) int detailRetCode; |
| | | |
| | | /** |
| | | * ç½ç»è¯·æ±æ¯å¦æåéè¾¾æå¡å¨ï¼ä»¥åæå¡å¨è¿åçæ°æ®æ ¼å¼æ¯å¦æ£ç¡®\n |
| | | * retCodeå
·ä½åå¼å¯åè\ref REPONSE_RESULT |
| | | */ |
| | | @property (nonatomic, assign) int retCode; |
| | | |
| | | /** |
| | | * ç½ç»è¯·æ±å¯¹åºçéå¢åºåå·ï¼æ¹ä¾¿å
é¨ç®¡ç |
| | | */ |
| | | @property (nonatomic, assign) int seq; |
| | | |
| | | /** |
| | | * é误æç¤ºè¯ |
| | | */ |
| | | @property (nonatomic, retain) NSString *errorMsg; |
| | | |
| | | /** |
| | | * æå¡å¨è¿åæ°æ®çjsonæ ¼å¼åå
¸\n |
| | | * åå
¸å
å
·ä½åæ°çå½ååå«ä¹è¯·åè\ref api_spec |
| | | */ |
| | | @property (nonatomic, retain) NSDictionary *jsonResponse; |
| | | |
| | | /** |
| | | * æå¡å¨è¿åçåå§æ°æ®å符串 |
| | | */ |
| | | @property (nonatomic, retain) NSString *message; |
| | | |
| | | /** |
| | | * ç¨æ·ä¿çæ°æ® |
| | | */ |
| | | @property (nonatomic, retain) id userData; |
| | | |
| | | @end |
| | | |
| | | |
| | | /** |
| | | * ç¨æ·èªå®ä¹çä¿çåæ®µ |
| | | */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_USER_DATA; |
| | | |
| | | /** |
| | | * \name åºç¨éè¯·åæ°åæ®µå®ä¹ |
| | | */ |
| | | ///@{ |
| | | |
| | | /** åºç¨é请å±ç¤ºå¾çurlçkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_APP_ICON; |
| | | |
| | | /** åºç¨é请æè¿°ææ¬çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_APP_DESC; |
| | | |
| | | /** åºç¨é请好åå表çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_APP_INVITED_OPENIDS; |
| | | |
| | | ///@} |
| | | |
| | | /** |
| | | * \name sendStoryæ°åäº«åæ°åæ®µå®ä¹ |
| | | */ |
| | | ///@{ |
| | | |
| | | /** é¢å¡«å
¥æ¥å人å表çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SENDSTORY_RECEIVER; |
| | | |
| | | /** å享feedsæ é¢çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SENDSTORY_TITLE; |
| | | |
| | | /** å享feedsè¯è®ºå
容çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SENDSTORY_COMMENT; |
| | | |
| | | /** å享feedsæè¦çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SENDSTORY_SUMMARY; |
| | | |
| | | /** å享feedså±ç¤ºå¾çurlçkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SENDSTORY_IMAGE; |
| | | |
| | | /** å享feedsè·³è½¬é¾æ¥urlçkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SENDSTORY_URL; |
| | | |
| | | /** å享feedsç¹å»æä½é»è®¤è¡ä¸ºçkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SENDSTORY_ACT; |
| | | |
| | | ///@} |
| | | |
| | | /** |
| | | * \name 设置头ååæ°åæ®µå®ä¹ |
| | | */ |
| | | ///@{ |
| | | |
| | | /** 头åå¾çæ°æ®çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SETUSERHEAD_PIC; |
| | | |
| | | /** 头åå¾çæä»¶åçkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_SETUSERHEAD_FILENAME; |
| | | |
| | | ///@} |
| | | |
| | | /** |
| | | * \name æå¡å¨è¿åæ°æ®çåæ°åæ®µå®ä¹ |
| | | */ |
| | | ///@{ |
| | | |
| | | /** æå¡å¨è¿åç çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_RETCODE; |
| | | |
| | | /** æå¡å¨è¿åé误信æ¯çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_MESSAGE; |
| | | |
| | | /** æå¡å¨è¿åé¢å¤æ°æ®çkey */ |
| | | FOUNDATION_EXTERN NSString * const PARAM_DATA; |
| | | |
| | | ///@} |
| | | |
| | | /** |
| | | * \name é误信æ¯ç¸å
³å¸¸éå®ä¹ |
| | | */ |
| | | ///@{ |
| | | |
| | | /** 详ç»é误信æ¯åå
¸ä¸é¢å¤ä¿¡æ¯çkey */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorKeyExtraInfo; |
| | | |
| | | /** 详ç»é误信æ¯åå
¸ä¸è¿åç çkey */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorKeyRetCode; |
| | | |
| | | /** 详ç»é误信æ¯åå
¸ä¸é误è¯å¥çkey */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorKeyMsg; |
| | | |
| | | /** 䏿¯æçæ¥å£ */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgUnsupportedAPI; |
| | | |
| | | /** æä½æå */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgSuccess; |
| | | |
| | | /** æªç¥é误 */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgUnknown; |
| | | |
| | | /** ç¨æ·åæ¶ */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgUserCancel; |
| | | |
| | | /** è¯·éæ°ç»å½ */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgReLogin; |
| | | |
| | | /** åºç¨æ²¡ææä½æé */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgOperationDeny; |
| | | |
| | | /** ç½ç»å¼å¸¸ææ²¡æç½ç» */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgNetwork; |
| | | |
| | | /** URLæ ¼å¼æåè®®é误 */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgURL; |
| | | |
| | | /** è§£ææ°æ®åºé */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgDataParse; |
| | | |
| | | /** ä¼ å
¥åæ°æè¯¯ */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgParam; |
| | | |
| | | /** è¿æ¥è¶
æ¶ */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgTimeout; |
| | | |
| | | /** å®å
¨é®é¢ */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgSecurity; |
| | | |
| | | /** æä»¶è¯»åé误 */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgIO; |
| | | |
| | | /** æå¡å¨ç«¯é误 */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgServer; |
| | | |
| | | /** 页é¢é误 */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgWebPage; |
| | | |
| | | /** 设置头åå¾çè¿å¤§ */ |
| | | FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgUserHeadPicLarge; |
| | | |
| | | /** ç¨æ·æªåæææéç§åè®® */ |
| | | FOUNDATION_EXPORT NSString * const TCOpenSDKErrorMsgUserNotAgreedAuthorization; |
| | | |
| | | ///@} |
| | | |
| | | /** |
| | | * \brief SDKæ°å¢è¯¦ç»é误常é |
| | | */ |
| | | typedef enum |
| | | { |
| | | kOpenSDKInvalid = -1, ///< æ æçé误ç |
| | | kOpenSDKErrorUnsupportedAPI = -2, ///< 䏿¯æçæ¥å£ |
| | | |
| | | /** |
| | | * \name CommonErrorCode |
| | | * å
Œ
±é误ç |
| | | */ |
| | | ///@{ |
| | | kOpenSDKErrorSuccess = 0, ///< æå |
| | | kOpenSDKErrorUnknown, ///< æªç¥é误 |
| | | kOpenSDKErrorUserCancel, ///< ç¨æ·åæ¶ |
| | | kOpenSDKErrorReLogin, ///< tokenæ ææç¨æ·æªææç¸åºæééè¦éæ°ç»å½ |
| | | kOpenSDKErrorOperationDeny, ///< ç¬¬ä¸æ¹åºç¨æ²¡æè¯¥apiæä½çæé |
| | | ///@} |
| | | |
| | | /** |
| | | * \name NetworkRelatedErrorCode |
| | | * ç½ç»ç¸å
³é误ç |
| | | */ |
| | | ///@{ |
| | | kOpenSDKErrorNetwork, ///< ç½ç»é误ï¼ç½ç»ä¸éæè¿æ¥ä¸å°æå¡å¨ |
| | | kOpenSDKErrorURL, ///< URLæ ¼å¼æåè®®é误 |
| | | kOpenSDKErrorDataParse, ///< æ°æ®è§£æéè¯¯ï¼æå¡å¨è¿åçæ°æ®è§£æåºé |
| | | kOpenSDKErrorParam, ///< ä¼ å
¥åæ°é误 |
| | | kOpenSDKErrorConnTimeout, ///< httpè¿æ¥è¶
æ¶ |
| | | kOpenSDKErrorSecurity, ///< å®å
¨é®é¢ |
| | | kOpenSDKErrorIO, ///< ä¸è½½åæä»¶IOé误 |
| | | kOpenSDKErrorServer, ///< æå¡å¨ç«¯é误 |
| | | ///@} |
| | | |
| | | /** |
| | | * \name WebViewRelatedError |
| | | * webviewç¹æé误 |
| | | */ |
| | | ///@{ |
| | | kOpenSDKErrorWebPage, ///< 页é¢é误 |
| | | ///@} |
| | | |
| | | /** |
| | | * \name SetUserHeadRelatedErrorCode |
| | | * 设置头åèªå®ä¹éè¯¯ç æ®µ |
| | | */ |
| | | ///@{ |
| | | kOpenSDKErrorUserHeadPicLarge = 0x010000, ///< å¾çè¿å¤§ 设置头åèªå®ä¹é误ç |
| | | ///@} |
| | | } OpenSDKError; |
| | | |
| | | /** |
| | | * \name SDKçæ¬(v1.3)æ¯æçææå表常é |
| | | */ |
| | | ///@{ |
| | | |
| | | /** åè¡¨ä¸æ¡è¯´è¯´å°QQ空é´(<b>éè¦ç³è¯·æé</b>) */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_ADD_TOPIC; |
| | | |
| | | /** å建ä¸ä¸ªQQ空é´ç¸å(<b>éè¦ç³è¯·æé</b>) */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_ADD_ALBUM; |
| | | |
| | | /** ä¸ä¼ ä¸å¼ ç
§çå°QQ空é´ç¸å(<b>éè¦ç³è¯·æé</b>) */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_UPLOAD_PIC; |
| | | |
| | | /** è·åç¨æ·QQ空é´ç¸åå表(<b>éè¦ç³è¯·æé</b>) */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_LIST_ALBUM; |
| | | |
| | | /** éªè¯æ¯å¦è®¤è¯ç©ºé´ç²ä¸ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_CHECK_PAGE_FANS; |
| | | |
| | | /** è·åç»å½ç¨æ·èªå·±ç详ç»ä¿¡æ¯ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_GET_INFO; |
| | | |
| | | /** è·åå
¶ä»ç¨æ·ç详ç»ä¿¡æ¯ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_GET_OTHER_INFO; |
| | | |
| | | /** è·åä¼åç¨æ·åºæ¬ä¿¡æ¯ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_GET_VIP_INFO; |
| | | |
| | | /** è·åä¼åç¨æ·è¯¦ç»ä¿¡æ¯ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_GET_VIP_RICH_INFO; |
| | | |
| | | /** è·åç¨æ·ä¿¡æ¯ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_GET_USER_INFO; |
| | | |
| | | /** ç§»å¨ç«¯è·åç¨æ·ä¿¡æ¯ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_GET_SIMPLE_USER_INFO; |
| | | |
| | | /** ç§»å¨ç«¯è·åç¨æ·ä¿¡æ¯ */ |
| | | FOUNDATION_EXTERN NSString *const kOPEN_PERMISSION_ALL; |
| | | ///@} |
| | | |
| | | |
| | | /** |
| | | * \name CGIæ¥å£ç¸å
³åæ°ç±»åå®ä¹ |
| | | */ |
| | | |
| | | /** å¿
å¡«çå符串类ååæ° */ |
| | | typedef NSString *TCRequiredStr; |
| | | |
| | | /** å¿
å¡«çUIImageç±»ååæ° */ |
| | | typedef UIImage *TCRequiredImage; |
| | | |
| | | /** å¿
å¡«çæ´ååæ° */ |
| | | typedef NSInteger TCRequiredInt; |
| | | |
| | | /** å¿
å¡«çæ°åç±»å */ |
| | | typedef NSNumber *TCRequiredNumber; |
| | | |
| | | /** å¿
å¡«çNSDataåæ° */ |
| | | typedef NSData *TCRequiredData; |
| | | |
| | | /** å¯éçå符串类ååæ° */ |
| | | typedef NSString *TCOptionalStr; |
| | | |
| | | /** å¯éçUIImageç±»ååæ° */ |
| | | typedef UIImage *TCOptionalImage; |
| | | |
| | | /** å¯éçæ´ååæ° */ |
| | | typedef NSInteger TCOptionalInt; |
| | | |
| | | /** å¯éçæ°åç±»å */ |
| | | typedef NSNumber *TCOptionalNumber; |
| | | |
| | | /** å¯éçä¸å®ç±»ååæ° */ |
| | | typedef id TCRequiredId; |
| | | ///@} |
| | | |
| | | |
| | | /** |
| | | * \brief CGI请æ±çåæ°åå
¸å°è£
è¾
å©åºç±» |
| | | * |
| | | * å°ç¸åºå±æ§çå¼ä»¥key-valueçå½¢å¼ä¿åå°åæ°åå
¸ä¸ |
| | | */ |
| | | @interface TCAPIRequest : NSMutableDictionary |
| | | |
| | | /** CGI请æ±çURLå°å */ |
| | | @property (nonatomic, readonly) NSURL *apiURL; |
| | | |
| | | /** CGIè¯·æ±æ¹å¼ï¼"GET"ï¼"POST" */ |
| | | @property (nonatomic, readonly) NSString *method; |
| | | |
| | | /** |
| | | * APIåæ°ä¸çä¿çåæ®µï¼å¯ä»¥å¡å
¥ä»»æåå
¸æ¯æçç±»åï¼åè°ç¨å®æåä¼å¸¦åç»è°ç¨æ¹ |
| | | */ |
| | | @property (nonatomic, retain) TCRequiredId paramUserData; |
| | | |
| | | /** |
| | | * APIResponse,APIçè¿åç»æ |
| | | */ |
| | | @property (nonatomic, readonly) APIResponse *response; |
| | | |
| | | /** åæ¶ç¸åºçCGI请æ±ä»»å¡ */ |
| | | - (void)cancel; |
| | | |
| | | @end |
| | | |
| | | @protocol TCAPIRequestDelegate <NSObject> |
| | | @optional |
| | | - (void)cgiRequest:(TCAPIRequest *)request didResponse:(APIResponse *)response; |
| | | |
| | | @end |
| | | |