Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 439c793

Browse files
jackyixueAbySwifter
authored andcommitted
【iOS】【TRTC-API-Example-Swift】fixed build bugs
1 parent fe44f23 commit 439c793

File tree

6 files changed

+57
-17
lines changed

6 files changed

+57
-17
lines changed

iOS/TRTC-API-Example-Swift/CustomCapture/CustomCaptureViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ class CustomCaptureViewController: UIViewController {
6868
* 视频通话场景推荐使用“自然”美颜效果
6969
*/
7070
let beautyManager = trtcCloud.getBeautyManager()
71-
beautyManager?.setBeautyStyle(TXBeautyStyle.nature)
72-
beautyManager?.setBeautyLevel(5)
73-
beautyManager?.setWhitenessLevel(1)
71+
beautyManager.setBeautyStyle(TXBeautyStyle.nature)
72+
beautyManager.setBeautyLevel(5)
73+
beautyManager.setWhitenessLevel(1)
7474

7575
/// 调整仪表盘显示位置
76-
trtcCloud.setDebugViewMargin(userId, margin: TXEdgeInsets.init(top: 80, left: 0, bottom: 0, right: 0))
76+
trtcCloud.setDebugViewMargin(userId ?? "", margin: TXEdgeInsets.init(top: 80, left: 0, bottom: 0, right: 0))
7777
}
7878

7979
override func viewWillAppear(_ animated: Bool) {

iOS/TRTC-API-Example-Swift/Live/LivePlayViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ class LivePlayViewController: UIViewController {
7777
* 互动直播场景推荐使用“光滑”美颜效果
7878
*/
7979
let beautyManager = trtcCloud.getBeautyManager()
80-
beautyManager?.setBeautyStyle(TXBeautyStyle.smooth)
81-
beautyManager?.setBeautyLevel(5)
82-
beautyManager?.setWhitenessLevel(1)
80+
beautyManager.setBeautyStyle(TXBeautyStyle.smooth)
81+
beautyManager.setBeautyLevel(5)
82+
beautyManager.setWhitenessLevel(1)
8383

8484
/// 调整仪表盘显示位置
8585
trtcCloud.setDebugViewMargin(roomOwner, margin: TXEdgeInsets.init(top: 80, left: 0, bottom: 0, right: 0))

iOS/TRTC-API-Example-Swift/Live/LivePushViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ class LivePushViewController: UIViewController {
8888
* 互动直播场景推荐使用“光滑”美颜效果
8989
*/
9090
let beautyManager = trtcCloud.getBeautyManager()
91-
beautyManager?.setBeautyStyle(TXBeautyStyle.smooth)
92-
beautyManager?.setBeautyLevel(5)
93-
beautyManager?.setWhitenessLevel(1)
91+
beautyManager.setBeautyStyle(TXBeautyStyle.smooth)
92+
beautyManager.setBeautyLevel(5)
93+
beautyManager.setWhitenessLevel(1)
9494

9595
/// 调整仪表盘显示位置
9696
trtcCloud.setDebugViewMargin(userId, margin: TXEdgeInsets.init(top: 80, left: 0, bottom: 0, right: 0))

iOS/TRTC-API-Example-Swift/RTC/RTCViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ class RTCViewController: UIViewController {
7575
* 视频通话场景推荐使用“自然”美颜效果
7676
*/
7777
let beautyManager = trtcCloud.getBeautyManager()
78-
beautyManager?.setBeautyStyle(TXBeautyStyle.nature)
79-
beautyManager?.setBeautyLevel(5)
80-
beautyManager?.setWhitenessLevel(1)
78+
beautyManager.setBeautyStyle(TXBeautyStyle.nature)
79+
beautyManager.setBeautyLevel(5)
80+
beautyManager.setWhitenessLevel(1)
8181

8282
/// 调整仪表盘显示位置
83-
trtcCloud.setDebugViewMargin(userId, margin: TXEdgeInsets.init(top: 80, left: 0, bottom: 0, right: 0))
83+
trtcCloud.setDebugViewMargin(userId ?? "", margin: TXEdgeInsets.init(top: 80, left: 0, bottom: 0, right: 0))
8484
}
8585

8686
override func viewWillAppear(_ animated: Bool) {

iOS/TRTC-API-Example-Swift/TRTCSimpleDemo.xcodeproj/project.pbxproj

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,21 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 52;
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
0405FADC2859E1B200DE7D20 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FADB2859E1B200DE7D20 /* AVFoundation.framework */; };
11+
0405FADE2859E1C200DE7D20 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FADD2859E1C200DE7D20 /* AudioToolbox.framework */; };
12+
0405FAE02859E1C900DE7D20 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FADF2859E1C900DE7D20 /* VideoToolbox.framework */; };
13+
0405FAE12859E1D300DE7D20 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FADF2859E1C900DE7D20 /* VideoToolbox.framework */; };
14+
0405FAE32859E24D00DE7D20 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FAE22859E24D00DE7D20 /* MetalKit.framework */; };
15+
0405FAE52859E25C00DE7D20 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FAE42859E25C00DE7D20 /* SystemConfiguration.framework */; };
16+
0405FAE72859E26B00DE7D20 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FAE62859E26B00DE7D20 /* CoreTelephony.framework */; };
17+
0405FAE82859E2BE00DE7D20 /* TXFFmpeg.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FAD72859E18C00DE7D20 /* TXFFmpeg.xcframework */; };
18+
0405FAE92859E2BE00DE7D20 /* TXFFmpeg.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FAD72859E18C00DE7D20 /* TXFFmpeg.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
19+
0405FAEA2859E2C100DE7D20 /* TXSoundTouch.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FAD92859E19800DE7D20 /* TXSoundTouch.xcframework */; };
20+
0405FAEB2859E2C100DE7D20 /* TXSoundTouch.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0405FAD92859E19800DE7D20 /* TXSoundTouch.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1021
280690A22490BE6D00FAAE90 /* ScreenEntranceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280690A02490BE6D00FAAE90 /* ScreenEntranceViewController.swift */; };
1122
280690A32490BE6D00FAAE90 /* ScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280690A12490BE6D00FAAE90 /* ScreenViewController.swift */; };
1223
28C0A3FC249101F000E50613 /* TRTCBroadcastExtensionLauncher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28C0A3FB249101F000E50613 /* TRTCBroadcastExtensionLauncher.swift */; };
@@ -84,13 +95,23 @@
8495
dstPath = "";
8596
dstSubfolderSpec = 10;
8697
files = (
98+
0405FAE92859E2BE00DE7D20 /* TXFFmpeg.xcframework in Embed Frameworks */,
99+
0405FAEB2859E2C100DE7D20 /* TXSoundTouch.xcframework in Embed Frameworks */,
87100
);
88101
name = "Embed Frameworks";
89102
runOnlyForDeploymentPostprocessing = 0;
90103
};
91104
/* End PBXCopyFilesBuildPhase section */
92105

