Skip to content

Commit 22836e1

Browse files
committed
Fix deprecation warnings and apply recommended Xcode settings
1 parent 7fdab8a commit 22836e1

7 files changed

Lines changed: 27 additions & 22 deletions

File tree

SwiftRadio.xcodeproj/project.pbxproj

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
CA3A11042D4E000000111002 /* Content.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA3A11032D4E000000111002 /* Content.swift */; };
4949
CA3A11052D4E000000111002 /* Content.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA3A11032D4E000000111002 /* Content.swift */; };
5050
CA58087D2D40BAC000F8082B /* CarPlaySceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA58087B2D40BAC000F8082B /* CarPlaySceneDelegate.swift */; };
51-
CA58087E2D40C11300F8082B /* Info-CarPlay.plist in Resources */ = {isa = PBXBuildFile; fileRef = CEA82F492921F260009E9FA0 /* Info-CarPlay.plist */; };
51+
CA5F00022F40A00000000002 /* GradientBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA5F00012F40A00000000001 /* GradientBackgroundView.swift */; };
52+
CA5F00032F40A00000000003 /* GradientBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA5F00012F40A00000000001 /* GradientBackgroundView.swift */; };
5253
CA900001200000000000000A /* MarqueeLabel in Frameworks */ = {isa = PBXBuildFile; productRef = CA900002200000000000000A /* MarqueeLabel */; };
5354
CAB4E8292D3D7DC7001282E9 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAB4E8282D3D7DC7001282E9 /* SceneDelegate.swift */; };
5455
CAB4E82A2D3D7DC7001282E9 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAB4E8282D3D7DC7001282E9 /* SceneDelegate.swift */; };
@@ -102,8 +103,6 @@
102103
CEE9A27C2B535C780018FE68 /* AlbumArtworkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEE9A27A2B535C780018FE68 /* AlbumArtworkView.swift */; };
103104
CEE9A27E2B54A5520018FE68 /* ControlsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEE9A27D2B54A5520018FE68 /* ControlsView.swift */; };
104105
CEE9A27F2B54A5520018FE68 /* ControlsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEE9A27D2B54A5520018FE68 /* ControlsView.swift */; };
105-
CA5F00022F40A00000000002 /* GradientBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA5F00012F40A00000000001 /* GradientBackgroundView.swift */; };
106-
CA5F00032F40A00000000003 /* GradientBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA5F00012F40A00000000001 /* GradientBackgroundView.swift */; };
107106
/* End PBXBuildFile section */
108107

109108
/* Begin PBXContainerItemProxy section */
@@ -171,6 +170,7 @@
171170
CA3A11002D4E000000111001 /* InfoSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoSection.swift; sourceTree = "<group>"; };
172171
CA3A11032D4E000000111002 /* Content.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Content.swift; sourceTree = "<group>"; };
173172
CA58087B2D40BAC000F8082B /* CarPlaySceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarPlaySceneDelegate.swift; sourceTree = "<group>"; };
173+
CA5F00012F40A00000000001 /* GradientBackgroundView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientBackgroundView.swift; sourceTree = "<group>"; };
174174
CAB4E8282D3D7DC7001282E9 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
175175
CE0A4994291F3A220071C0CC /* SwiftRadio.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SwiftRadio.entitlements; sourceTree = "<group>"; };
176176
CE321FF229371140001572BD /* Bundle+appName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+appName.swift"; sourceTree = "<group>"; };
@@ -191,7 +191,6 @@
191191
CEE9A2772B5345C30018FE68 /* NowPlayingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NowPlayingViewController.swift; sourceTree = "<group>"; };
192192
CEE9A27A2B535C780018FE68 /* AlbumArtworkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlbumArtworkView.swift; sourceTree = "<group>"; };
193193
CEE9A27D2B54A5520018FE68 /* ControlsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ControlsView.swift; sourceTree = "<group>"; };
194-
CA5F00012F40A00000000001 /* GradientBackgroundView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientBackgroundView.swift; sourceTree = "<group>"; };
195194
/* End PBXFileReference section */
196195

