Skip to content

Commit

Permalink
More project structure cleanup (#4131)
Browse files Browse the repository at this point in the history
## More project structure cleanup: 

- Removes redundant workspace and project files for PurchaseTester
- Cleans up bad references
- Cleans up certificates
- Re-does the process to deploy PurchaseTester, since it was designed to
run from the xcworkspace, which doesn't work anymore.
- adds a `dry-run` option to deploying PurchaseTester and adds a job for
it in the all-tests workflow. It tries building it and archiving but
doesn't actually publish to TestFlight. We didn't really have a test for
this, so it's another thing that could have broken in production.
  • Loading branch information
aboedo authored and nyeu committed Oct 1, 2024
1 parent 1ddd8e3 commit 414f5aa
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 403 deletions.
24 changes: 17 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1231,9 +1231,20 @@ jobs:
- update-spm-installation-commit
- run:
name: Submit Purchase Tester
working_directory: "Tests/TestingApps/PurchaseTesterSwiftUI"
command: bundle exec fastlane deploy_purchase_tester

deploy-purchase-tester-dry-run:
<<: *base-job
steps:
- checkout
- setup-git-credentials
- trust-github-key
- install-dependencies
- update-spm-installation-commit
- run:
name: Submit Purchase Tester
command: bundle exec fastlane deploy_purchase_tester dry_run:true

deploy-to-spm:
docker:
- image: cimg/base:stable
Expand Down Expand Up @@ -1325,12 +1336,10 @@ workflows:
requires:
- make-release
<<: *release-tags
# temporarily disabled since this won't work when building directly from its workspace.
# there's another PR to re-enable it
# - deploy-purchase-tester:
# requires:
# - make-release
# <<: *release-tags
- deploy-purchase-tester:
requires:
- make-release
<<: *release-tags

snapshot-bump:
when:
Expand Down Expand Up @@ -1421,3 +1430,4 @@ workflows:
- installation-tests-carthage
- installation-tests-xcode-direct-integration
- installation-tests-receipt-parser
- deploy-purchase-tester-dry-run
4 changes: 0 additions & 4 deletions RevenueCat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1200,14 +1200,12 @@
2DD500E22C519EB4009C19B7 /* PurchaseTesterApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchaseTesterApp.swift; sourceTree = "<group>"; };
2DD500E32C519EB4009C19B7 /* ReceiptInspector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReceiptInspector.swift; sourceTree = "<group>"; };
2DD500E42C519EB4009C19B7 /* ReceiptVerifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReceiptVerifier.swift; sourceTree = "<group>"; };
2DD500E52C519EB4009C19B7 /* RevenueCat_SwiftUIConfiguration.storekit */ = {isa = PBXFileReference; lastKnownFileType = text; path = RevenueCat_SwiftUIConfiguration.storekit; sourceTree = "<group>"; };
2DD500E62C519EB4009C19B7 /* Windows.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Windows.swift; sourceTree = "<group>"; };
2DD500E82C519EB4009C19B7 /* AppIcon.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = AppIcon.xcassets; sourceTree = "<group>"; };
2DD500E92C519EB4009C19B7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
2DD500EA2C519EB4009C19B7 /* PurchaseTester-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PurchaseTester-Info.plist"; sourceTree = "<group>"; };
2DD500EB2C519EB4009C19B7 /* PurchaseTester.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PurchaseTester.entitlements; sourceTree = "<group>"; };
2DD500EC2C519EB4009C19B7 /* PurchaseTester.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = PurchaseTester.xcodeproj; sourceTree = "<group>"; };
2DD500ED2C519EB4009C19B7 /* PurchaseTester.xcworkspace */ = {isa = PBXFileReference; lastKnownFileType = wrapper.workspace; path = PurchaseTester.xcworkspace; sourceTree = "<group>"; };
2DD58DD727F240EB000FDFE3 /* EmptyFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyFile.swift; sourceTree = "<group>"; };
2DD6E5882C544C420068E695 /* RevenueCat_IntegrationPurchaseTesterConfiguration.storekit */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RevenueCat_IntegrationPurchaseTesterConfiguration.storekit; sourceTree = "<group>"; };
2DD6E58B2C544D2D0068E695 /* PurchaseTesterStoreKitConfiguration.storekit */ = {isa = PBXFileReference; lastKnownFileType = text; path = PurchaseTesterStoreKitConfiguration.storekit; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2644,7 +2642,6 @@
2DD500E22C519EB4009C19B7 /* PurchaseTesterApp.swift */,
2DD500E32C519EB4009C19B7 /* ReceiptInspector.swift */,
2DD500E42C519EB4009C19B7 /* ReceiptVerifier.swift */,
2DD500E52C519EB4009C19B7 /* RevenueCat_SwiftUIConfiguration.storekit */,
2DD500E62C519EB4009C19B7 /* Windows.swift */,
);
path = Shared;
Expand All @@ -2662,7 +2659,6 @@
2DD500EA2C519EB4009C19B7 /* PurchaseTester-Info.plist */,
2DD500EB2C519EB4009C19B7 /* PurchaseTester.entitlements */,
2DD500EC2C519EB4009C19B7 /* PurchaseTester.xcodeproj */,
2DD500ED2C519EB4009C19B7 /* PurchaseTester.xcworkspace */,
2DD6E58B2C544D2D0068E695 /* PurchaseTesterStoreKitConfiguration.storekit */,
);
path = PurchaseTesterSwiftUI;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand All @@ -17,7 +18,7 @@
BlueprintIdentifier = "2CD2C4F4278C9B02005D1CC2"
BuildableName = "PurchaseTester.app"
BlueprintName = "PurchaseTester"
ReferencedContainer = "container:PurchaseTester.xcodeproj">
ReferencedContainer = "container:Tests/TestingApps/PurchaseTesterSwiftUI/PurchaseTester.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -26,9 +27,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -47,7 +47,7 @@
BlueprintIdentifier = "2CD2C4F4278C9B02005D1CC2"
BuildableName = "PurchaseTester.app"
BlueprintName = "PurchaseTester"
ReferencedContainer = "container:PurchaseTester.xcodeproj">
ReferencedContainer = "container:Tests/TestingApps/PurchaseTesterSwiftUI/PurchaseTester.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<StoreKitConfigurationFileReference
Expand All @@ -67,7 +67,7 @@
BlueprintIdentifier = "2CD2C4F4278C9B02005D1CC2"
BuildableName = "PurchaseTester.app"
BlueprintName = "PurchaseTester"
ReferencedContainer = "container:PurchaseTester.xcodeproj">
ReferencedContainer = "container:Tests/TestingApps/PurchaseTesterSwiftUI/PurchaseTester.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
2C10F19327AC319A0078444D /* EntitlementsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntitlementsView.swift; sourceTree = "<group>"; };
2C10F19627AC31B80078444D /* CustomerInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomerInfoView.swift; sourceTree = "<group>"; };
2C10F19927AC32840078444D /* SubscriberAttributesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriberAttributesView.swift; sourceTree = "<group>"; };
2C8C610427C5206D00F86F21 /* RevenueCat_SwiftUIConfiguration.storekit */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RevenueCat_SwiftUIConfiguration.storekit; sourceTree = "<group>"; };
2C8C610D27CEBEF200F86F21 /* PurchaseTester-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PurchaseTester-Info.plist"; sourceTree = "<group>"; };
2CCAF2AB286232EB0004E2CA /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
2CD2C4EE278C9B01005D1CC2 /* PurchaseTesterApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchaseTesterApp.swift; sourceTree = "<group>"; };
Expand All @@ -147,7 +146,6 @@
575642A3290C7A2700719219 /* LoggerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggerView.swift; sourceTree = "<group>"; };
575642A5290C7D3100719219 /* Windows.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Windows.swift; sourceTree = "<group>"; };
5759B471296F9B3B002472D5 /* LocalReceiptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalReceiptView.swift; sourceTree = "<group>"; };
576B00A02950FA9700139C53 /* RevenueCat_IntegrationPurchaseTesterConfiguration.storekit */ = {isa = PBXFileReference; lastKnownFileType = text; name = RevenueCat_IntegrationPurchaseTesterConfiguration.storekit; path = ../../PurchaseTester/RevenueCat_IntegrationPurchaseTesterConfiguration.storekit; sourceTree = "<group>"; };
578DAA092947DD21001700FD /* PurchaseTesterWatchOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PurchaseTesterWatchOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
578DAA0B2947DD21001700FD /* PurchaseTesterWatchApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurchaseTesterWatchApp.swift; sourceTree = "<group>"; };
578DAA0D2947DD21001700FD /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -252,8 +250,6 @@
children = (
2DD2CBB229831A22004A3A6A /* ReceiptVerifier.swift */,
2DD2CBB029831A09004A3A6A /* ReceiptInspector.swift */,
2C8C610427C5206D00F86F21 /* RevenueCat_SwiftUIConfiguration.storekit */,
576B00A02950FA9700139C53 /* RevenueCat_IntegrationPurchaseTesterConfiguration.storekit */,
2CD2C4EE278C9B01005D1CC2 /* PurchaseTesterApp.swift */,
575642A5290C7D3100719219 /* Windows.swift */,
2CF428672863EE9D007E6A78 /* Extensions */,
Expand Down Expand Up @@ -720,15 +716,14 @@
CLANG_MODULES_AUTOLINK = YES;
CODE_SIGN_ENTITLEMENTS = PurchaseTester.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8SXR2327BM;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "PurchaseTester-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Purchase Tester";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
Expand All @@ -740,9 +735,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.sampleapp;
PRODUCT_NAME = PurchaseTester;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match Development com.revenuecat.sampleapp";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match Development com.revenuecat.sampleapp macos";
"PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "match Development com.revenuecat.sampleapp";
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down Expand Up @@ -770,7 +762,6 @@
INFOPLIST_FILE = "PurchaseTester-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Purchase Tester";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
Expand Down Expand Up @@ -802,7 +793,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8SXR2327BM;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_CFBundleDisplayName = PurchaseTesterWatchOS;
Expand All @@ -815,6 +809,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.sampleapp.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -855,8 +850,11 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 8SXR2327BM;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -874,8 +872,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.Core;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
Expand All @@ -894,8 +891,11 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
Expand All @@ -913,8 +913,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.Core;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@
{
"eligibility" : [
"expired",
"existing",
"new"
"new",
"existing"
],
"internalID" : "94C72762",
"isStackable" : true,
Expand Down Expand Up @@ -360,8 +360,8 @@
"codeOffers" : [
{
"eligibility" : [
"expired",
"existing",
"expired",
"new"
],
"internalID" : "3793E8C8",
Expand Down
Loading

0 comments on commit 414f5aa

Please sign in to comment.