Skip to content

Commit 57d1a89

Browse files
committed
修改文件
1 parent ad04b40 commit 57d1a89

File tree

6 files changed

+63
-40
lines changed

6 files changed

+63
-40
lines changed

Audio/AR-iOS-VoiceLive-Base/AR-iOS-VoiceLive-Base/Info.plist

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,30 @@
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
23+
<key>NSAppTransportSecurity</key>
24+
<dict>
25+
<key>NSAllowsArbitraryLoads</key>
26+
<true/>
27+
</dict>
28+
<key>NSCameraUsageDescription</key>
29+
<string>Camera for a call</string>
30+
<key>NSMicrophoneUsageDescription</key>
31+
<string>Microphone for a call</string>
2332
<key>UIApplicationSupportsIndirectInputEvents</key>
2433
<true/>
2534
<key>UILaunchStoryboardName</key>
2635
<string>LaunchScreen</string>
27-
<key>NSAppTransportSecurity</key>
28-
<dict>
29-
<key>NSAllowsArbitraryLoads</key>
30-
<true/>
31-
</dict>
32-
<key>NSCameraUsageDescription</key>
33-
<string>Camera for a call</string>
34-
<key>NSMicrophoneUsageDescription</key>
35-
<string>Microphone for a call</string>
36-
<key>UIStatusBarStyle</key>
37-
<string>UIStatusBarStyleLightContent</string>
38-
<key>UIViewControllerBasedStatusBarAppearance</key>
39-
<false/>
4036
<key>UIMainStoryboardFile</key>
4137
<string>Main</string>
4238
<key>UIRequiredDeviceCapabilities</key>
4339
<array>
4440
<string>armv7</string>
4541
</array>
42+
<key>UIStatusBarStyle</key>
43+
<string>UIStatusBarStyleLightContent</string>
4644
<key>UISupportedInterfaceOrientations</key>
4745
<array>
4846
<string>UIInterfaceOrientationPortrait</string>
49-
<string>UIInterfaceOrientationLandscapeLeft</string>
50-
<string>UIInterfaceOrientationLandscapeRight</string>
5147
</array>
5248
<key>UISupportedInterfaceOrientations~ipad</key>
5349
<array>
@@ -56,5 +52,7 @@
5652
<string>UIInterfaceOrientationLandscapeLeft</string>
5753
<string>UIInterfaceOrientationLandscapeRight</string>
5854
</array>
55+
<key>UIViewControllerBasedStatusBarAppearance</key>
56+
<false/>
5957
</dict>
6058
</plist>

Audio/AR-iOS-VoiceLive-Base/AR-iOS-VoiceLive-Base/Main/ARHomeViewController.m

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,21 @@ - (IBAction)AudienceAction:(id)sender {
4949
/// @param isAnchor 是否为主播
5050
- (void)pushRoomControllerWithAnchor:(BOOL)isAnchor {
5151
[self.view endEditing:YES];
52-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
53-
ARRoomViewController *vc = [sb instantiateViewControllerWithIdentifier:@"ARRoomViewController"];
54-
vc.userId = _uid;
55-
vc.channelId = self.channelTF.text;
56-
vc.isAnchor = isAnchor;
57-
[self.navigationController pushViewController:vc animated:YES];
52+
if ([self.channelTF.text isEqualToString:@""]) {
53+
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"频道id不能为空" preferredStyle:UIAlertControllerStyleAlert];
54+
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
55+
56+
}];
57+
[alert addAction:sureAction];
58+
[self presentViewController:alert animated:YES completion:nil];
59+
} else {
60+
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
61+
ARRoomViewController *vc = [sb instantiateViewControllerWithIdentifier:@"ARRoomViewController"];
62+
vc.userId = _uid;
63+
vc.channelId = self.channelTF.text;
64+
vc.isAnchor = isAnchor;
65+
[self.navigationController pushViewController:vc animated:YES];
66+
}
5867
}
5968

6069

Audio/AR-iOS-VoiceLive-Base/AR-iOS-VoiceLive-Base/Main/ARRoomViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by anyRTC on 2021/1/26.
66
//
77

