Skip to content

Commit f2d43d6

Browse files
author
zhaoyongqiang
committed
fix 截图弹窗一直弹的问题
1 parent b8214ef commit f2d43d6

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

macOS/APIExample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@
100100
E702C1E628B4DB4800D7C7ED /* LiveStreaming.strings in Resources */ = {isa = PBXBuildFile; fileRef = E702C1E128B4DB4800D7C7ED /* LiveStreaming.strings */; };
101101
E702C1E728B4DB4800D7C7ED /* LiveStreaming.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E702C1E328B4DB4800D7C7ED /* LiveStreaming.storyboard */; };
102102
E702C1E828B4DB4800D7C7ED /* LiveStreaming.swift in Sources */ = {isa = PBXBuildFile; fileRef = E702C1E528B4DB4800D7C7ED /* LiveStreaming.swift */; };
103-
E702C1EA28B5C17600D7C7ED /* agora-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = E702C1E928B5C17600D7C7ED /* agora-logo.png */; };
104103
E71E7B0B289B7D7900B846C7 /* SimpleFilter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BD4AE79272518D600E95B87 /* SimpleFilter.framework */; };
105104
E71E7B0C289B96FA00B846C7 /* VideoProcess.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E71E7B0E289B96FA00B846C7 /* VideoProcess.storyboard */; };
106105
E71E7B17289BA78D00B846C7 /* QuickSwitchChannel.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E71E7B15289BA78D00B846C7 /* QuickSwitchChannel.storyboard */; };
107106
E71E7B18289BA78D00B846C7 /* QuickSwitchChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E71E7B16289BA78D00B846C7 /* QuickSwitchChannel.swift */; };
107+
E7218BA628BF5E65005A01D5 /* agora-logo.png in Resources */ = {isa = PBXBuildFile; fileRef = E7218BA528BF5E65005A01D5 /* agora-logo.png */; };
108108
E74877D728A261D700CA2F58 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E74877D428A261D700CA2F58 /* NetworkManager.swift */; };
109109
E74877D828A261D700CA2F58 /* JSONObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = E74877D528A261D700CA2F58 /* JSONObject.swift */; };
110110
E763A82D288AA99B00FE99FA /* SimpleFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = E763A81E288AA99B00FE99FA /* SimpleFilter.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -259,13 +259,13 @@
259259
E702C1E228B4DB4800D7C7ED /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LiveStreaming.strings"; sourceTree = "<group>"; };
260260
E702C1E428B4DB4800D7C7ED /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LiveStreaming.storyboard; sourceTree = "<group>"; };
261261
E702C1E528B4DB4800D7C7ED /* LiveStreaming.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveStreaming.swift; sourceTree = "<group>"; };
262-
E702C1E928B5C17600D7C7ED /* agora-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "agora-logo.png"; path = "../../../iOS/APIExample/APIExample/Resources/agora-logo.png"; sourceTree = "<group>"; };
263262
E702C1EB28B5C76000D7C7ED /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LiveStreaming.strings"; sourceTree = "<group>"; };
264263
E71E7B0D289B96FA00B846C7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/VideoProcess.storyboard; sourceTree = "<group>"; };
265264
E71E7B12289B971900B846C7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/VideoProcess.strings; sourceTree = "<group>"; };
266265
E71E7B13289B9C2C00B846C7 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/VideoProcess.strings"; sourceTree = "<group>"; };
267266
E71E7B15289BA78D00B846C7 /* QuickSwitchChannel.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = QuickSwitchChannel.storyboard; sourceTree = "<group>"; };
268267
E71E7B16289BA78D00B846C7 /* QuickSwitchChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuickSwitchChannel.swift; sourceTree = "<group>"; };
268+
E7218BA528BF5E65005A01D5 /* agora-logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "agora-logo.png"; sourceTree = "<group>"; };
269269
E74877D428A261D700CA2F58 /* NetworkManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
270270
E74877D528A261D700CA2F58 /* JSONObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONObject.swift; sourceTree = "<group>"; };
271271
E763A81E288AA99B00FE99FA /* SimpleFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleFilter.h; sourceTree = "<group>"; };
@@ -471,7 +471,7 @@
471471
034C629D25297ABB00296ECF /* Resources */ = {
472472
isa = PBXGroup;
473473
children = (
474-
E702C1E928B5C17600D7C7ED /* agora-logo.png */,
474+
E7218BA528BF5E65005A01D5 /* agora-logo.png */,
475475
67033725279E81DF0069F4B3 /* bg.jpg */,
476476
671BD67A27E0A4F50076D5E1 /* output.raw */,
477477
57A635F32593544600EDC2F7 /* effectA.wav */,
@@ -917,7 +917,7 @@
917917
67033726279E81DF0069F4B3 /* bg.jpg in Resources */,
918918
033A9FB3252EAEB500BC26E1 /* JoinChannelVideo.storyboard in Resources */,
919919
036D3AA024FA40EB00B1D8DC /* VideoView.xib in Resources */,
920-
E702C1EA28B5C17600D7C7ED /* agora-logo.png in Resources */,
920+
E7218BA628BF5E65005A01D5 /* agora-logo.png in Resources */,
921921
033A9FEB252EB5CC00BC26E1 /* AudioMixing.storyboard in Resources */,
922922
67E40B2427EC82F900C7A6E9 /* SpatialAudio.storyboard in Resources */,
923923
671BD67B27E0A4F50076D5E1 /* output.raw in Resources */,

macOS/APIExample/Examples/Advanced/ScreenShare/ScreenShare.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,16 @@ class ScreenShare: BaseViewController {
202202
let programPath = Bundle.main.executablePath?.components(separatedBy: "/")[2] ?? ""
203203
let path = "/Users/\(programPath)/Downloads/thumbnail"
204204
try? FileManager.default.createDirectory(atPath: path, withIntermediateDirectories: true, attributes: nil)
205+
var isShowAlert: Bool = false
205206
result?.enumerated().forEach({ index,item in
206207
let url = "\(path)/\(index).png"
207208
guard item.type == type else { return }
208209
let isSucces = item.thumbImage.savePNG(to: URL(fileURLWithPath: url))
209210
let message = isSucces ? "Save successfully".localized : "Save failed".localized
210-
showAlert(message: message)
211+
if isShowAlert == false {
212+
showAlert(message: message)
213+
isShowAlert = true
214+
}
211215
})
212216
}
213217

1.16 KB
Loading

0 commit comments

Comments
 (0)