Skip to content

Commit

Permalink
Create Library-Keychain-iOSTests bundle.
Browse files Browse the repository at this point in the history
This is just so we can test a single file, KeychainTests, in a hosted environment, without affecting the rest of our tests.
  • Loading branch information
amy-at-kickstarter committed Feb 14, 2024
1 parent b8f4473 commit 1d0040b
Show file tree
Hide file tree
Showing 3 changed files with 248 additions and 3 deletions.
223 changes: 220 additions & 3 deletions Kickstarter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,9 @@
E10D06652AD48C9C00470B5C /* FetchBackerProjectsQueryRequestForTests.graphql_test in Resources */ = {isa = PBXBuildFile; fileRef = E10D06642AD48C9C00470B5C /* FetchBackerProjectsQueryRequestForTests.graphql_test */; };
E10F75E82B6937FA00024AD1 /* PKCETest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1EEED2A2B686829009976D9 /* PKCETest.swift */; };
E113BD782B7D1B7700D3A809 /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = E113BD762B7D1B7700D3A809 /* Keychain.swift */; };
E113BD7A2B7D1B8600D3A809 /* KeychainTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E113BD772B7D1B7700D3A809 /* KeychainTests.swift */; };
E113BD842B7D255000D3A809 /* Library_Keychain_iOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E113BD832B7D255000D3A809 /* Library_Keychain_iOSTests.swift */; };
E113BD852B7D255000D3A809 /* Library.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A755113C1C8642B3005355CF /* Library.framework */; platformFilter = ios; };
E113BD8D2B7D255A00D3A809 /* KeychainTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E113BD772B7D1B7700D3A809 /* KeychainTests.swift */; };
E118351F2B75639F007B42E6 /* PaginationExampleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E118351E2B75639F007B42E6 /* PaginationExampleViewModel.swift */; };
E11CFE4B2B6C42CE00497375 /* OAuth.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11CFE492B6C41B400497375 /* OAuth.swift */; };
E170B9112B20E83B001BEDD7 /* MockGraphQLClient+CombineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E170B9102B20E83B001BEDD7 /* MockGraphQLClient+CombineTests.swift */; };
Expand Down Expand Up @@ -1570,6 +1572,20 @@
remoteGlobalIDString = E10BE8CC2B02975C00F73DC9;
remoteInfo = RichPushNotifications;
};
E113BD862B7D255000D3A809 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A7E06C711C5A6EB300EBDCC2 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A755113B1C8642B3005355CF;
remoteInfo = "Library-iOS";
};
E113BD8E2B7D256100D3A809 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A7E06C711C5A6EB300EBDCC2 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A7D1F9441C850B7C000D41D5;
remoteInfo = "Kickstarter-iOS";
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -3091,6 +3107,8 @@
E10D06642AD48C9C00470B5C /* FetchBackerProjectsQueryRequestForTests.graphql_test */ = {isa = PBXFileReference; lastKnownFileType = text; path = FetchBackerProjectsQueryRequestForTests.graphql_test; sourceTree = "<group>"; };
E113BD762B7D1B7700D3A809 /* Keychain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = "<group>"; };
E113BD772B7D1B7700D3A809 /* KeychainTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeychainTests.swift; sourceTree = "<group>"; };
E113BD812B7D255000D3A809 /* Library-Keychain-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Library-Keychain-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
E113BD832B7D255000D3A809 /* Library_Keychain_iOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Library_Keychain_iOSTests.swift; sourceTree = "<group>"; };
E118351E2B75639F007B42E6 /* PaginationExampleViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginationExampleViewModel.swift; sourceTree = "<group>"; };
E11CFE492B6C41B400497375 /* OAuth.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OAuth.swift; sourceTree = "<group>"; };
E11CFE4E2B7162A400497375 /* PaginationExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginationExampleView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3195,6 +3213,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E113BD7E2B7D255000D3A809 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E113BD852B7D255000D3A809 /* Library.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand Down Expand Up @@ -6197,6 +6223,7 @@
children = (
802800561C88F62500141235 /* Configs */,
E10BE8CE2B02975C00F73DC9 /* RichPushNotifications */,
E113BD822B7D255000D3A809 /* Library-Keychain-iOSTests */,
A7E06DBC1C5C027800EBDCC2 /* Frameworks */,
A7D1F9461C850B7C000D41D5 /* Kickstarter-iOS */,
D01587511EEB2DE4006E7684 /* KsApi */,
Expand All @@ -6219,6 +6246,7 @@
D01587501EEB2DE4006E7684 /* KsApi.framework */,
D01587581EEB2DE4006E7684 /* KsApiTests.xctest */,
E10BE8CD2B02975C00F73DC9 /* RichPushNotifications.appex */,
E113BD812B7D255000D3A809 /* Library-Keychain-iOSTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -6922,6 +6950,14 @@
path = RichPushNotifications;
sourceTree = "<group>";
};
E113BD822B7D255000D3A809 /* Library-Keychain-iOSTests */ = {
isa = PBXGroup;
children = (
E113BD832B7D255000D3A809 /* Library_Keychain_iOSTests.swift */,
);
path = "Library-Keychain-iOSTests";
sourceTree = "<group>";
};
E11835202B75799F007B42E6 /* PaginationExample */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -7171,14 +7207,33 @@
productReference = E10BE8CD2B02975C00F73DC9 /* RichPushNotifications.appex */;
productType = "com.apple.product-type.app-extension";
};
E113BD802B7D255000D3A809 /* Library-Keychain-iOSTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = E113BD8C2B7D255000D3A809 /* Build configuration list for PBXNativeTarget "Library-Keychain-iOSTests" */;
buildPhases = (
E113BD7D2B7D255000D3A809 /* Sources */,
E113BD7E2B7D255000D3A809 /* Frameworks */,
E113BD7F2B7D255000D3A809 /* Resources */,
);
buildRules = (
);
dependencies = (
E113BD872B7D255000D3A809 /* PBXTargetDependency */,
E113BD8F2B7D256100D3A809 /* PBXTargetDependency */,
);
name = "Library-Keychain-iOSTests";
productName = "Library-Keychain-iOSTests";
productReference = E113BD812B7D255000D3A809 /* Library-Keychain-iOSTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
A7E06C711C5A6EB300EBDCC2 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1500;
LastSwiftUpdateCheck = 1520;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = Kickstarter;
TargetAttributes = {
Expand Down Expand Up @@ -7228,6 +7283,10 @@
E10BE8CC2B02975C00F73DC9 = {
CreatedOnToolsVersion = 15.0.1;
};
E113BD802B7D255000D3A809 = {
CreatedOnToolsVersion = 15.2;
TestTargetID = A7D1F9441C850B7C000D41D5;
};
};
};
buildConfigurationList = A7E06C741C5A6EB300EBDCC2 /* Build configuration list for PBXProject "Kickstarter" */;
Expand Down Expand Up @@ -7265,6 +7324,7 @@
A7D1F9441C850B7C000D41D5 /* Kickstarter-iOS */,
A755113B1C8642B3005355CF /* Library-iOS */,
A75511441C8642B3005355CF /* Library-iOSTests */,
E113BD802B7D255000D3A809 /* Library-Keychain-iOSTests */,
A7C7959D1C873A870081977F /* Kickstarter-Framework-iOS */,
A7D1F9591C850B7C000D41D5 /* Kickstarter-Framework-iOSTests */,
D015874F1EEB2DE4006E7684 /* KsApi */,
Expand Down Expand Up @@ -7433,6 +7493,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E113BD7F2B7D255000D3A809 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -7808,7 +7875,6 @@
1996AA312A5F39CC00AE2ED0 /* PledgePaymentMethodsViewModelTests.swift in Sources */,
3757D107228E521600241AE6 /* UIFontTests.swift in Sources */,
A7ED1F351E830FDC00BFFA01 /* String+SimpleHTMLTests.swift in Sources */,
E113BD7A2B7D1B8600D3A809 /* KeychainTests.swift in Sources */,
A7ED1FB31E831C5C00BFFA01 /* ActivitySampleBackingCellViewModelTests.swift in Sources */,
A7ED1FD71E831C5C00BFFA01 /* SearchEmptyStateCellViewModelTests.swift in Sources */,
A7ED1F491E831BA200BFFA01 /* DispatchTimeInterval-Extensions.swift in Sources */,
Expand Down Expand Up @@ -8904,6 +8970,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
E113BD7D2B7D255000D3A809 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E113BD842B7D255000D3A809 /* Library_Keychain_iOSTests.swift in Sources */,
E113BD8D2B7D255A00D3A809 /* KeychainTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
Expand Down Expand Up @@ -8942,6 +9017,17 @@
target = E10BE8CC2B02975C00F73DC9 /* RichPushNotifications */;
targetProxy = E10BE8D22B02975C00F73DC9 /* PBXContainerItemProxy */;
};
E113BD872B7D255000D3A809 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
platformFilter = ios;
target = A755113B1C8642B3005355CF /* Library-iOS */;
targetProxy = E113BD862B7D255000D3A809 /* PBXContainerItemProxy */;
};
E113BD8F2B7D256100D3A809 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A7D1F9441C850B7C000D41D5 /* Kickstarter-iOS */;
targetProxy = E113BD8E2B7D256100D3A809 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
Expand Down Expand Up @@ -10265,6 +10351,126 @@
};
name = "AppCenter Alpha";
};
E113BD882B7D255000D3A809 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.kickstarter.Library-Keychain-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KickDebug.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/KickDebug";
};
name = Debug;
};
E113BD892B7D255000D3A809 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.kickstarter.Library-Keychain-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KickDebug.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/KickDebug";
};
name = Release;
};
E113BD8A2B7D255000D3A809 /* AppCenter Beta */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.kickstarter.Library-Keychain-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KickDebug.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/KickDebug";
};
name = "AppCenter Beta";
};
E113BD8B2B7D255000D3A809 /* AppCenter Alpha */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.kickstarter.Library-Keychain-iOSTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KickDebug.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/KickDebug";
};
name = "AppCenter Alpha";
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -10367,6 +10573,17 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
E113BD8C2B7D255000D3A809 /* Build configuration list for PBXNativeTarget "Library-Keychain-iOSTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
E113BD882B7D255000D3A809 /* Debug */,
E113BD892B7D255000D3A809 /* Release */,
E113BD8A2B7D255000D3A809 /* AppCenter Beta */,
E113BD8B2B7D255000D3A809 /* AppCenter Alpha */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
Expand Down
10 changes: 10 additions & 0 deletions Kickstarter.xcodeproj/xcshareddata/xcschemes/Library-iOS.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
ReferencedContainer = "container:Kickstarter.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E113BD802B7D255000D3A809"
BuildableName = "Library-Keychain-iOSTests.xctest"
BlueprintName = "Library-Keychain-iOSTests"
ReferencedContainer = "container:Kickstarter.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
18 changes: 18 additions & 0 deletions Library-Keychain-iOSTests/Library_Keychain_iOSTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import XCTest

final class Library_Keychain_iOSTests: XCTestCase {
func testLibraryKeychainExists() {
XCTAssertTrue(true)

/*
This testing bundle, Library-Keychain-iOSTests, exists so that we can run KeychainTests.
Testing the keychain requires the unit tests to be hosted; otherwise it throws errors
about missing entitlements.
However, the rest of our library tests require the unit tests NOT to be hosted.
This target is just split out so we can run KeychainTests.swift in that hosted environment..
*/
}
}

0 comments on commit 1d0040b

Please sign in to comment.