Skip to content

Commit 452b6c4

Browse files
Refactor, Update Audio Example UI & Files.
1 parent 8fe7493 commit 452b6c4

File tree

13 files changed

+79
-71
lines changed

13 files changed

+79
-71
lines changed

Example/Example.xcodeproj/project.pbxproj

+32-35
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
A89687802A52E07600AC0F09 /* Boswell Interview - Ted 2023-05-16.m4a in Resources */ = {isa = PBXBuildFile; fileRef = A896877F2A52E07600AC0F09 /* Boswell Interview - Ted 2023-05-16.m4a */; };
10+
777D472B2A53EA9D0050C0E7 /* ChatGPTAPIManager in Frameworks */ = {isa = PBXBuildFile; productRef = 777D472A2A53EA9D0050C0E7 /* ChatGPTAPIManager */; };
11+
777D472F2A53F7560050C0E7 /* english_song.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 777D472D2A53F7550050C0E7 /* english_song.m4a */; };
12+
777D47302A53F7560050C0E7 /* translation_file.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 777D472E2A53F7550050C0E7 /* translation_file.m4a */; };
1113
A8B85FCD2A431318005FBEDE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B85FCC2A431318005FBEDE /* AppDelegate.swift */; };
1214
A8B85FCF2A431318005FBEDE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B85FCE2A431318005FBEDE /* SceneDelegate.swift */; };
1315
A8B85FD12A431318005FBEDE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B85FD02A431318005FBEDE /* ViewController.swift */; };
@@ -25,15 +27,11 @@
2527
A8B860102A431AA6005FBEDE /* EZLoadingActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860082A431AA6005FBEDE /* EZLoadingActivity.swift */; };
2628
A8B860112A431AA6005FBEDE /* ImageWithTextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860092A431AA6005FBEDE /* ImageWithTextViewController.swift */; };
2729
A8B860132A432135005FBEDE /* openai.svg in Resources */ = {isa = PBXBuildFile; fileRef = A8B860122A432135005FBEDE /* openai.svg */; };
28-
A8B860192A432841005FBEDE /* ChatGPTAPIManager in Frameworks */ = {isa = PBXBuildFile; productRef = A8B860182A432841005FBEDE /* ChatGPTAPIManager */; };
2930
A8B860252A440C52005FBEDE /* MessageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860242A440C52005FBEDE /* MessageModel.swift */; };
3031
A8B8602D2A4413F2005FBEDE /* ChatViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B8602C2A4413F2005FBEDE /* ChatViewModel.swift */; };
3132
A8B8602F2A44140A005FBEDE /* ImageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B8602E2A441409005FBEDE /* ImageViewModel.swift */; };
3233
A8B860342A44431C005FBEDE /* TextGenerationViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B860332A44431C005FBEDE /* TextGenerationViewModel.swift */; };
3334
A8B8607C2A45AE40005FBEDE /* AudioViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */; };
34-
A8B8607E2A45B474005FBEDE /* sample-15s.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = A8B8607D2A45B474005FBEDE /* sample-15s.mp3 */; };
35-
A8B860802A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = A8B8607F2A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 */; };
36-
A8B860822A45C555005FBEDE /* Hindi Songs.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = A8B860812A45C555005FBEDE /* Hindi Songs.mp3 */; };
3735
/* End PBXBuildFile section */
3836

3937
/* Begin PBXContainerItemProxy section */
@@ -54,7 +52,9 @@
5452
/* End PBXContainerItemProxy section */
5553

5654
/* Begin PBXFileReference section */
57-
A896877F2A52E07600AC0F09 /* Boswell Interview - Ted 2023-05-16.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Boswell Interview - Ted 2023-05-16.m4a"; path = "../../../../../../Downloads/Boswell.ai-main/Boswell Interview - Ted 2023-05-16.m4a"; sourceTree = "<group>"; };
55+
777D47282A53EA8F0050C0E7 /* chatgpt-ios-sdk */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "chatgpt-ios-sdk"; path = ..; sourceTree = "<group>"; };
56+
777D472D2A53F7550050C0E7 /* english_song.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = english_song.m4a; sourceTree = "<group>"; };
57+
777D472E2A53F7550050C0E7 /* translation_file.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = translation_file.m4a; sourceTree = "<group>"; };
5858
A8B85FC92A431318005FBEDE /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
5959
A8B85FCC2A431318005FBEDE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
6060
A8B85FCE2A431318005FBEDE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -81,17 +81,14 @@
8181
A8B8602E2A441409005FBEDE /* ImageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageViewModel.swift; sourceTree = "<group>"; };
8282
A8B860332A44431C005FBEDE /* TextGenerationViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextGenerationViewModel.swift; sourceTree = "<group>"; };
8383
A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioViewController.swift; sourceTree = "<group>"; };
84-
A8B8607D2A45B474005FBEDE /* sample-15s.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "sample-15s.mp3"; sourceTree = "<group>"; };
85-
A8B8607F2A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "passenger-let-her-go-official-video.mp3"; sourceTree = "<group>"; };
86-
A8B860812A45C555005FBEDE /* Hindi Songs.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "Hindi Songs.mp3"; sourceTree = "<group>"; };
8784
/* End PBXFileReference section */
8885