8-
#define APPID @"177e21c0d1641291c34e46e1198bd49a"
8+
#define APPID @""
99

1010
#import "ARRoomViewController.h"
1111
#import "ARUserModel.h"

Video/AR-iOS-VideoLive-Base/AR-iOS-VideoLive-Base/Info.plist

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,30 @@
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
23+
<key>NSAppTransportSecurity</key>
24+
<dict>
25+
<key>NSAllowsArbitraryLoads</key>
26+
<true/>
27+
</dict>
28+
<key>NSCameraUsageDescription</key>
29+
<string>Camera for a call</string>
30+
<key>NSMicrophoneUsageDescription</key>
31+
<string>Microphone for a call</string>
2332
<key>UIApplicationSupportsIndirectInputEvents</key>
2433
<true/>
2534
<key>UILaunchStoryboardName</key>
2635
<string>LaunchScreen</string>
27-
<key>NSAppTransportSecurity</key>
28-
<dict>
29-
<key>NSAllowsArbitraryLoads</key>
30-
<true/>
31-
</dict>
32-
<key>NSCameraUsageDescription</key>
33-
<string>Camera for a call</string>
34-
<key>NSMicrophoneUsageDescription</key>
35-
<string>Microphone for a call</string>
36-
<key>UIStatusBarStyle</key>
37-
<string>UIStatusBarStyleLightContent</string>
38-
<key>UIViewControllerBasedStatusBarAppearance</key>
39-
<false/>
4036
<key>UIMainStoryboardFile</key>
4137
<string>Main</string>
4238
<key>UIRequiredDeviceCapabilities</key>
4339
<array>
4440
<string>armv7</string>
4541
</array>
42+
<key>UIStatusBarStyle</key>
43+
<string>UIStatusBarStyleLightContent</string>
4644
<key>UISupportedInterfaceOrientations</key>
4745
<array>
4846
<string>UIInterfaceOrientationPortrait</string>
49-
<string>UIInterfaceOrientationLandscapeLeft</string>
50-
<string>UIInterfaceOrientationLandscapeRight</string>
5147
</array>
5248
<key>UISupportedInterfaceOrientations~ipad</key>
5349
<array>
@@ -56,5 +52,7 @@
5652
<string>UIInterfaceOrientationLandscapeLeft</string>
5753
<string>UIInterfaceOrientationLandscapeRight</string>
5854
</array>
55+
<key>UIViewControllerBasedStatusBarAppearance</key>
56+
<false/>
5957
</dict>
6058
</plist>

Video/AR-iOS-VideoLive-Base/AR-iOS-VideoLive-Base/Main/ARHomeViewController.m

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,29 @@ - (void)viewDidLoad {
2727
}
2828

2929
- (IBAction)AnchorAction:(id)sender {
30-
[self pushRoomControllerWithAnchor:YES];
30+
if ([self.channelTF.text isEqualToString:@""]) {
31+
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"频道id不能为空" preferredStyle:UIAlertControllerStyleAlert];
32+
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
33+
34+
}];
35+
[alert addAction:sureAction];
36+
[self presentViewController:alert animated:YES completion:nil];
37+
} else {
38+
[self pushRoomControllerWithAnchor:YES];
39+
}
3140
}
3241

3342
- (IBAction)AudienceAction:(id)sender {
34-
[self pushRoomControllerWithAnchor:NO];
43+
if ([self.channelTF.text isEqualToString:@""]) {
44+
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"频道id不能为空" preferredStyle:UIAlertControllerStyleAlert];
45+
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
46+
47+
}];
48+
[alert addAction:sureAction];
49+
[self presentViewController:alert animated:YES completion:nil];
50+
} else {
51+
[self pushRoomControllerWithAnchor:NO];
52+
}
3553
}
3654

3755

Video/AR-iOS-VideoLive-Base/AR-iOS-VideoLive-Base/Main/ARRoomViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Created by anyRTC on 2021/1/26.
66
//
7-
#define APPID @"177e21c0d1641291c34e46e1198bd49a"
7+
#define APPID @""
88
#import "ARRoomViewController.h"
99
#import "ARItemModel.h"
1010
#import "ARVideoShowCell.h"

0 commit comments

Comments
 (0)