-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
829 changed files
with
50,638 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
For the changelog, see [Meeting SDK - iOS](https://devsupport.zoom.us/hc/en-us/sections/9481888523917-iOS). |
1,528 changes: 1,528 additions & 0 deletions
1,528
5.16.10/ios/MobileRTCSample/MobileRTCSample.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// AppDelegate.h | ||
// MobileRTCSample | ||
// | ||
// Created by Zoom Video Communications on 3/17/14. | ||
// Copyright (c) 2014 Zoom Video Communications, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "SDKAuthPresenter.h" | ||
/** | ||
* We recommend that, you can generate jwttoken on your own server instead of hardcore in the code. | ||
* We hardcore it here, just to run the demo. | ||
* | ||
* You can generate a jwttoken on the https://jwt.io/ | ||
* with this payload: | ||
* { | ||
* "appKey": "string", // app key | ||
* "iat": long, // access token issue timestamp | ||
* "exp": long, // access token expire time | ||
* "tokenExp": long // token expire time | ||
* } | ||
*/ | ||
#define KjwtToken @"" | ||
#define kSDKDomain @"" | ||
|
||
|
||
@interface AppDelegate : UIResponder <UIApplicationDelegate, UIAlertViewDelegate> | ||
|
||
@property (strong, nonatomic) UIWindow *window; | ||
@property (strong, nonatomic) SDKAuthPresenter *authPresenter; | ||
- (UIViewController *)topViewController; | ||
@end |
147 changes: 147 additions & 0 deletions
147
5.16.10/ios/MobileRTCSample/MobileRTCSample/AppDelegate.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
// | ||
// AppDelegate.m | ||
// MobileRTCSample | ||
// | ||
// Created by Zoom Video Communications on 3/17/14. | ||
// Copyright (c) 2014 Zoom Video Communications, Inc. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
#import "MainViewController.h" | ||
#import "SDKInitPresenter.h" | ||
#import "BaseNavigationController.h" | ||
#import "SDKAuthPresenter+Login.h" | ||
|
||
@implementation AppDelegate | ||
|
||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
{ | ||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | ||
// Override point for customization after application launch. | ||
|
||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | ||
NSLog(@"%@", paths[0]); | ||
|
||
MainViewController *mainVC = [[MainViewController alloc] init]; | ||
BaseNavigationController *navVC = [[BaseNavigationController alloc] initWithRootViewController:mainVC]; | ||
navVC.navigationBarHidden = YES; | ||
|
||
self.window.rootViewController = navVC; | ||
|
||
self.window.backgroundColor = [UIColor whiteColor]; | ||
[self.window makeKeyAndVisible]; | ||
|
||
return YES; | ||
} | ||
|
||
- (void)applicationWillResignActive:(UIApplication *)application | ||
{ | ||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. | ||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. | ||
|
||
[[MobileRTC sharedRTC] appWillResignActive]; | ||
} | ||
|
||
- (void)applicationDidEnterBackground:(UIApplication *)application | ||
{ | ||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. | ||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | ||
[[MobileRTC sharedRTC] appDidEnterBackgroud]; | ||
} | ||
|
||
- (void)applicationWillEnterForeground:(UIApplication *)application | ||
{ | ||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. | ||
} | ||
|
||
- (void)applicationDidBecomeActive:(UIApplication *)application | ||
{ | ||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | ||
|
||
[[MobileRTC sharedRTC] appDidBecomeActive]; | ||
} | ||
|
||
- (void)applicationWillTerminate:(UIApplication *)application | ||
{ | ||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
[[MobileRTC sharedRTC] appWillTerminate]; | ||
} | ||
|
||
- (SDKAuthPresenter *)authPresenter { | ||
BaseNavigationController *navVC = self.window.rootViewController; | ||
MainViewController *mainVC; | ||
for(id vc in navVC.viewControllers) { | ||
if ([vc isKindOfClass:[MainViewController class]]) { | ||
mainVC = vc; | ||
break; | ||
} | ||
} | ||
if(mainVC) { | ||
return mainVC.authPresenter; | ||
} | ||
return nil; | ||
} | ||
|
||
// For iOS 4.2+ support | ||
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url | ||
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation | ||
{ | ||
if ([[url scheme] isEqualToString:<#Your URL scheme#>] && [self isSSOLoginURL:url]) { | ||
BaseNavigationController *navVC = self.window.rootViewController; | ||
MainViewController *mainVC; | ||
for(id vc in navVC.viewControllers) { | ||
if ([vc isKindOfClass:[MainViewController class]]) { | ||
mainVC = vc; | ||
break; | ||
} | ||
} | ||
if(mainVC) { | ||
[mainVC.authPresenter ssoLoginWithWebUriProtocol:url.absoluteString]; | ||
} | ||
|
||
} else { | ||
[[[MobileRTC sharedRTC] getMeetingService] handZoomWebUrl:url.absoluteString]; | ||
} | ||
|
||
return YES; | ||
} | ||
|
||
- (BOOL)isSSOLoginURL:(NSURL *)url | ||
{ | ||
BOOL isSSOLogin = NO; | ||
|
||
NSString *urlString = [url absoluteString]; | ||
|
||
NSRange range = [urlString rangeOfString:@"sso?"]; | ||
|
||
if(range.location != NSNotFound) | ||
{ | ||
isSSOLogin = YES; | ||
} | ||
|
||
return isSSOLogin; | ||
} | ||
|
||
- (UIViewController *)topViewController | ||
{ | ||
UIViewController *resultVC; | ||
resultVC = [self _topViewController:[[UIApplication sharedApplication].keyWindow rootViewController]]; | ||
while (resultVC.presentedViewController) { | ||
resultVC = [self _topViewController:resultVC.presentedViewController]; | ||
} | ||
return resultVC; | ||
} | ||
|
||
- (UIViewController *)_topViewController:(UIViewController *)vc | ||
{ | ||
if ([vc isKindOfClass:[UINavigationController class]]) { | ||
return [self _topViewController:[(UINavigationController *)vc topViewController]]; | ||
} else if ([vc isKindOfClass:[UITabBarController class]]) { | ||
return [self _topViewController:[(UITabBarController *)vc selectedViewController]]; | ||
} else { | ||
return vc; | ||
} | ||
return nil; | ||
} | ||
|
||
@end |
17 changes: 17 additions & 0 deletions
17
5.16.10/ios/MobileRTCSample/MobileRTCSample/BaseNavigationController.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// BaseNavigationController.h | ||
// MobileRTCSample | ||
// | ||
// Created by Byron Zhang on 2020/8/27. | ||
// Copyright © 2020 Zoom Video Communications, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface BaseNavigationController : UINavigationController | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
44 changes: 44 additions & 0 deletions
44
5.16.10/ios/MobileRTCSample/MobileRTCSample/BaseNavigationController.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// BaseNavigationController.m | ||
// MobileRTCSample | ||
// | ||
// Created by Byron Zhang on 2020/8/27. | ||
// Copyright © 2020 Zoom Video Communications, Inc. All rights reserved. | ||
// | ||
|
||
#import "BaseNavigationController.h" | ||
|
||
@interface BaseNavigationController () | ||
|
||
@end | ||
|
||
@implementation BaseNavigationController | ||
|
||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view. | ||
} | ||
|
||
- (void)willTransitionToTraitCollection:(UITraitCollection *)newCollection withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator | ||
{ | ||
[[MobileRTC sharedRTC] willTransitionToTraitCollection:newCollection withTransitionCoordinator:coordinator]; | ||
[super willTransitionToTraitCollection:newCollection withTransitionCoordinator:coordinator]; | ||
} | ||
|
||
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator | ||
{ | ||
[[MobileRTC sharedRTC] viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; | ||
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; | ||
} | ||
|
||
/* | ||
#pragma mark - Navigation | ||
// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | ||
// Get the new view controller using [segue destinationViewController]. | ||
// Pass the selected object to the new view controller. | ||
} | ||
*/ | ||
|
||
@end |
17 changes: 17 additions & 0 deletions
17
5.16.10/ios/MobileRTCSample/MobileRTCSample/CustomMeeting/AllChatMessageViewController.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// AllChatMessageViewController.h | ||
// MobileRTCSample | ||
// | ||
// Created by Zoom Video Communications on 2022/4/6. | ||
// Copyright © 2022 Zoom Video Communications, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface AllChatMessageViewController : UIViewController | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.