diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/SRGAppearance.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/SRGAppearance.xcscheme index 89350f6..4db2e1d 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/SRGAppearance.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/SRGAppearance.xcscheme @@ -1,6 +1,6 @@ UIUserInterfaceStyle Automatic + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default + UISceneDelegateClassName + SceneDelegate + + + + diff --git a/Demo/SRGAppearance-demo.xcodeproj/project.pbxproj b/Demo/SRGAppearance-demo.xcodeproj/project.pbxproj index 1ca6dd5..cb3d04c 100644 --- a/Demo/SRGAppearance-demo.xcodeproj/project.pbxproj +++ b/Demo/SRGAppearance-demo.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 6F052B5326DFAE3800855BB0 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F052B5226DFAE3700855BB0 /* SceneDelegate.m */; }; 6F0EE5882316B40500328674 /* Resources.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0EE5872316B40500328674 /* Resources.m */; }; 6F9453D5223FF5890039974F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6F9453D4223FF5890039974F /* Images.xcassets */; }; 6FC82AD424C5AA4100459101 /* SRGAppearance in Frameworks */ = {isa = PBXBuildFile; productRef = 6FC82AD324C5AA4100459101 /* SRGAppearance */; }; @@ -21,6 +22,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6F052B5126DFAE3700855BB0 /* SceneDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; + 6F052B5226DFAE3700855BB0 /* SceneDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; 6F0EE5822316AE8B00328674 /* Demo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Demo.xcconfig; sourceTree = ""; }; 6F0EE5862316B40500328674 /* Resources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Resources.h; sourceTree = ""; }; 6F0EE5872316B40500328674 /* Resources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Resources.m; sourceTree = ""; }; @@ -108,6 +111,8 @@ 6FE08CBD1E8A86FB00EC4716 /* AppDelegate.h */, 6FE08CBE1E8A86FB00EC4716 /* AppDelegate.m */, 6FE08CBF1E8A86FB00EC4716 /* main.m */, + 6F052B5126DFAE3700855BB0 /* SceneDelegate.h */, + 6F052B5226DFAE3700855BB0 /* SceneDelegate.m */, ); path = Application; sourceTree = ""; @@ -165,7 +170,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = SRG; - LastUpgradeCheck = 1250; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "SRG SSR"; TargetAttributes = { 6FE08C5E1E8A865800EC4716 = { @@ -215,6 +220,7 @@ 6FE08CC61E8A877200EC4716 /* FontsViewController.m in Sources */, 6FE48649260B515C00671546 /* PlaygroundView.swift in Sources */, 6F0EE5882316B40500328674 /* Resources.m in Sources */, + 6F052B5326DFAE3800855BB0 /* SceneDelegate.m in Sources */, 6FE08CC31E8A86FB00EC4716 /* main.m in Sources */, 6FE48639260B292E00671546 /* PlaygroundViewController~ios.m in Sources */, 6FE08CC21E8A86FB00EC4716 /* AppDelegate.m in Sources */, diff --git a/Demo/SRGAppearance-demo.xcodeproj/xcshareddata/xcschemes/SRGAppearance-demo.xcscheme b/Demo/SRGAppearance-demo.xcodeproj/xcshareddata/xcschemes/SRGAppearance-demo.xcscheme index 4e952eb..2dbce9a 100644 --- a/Demo/SRGAppearance-demo.xcodeproj/xcshareddata/xcschemes/SRGAppearance-demo.xcscheme +++ b/Demo/SRGAppearance-demo.xcodeproj/xcshareddata/xcschemes/SRGAppearance-demo.xcscheme @@ -1,6 +1,6 @@ + +@property (nonatomic) UIWindow *window; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Demo/Sources/Application/SceneDelegate.m b/Demo/Sources/Application/SceneDelegate.m new file mode 100644 index 0000000..e90c4d9 --- /dev/null +++ b/Demo/Sources/Application/SceneDelegate.m @@ -0,0 +1,25 @@ +// +// Copyright (c) SRG SSR. All rights reserved. +// +// License information is available from the LICENSE file. +// + +#import "SceneDelegate.h" + +#import "FontsViewController.h" + +@implementation SceneDelegate + +- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions +{ + if ([scene isKindOfClass:UIWindowScene.class]) { + UIWindowScene *windowScene = (UIWindowScene *)scene; + self.window = [[UIWindow alloc] initWithWindowScene:windowScene]; + [self.window makeKeyAndVisible]; + + FontsViewController *fontsViewController = [[FontsViewController alloc] init]; + self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:fontsViewController]; + } +} + +@end diff --git a/Demo/Sources/Fonts/PlaygroundView.swift b/Demo/Sources/Fonts/PlaygroundView.swift index 4de0a66..344ee9f 100644 --- a/Demo/Sources/Fonts/PlaygroundView.swift +++ b/Demo/Sources/Fonts/PlaygroundView.swift @@ -13,7 +13,7 @@ import SwiftUI class PlaygroundHostViewController: UIViewController { override func loadView() { let view = UIView(frame: UIScreen.main.bounds) - view.backgroundColor = .white + view.backgroundColor = .systemBackground self.view = view } @@ -31,7 +31,7 @@ class PlaygroundHostViewController: UIViewController { hostView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor), hostView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), hostView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), - hostView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor) + hostView.bottomAnchor.constraint(equalTo: view.bottomAnchor) ]) } diff --git a/Gemfile.lock b/Gemfile.lock index c49ddfb..a835d13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,61 +2,74 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (3.0.3) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) artifactory (3.0.15) atomos (0.1.3) - aws-eventstream (1.1.0) - aws-partitions (1.422.0) - aws-sdk-core (3.111.2) + aws-eventstream (1.2.0) + aws-partitions (1.502.0) + aws-sdk-core (3.121.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.41.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-kms (1.48.0) + aws-sdk-core (~> 3, >= 3.120.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.87.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-s3 (1.103.0) + aws-sdk-core (~> 3, >= 3.120.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.2) + aws-sigv4 (~> 1.4) + aws-sigv4 (1.4.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.0.3) colored (1.2) colored2 (3.1.2) - commander-fastlane (4.4.6) - highline (~> 1.7.2) + commander (4.6.0) + highline (~> 2.0.0) declarative (0.0.20) - declarative-option (0.1.0) - digest-crc (0.6.3) + digest-crc (0.6.4) rake (>= 12.0.0, < 14.0.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) - emoji_regex (3.2.1) - excon (0.78.1) - faraday (1.3.0) + emoji_regex (3.2.2) + excon (0.85.0) + faraday (1.7.2) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) faraday-net_http (1.0.1) - faraday_middleware (1.0.0) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday_middleware (1.1.0) faraday (~> 1.0) - fastimage (2.2.1) - fastlane (2.172.0) + fastimage (2.2.5) + fastlane (2.194.0) CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) + addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) colored - commander-fastlane (>= 4.4.6, < 5.0.0) + commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) @@ -65,18 +78,20 @@ GEM faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) - google-api-client (>= 0.37.0, < 0.39.0) - google-cloud-storage (>= 1.15.0, < 2.0.0) - highline (>= 1.7.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) multipart-post (~> 2.0.0) + naturally (~> 2.2) + optparse (~> 0.1.1) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) simctl (~> 1.6.3) - slack-notifier (>= 2.0.0, < 3.0.0) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (>= 1.4.5, < 2.0.0) tty-screen (>= 0.6.3, < 1.0.0) @@ -88,89 +103,85 @@ GEM fastlane-plugin-trainer (0.4.1) trainer (>= 0.7.0) gh_inspector (1.1.3) - google-api-client (0.38.0) - addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) - httpclient (>= 2.8.1, < 3.0) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.0) - signet (~> 0.12) - google-apis-core (0.2.1) + google-apis-androidpublisher_v3 (0.11.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.1) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.14) - httpclient (>= 2.8.1, < 3.0) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) mini_mime (~> 1.0) representable (~> 3.0) - retriable (>= 2.0, < 4.0) + retriable (>= 2.0, < 4.a) rexml - signet (~> 0.14) webrick - google-apis-iamcredentials_v1 (0.1.0) - google-apis-core (~> 0.1) - google-apis-storage_v1 (0.1.0) - google-apis-core (~> 0.1) - google-cloud-core (1.5.0) + google-apis-iamcredentials_v1 (0.7.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-playcustomapp_v1 (0.5.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.6.0) + google-apis-core (>= 0.4, < 2.a) + google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.4.0) + google-cloud-env (1.5.0) faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.0.1) - google-cloud-storage (1.30.0) + google-cloud-errors (1.1.0) + google-cloud-storage (1.34.1) addressable (~> 2.5) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) google-apis-storage_v1 (~> 0.1) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (0.15.0) + googleauth (0.17.1) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.14) - highline (1.7.10) - http-cookie (1.0.3) + signet (~> 0.15) + highline (2.0.3) + http-cookie (1.0.4) domain_name (~> 0.5) httpclient (2.8.3) jmespath (1.4.0) json (2.5.1) - jwt (2.2.2) + jwt (2.2.3) memoist (0.16.2) mini_magick (4.11.0) - mini_mime (1.0.2) + mini_mime (1.1.1) multi_json (1.15.0) multipart-post (2.0.0) nanaimo (0.3.0) naturally (2.2.1) + optparse (0.1.1) os (1.1.1) plist (3.6.0) public_suffix (4.0.6) - rake (13.0.3) - representable (3.0.4) + rake (13.0.6) + representable (3.1.1) declarative (< 0.1.0) - declarative-option (< 0.2.0) + trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.4) + rexml (3.2.5) rouge (2.0.7) - ruby2_keywords (0.0.4) - rubyzip (2.3.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) security (0.1.3) - signet (0.14.1) - addressable (~> 2.3) + signet (0.16.0) + addressable (~> 2.8) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) simctl (1.6.8) CFPropertyList naturally - slack-notifier (2.3.2) terminal-notifier (2.0.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) + trailblazer-option (0.1.1) trainer (0.9.1) fastlane (>= 2.25.0) plist (>= 3.1.0, < 4.0.0) @@ -181,19 +192,20 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.7.0) + unf_ext (0.0.8) + unicode-display_width (1.8.0) webrick (1.7.0) word_wrap (1.0.0) - xcode-install (2.6.6) + xcode-install (2.8.0) claide (>= 0.9.1, < 1.1.0) fastlane (>= 2.1.0, < 3.0.0) - xcodeproj (1.19.0) + xcodeproj (1.21.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) + rexml (~> 3.2.4) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) diff --git a/Package.swift b/Package.swift index 7cffb49..aced7fd 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ import PackageDescription struct ProjectSettings { - static let marketingVersion: String = "4.0.0" + static let marketingVersion: String = "4.0.1" } let package = Package( diff --git a/Sources/SRGAppearance/SRGFontMetrics.h b/Sources/SRGAppearance/SRGFontMetrics.h index 4a2ce16..371014e 100644 --- a/Sources/SRGAppearance/SRGFontMetrics.h +++ b/Sources/SRGAppearance/SRGFontMetrics.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN /** - * Font metrics applying behavior matching SRG SSR font styles (scaling behavior for accessibility, maximum + * Font metrics applying behavior matching SRG SSR font styles (scaling behavior for accessibility with maximum * value). */ @interface SRGFontMetrics : UIFontMetrics @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN + (SRGFontMetrics *)metricsForFontStyle:(SRGFontStyle *)style; /** - * Initialies metrics for an SRG font style. + * Initializes metrics for an SRG font style. */ - (instancetype)initForFontStyle:(SRGFontStyle)style; diff --git a/Sources/SRGAppearanceSwiftTests/FontsTestCase.swift b/Sources/SRGAppearanceSwiftTests/FontsTestCase.swift index 1d140a1..9abb9f3 100644 --- a/Sources/SRGAppearanceSwiftTests/FontsTestCase.swift +++ b/Sources/SRGAppearanceSwiftTests/FontsTestCase.swift @@ -9,7 +9,7 @@ import XCTest class FontsTestCase: XCTestCase { func testFontsWithStyle() { - XCTAssertTrue(SRGFont.font(.body).fontName == "SRGSSRTypeTextVFApp-Medium") + XCTAssertTrue(SRGFont.font(.body).fontName.contains("SRGSSRType")) } func testFontsWithWeightSizeRelativeToTextStyle() { diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 5acc0ce..76cb279 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -17,7 +17,7 @@ platform :ios do before_all do ensure_git_status_clean - xcversion(version: '~> 12') + xcversion(version: '~> 13') end desc 'Run library tests' diff --git a/fastlane/README.md b/fastlane/README.md index d2d323b..45a7da7 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -24,6 +24,6 @@ Run library tests ---- -This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).