Skip to content

Commit 871fcf3

Browse files
committed
Changed from scheme-based logic to sandbox URL check
1 parent e5bb989 commit 871fcf3

5 files changed

Lines changed: 31 additions & 12 deletions

File tree

Siri/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.2</string>
20+
<string>1.2.2</string>
2121
<key>CFBundleVersion</key>
22-
<string>67</string>
22+
<string>68</string>
2323
<key>NSExtension</key>
2424
<dict>
2525
<key>NSExtensionAttributes</key>

TCAT.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
BF8460AD2172B0F80027FB62 /* SFUIText-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = BF8460A92172B0F70027FB62 /* SFUIText-Medium.otf */; };
5555
BF8460AE2172B0F80027FB62 /* SFUIText-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = BF8460AA2172B0F80027FB62 /* SFUIText-Bold.otf */; };
5656
BF8460AF2172B0F80027FB62 /* SFUIText-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = BF8460AB2172B0F80027FB62 /* SFUIText-Regular.otf */; };
57+
BF8AF5F32206BBF60091AB8C /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF8AF5F22206BBF60091AB8C /* Utilities.swift */; };
5758
BFA53FEE1FD45D7000E770DF /* RouteDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFA53FED1FD45D7000E770DF /* RouteDetailViewController.swift */; };
5859
BFB86A07205C614C000794B2 /* OnboardingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFB86A06205C614C000794B2 /* OnboardingViewController.swift */; };
5960
BFC367F321B66E9A00ABD9AC /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = BFC367F621B66E9A00ABD9AC /* Intents.intentdefinition */; };
@@ -198,6 +199,7 @@
198199
BF8460A92172B0F70027FB62 /* SFUIText-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "SFUIText-Medium.otf"; path = "Supporting Files/Fonts/SFUIText-Medium.otf"; sourceTree = "<group>"; };
199200
BF8460AA2172B0F80027FB62 /* SFUIText-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "SFUIText-Bold.otf"; path = "Supporting Files/Fonts/SFUIText-Bold.otf"; sourceTree = "<group>"; };
200201
BF8460AB2172B0F80027FB62 /* SFUIText-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "SFUIText-Regular.otf"; path = "Supporting Files/Fonts/SFUIText-Regular.otf"; sourceTree = "<group>"; };
202+
BF8AF5F22206BBF60091AB8C /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Utilities.swift; path = Utilities/Utilities.swift; sourceTree = "<group>"; };
201203
BFA53FED1FD45D7000E770DF /* RouteDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RouteDetailViewController.swift; path = Controllers/RouteDetailViewController.swift; sourceTree = "<group>"; };
202204
BFB86A06205C614C000794B2 /* OnboardingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OnboardingViewController.swift; path = Controllers/OnboardingViewController.swift; sourceTree = "<group>"; };
203205
BFC367F521B66E9A00ABD9AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/Intents.intentdefinition; sourceTree = "<group>"; };
@@ -315,6 +317,7 @@
315317
isa = PBXGroup;
316318
children = (
317319
2292486721B891A30004279C /* Endpoints.swift */,
320+
BF8AF5F22206BBF60091AB8C /* Utilities.swift */,
318321
2292486821B891A30004279C /* Models.swift */,
319322
DD3D9C201F94297100B164D4 /* Reachability.swift */,
320323
);
@@ -877,6 +880,7 @@
877880
DDB49C9D1E8857FC00A99C35 /* BusPath.swift in Sources */,
878881
DD659C8A20508E1B00506BAC /* WalkWithDistanceIcon.swift in Sources */,
879882
DD36A7001F66378C00E4789E /* PlaceResult.swift in Sources */,
883+
BF8AF5F32206BBF60091AB8C /* Utilities.swift in Sources */,
880884
BF73F0F31F60B0BD003B479D /* LocationObject.swift in Sources */,
881885
BFF41EB2204365E800E0696B /* SummaryView.swift in Sources */,
882886
DDB49CA21E88584B00A99C35 /* DetailIconView.swift in Sources */,

TCAT/Supporting Files/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.2</string>
20+
<string>1.2.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>
@@ -32,7 +32,7 @@
3232
</dict>
3333
</array>
3434
<key>CFBundleVersion</key>
35-
<string>67</string>
35+
<string>68</string>
3636
<key>ITSAppUsesNonExemptEncryption</key>
3737
<false/>
3838
<key>LSApplicationQueriesSchemes</key>

TCAT/Utilities/Endpoints.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,26 @@ class Network {
4242

4343
/// Network IP address being used for specified networkType
4444
static var ipAddress: String {
45-
#if DEBUG
46-
return debugIPAddress
47-
#else
45+
if isTestFlight() {
46+
return debugIPAddress
47+
}
4848
switch networkType {
4949
case .local: return localIPAddress
5050
case .debug: return debugIPAddress
5151
case .release: return releaseIPAddress
5252
}
53-
#endif
5453
}
5554

5655
/// Network source currently being used
5756
static var address: String {
58-
#if DEBUG
59-
return debugSource
60-
#else
57+
if isTestFlight() {
58+
return debugSource
59+
}
6160
switch networkType {
6261
case .local: return localSource
6362
case .debug: return debugSource
6463
case .release: return releaseSource
6564
}
66-
#endif
6765
}
6866

6967
static let tron = TRON(baseURL: Network.address)

TCAT/Utilities/Utilities.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// Network+Utilities.swift
3+
// TCAT
4+
//
5+
// Created by Matt Barker on 2/3/19.
6+
// Copyright © 2019 cuappdev. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
func isTestFlight() -> Bool {
12+
let sandboxString = "sandboxReceipt"
13+
guard let appStoreReceiptURL = Bundle.main.appStoreReceiptURL else {
14+
return false
15+
}
16+
return appStoreReceiptURL.lastPathComponent == sandboxString
17+
}

0 commit comments

Comments
 (0)