8986
/* Begin PBXFrameworksBuildPhase section */
9087
A8B85FC62A431318005FBEDE /* Frameworks */ = {
9188
isa = PBXFrameworksBuildPhase;
9289
buildActionMask = 2147483647;
9390
files = (
94-
A8B860192A432841005FBEDE /* ChatGPTAPIManager in Frameworks */,
91+
777D472B2A53EA9D0050C0E7 /* ChatGPTAPIManager in Frameworks */,
9592
);
9693
runOnlyForDeploymentPostprocessing = 0;
9794
};
@@ -112,13 +109,30 @@
112109
/* End PBXFrameworksBuildPhase section */
113110

114111
/* Begin PBXGroup section */
112+
777D47292A53EA9D0050C0E7 /* Frameworks */ = {
113+
isa = PBXGroup;
114+
children = (
115+
);
116+
name = Frameworks;
117+
sourceTree = "<group>";
118+
};
119+
777D472C2A53F3730050C0E7 /* AudioTranslationAndTranscript */ = {
120+
isa = PBXGroup;
121+
children = (
122+
A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */,
123+
);
124+
path = AudioTranslationAndTranscript;
125+
sourceTree = "<group>";
126+
};
115127
A8B85FC02A431318005FBEDE = {
116128
isa = PBXGroup;
117129
children = (
130+
777D47282A53EA8F0050C0E7 /* chatgpt-ios-sdk */,
118131
A8B85FCB2A431318005FBEDE /* Example */,
119132
A8B85FE22A43131A005FBEDE /* ExampleTests */,
120133
A8B85FEC2A43131A005FBEDE /* ExampleUITests */,
121134
A8B85FCA2A431318005FBEDE /* Products */,
135+
777D47292A53EA9D0050C0E7 /* Frameworks */,
122136
);
123137
sourceTree = "<group>";
124138
};
@@ -165,12 +179,12 @@
165179
A8B860202A440BB9005FBEDE /* Views */ = {
166180
isa = PBXGroup;
167181
children = (
182+
A8B860262A440C79005FBEDE /* Cells */,
168183
A8B860322A444295005FBEDE /* TextToImage */,
169184
A8B860302A444288005FBEDE /* ChatAndText */,
170-
A8B860262A440C79005FBEDE /* Cells */,
185+
777D472C2A53F3730050C0E7 /* AudioTranslationAndTranscript */,
171186
A8B85FD02A431318005FBEDE /* ViewController.swift */,
172187
A8B860082A431AA6005FBEDE /* EZLoadingActivity.swift */,
173-
A8B8607B2A45AE40005FBEDE /* AudioViewController.swift */,
174188
);
175189
path = Views;
176190
sourceTree = "<group>";
@@ -225,10 +239,8 @@
225239
A8B860292A440CC0005FBEDE /* Supporting */ = {
226240
isa = PBXGroup;
227241
children = (
228-
A8B8607D2A45B474005FBEDE /* sample-15s.mp3 */,
229-
A896877F2A52E07600AC0F09 /* Boswell Interview - Ted 2023-05-16.m4a */,
230-
A8B8607F2A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 */,
231-
A8B860812A45C555005FBEDE /* Hindi Songs.mp3 */,
242+
777D472D2A53F7550050C0E7 /* english_song.m4a */,
243+
777D472E2A53F7550050C0E7 /* translation_file.m4a */,
232244
A8B85FD52A43131A005FBEDE /* Assets.xcassets */,
233245
A8B860122A432135005FBEDE /* openai.svg */,
234246
A8B85FDA2A43131A005FBEDE /* Info.plist */,
@@ -269,7 +281,7 @@
269281
);
270282
name = Example;
271283
packageProductDependencies = (
272-
A8B860182A432841005FBEDE /* ChatGPTAPIManager */,
284+
777D472A2A53EA9D0050C0E7 /* ChatGPTAPIManager */,
273285
);
274286
productName = Example;
275287
productReference = A8B85FC92A431318005FBEDE /* Example.app */;
@@ -344,7 +356,6 @@
344356
);
345357
mainGroup = A8B85FC02A431318005FBEDE;
346358
packageReferences = (
347-
A8B860172A432841005FBEDE /* XCRemoteSwiftPackageReference "chatgpt-ios-sdk" */,
348359
);
349360
productRefGroup = A8B85FCA2A431318005FBEDE /* Products */;
350361
projectDirPath = "";
@@ -362,13 +373,11 @@
362373
isa = PBXResourcesBuildPhase;
363374
buildActionMask = 2147483647;
364375
files = (
376+
777D472F2A53F7560050C0E7 /* english_song.m4a in Resources */,
365377
A8B8600A2A431AA6005FBEDE /* UserCell.xib in Resources */,
366-
A8B8607E2A45B474005FBEDE /* sample-15s.mp3 in Resources */,
378+
777D47302A53F7560050C0E7 /* translation_file.m4a in Resources */,
367379
A8B85FD92A43131A005FBEDE /* LaunchScreen.storyboard in Resources */,
368380
A8B860132A432135005FBEDE /* openai.svg in Resources */,
369-
A89687802A52E07600AC0F09 /* Boswell Interview - Ted 2023-05-16.m4a in Resources */,
370-
A8B860822A45C555005FBEDE /* Hindi Songs.mp3 in Resources */,
371-
A8B860802A45BCFE005FBEDE /* passenger-let-her-go-official-video.mp3 in Resources */,
372381
A8B85FD62A43131A005FBEDE /* Assets.xcassets in Resources */,
373382
A8B8600F2A431AA6005FBEDE /* AssistantCell.xib in Resources */,
374383
A8B85FD42A431318005FBEDE /* Main.storyboard in Resources */,
@@ -749,21 +758,9 @@
749758
};
750759
/* End XCConfigurationList section */
751760

752-
/* Begin XCRemoteSwiftPackageReference section */
753-
A8B860172A432841005FBEDE /* XCRemoteSwiftPackageReference "chatgpt-ios-sdk" */ = {
754-
isa = XCRemoteSwiftPackageReference;
755-
repositoryURL = "https://github.com/DevCrew-io/chatgpt-ios-sdk.git";
756-
requirement = {
757-
kind = upToNextMajorVersion;
758-
minimumVersion = 1.0.2;
759-
};
760-
};
761-
/* End XCRemoteSwiftPackageReference section */
762-
763761
/* Begin XCSwiftPackageProductDependency section */
764-
A8B860182A432841005FBEDE /* ChatGPTAPIManager */ = {
762+
777D472A2A53EA9D0050C0E7 /* ChatGPTAPIManager */ = {
765763
isa = XCSwiftPackageProductDependency;
766-
package = A8B860172A432841005FBEDE /* XCRemoteSwiftPackageReference "chatgpt-ios-sdk" */;
767764
productName = ChatGPTAPIManager;
768765
};
769766
/* End XCSwiftPackageProductDependency section */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

-14
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>Example.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>

Example/Example/Storyboards/Base.lproj/Main.storyboard

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="NLF-Zg-uhw">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="NLF-Zg-uhw">
33
<device id="retina6_12" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
88
<capability name="System colors in document resources" minToolsVersion="11.0"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -66,7 +66,7 @@
6666
<constraint firstAttribute="height" constant="40" id="C2D-Gd-AnK"/>
6767
</constraints>
6868
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
69-
<state key="normal" title="Audio Transcriptions">
69+
<state key="normal" title="Audio">
7070
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
7171
</state>
7272
<connections>
@@ -265,17 +265,14 @@
265265
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
266266
<subviews>
267267
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Mv-Ab-Pa3">
268-
<rect key="frame" x="0.0" y="59" width="393" height="100"/>
268+
<rect key="frame" x="0.0" y="59" width="393" height="629.66666666666663"/>
269269
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
270-
<constraints>
271-
<constraint firstAttribute="height" constant="100" id="UGC-97-28f"/>
272-
</constraints>
273270
<color key="textColor" systemColor="labelColor"/>
274271
<fontDescription key="fontDescription" type="system" pointSize="14"/>
275272
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
276273
</textView>
277274
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tPH-2H-UdE">
278-
<rect key="frame" x="20" y="179" width="353" height="35"/>
275+
<rect key="frame" x="20" y="708.66666666666663" width="353" height="35"/>
279276
<color key="backgroundColor" red="0.0" green="0.49803921569999998" blue="1" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
280277
<state key="normal" title="Button"/>
281278
<buttonConfiguration key="configuration" style="plain" title="Translation">
@@ -286,7 +283,7 @@
286283
</connections>
287284
</button>
288285
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OT2-ZZ-jY1">
289-
<rect key="frame" x="20" y="234" width="353" height="34.333333333333314"/>
286+
<rect key="frame" x="20" y="763.66666666666663" width="353" height="34.333333333333371"/>
290287
<color key="backgroundColor" red="0.0" green="0.49803921569999998" blue="1" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
291288
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
292289
<state key="normal" title="Transcription">
@@ -308,6 +305,7 @@
308305
<constraint firstItem="Tmd-kn-nFh" firstAttribute="trailing" secondItem="8Mv-Ab-Pa3" secondAttribute="trailing" id="EGT-cI-btL"/>
309306
<constraint firstItem="tPH-2H-UdE" firstAttribute="top" secondItem="8Mv-Ab-Pa3" secondAttribute="bottom" constant="20" id="GBT-1B-NqY"/>
310307
<constraint firstItem="OT2-ZZ-jY1" firstAttribute="top" secondItem="tPH-2H-UdE" secondAttribute="bottom" constant="20" id="WLY-yL-4kZ"/>
308+
<constraint firstItem="Tmd-kn-nFh" firstAttribute="bottom" secondItem="OT2-ZZ-jY1" secondAttribute="bottom" constant="20" id="fdP-qB-Uec"/>
311309
<constraint firstItem="tPH-2H-UdE" firstAttribute="leading" secondItem="Tmd-kn-nFh" secondAttribute="leading" constant="20" id="iJD-R0-6m6"/>
312310
<constraint firstItem="8Mv-Ab-Pa3" firstAttribute="leading" secondItem="Tmd-kn-nFh" secondAttribute="leading" id="uHU-Cg-ahu"/>
313311
<constraint firstItem="Tmd-kn-nFh" firstAttribute="trailing" secondItem="OT2-ZZ-jY1" secondAttribute="trailing" constant="20" id="uMf-yG-lqM"/>
-227 KB
Binary file not shown.
718 KB
Binary file not shown.
Binary file not shown.
-300 KB
Binary file not shown.
Binary file not shown.

Example/Example/Views/AudioViewController.swift renamed to Example/Example/Views/AudioTranslationAndTranscript/AudioViewController.swift

+16-11
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@ import ChatGPTAPIManager
1111
class AudioViewController: UIViewController {
1212

1313
@IBOutlet weak var textView: UITextView!
14-
let url = Bundle.main.url(forResource: "Boswell Interview - Ted 2023-05-16", withExtension: "m4a")
15-
14+
1615
override func viewDidLoad() {
1716
super.viewDidLoad()
1817

1918
}
2019
@IBAction func audioTranslation(sender: UIButton) {
21-
let fileURL = URL(fileURLWithPath: url!.path)
22-
self.audioTranslation(url: fileURL)
20+
if let fileURL = Bundle.main.url(forResource: "translation_file", withExtension: "m4a") {
21+
self.audioTranslation(url: fileURL)
22+
}
2323
}
2424
@IBAction func audioTranscription(sender: UIButton) {
25-
let fileURL = URL(fileURLWithPath: url!.path)
26-
self.audioTranscriptions(url: fileURL)
25+
if let fileURL = Bundle.main.url(forResource: "english_song", withExtension: "m4a") {
26+
self.audioTranscriptions(url: fileURL)
27+
}
2728
}
2829

2930
func audioTranslation(url: URL) {
@@ -34,27 +35,31 @@ class AudioViewController: UIViewController {
3435
case.success(let success):
3536
print(success)
3637
DispatchQueue.main.async {
37-
self.textView.text = success
38+
self.textView.text = success
39+
EZLoadingActivity.hide(true, animated: true)
3840
}
3941
case.failure(let error):
4042
print(error)
43+
self.textView.text = "\(error)"
44+
EZLoadingActivity.hide(false, animated: true)
4145
}
4246
})
4347
}
4448
func audioTranscriptions(url: URL) {
4549
EZLoadingActivity.show("Loading...", disableUI: true)
46-
ChatGPTAPIManager.shared.audioTranscriptionRequest(fileUrl: url, prompt: "Translate this audio", model: .whisper1, endPoint: .transcriptions, completion: { result in
50+
ChatGPTAPIManager.shared.audioTranscriptionRequest(fileUrl: url, prompt: "Translate this audio", language: "en", model: .whisper1, endPoint: .transcriptions, completion: { result in
4751

4852
switch result {
4953
case.success(let success):
5054
print(success)
5155
DispatchQueue.main.async {
52-
EZLoadingActivity.hide(true,animated: true)
53-
self.textView.text = success
56+
self.textView.text = success
57+
EZLoadingActivity.hide(true, animated: true)
5458
}
5559
case.failure(let error):
5660
print(error)
57-
EZLoadingActivity.hide(false,animated: true)
61+
self.textView.text = "\(error)"
62+
EZLoadingActivity.hide(false, animated: true)
5863
}
5964
})
6065
}

0 commit comments

Comments
 (0)