Commit 021651bfbc7d5c33bd79ed8b849b1d185d0312a3
Merge branch 'master' of http://bj.gitlab.cnlive.com/ios-team/CNLiveMateCode
# Conflicts: # metaCode/Classes/Other/AppDelegate.swift
Showing
7 changed files
with
152 additions
and
82 deletions
metaCode.xcodeproj/project.pbxproj
| ... | ... | @@ -1123,22 +1123,26 @@ |
| 1123 | 1123 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 1124 | 1124 | CLANG_ENABLE_MODULES = YES; |
| 1125 | 1125 | CODE_SIGN_STYLE = Automatic; |
| 1126 | - CURRENT_PROJECT_VERSION = 1.0; | |
| 1126 | + CURRENT_PROJECT_VERSION = 1.0.0.23.09.19.10; | |
| 1127 | 1127 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 1128 | 1128 | GENERATE_INFOPLIST_FILE = YES; |
| 1129 | 1129 | INFOPLIST_FILE = metaCode/Info.plist; |
| 1130 | 1130 | INFOPLIST_KEY_CFBundleDisplayName = "元码"; |
| 1131 | + INFOPLIST_KEY_NSCameraUsageDescription = "需要允许开启相机才能使用录制视频和拍照功能"; | |
| 1132 | + INFOPLIST_KEY_NSMicrophoneUsageDescription = "需要允许开启麦克风才能使用录制视频和语音等服务"; | |
| 1133 | + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | |
| 1134 | + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | |
| 1131 | 1135 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
| 1132 | 1136 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; |
| 1133 | 1137 | INFOPLIST_KEY_UIMainStoryboardFile = Main; |
| 1134 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | |
| 1135 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | |
| 1138 | + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; | |
| 1139 | + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; | |
| 1136 | 1140 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; |
| 1137 | 1141 | LD_RUNPATH_SEARCH_PATHS = ( |
| 1138 | 1142 | "$(inherited)", |
| 1139 | 1143 | "@executable_path/Frameworks", |
| 1140 | 1144 | ); |
| 1141 | - MARKETING_VERSION = 1.0; | |
| 1145 | + MARKETING_VERSION = 1.0.0; | |
| 1142 | 1146 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode.debug; |
| 1143 | 1147 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1144 | 1148 | SWIFT_EMIT_LOC_STRINGS = YES; |
| ... | ... | @@ -1157,22 +1161,26 @@ |
| 1157 | 1161 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 1158 | 1162 | CLANG_ENABLE_MODULES = YES; |
| 1159 | 1163 | CODE_SIGN_STYLE = Automatic; |
| 1160 | - CURRENT_PROJECT_VERSION = 1.0; | |
| 1164 | + CURRENT_PROJECT_VERSION = 1.0.0.23.09.19.10; | |
| 1161 | 1165 | DEVELOPMENT_TEAM = 94X49GG3ZW; |
| 1162 | 1166 | GENERATE_INFOPLIST_FILE = YES; |
| 1163 | 1167 | INFOPLIST_FILE = metaCode/Info.plist; |
| 1164 | 1168 | INFOPLIST_KEY_CFBundleDisplayName = "元码"; |
| 1169 | + INFOPLIST_KEY_NSCameraUsageDescription = "需要允许开启相机才能使用录制视频和拍照功能"; | |
| 1170 | + INFOPLIST_KEY_NSMicrophoneUsageDescription = "需要允许开启麦克风才能使用录制视频和语音等服务"; | |
| 1171 | + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | |
| 1172 | + INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "需要允许打开相册才能访问相册照片和保存照片"; | |
| 1165 | 1173 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
| 1166 | 1174 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen.storyboard; |
| 1167 | 1175 | INFOPLIST_KEY_UIMainStoryboardFile = Main; |
| 1168 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | |
| 1169 | - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; | |
| 1176 | + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; | |
| 1177 | + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; | |
| 1170 | 1178 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; |
| 1171 | 1179 | LD_RUNPATH_SEARCH_PATHS = ( |
| 1172 | 1180 | "$(inherited)", |
| 1173 | 1181 | "@executable_path/Frameworks", |
| 1174 | 1182 | ); |
| 1175 | - MARKETING_VERSION = 1.0; | |
| 1183 | + MARKETING_VERSION = 1.0.0; | |
| 1176 | 1184 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode.debug; |
| 1177 | 1185 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1178 | 1186 | SWIFT_EMIT_LOC_STRINGS = YES; | ... | ... |
metaCode/Classes/Main/HomePage/Controller/CNMetaCodeHomePageController.swift
| ... | ... | @@ -184,15 +184,18 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 184 | 184 | |
| 185 | 185 | self.setupUI() |
| 186 | 186 | |
| 187 | + /// 通知名 | |
| 188 | + let notificationName = "CNLiveNetworkStatusNotification" | |
| 189 | + /// 自定义通知 | |
| 190 | + NotificationCenter.default.addObserver(self, selector: #selector(networkStatusNotificationAction), name: NSNotification.Name(rawValue: notificationName), object: nil) | |
| 191 | + | |
| 187 | 192 | // self.tabBarController?.tabBar.top = self.tabBarY + KSreenHeight |
| 188 | 193 | |
| 189 | - | |
| 190 | 194 | } |
| 191 | 195 | override func viewWillAppear(_ animated: Bool) { |
| 192 | 196 | super.viewWillAppear(animated) |
| 193 | 197 | |
| 194 | 198 | print("uid = ",UserInfoManager.shared.userInfo.uid) |
| 195 | - self.getUserIdentityApi() | |
| 196 | 199 | |
| 197 | 200 | } |
| 198 | 201 | override func viewDidAppear(_ animated: Bool) { |
| ... | ... | @@ -201,7 +204,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 201 | 204 | |
| 202 | 205 | self.topNavView.isHidden = true |
| 203 | 206 | } |
| 204 | - | |
| 207 | + | |
| 208 | + deinit { | |
| 209 | + /// 移除通知 | |
| 210 | + NotificationCenter.default.removeObserver(self) | |
| 211 | + } | |
| 205 | 212 | |
| 206 | 213 | // MARK: - 添加UI |
| 207 | 214 | func setupUI(){ |
| ... | ... | @@ -225,12 +232,26 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 225 | 232 | |
| 226 | 233 | } |
| 227 | 234 | |
| 228 | - // MARK: -按钮点击事件 | |
| 235 | + // MARK: -事件 | |
| 229 | 236 | //无网时刷新 |
| 230 | 237 | @objc func errorFreshButtonAction(){ |
| 231 | 238 | self.getUserIdentityApi() |
| 232 | 239 | } |
| 233 | - | |
| 240 | + /// 接受到通知后的方法回调 | |
| 241 | + @objc private func networkStatusNotificationAction(noti: Notification) { | |
| 242 | + let netStatus:String = noti.object as! String | |
| 243 | + switch netStatus { | |
| 244 | +// case "notReachable"://暂时不处理 | |
| 245 | + | |
| 246 | + case "reachableViaWWAN": | |
| 247 | + self.getUserIdentityApi() | |
| 248 | + case "reachableViaWiFi": | |
| 249 | + self.getUserIdentityApi() | |
| 250 | + default: | |
| 251 | + break | |
| 252 | + } | |
| 253 | + } | |
| 254 | + | |
| 234 | 255 | // MARK: -添加约束 |
| 235 | 256 | func makeConstraints(){ |
| 236 | 257 | self.errorImgView.snp.makeConstraints { make in |
| ... | ... | @@ -426,9 +447,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel |
| 426 | 447 | //MARK: - 网络请求获取身份列表 |
| 427 | 448 | func getUserIdentityApi() |
| 428 | 449 | { |
| 450 | + showLoading(message: "") | |
| 429 | 451 | CNLiveMineViewModel.requestAuthStandList(page: 1) |
| 430 | 452 | { result, respStatue in |
| 431 | 453 | |
| 454 | + hiddenLoading() | |
| 432 | 455 | if respStatue == .success{ |
| 433 | 456 | self.NetApiStatus = .success |
| 434 | 457 | let listArray:NSArray = (result as! StandListBaseModel).list as NSArray | ... | ... |
metaCode/Classes/Main/HomePage/View/CNIDCardView.swift
| ... | ... | @@ -53,24 +53,38 @@ class CNIDCardView: UIView{ |
| 53 | 53 | self.contentView.addSubview(self.sexValueLabel) |
| 54 | 54 | self.contentView.addSubview(self.dateValueLabel) |
| 55 | 55 | self.contentView.addSubview(self.IDValueLabel) |
| 56 | + self.contentView.addSubview(self.iDIconImgView) | |
| 57 | + | |
| 56 | 58 | } |
| 57 | 59 | |
| 58 | 60 | func loadIDDetailData(){ |
| 61 | + showLoading(message: "") | |
| 59 | 62 | CNLiveMineViewModel.requestsStandInfo(identityId: "\(_idModel!.id)", type: .havedate) { result, respStatue in |
| 63 | + hiddenLoading() | |
| 60 | 64 | if respStatue == .success { |
| 61 | 65 | let cardArray = result as! NSMutableArray |
| 62 | 66 | for i in (0..<cardArray.count){ |
| 63 | 67 | let idCardModel = cardArray[i] as! MineStandInfoModel |
| 64 | 68 | switch idCardModel.name { |
| 65 | 69 | case "姓名": |
| 66 | - self.nameValueLabel.text = idCardModel.userInfo | |
| 70 | + self.nameValueLabel.text = idCardModel.userInfo | |
| 67 | 71 | case "性别": |
| 68 | 72 | self.sexValueLabel.text = idCardModel.userInfo |
| 69 | 73 | case "认证时间": |
| 70 | 74 | self.dateValueLabel.text = idCardModel.userInfo |
| 71 | 75 | case "编号": |
| 72 | - self.IDValueLabel.text = idCardModel.userInfo | |
| 76 | + self.IDValueLabel.text = idCardModel.userInfo | |
| 77 | + case "证件照": | |
| 78 | + let str:String = idCardModel.userInfo! | |
| 79 | + if(str.isEmpty){ | |
| 80 | + self.iDIconImgView.isHidden = true | |
| 81 | + }else | |
| 82 | + { | |
| 83 | + self.iDIconImgView.isHidden = false | |
| 84 | + self.iDIconImgView.kf.setImage(with: URL(string: str)) | |
| 85 | + } | |
| 73 | 86 | |
| 87 | + self.iDCardBGView.kf.setImage(with: URL(string: self._idModel!.cardImg), placeholder: UIImage(named: "homePage_idCardBG")) | |
| 74 | 88 | default: |
| 75 | 89 | break |
| 76 | 90 | } |
| ... | ... | @@ -79,6 +93,59 @@ class CNIDCardView: UIView{ |
| 79 | 93 | } |
| 80 | 94 | } |
| 81 | 95 | |
| 96 | + // MARK: - 约束 | |
| 97 | + func makeConstraints(){ | |
| 98 | + self.iDCardBGView.snp.makeConstraints { make in | |
| 99 | + make.centerX.equalToSuperview() | |
| 100 | + make.centerY.equalToSuperview() | |
| 101 | + make.width.equalToSuperview() | |
| 102 | + make.height.equalToSuperview() | |
| 103 | + } | |
| 104 | + //标签 | |
| 105 | + self.nameLabel.snp.makeConstraints { make in | |
| 106 | + make.left.equalToSuperview().offset(20) | |
| 107 | + make.top.equalTo(60) | |
| 108 | + make.width.equalTo(54) | |
| 109 | + } | |
| 110 | + self.sexLabel.snp.makeConstraints { make in | |
| 111 | + make.left.equalToSuperview().offset(20) | |
| 112 | + make.top.equalTo(nameLabel.snp.bottom).offset(10) | |
| 113 | + } | |
| 114 | + self.dateLabel.snp.makeConstraints { make in | |
| 115 | + make.left.equalToSuperview().offset(20) | |
| 116 | + make.top.equalTo(sexLabel.snp.bottom).offset(10) | |
| 117 | + } | |
| 118 | + self.IDLabel.snp.makeConstraints { make in | |
| 119 | + make.left.equalToSuperview().offset(20) | |
| 120 | + make.top.equalTo(dateLabel.snp.bottom).offset(10) | |
| 121 | + } | |
| 122 | + //标签值 | |
| 123 | + self.nameValueLabel.snp.makeConstraints { make in | |
| 124 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 125 | + make.top.equalTo(nameLabel.snp.top) | |
| 126 | + make.right.equalTo(iDIconImgView.snp.left).offset(-5) | |
| 127 | + } | |
| 128 | + self.sexValueLabel.snp.makeConstraints { make in | |
| 129 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 130 | + make.top.equalTo(sexLabel.snp.top) | |
| 131 | + } | |
| 132 | + self.dateValueLabel.snp.makeConstraints { make in | |
| 133 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 134 | + make.top.equalTo(dateLabel.snp.top) | |
| 135 | + } | |
| 136 | + self.IDValueLabel.snp.makeConstraints { make in | |
| 137 | + make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 138 | + make.top.equalTo(IDLabel.snp.top) | |
| 139 | + make.right.lessThanOrEqualTo(iDIconImgView.snp.left).offset(-5) | |
| 140 | + } | |
| 141 | + self.iDIconImgView.snp.makeConstraints { make in | |
| 142 | + make.right.equalToSuperview().offset(-15) | |
| 143 | + make.top.equalTo(nameLabel.snp.top) | |
| 144 | + make.width.equalTo(60) | |
| 145 | + make.height.equalTo(85) | |
| 146 | + } | |
| 147 | + } | |
| 148 | + | |
| 82 | 149 | // MARK: - 懒加载 |
| 83 | 150 | ///视图总容器 |
| 84 | 151 | lazy var contentView : UIView = { |
| ... | ... | @@ -184,48 +251,12 @@ class CNIDCardView: UIView{ |
| 184 | 251 | return IDValueLabel |
| 185 | 252 | }() |
| 186 | 253 | |
| 187 | - // MARK: - 约束 | |
| 188 | - func makeConstraints(){ | |
| 189 | - self.iDCardBGView.snp.makeConstraints { make in | |
| 190 | - make.centerX.equalToSuperview() | |
| 191 | - make.centerY.equalToSuperview() | |
| 192 | - make.width.equalToSuperview() | |
| 193 | - make.height.equalToSuperview() | |
| 194 | - } | |
| 195 | - //标签 | |
| 196 | - self.nameLabel.snp.makeConstraints { make in | |
| 197 | - make.left.equalToSuperview().offset(20) | |
| 198 | - make.top.equalTo(60) | |
| 199 | - } | |
| 200 | - self.sexLabel.snp.makeConstraints { make in | |
| 201 | - make.left.equalToSuperview().offset(20) | |
| 202 | - make.top.equalTo(nameLabel.snp.bottom).offset(10) | |
| 203 | - } | |
| 204 | - self.dateLabel.snp.makeConstraints { make in | |
| 205 | - make.left.equalToSuperview().offset(20) | |
| 206 | - make.top.equalTo(sexLabel.snp.bottom).offset(10) | |
| 207 | - } | |
| 208 | - self.IDLabel.snp.makeConstraints { make in | |
| 209 | - make.left.equalToSuperview().offset(20) | |
| 210 | - make.top.equalTo(dateLabel.snp.bottom).offset(10) | |
| 211 | - } | |
| 212 | - //标签值 | |
| 213 | - self.nameValueLabel.snp.makeConstraints { make in | |
| 214 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 215 | - make.top.equalTo(nameLabel.snp.top) | |
| 216 | - } | |
| 217 | - self.sexValueLabel.snp.makeConstraints { make in | |
| 218 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 219 | - make.top.equalTo(sexLabel.snp.top) | |
| 220 | - } | |
| 221 | - self.dateValueLabel.snp.makeConstraints { make in | |
| 222 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 223 | - make.top.equalTo(dateLabel.snp.top) | |
| 224 | - } | |
| 225 | - self.IDValueLabel.snp.makeConstraints { make in | |
| 226 | - make.left.equalTo(nameLabel.snp.right).offset(10) | |
| 227 | - make.top.equalTo(IDLabel.snp.top) | |
| 228 | - } | |
| 229 | - } | |
| 254 | + ///证件照 | |
| 255 | + lazy var iDIconImgView:UIImageView = { | |
| 256 | + | |
| 257 | + let iDIconImgView:UIImageView = UIImageView(frame: CGRect(x: 20, y: 25, width: 60, height: 85)) | |
| 258 | + iDIconImgView.backgroundColor = UIColor.red | |
| 259 | + return iDIconImgView | |
| 260 | + }() | |
| 230 | 261 | |
| 231 | 262 | } | ... | ... |
metaCode/Classes/Main/HomePage/View/CNMainView.swift
| ... | ... | @@ -153,7 +153,11 @@ class CNFrontMainView : UIView{ |
| 153 | 153 | |
| 154 | 154 | @objc func addStandBtnAction() { |
| 155 | 155 | //跳转到添加身份页面 |
| 156 | - currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: true) | |
| 156 | +// currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: false) | |
| 157 | + DispatchQueue.main.asyncAfter(deadline: .now()+0.25){ | |
| 158 | + currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!), animated: true) | |
| 159 | + } | |
| 160 | + | |
| 157 | 161 | } |
| 158 | 162 | } |
| 159 | 163 | ... | ... |
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
| ... | ... | @@ -254,7 +254,7 @@ class CNLiveMineViewModel: NSObject { |
| 254 | 254 | /// - resultBlock: 返回 |
| 255 | 255 | static func requestAuthStandList(page: NSInteger, resultBlock: @escaping resultNewsBlock) { |
| 256 | 256 | let param = NSMutableDictionary() |
| 257 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | |
| 257 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")//10458139 UserInfoManager.shared.userInfo.uid | |
| 258 | 258 | param.setValue("10", forKey: "pageSize") |
| 259 | 259 | param.setValue("\(page)", forKey: "page") |
| 260 | 260 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| ... | ... | @@ -434,7 +434,7 @@ class CNLiveMineViewModel: NSObject { |
| 434 | 434 | /// - resultBlock: 返回 |
| 435 | 435 | static func requestsStandInfo(identityId: String, type: CNLiveMineGetWriteType, resultBlock: @escaping resultNewsBlock) { |
| 436 | 436 | let param = NSMutableDictionary() |
| 437 | - param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid") | |
| 437 | + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "sid")//UserInfoManager.shared.userInfo.uid //10458139 | |
| 438 | 438 | param.setValue(identityId, forKey: "identityId") |
| 439 | 439 | CNLiveNetworking.setAllowRequestDefaultArgument(true) |
| 440 | 440 | CNLiveNetworking.setupShowDataResult(false) | ... | ... |
metaCode/Classes/Other/AppDelegate.swift
| ... | ... | @@ -17,7 +17,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate { |
| 17 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { |
| 18 | 18 | |
| 19 | 19 | // Override point for customization after application launch. |
| 20 | - | |
| 20 | + CNLiveNetworking.networkStatus { status in | |
| 21 | + | |
| 22 | + if(status == .notReachable || status == .unknown){ | |
| 23 | + /// 发送简单数据 | |
| 24 | + NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "CNLiveNetworkStatusNotification"), object: "notReachable") | |
| 25 | + } | |
| 26 | + if status == .reachableViaWWAN { | |
| 27 | + /// 发送简单数据 | |
| 28 | + NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "CNLiveNetworkStatusNotification"), object: "reachableViaWWAN") | |
| 29 | + } | |
| 30 | + if status == .reachableViaWiFi { | |
| 31 | + /// 发送简单数据 | |
| 32 | + NotificationCenter.default.post(name: NSNotification.Name.init(rawValue: "CNLiveNetworkStatusNotification"), object: "reachableViaWiFi") | |
| 33 | + } | |
| 34 | + } | |
| 21 | 35 | |
| 22 | 36 | //设置APP环境 |
| 23 | 37 | CNLiveEnvironmentManager.shared.setupEnvironment(environment: .development) | ... | ... |
metaCode/Info.plist
| ... | ... | @@ -4,31 +4,21 @@ |
| 4 | 4 | <dict> |
| 5 | 5 | <key>CFBundleAllowMixedLocalizations</key> |
| 6 | 6 | <true/> |
| 7 | - <key>UIApplicationSceneManifest</key> | |
| 7 | + <key>CFBundleLocalizations</key> | |
| 8 | + <array> | |
| 9 | + <string>zh</string> | |
| 10 | + </array> | |
| 11 | + <key>NSAppTransportSecurity</key> | |
| 8 | 12 | <dict> |
| 9 | - <key>UIApplicationSupportsMultipleScenes</key> | |
| 10 | - <false/> | |
| 13 | + <key>NSAllowsArbitraryLoads</key> | |
| 14 | + <true/> | |
| 11 | 15 | </dict> |
| 12 | - <key>NSPhotoLibraryAddUsageDescription</key> | |
| 13 | - <string>需要允许打开相册才能访问相册照片和保存照片</string> | |
| 14 | - <key>NSPhotoLibraryUsageDescription</key> | |
| 15 | - <string>需要允许打开相册才能访问相册照片和保存照片</string> | |
| 16 | - <key>NSCameraUsageDescription</key> | |
| 17 | - <string>需要允许开启相机才能使用录制视频和拍照功能</string> | |
| 18 | - <key>NSMicrophoneUsageDescription</key> | |
| 19 | - <string>需要允许开启麦克风才能使用录制视频和语音等服务</string> | |
| 20 | 16 | <key>PHPhotoLibraryPreventAutomaticLimitedAccessAlert</key> |
| 21 | 17 | <true/> |
| 22 | - <key>NSAppTransportSecurity</key> | |
| 18 | + <key>UIApplicationSceneManifest</key> | |
| 23 | 19 | <dict> |
| 24 | - <key>NSAllowsArbitraryLoads</key> | |
| 25 | - <true/> | |
| 20 | + <key>UIApplicationSupportsMultipleScenes</key> | |
| 21 | + <false/> | |
| 26 | 22 | </dict> |
| 27 | - <key>CFBundleDevelopmentRegion</key> | |
| 28 | - <string>zh_CN</string> | |
| 29 | - <key>CFBundleLocalizations</key> | |
| 30 | - <array> | |
| 31 | - <string>zh</string> | |
| 32 | - </array> | |
| 33 | 23 | </dict> |
| 34 | 24 | </plist> | ... | ... |