diff --git a/ios/HackerNews.xcodeproj/project.pbxproj b/ios/HackerNews.xcodeproj/project.pbxproj index 87b42f0e..72771900 100644 --- a/ios/HackerNews.xcodeproj/project.pbxproj +++ b/ios/HackerNews.xcodeproj/project.pbxproj @@ -33,10 +33,10 @@ A495B2952BFEA11B00A8A8A9 /* Reaper in Frameworks */ = {isa = PBXBuildFile; productRef = A495B2942BFEA11B00A8A8A9 /* Reaper */; }; A49933942AA28B5900DED8B1 /* StoryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A48C0DE92A9819E00034CC0A /* StoryViewModel.swift */; }; A49933952AA28B6500DED8B1 /* StoryScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A48C0DE62A9818A50034CC0A /* StoryScreen.swift */; }; - A4BED5BC2ACE178C001642B3 /* SnapshottingTests in Frameworks */ = {isa = PBXBuildFile; productRef = A4BED5BB2ACE178C001642B3 /* SnapshottingTests */; }; - A4BED5BE2ACE17B3001642B3 /* Snapshotting in Frameworks */ = {isa = PBXBuildFile; productRef = A4BED5BD2ACE17B3001642B3 /* Snapshotting */; }; A4BED5C32AD5E083001642B3 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; A4BED5C42AD5E083001642B3 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + A4D28AEE2C237E2A007F20D0 /* SnapshotPreferences in Frameworks */ = {isa = PBXBuildFile; productRef = A4D28AED2C237E2A007F20D0 /* SnapshotPreferences */; }; + A4D28AF02C237E2A007F20D0 /* SnapshottingTests in Frameworks */ = {isa = PBXBuildFile; productRef = A4D28AEF2C237E2A007F20D0 /* SnapshottingTests */; }; A9DF68FF511E48048B0A703D /* Sentry in Frameworks */ = {isa = PBXBuildFile; productRef = 673236B0A4D04137A0D80A76 /* Sentry */; }; /* End PBXBuildFile section */ @@ -57,6 +57,19 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + A4D28AE92C237BAE007F20D0 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 1DF161F92A4346F6001A3F76 /* StoryRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryRow.swift; sourceTree = ""; }; 1DF161FF2A4365A1001A3F76 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; @@ -124,6 +137,7 @@ buildActionMask = 2147483647; files = ( A47309B42AA29D9600201376 /* SwiftSoup in Frameworks */, + A4D28AEE2C237E2A007F20D0 /* SnapshotPreferences in Frameworks */, A495B2952BFEA11B00A8A8A9 /* Reaper in Frameworks */, A9DF68FF511E48048B0A703D /* Sentry in Frameworks */, ); @@ -141,8 +155,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A4BED5BE2ACE17B3001642B3 /* Snapshotting in Frameworks */, - A4BED5BC2ACE178C001642B3 /* SnapshottingTests in Frameworks */, + A4D28AF02C237E2A007F20D0 /* SnapshottingTests in Frameworks */, A4BED5C42AD5E083001642B3 /* (null) in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -354,6 +367,7 @@ A42705772A4293B10057E439 /* Resources */, A42705AE2A44C35D0057E439 /* Strip Symbols */, F52059CED4FD476981550295 /* Upload Debug Symbols to Sentry */, + A4D28AE92C237BAE007F20D0 /* Embed Frameworks */, ); buildRules = ( ); @@ -364,6 +378,7 @@ A47309B32AA29D9600201376 /* SwiftSoup */, 673236B0A4D04137A0D80A76 /* Sentry */, A495B2942BFEA11B00A8A8A9 /* Reaper */, + A4D28AED2C237E2A007F20D0 /* SnapshotPreferences */, ); productName = HackerNews; productReference = A42705792A4293B10057E439 /* HackerNews.app */; @@ -402,8 +417,7 @@ ); name = HackerNewsUITests; packageProductDependencies = ( - A4BED5BB2ACE178C001642B3 /* SnapshottingTests */, - A4BED5BD2ACE17B3001642B3 /* Snapshotting */, + A4D28AEF2C237E2A007F20D0 /* SnapshottingTests */, ); productName = HackerNewsUITests; productReference = A42705932A4293B30057E439 /* HackerNewsUITests.xctest */; @@ -443,9 +457,9 @@ mainGroup = A42705702A4293B10057E439; packageReferences = ( A47309B22AA29D9600201376 /* XCRemoteSwiftPackageReference "SwiftSoup" */, - A4BED5BA2ACE178C001642B3 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */, 995A2BEDEF224F7085D3DB13 /* XCRemoteSwiftPackageReference "sentry-cocoa" */, A495B2932BFEA11B00A8A8A9 /* XCRemoteSwiftPackageReference "Reaper" */, + A4D28AEC2C237E2A007F20D0 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */, ); productRefGroup = A427057A2A4293B10057E439 /* Products */; projectDirPath = ""; @@ -487,6 +501,7 @@ /* Begin PBXShellScriptBuildPhase section */ A42705AE2A44C35D0057E439 /* Strip Symbols */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -502,10 +517,11 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/bash\nset -e\n\nif [ \"Release\" = \"${CONFIGURATION}\" ]; then\n # Path to the app directory\n APP_DIR_PATH=\"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}\"\n # Strip main binary\n strip -rSTx \"${APP_DIR_PATH}/${EXECUTABLE_NAME}\"\n # Path to the Frameworks directory\n APP_FRAMEWORKS_DIR=\"${APP_DIR_PATH}/Frameworks\"\n\n # Strip symbols from frameworks, if Frameworks/ exists at all\n # ... as long as the framework is NOT signed by Apple\n if [ -d \"${APP_FRAMEWORKS_DIR}\" ]\n then\n find \"${APP_FRAMEWORKS_DIR}\" -type f -perm +111 -maxdepth 2 -mindepth 2 -exec bash -c 'codesign -v -R=\"anchor apple\" \"{}\" &> /dev/null || (echo \"{}\" && strip -rSTx \"{}\")' \\;\n fi\nfi\n"; + shellScript = "#!/bin/bash\nset -e\n\nif [ \"Release\" = \"${CONFIGURATION}\" ]; then\n # Path to the app directory\n APP_DIR_PATH=\"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}\"\n # Strip main binary\n strip -rSTx \"${APP_DIR_PATH}/${EXECUTABLE_NAME}\"\n # Path to the Frameworks directory\n APP_FRAMEWORKS_DIR=\"${APP_DIR_PATH}/Frameworks\"\n\n # Strip symbols from frameworks, if Frameworks/ exists at all\n # ... as long as the framework is NOT signed by Apple\n if [ -d \"${APP_FRAMEWORKS_DIR}\" ]\n then\n find \"${APP_FRAMEWORKS_DIR}\" -type f -perm +111 -maxdepth 2 -mindepth 2 -exec bash -c '\n codesign -v -R=\"anchor apple\" \"{}\" &> /dev/null ||\n (\n echo \"Stripping {}\" &&\n if [ -w \"{}\" ]; then\n strip -rSTx \"{}\"\n else\n echo \"Warning: No write permission for {}\"\n fi\n )\n ' \\;\n fi\nfi\n"; }; F52059CED4FD476981550295 /* Upload Debug Symbols to Sentry */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -923,7 +939,7 @@ minimumVersion = 1.3.1; }; }; - A4BED5BA2ACE178C001642B3 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */ = { + A4D28AEC2C237E2A007F20D0 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/EmergeTools/SnapshotPreviews-iOS"; requirement = { @@ -949,15 +965,15 @@ package = A495B2932BFEA11B00A8A8A9 /* XCRemoteSwiftPackageReference "Reaper" */; productName = Reaper; }; - A4BED5BB2ACE178C001642B3 /* SnapshottingTests */ = { + A4D28AED2C237E2A007F20D0 /* SnapshotPreferences */ = { isa = XCSwiftPackageProductDependency; - package = A4BED5BA2ACE178C001642B3 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */; - productName = SnapshottingTests; + package = A4D28AEC2C237E2A007F20D0 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */; + productName = SnapshotPreferences; }; - A4BED5BD2ACE17B3001642B3 /* Snapshotting */ = { + A4D28AEF2C237E2A007F20D0 /* SnapshottingTests */ = { isa = XCSwiftPackageProductDependency; - package = A4BED5BA2ACE178C001642B3 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */; - productName = Snapshotting; + package = A4D28AEC2C237E2A007F20D0 /* XCRemoteSwiftPackageReference "SnapshotPreviews-iOS" */; + productName = SnapshottingTests; }; /* End XCSwiftPackageProductDependency section */ }; diff --git a/ios/HackerNews.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/HackerNews.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a2294841..c5ea50af 100644 --- a/ios/HackerNews.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ios/HackerNews.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,6 +1,24 @@ { "originHash" : "77385174260e5a082870946dcb2ffee0e39ed35c0df6df3e0daa25b2102bf3f8", "pins" : [ + { + "identity" : "accessibilitysnapshot", + "kind" : "remoteSourceControl", + "location" : "https://github.com/EmergeTools/AccessibilitySnapshot.git", + "state" : { + "revision" : "54046d8fa44b9fa9f0e2229526f6ed89cb5e0ec2", + "version" : "1.0.2" + } + }, + { + "identity" : "flyingfox", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swhitty/FlyingFox.git", + "state" : { + "revision" : "ed86fc6d68ec1467aaab3e494b581e66dd7a4512", + "version" : "0.12.2" + } + }, { "identity" : "reaper", "kind" : "remoteSourceControl", @@ -25,7 +43,7 @@ "location" : "https://github.com/EmergeTools/SnapshotPreviews-iOS", "state" : { "branch" : "main", - "revision" : "f22f2f057ff26b6327d74279f9234f1b11822e23" + "revision" : "e5bf73a45a105049a4dacc960011559a78c914b2" } }, { diff --git a/ios/HackerNews/Utils/Previews.swift b/ios/HackerNews/Utils/Previews.swift index 6baa6c1c..fd6a3e97 100644 --- a/ios/HackerNews/Utils/Previews.swift +++ b/ios/HackerNews/Utils/Previews.swift @@ -7,6 +7,7 @@ import Foundation import SwiftUI +import SnapshotPreferences struct PreviewVariants: View { let content: Content @@ -58,6 +59,14 @@ struct PreviewVariants: View { .navigationBarHidden(true) .previewDevice("iPad Air (5th generation)") .previewDisplayName("iPad Air, dark mode") + + self.content + .environment(\.colorScheme, .light) + .preferredColorScheme(.light) + .navigationBarHidden(true) + .previewDevice("iPhone 11 Pro Max") + .previewDisplayName("Accessibility") + .emergeAccessibility(true) } } }