197196
/* Begin PBXFrameworksBuildPhase section */
@@ -490,9 +489,10 @@
490489
9409E10E1ABF6FE900312E2B /* Project object */ = {
491490
isa = PBXProject;
492491
attributes = {
492+
BuildIndependentTargetsInParallel = YES;
493493
LastSwiftMigration = 0700;
494494
LastSwiftUpdateCheck = 0710;
495-
LastUpgradeCheck = 1400;
495+
LastUpgradeCheck = 2620;
496496
ORGANIZATIONNAME = matthewfecher.com;
497497
TargetAttributes = {
498498
2C5545B91C1124DE00728469 = {
@@ -560,7 +560,6 @@
560560
isa = PBXResourcesBuildPhase;
561561
buildActionMask = 2147483647;
562562
files = (
563-
CA58087E2D40C11300F8082B /* Info-CarPlay.plist in Resources */,
564563
CE6A3E46291F376D0058C82A /* stations.json in Resources */,
565564
CE6A3E47291F376D0058C82A /* NothingFoundCell.xib in Resources */,
566565
CE6A3E48291F376D0058C82A /* LogoShareView.xib in Resources */,
@@ -723,6 +722,7 @@
723722
isa = XCBuildConfiguration;
724723
buildSettings = {
725724
ALWAYS_SEARCH_USER_PATHS = NO;
725+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
726726
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
727727
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
728728
CLANG_CXX_LIBRARY = "libc++";
@@ -752,6 +752,7 @@
752752
COPY_PHASE_STRIP = NO;
753753
ENABLE_STRICT_OBJC_MSGSEND = YES;
754754
ENABLE_TESTABILITY = YES;
755+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
755756
GCC_C_LANGUAGE_STANDARD = gnu99;
756757
GCC_DYNAMIC_NO_PIC = NO;
757758
GCC_NO_COMMON_BLOCKS = YES;
@@ -771,6 +772,7 @@
771772
MTL_ENABLE_DEBUG_INFO = YES;
772773
ONLY_ACTIVE_ARCH = YES;
773774
SDKROOT = iphoneos;
775+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
774776
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
775777
};
776778
name = Debug;
@@ -779,6 +781,7 @@
779781
isa = XCBuildConfiguration;
780782
buildSettings = {
781783
ALWAYS_SEARCH_USER_PATHS = NO;
784+
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
782785
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
783786
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
784787
CLANG_CXX_LIBRARY = "libc++";
@@ -808,6 +811,7 @@
808811
COPY_PHASE_STRIP = NO;
809812
ENABLE_NS_ASSERTIONS = NO;
810813
ENABLE_STRICT_OBJC_MSGSEND = YES;
814+
ENABLE_USER_SCRIPT_SANDBOXING = YES;
811815
GCC_C_LANGUAGE_STANDARD = gnu99;
812816
GCC_NO_COMMON_BLOCKS = YES;
813817
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -819,6 +823,7 @@
819823
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
820824
MTL_ENABLE_DEBUG_INFO = NO;
821825
SDKROOT = iphoneos;
826+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
822827
SWIFT_COMPILATION_MODE = wholemodule;
823828
SWIFT_OPTIMIZATION_LEVEL = "-O";
824829
VALIDATE_PRODUCT = YES;
@@ -834,6 +839,7 @@
834839
CURRENT_PROJECT_VERSION = 6;
835840
DEFINES_MODULE = YES;
836841
DEVELOPMENT_TEAM = 6G96AERJ7Q;
842+
ENABLE_MODULE_VERIFIER = YES;
837843
FRAMEWORK_SEARCH_PATHS = (
838844
"$(inherited)",
839845
"$(PROJECT_DIR)/SwiftRadio",
@@ -845,6 +851,7 @@
845851
"@executable_path/Frameworks",
846852
);
847853
MARKETING_VERSION = 2.0.8;
854+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
848855
PRODUCT_BUNDLE_IDENTIFIER = com.matthewfecher.SwiftRadio;
849856
PRODUCT_NAME = SwiftRadio;
850857
PROVISIONING_PROFILE = "";
@@ -864,6 +871,7 @@
864871
CURRENT_PROJECT_VERSION = 6;
865872
DEFINES_MODULE = YES;
866873
DEVELOPMENT_TEAM = 6G96AERJ7Q;
874+
ENABLE_MODULE_VERIFIER = YES;
867875
FRAMEWORK_SEARCH_PATHS = (
868876
"$(inherited)",
869877
"$(PROJECT_DIR)/SwiftRadio",
@@ -875,6 +883,7 @@
875883
"@executable_path/Frameworks",
876884
);
877885
MARKETING_VERSION = 2.0.8;
886+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
878887
PRODUCT_BUNDLE_IDENTIFIER = com.matthewfecher.SwiftRadio;
879888
PRODUCT_NAME = SwiftRadio;
880889
PROVISIONING_PROFILE = "";
@@ -897,6 +906,7 @@
897906
DEFINES_MODULE = YES;
898907
DEVELOPMENT_TEAM = "";
899908
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6G96AERJ7Q;
909+
ENABLE_MODULE_VERIFIER = YES;
900910
FRAMEWORK_SEARCH_PATHS = (
901911
"$(inherited)",
902912
"$(PROJECT_DIR)/SwiftRadio",
@@ -908,6 +918,7 @@
908918
"@executable_path/Frameworks",
909919
);
910920
MARKETING_VERSION = 2.0.8;
921+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
911922
OTHER_SWIFT_FLAGS = "-D CarPlay";
912923
PRODUCT_BUNDLE_IDENTIFIER = com.fethica.SwiftRadio;
913924
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -932,6 +943,7 @@
932943
DEFINES_MODULE = YES;
933944
DEVELOPMENT_TEAM = "";
934945
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6G96AERJ7Q;
946+
ENABLE_MODULE_VERIFIER = YES;
935947
FRAMEWORK_SEARCH_PATHS = (
936948
"$(inherited)",
937949
"$(PROJECT_DIR)/SwiftRadio",
@@ -943,6 +955,7 @@
943955
"@executable_path/Frameworks",
944956
);
945957
MARKETING_VERSION = 2.0.8;
958+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
946959
OTHER_SWIFT_FLAGS = "-D CarPlay";
947960
PRODUCT_BUNDLE_IDENTIFIER = com.fethica.SwiftRadio;
948961
PRODUCT_NAME = "$(TARGET_NAME)";

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

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

SwiftRadio.xcodeproj/xcshareddata/xcschemes/SwiftRadio.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1400"
3+
LastUpgradeVersion = "2620"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

SwiftRadio/Coordinators/MainCoordinator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MainCoordinator: NavigationCoordinator {
4141
navigationController.popupBar.tintColor = Config.tintColor
4242
navigationController.popupBar.progressViewStyle = .bottom
4343
navigationController.popupContentView.popupCloseButtonStyle = .chevron
44-
navigationController.presentPopupBar(withContentViewController: nowPlayingViewController, animated: true)
44+
navigationController.presentPopupBar(with: nowPlayingViewController, animated: true)
4545
isPopupBarPresented = true
4646
}
4747

SwiftRadio/Model/StationsManager.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,12 @@ extension StationsManager: FRadioPlayerObserver {
204204
}
205205

206206
Task { [weak self] in
207+
guard let self else { return }
207208
guard let image = await NetworkService.fetchImage(from: artworkURL) else {
208-
await MainActor.run { self?.resetArtwork(with: self?.currentStation) }
209+
await MainActor.run { self.resetArtwork(with: self.currentStation) }
209210
return
210211
}
211-
await MainActor.run { self?.updateLockScreen(with: image) }
212+
await MainActor.run { self.updateLockScreen(with: image) }
212213
}
213214
}
214215
}

SwiftRadio/Services/AudioSetupService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class AudioSetupService {
2121
func setupAudioSession() {
2222
do {
2323
let session = AVAudioSession.sharedInstance()
24-
try session.setCategory(.playback, mode: .default, options: [.mixWithOthers, .allowBluetooth])
24+
try session.setCategory(.playback, mode: .default, options: [.mixWithOthers, .allowBluetoothHFP])
2525
try session.setActive(true)
2626
} catch {
2727
if Config.debugLog {

SwiftRadio/ViewControllers/LoaderController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class LoaderController: BaseController {
1919
private let manager = StationsManager.shared
2020

2121
private let activityIndicatorView: UIActivityIndicatorView = {
22-
let view = UIActivityIndicatorView(style: .white)
22+
let view = UIActivityIndicatorView(style: .medium)
2323
view.translatesAutoresizingMaskIntoConstraints = false
2424
return view
2525
}()

0 commit comments

Comments
 (0)