Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated methods over a year old #1181

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions GliaWidgets.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
1A60AF96256675C400E53F53 /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A60AF95256675C400E53F53 /* UIColor+Extensions.swift */; };
1A60AFA325667EA300E53F53 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A60AFA225667EA300E53F53 /* Assets.xcassets */; };
1A60AFAA2566806000E53F53 /* Deprecated.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1A60AFAC2566806000E53F53 /* Deprecated.strings */; };
1A60AFAF256680EF00E53F53 /* L10n.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A60AFAE256680EF00E53F53 /* L10n.swift */; };
1A60AFB22566821B00E53F53 /* Asset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A60AFB12566821B00E53F53 /* Asset.swift */; };
1A60AFB62566825400E53F53 /* ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A60AFB52566825400E53F53 /* ViewModel.swift */; };
1A60AFB9256682AF00E53F53 /* FlowCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A60AFB8256682AF00E53F53 /* FlowCoordinator.swift */; };
Expand Down Expand Up @@ -1181,7 +1180,6 @@
1A60AF95256675C400E53F53 /* UIColor+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extensions.swift"; sourceTree = "<group>"; };
1A60AFA225667EA300E53F53 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1A60AFAB2566806000E53F53 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Deprecated.strings; sourceTree = "<group>"; };
1A60AFAE256680EF00E53F53 /* L10n.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = L10n.swift; sourceTree = "<group>"; };
1A60AFB12566821B00E53F53 /* Asset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Asset.swift; sourceTree = "<group>"; };
1A60AFB52566825400E53F53 /* ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModel.swift; sourceTree = "<group>"; };
1A60AFB8256682AF00E53F53 /* FlowCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlowCoordinator.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2404,7 +2402,6 @@
C08D776128F58A18000461E5 /* ColorType.swift */,
1A205D5B25655CB1003AA3CD /* GliaWidgets.h */,
1A205D5C25655CB1003AA3CD /* Info.plist */,
1A60AFAE256680EF00E53F53 /* L10n.swift */,
31E35AB92A8648E9006EC7FB /* Localization.swift */,
3146C9482AB18AC70047D8CC /* Localization+StringProviding.swift */,
31882C9A2AA21B71009DE4BD /* Localization+Templates.swift */,
Expand Down Expand Up @@ -6204,7 +6201,6 @@
C0175A282A67D470001FACDE /* GvaPersistentButtonStyle.swift in Sources */,
C49A29F22614A85E00819269 /* ChoiceCard.swift in Sources */,
1A0C9A6D25C16EED00815406 /* Theme+Call.swift in Sources */,
1A60AFAF256680EF00E53F53 /* L10n.swift in Sources */,
9A1992DD27D6254800161AAE /* ImageView.Cache.Live.swift in Sources */,
845E2F9B283FCA9000C04D56 /* Theme.Survey.Checkbox.swift in Sources */,
C0D2F07F29A4E59200803B47 /* CallButtonBarStyle.Mock.swift in Sources */,
Expand Down
21 changes: 0 additions & 21 deletions GliaWidgets/Asset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ private let bundleManaging: BundleManaging = .live
// swiftlint:disable superfluous_disable_command
// swiftlint:disable file_length

@available(*, deprecated, renamed: "ImageAsset")
public typealias AssetType = ImageAsset

public struct ImageAsset {
public fileprivate(set) var name: String
Expand Down Expand Up @@ -138,27 +136,9 @@ public enum Asset {
spinner,
]
// swiftlint:enable trailing_comma
@available(*, deprecated, renamed: "allImages")
public static let allValues: [AssetType] = allImages
}
// swiftlint:enable identifier_name line_length nesting type_body_length type_name

public extension Image {
@available(iOS 1.0, tvOS 1.0, watchOS 1.0, *)
@available(OSX, deprecated,
message: "This initializer is unsafe on macOS, please use the ImageAsset.image property")
convenience init!(asset: ImageAsset) {
#if os(iOS) || os(tvOS)
let bundle = bundleManaging.current()
self.init(named: asset.name, in: bundle, compatibleWith: nil)
#elseif os(OSX)
self.init(named: NSImage.Name(asset.name))
#elseif os(watchOS)
self.init(named: asset.name)
#endif
}
}

public extension AssetColorTypeAlias {
@available(iOS 11.0, tvOS 11.0, watchOS 4.0, OSX 10.13, *)
convenience init!(asset: ColorAsset) {
Expand All @@ -172,4 +152,3 @@ public extension AssetColorTypeAlias {
#endif
}
}

Loading
Loading