Skip to content

Commit 95c77d7

Browse files
committed
Upgrade Alamofire to 5.x, Fix Add Client Config
- Refactor ClientConfig to safely build a URL (Hopefully fixes Pistachio's problem) - **Unfortunately this means that previously configured hosts will have to be re-configured** - Upgrade Alamofire to 5.4.1 which had breaking changes - Implement an API Router to cleanup request creation - Implement a request retrier and increase timeout interval - So far early testing shows this has helped out with empty responses and time-outs
1 parent a69c380 commit 95c77d7

19 files changed

+613
-520
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,3 @@ fastlane/test_output
7979

8080
iOSInjectionProject/
8181
.DS_Store
82-
Deluge Remote/Resources/GoogleService-Info.plist

Deluge Remote.xcodeproj/project.pbxproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
472AA96A25940AE600529B45 /* SlideInPresentationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472AA96925940AE600529B45 /* SlideInPresentationManager.swift */; };
3535
472AA96D25940B8C00529B45 /* SlideInPresentationController .swift in Sources */ = {isa = PBXBuildFile; fileRef = 472AA96C25940B8C00529B45 /* SlideInPresentationController .swift */; };
3636
473CB8BD2595C9B700A4B3EF /* NotificationBannerSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 473CB8BC2595C9B700A4B3EF /* NotificationBannerSwift */; };
37+
473CB8C52596A8E100A4B3EF /* DelugeAPIRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 473CB8C42596A8E100A4B3EF /* DelugeAPIRouter.swift */; };
3738
473D1F75258AE16E00045DB0 /* ChevronTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 473D1F74258AE16E00045DB0 /* ChevronTableViewCell.swift */; };
3839
473D1F79258B1C6E00045DB0 /* PlainCircularProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 473D1F78258B1C6E00045DB0 /* PlainCircularProgressBar.swift */; };
3940
473D1F7C258B1F7000045DB0 /* TorrentConnectedClientCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 473D1F7B258B1F6F00045DB0 /* TorrentConnectedClientCell.swift */; };
@@ -108,6 +109,7 @@
108109
472AA9662593FE4200529B45 /* TorrentSortingPopup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TorrentSortingPopup.swift; sourceTree = "<group>"; };
109110
472AA96925940AE600529B45 /* SlideInPresentationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlideInPresentationManager.swift; sourceTree = "<group>"; };
110111
472AA96C25940B8C00529B45 /* SlideInPresentationController .swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SlideInPresentationController .swift"; sourceTree = "<group>"; };
112+
473CB8C42596A8E100A4B3EF /* DelugeAPIRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DelugeAPIRouter.swift; sourceTree = "<group>"; };
111113
473D1F74258AE16E00045DB0 /* ChevronTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChevronTableViewCell.swift; sourceTree = "<group>"; };
112114
473D1F78258B1C6E00045DB0 /* PlainCircularProgressBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlainCircularProgressBar.swift; sourceTree = "<group>"; };
113115
473D1F7B258B1F6F00045DB0 /* TorrentConnectedClientCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TorrentConnectedClientCell.swift; sourceTree = "<group>"; };
@@ -300,6 +302,7 @@
300302
471602761DD433A700727CBD /* DelugeClient.swift */,
301303
477BFAEE21E442F8008E80CF /* DelugeRequestRetrier.swift */,
302304
477D7B3121D3EFE000F78CE1 /* ClientManager.swift */,
305+
473CB8C42596A8E100A4B3EF /* DelugeAPIRouter.swift */,
303306
);
304307
path = API;
305308
sourceTree = "<group>";
@@ -517,6 +520,7 @@
517520
47C800F9259096A500A01831 /* TorrentFilesViewController.swift in Sources */,
518521
472AA96A25940AE600529B45 /* SlideInPresentationManager.swift in Sources */,
519522
477D7B3221D3EFE000F78CE1 /* ClientManager.swift in Sources */,
523+
473CB8C52596A8E100A4B3EF /* DelugeAPIRouter.swift in Sources */,
520524
477D7ADB21D3299300F78CE1 /* ClientConfig.swift in Sources */,
521525
47A3018D24954EF100AC5EED /* FileManagerHelper.swift in Sources */,
522526
47F9C73321DC66790017281C /* TorrentConfig.swift in Sources */,
@@ -724,7 +728,7 @@
724728
"@executable_path/Frameworks",
725729
);
726730
LIBRARY_SEARCH_PATHS = "";
727-
MARKETING_VERSION = 1.5.1;
731+
MARKETING_VERSION = 1.5.2;
728732
OTHER_LDFLAGS = "-ObjC";
729733
PRODUCT_BUNDLE_IDENTIFIER = "io.rudybermudez.Deluge-Remote";
730734
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -756,7 +760,7 @@
756760
"@executable_path/Frameworks",
757761
);
758762
LIBRARY_SEARCH_PATHS = "";
759-
MARKETING_VERSION = 1.5.1;
763+
MARKETING_VERSION = 1.5.2;
760764
OTHER_LDFLAGS = "-ObjC";
761765
PRODUCT_BUNDLE_IDENTIFIER = "io.rudybermudez.Deluge-Remote";
762766
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -828,7 +832,7 @@
828832
repositoryURL = "https://github.com/Alamofire/Alamofire.git";
829833
requirement = {
830834
kind = upToNextMajorVersion;
831-
minimumVersion = 4.9.0;
835+
minimumVersion = 5.4.1;
832836
};
833837
};
834838
47E685D9259078F2008C2969 /* XCRemoteSwiftPackageReference "Eureka" */ = {

Deluge Remote.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Deluge Remote/Resources/Base.lproj/Main.storyboard

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="example.server.com" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="kRL-PI-PWI" userLabel="Hostname Text Field">
271271
<rect key="frame" x="147" y="12.666666666666664" width="255" height="19"/>
272272
<fontDescription key="fontDescription" type="system" pointSize="14"/>
273-
<textInputTraits key="textInputTraits" textContentType="url"/>
273+
<textInputTraits key="textInputTraits" autocorrectionType="no" keyboardType="URL" textContentType="url"/>
274274
</textField>
275275
</subviews>
276276
<constraints>
@@ -302,7 +302,7 @@
302302
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="/example/relative/path" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="UzT-Bn-Wt9" userLabel="Relative Path Text Field">
303303
<rect key="frame" x="147" y="12.666666666666664" width="255" height="19"/>
304304
<fontDescription key="fontDescription" type="system" pointSize="14"/>
305-
<textInputTraits key="textInputTraits"/>
305+
<textInputTraits key="textInputTraits" autocorrectionType="no" keyboardType="URL" textContentType="url"/>
306306
</textField>
307307
</subviews>
308308
<constraints>
@@ -494,23 +494,23 @@
494494
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
495495
<prototypes>
496496
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="default" id="GwR-nl-DEO" customClass="DefaultTableViewCell" customModule="Deluge_Remote" customModuleProvider="target">
497-
<rect key="frame" x="20" y="55.333332061767578" width="374" height="43.333332061767578"/>
497+
<rect key="frame" x="20" y="55.333332061767578" width="374" height="42.666667938232422"/>
498498
<autoresizingMask key="autoresizingMask"/>
499499
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="GwR-nl-DEO" id="iLg-vO-CXs">
500-
<rect key="frame" x="0.0" y="0.0" width="374" height="43.333332061767578"/>
500+
<rect key="frame" x="0.0" y="0.0" width="374" height="42.666667938232422"/>
501501
<autoresizingMask key="autoresizingMask"/>
502502
<subviews>
503503
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="1Cz-6Z-akb">
504-
<rect key="frame" x="20" y="10.999999999999998" width="334" height="21.333333333333329"/>
504+
<rect key="frame" x="20" y="11.000000000000002" width="334" height="20.666666666666671"/>
505505
<subviews>
506506
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FwW-0d-ykg">
507-
<rect key="frame" x="0.0" y="0.66666666666666607" width="159" height="20.333333333333336"/>
507+
<rect key="frame" x="0.0" y="0.33333333333333393" width="159" height="20.333333333333329"/>
508508
<fontDescription key="fontDescription" type="system" pointSize="17"/>
509509
<nil key="textColor"/>
510510
<nil key="highlightedColor"/>
511511
</label>
512512
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="Detail" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WGn-5W-4iC" customClass="SelectableActiveLabel" customModule="Deluge_Remote" customModuleProvider="target">
513-
<rect key="frame" x="167" y="0.33333333333333393" width="167" height="21"/>
513+
<rect key="frame" x="167" y="0.33333333333333393" width="167" height="20.333333333333329"/>
514514
<fontDescription key="fontDescription" type="system" pointSize="17"/>
515515
<color key="textColor" systemColor="secondaryLabelColor"/>
516516
<nil key="highlightedColor"/>
@@ -536,7 +536,7 @@
536536
</connections>
537537
</tableViewCell>
538538
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="chevronRow" id="6zd-bM-ld4" customClass="ChevronTableViewCell" customModule="Deluge_Remote" customModuleProvider="target">
539-
<rect key="frame" x="20" y="98.666664123535156" width="374" height="42.666667938232422"/>
539+
<rect key="frame" x="20" y="98" width="374" height="42.666667938232422"/>
540540
<autoresizingMask key="autoresizingMask"/>
541541
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="6zd-bM-ld4" id="UwX-Hc-q5F">
542542
<rect key="frame" x="0.0" y="0.0" width="374" height="42.666667938232422"/>
@@ -588,7 +588,7 @@
588588
</connections>
589589
</tableViewCell>
590590
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="torrentPeerTableViewCell" id="dvJ-4z-Spy" customClass="TorrentPeerTableViewCell" customModule="Deluge_Remote" customModuleProvider="target">
591-
<rect key="frame" x="20" y="141.33333206176758" width="374" height="80"/>
591+
<rect key="frame" x="20" y="140.66666793823242" width="374" height="80"/>
592592
<autoresizingMask key="autoresizingMask"/>
593593
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="dvJ-4z-Spy" id="Pyd-uZ-CPK">
594594
<rect key="frame" x="0.0" y="0.0" width="374" height="80"/>
@@ -868,11 +868,6 @@
868868
<point key="canvasLocation" x="4037.68115942029" y="638.83928571428567"/>
869869
</scene>
870870
</scenes>
871-
<designables>
872-
<designable name="WGn-5W-4iC">
873-
<size key="intrinsicContentSize" width="44" height="21"/>
874-
</designable>
875-
</designables>
876871
<resources>
877872
<image name="chevron.down" catalog="system" width="128" height="72"/>
878873
<image name="chevron.right" catalog="system" width="96" height="128"/>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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>CLIENT_ID</key>
6+
<string>366803721705-tpao2r7j5bc6hjhethh2en55gcd4dego.apps.googleusercontent.com</string>
7+
<key>REVERSED_CLIENT_ID</key>
8+
<string>com.googleusercontent.apps.366803721705-tpao2r7j5bc6hjhethh2en55gcd4dego</string>
9+
<key>API_KEY</key>
10+
<string>AIzaSyBY9pXCh3f50pFA3Nhplee5O9GXSgBPPc8</string>
11+
<key>GCM_SENDER_ID</key>
12+
<string>366803721705</string>
13+
<key>PLIST_VERSION</key>
14+
<string>1</string>
15+
<key>BUNDLE_ID</key>
16+
<string>io.rudybermudez.Deluge-Remote</string>
17+
<key>PROJECT_ID</key>
18+
<string>deluge-remote</string>
19+
<key>STORAGE_BUCKET</key>
20+
<string>deluge-remote.appspot.com</string>
21+
<key>IS_ADS_ENABLED</key>
22+
<false></false>
23+
<key>IS_ANALYTICS_ENABLED</key>
24+
<false></false>
25+
<key>IS_APPINVITE_ENABLED</key>
26+
<true></true>
27+
<key>IS_GCM_ENABLED</key>
28+
<true></true>
29+
<key>IS_SIGNIN_ENABLED</key>
30+
<true></true>
31+
<key>GOOGLE_APP_ID</key>
32+
<string>1:366803721705:ios:11c61beefa12a39deeff78</string>
33+
</dict>
34+
</plist>

0 commit comments

Comments
 (0)