93106
/* Begin PBXFileReference section */
107+
0405FAD72859E18C00DE7D20 /* TXFFmpeg.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXFFmpeg.xcframework; path = ../SDK/TXFFmpeg.xcframework; sourceTree = "<group>"; };
108+
0405FAD92859E19800DE7D20 /* TXSoundTouch.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXSoundTouch.xcframework; path = ../SDK/TXSoundTouch.xcframework; sourceTree = "<group>"; };
109+
0405FADB2859E1B200DE7D20 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
110+
0405FADD2859E1C200DE7D20 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
111+
0405FADF2859E1C900DE7D20 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; };
112+
0405FAE22859E24D00DE7D20 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
113+
0405FAE42859E25C00DE7D20 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
114+
0405FAE62859E26B00DE7D20 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
94115
280690A02490BE6D00FAAE90 /* ScreenEntranceViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScreenEntranceViewController.swift; sourceTree = "<group>"; };
95116
280690A12490BE6D00FAAE90 /* ScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScreenViewController.swift; sourceTree = "<group>"; };
96117
280690A92490C04D00FAAE90 /* ReplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReplayKit.framework; path = System/Library/Frameworks/ReplayKit.framework; sourceTree = SDKROOT; };
@@ -171,6 +192,7 @@
171192
isa = PBXFrameworksBuildPhase;
172193
buildActionMask = 2147483647;
173194
files = (
195+
0405FAE12859E1D300DE7D20 /* VideoToolbox.framework in Frameworks */,
174196
C61744BA26E8A43E00FD00B1 /* libc++.tbd in Frameworks */,
175197
C61744B926E8A43500FD00B1 /* Accelerate.framework in Frameworks */,
176198
453371862491F35100E18040 /* TXLiteAVSDK_ReplayKitExt.framework in Frameworks */,
@@ -182,11 +204,19 @@
182204
isa = PBXFrameworksBuildPhase;
183205
buildActionMask = 2147483647;
184206
files = (
207+
0405FAE72859E26B00DE7D20 /* CoreTelephony.framework in Frameworks */,
208+
0405FAE52859E25C00DE7D20 /* SystemConfiguration.framework in Frameworks */,
209+
0405FAE32859E24D00DE7D20 /* MetalKit.framework in Frameworks */,
210+
0405FAE02859E1C900DE7D20 /* VideoToolbox.framework in Frameworks */,
211+
0405FADE2859E1C200DE7D20 /* AudioToolbox.framework in Frameworks */,
212+
FD96E07E248DF98800294D1F /* Accelerate.framework in Frameworks */,
213+
0405FADC2859E1B200DE7D20 /* AVFoundation.framework in Frameworks */,
185214
FDD9E0302440840900FD5B5A /* libresolv.tbd in Frameworks */,
186215
FDCEFF4F241BBDF1000BFA0B /* libiconv.tbd in Frameworks */,
216+
0405FAEA2859E2C100DE7D20 /* TXSoundTouch.xcframework in Frameworks */,
187217
FDCEFF4D241BBDEB000BFA0B /* libc++.tbd in Frameworks */,
188-
FD96E07E248DF98800294D1F /* Accelerate.framework in Frameworks */,
189218
FDCEFF4B241BBDD6000BFA0B /* TXLiteAVSDK_TRTC.framework in Frameworks */,
219+
0405FAE82859E2BE00DE7D20 /* TXFFmpeg.xcframework in Frameworks */,
190220
8AB4CC75885C25710FA89DD4 /* libPods-TRTCSimpleDemo.a in Frameworks */,
191221
);
192222
runOnlyForDeploymentPostprocessing = 0;
@@ -351,6 +381,14 @@
351381
C2D3A67E7F4AD77B3A644C16 /* Frameworks */ = {
352382
isa = PBXGroup;
353383
children = (
384+
0405FAE62859E26B00DE7D20 /* CoreTelephony.framework */,
385+
0405FAE42859E25C00DE7D20 /* SystemConfiguration.framework */,
386+
0405FAE22859E24D00DE7D20 /* MetalKit.framework */,
387+
0405FADF2859E1C900DE7D20 /* VideoToolbox.framework */,
388+
0405FADD2859E1C200DE7D20 /* AudioToolbox.framework */,
389+
0405FADB2859E1B200DE7D20 /* AVFoundation.framework */,
390+
0405FAD92859E19800DE7D20 /* TXSoundTouch.xcframework */,
391+
0405FAD72859E18C00DE7D20 /* TXFFmpeg.xcframework */,
354392
28C0A3D42490CAB000E50613 /* TXLiteAVSDK_ReplayKitExt.framework */,
355393
FDD9E02F2440840900FD5B5A /* libresolv.tbd */,
356394
FDCEFF4E241BBDF1000BFA0B /* libiconv.tbd */,
@@ -596,6 +634,7 @@
596634
CODE_SIGN_IDENTITY = "iPhone Developer";
597635
CODE_SIGN_STYLE = Manual;
598636
DEVELOPMENT_TEAM = 5GHU44CJHG;
637+
ENABLE_BITCODE = NO;
599638
INFOPLIST_FILE = Screen/TXReplayKit_Screen/Info.plist;
600639
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
601640
LD_RUNPATH_SEARCH_PATHS = (
@@ -618,6 +657,7 @@
618657
CODE_SIGN_IDENTITY = "iPhone Developer";
619658
CODE_SIGN_STYLE = Manual;
620659
DEVELOPMENT_TEAM = 5GHU44CJHG;
660+
ENABLE_BITCODE = NO;
621661
INFOPLIST_FILE = Screen/TXReplayKit_Screen/Info.plist;
622662
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
623663
LD_RUNPATH_SEARCH_PATHS = (

iOS/TRTC-API-Example-Swift/TRTCSimpleDemo.xcodeproj/xcshareddata/xcschemes/TRTCSimpleDemo.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
1111
<ActionContent
1212
title = "Run Script"
13-
scriptText = "# Type a script or drag a script file from your workspace to insert its path.&#10;cd ${SRCROOT}&#10;WORK_DIR=$(pwd)&#10;&#10;TARGET=&quot;TRTC&quot;&#10;&#10;if [ ! -e &quot;../SDK&quot; ]; then&#10;mkdir ../SDK&#10;fi&#10;&#10;if [ ! -e &quot;../SDK/TXLiteAVSDK_TRTC.framework&quot; ] || [ ! -e &quot;./Pods&quot; ]; then&#10;URL=&quot;https://liteav.sdk.qcloud.com/download/latest/TXLiteAVSDK_TRTC_iOS_latest.zip&quot;&#10;echo &quot;Downloading SDK from $URL&quot;&#10;curl &quot;$URL&quot; --output ../SDK/TXLiteAVSDK_TRTC_iOS.zip&#10;&#10;cd ../SDK&#10;unzip TXLiteAVSDK_TRTC_iOS.zip&#10;&#10;rm -rf __MACOSX&#10;if [ ! -e &quot;TXLiteAVSDK_${TARGET}.framework&quot; ]; then&#10;echo &quot;move TXLiteAVSDK_${TARGET}.framework&quot;&#10;mv LiteAVSDK_${TARGET}_*/SDK/*.framework .&#10;fi&#10;if [ ! -e &quot;../TRTCSimpleDemo/Pods&quot; ]; then&#10;echo &quot;copy Pods&quot;&#10;cp -rf LiteAVSDK_${TARGET}_*/TRTCSimpleDemo/Pods ../TRTCSimpleDemo/&#10;xcodebuild -project ../TRTCSimpleDemo/Pods/Pods.xcodeproj -configuration ${CONFIGURATION}&#10;fi&#10;rm -rf LiteAVSDK_${TARGET}_*&#10;rm -rf TXLiteAVSDK_${TARGET}_*&#10;fi&#10;">
13+
scriptText = "# Type a script or drag a script file from your workspace to insert its path.&#10;cd ${SRCROOT}&#10;WORK_DIR=$(pwd)&#10;&#10;TARGET=&quot;TRTC&quot;&#10;&#10;if [ ! -e &quot;../SDK&quot; ]; then&#10;mkdir ../SDK&#10;fi&#10;&#10;if [ ! -e &quot;../SDK/TXLiteAVSDK_TRTC.framework&quot; ] || [ ! -e &quot;./Pods&quot; ]; then&#10;URL=&quot;https://liteav.sdk.qcloud.com/download/latest/TXLiteAVSDK_TRTC_iOS_latest.zip&quot;&#10;echo &quot;Downloading SDK from $URL&quot;&#10;curl &quot;$URL&quot; --output ../SDK/TXLiteAVSDK_TRTC_iOS.zip&#10;&#10;cd ../SDK&#10;unzip TXLiteAVSDK_TRTC_iOS.zip&#10;&#10;rm -rf __MACOSX&#10;if [ ! -e &quot;TXLiteAVSDK_${TARGET}.framework&quot; ]; then&#10;echo &quot;move TXLiteAVSDK_${TARGET}.framework&quot;&#10;mv LiteAVSDK_${TARGET}_*/SDK/*.framework .&#10;mv LiteAVSDK_${TARGET}_*/SDK/*.xcframework .&#10;fi&#10;if [ ! -e &quot;../TRTCSimpleDemo/Pods&quot; ]; then&#10;echo &quot;copy Pods&quot;&#10;cp -rf LiteAVSDK_${TARGET}_*/TRTCSimpleDemo/Pods ../TRTCSimpleDemo/&#10;xcodebuild -project ../TRTCSimpleDemo/Pods/Pods.xcodeproj -configuration ${CONFIGURATION}&#10;fi&#10;rm -rf LiteAVSDK_${TARGET}_*&#10;rm -rf TXLiteAVSDK_${TARGET}_*&#10;fi&#10;">
1414
<EnvironmentBuildable>
1515
<BuildableReference
1616
BuildableIdentifier = "primary"

0 commit comments

Comments
 (0)