commit 7e227f2fa595721422bae86520bab5d1e6daf59d
parent 0d04c79f62c02ed6f7214c99aad409248e5fcee2
Author: triesap <tyson@radroots.org>
Date: Thu, 11 Jun 2026 17:05:26 -0700
build: make field ios testable
- clear stale UniFFI generated output before installing Swift bindings
- add a Radroots smoke test target for the Xcode test action
- commit the regenerated XcodeGen project and shared scheme
- keep generated FFI artifacts ignored outside source control
Diffstat:
5 files changed, 234 insertions(+), 0 deletions(-)
diff --git a/Radroots.xcodeproj/project.pbxproj b/Radroots.xcodeproj/project.pbxproj
@@ -15,6 +15,7 @@
33A800AA701C354099623B24 /* MarketView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C0B870E44C7B152A7FABE0 /* MarketView.swift */; };
360F23EFE80FDBDC6983FB15 /* AppEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = D448C9655B708CA3FA8712B9 /* AppEntry.swift */; };
4025E63F6603011431B8A0E1 /* DebugDump.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7F9BFC3C8CE2F86FB7DB74B /* DebugDump.swift */; };
+ 456DE610453A759C6E9C7E67 /* RadrootsSmokeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B55F6649DFED91BA8670D13 /* RadrootsSmokeTests.swift */; };
4B44B723FF06ECC363A486BA /* TradeListingDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26BAE32CD1D46033DDA1A5BB /* TradeListingDetailView.swift */; };
505A5731ACDBBB0296134340 /* TradeListingCreateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 947ADA6D32E42ED2B40A5351 /* TradeListingCreateView.swift */; };
5AECD474FB2F91855BDD79C0 /* PostFeedViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21554DA87EEC1E5C5F38365 /* PostFeedViewModel.swift */; };
@@ -36,6 +37,16 @@
FD9B01F8F5DD1F05A64FD556 /* TradeOrderRequestView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 466BFA2F60BE3113EDD1BA3B /* TradeOrderRequestView.swift */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ 5B242C3EC56D6F3216103D77 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 572C41532B5066EC7641561C /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 469EC50C49E7266DF1C2000B;
+ remoteInfo = Radroots;
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXFileReference section */
08C0B870E44C7B152A7FABE0 /* MarketView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketView.swift; sourceTree = "<group>"; };
08FA88664E5E3ED3A24D56CC /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
@@ -46,12 +57,14 @@
26BAE32CD1D46033DDA1A5BB /* TradeListingDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TradeListingDetailView.swift; sourceTree = "<group>"; };
2818363B157125491FB84A1E /* App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = "<group>"; };
2FE790CA1CD31208947913B9 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
+ 318804462AADCA05FB04ACD9 /* RadrootsTests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = RadrootsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3FADD6E2563CC9AF9F935DCE /* RadrootsKit */ = {isa = PBXFileReference; lastKnownFileType = folder; name = RadrootsKit; path = RadrootsKit; sourceTree = SOURCE_ROOT; };
41A4289F43625DD65E6C4B25 /* CopyRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyRow.swift; sourceTree = "<group>"; };
466BFA2F60BE3113EDD1BA3B /* TradeOrderRequestView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TradeOrderRequestView.swift; sourceTree = "<group>"; };
4BC4B7D0BB4C6D8E4B0AA4AD /* radroots.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = radroots.xcconfig; sourceTree = "<group>"; };
54EE5A34FE2086899F5B7568 /* radroots.git.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = radroots.git.xcconfig; sourceTree = "<group>"; };
676B89EB116B60AE8C2B4313 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
+ 7B55F6649DFED91BA8670D13 /* RadrootsSmokeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadrootsSmokeTests.swift; sourceTree = "<group>"; };
7C294E8EF50F5E1E73F5C135 /* Common.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.xcconfig; sourceTree = "<group>"; };
93AA285819DD1269C3EAD80A /* Radroots.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Radroots.app; sourceTree = BUILT_PRODUCTS_DIR; };
93D729E070C32490545FA837 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -94,6 +107,14 @@
path = App;
sourceTree = "<group>";
};
+ 31C88176C5674CFF5F9CFBEA /* RadrootsTests */ = {
+ isa = PBXGroup;
+ children = (
+ 7B55F6649DFED91BA8670D13 /* RadrootsSmokeTests.swift */,
+ );
+ path = RadrootsTests;
+ sourceTree = "<group>";
+ };
579F407D96CCAFD4000EF363 /* Config */ = {
isa = PBXGroup;
children = (
@@ -123,6 +144,7 @@
isa = PBXGroup;
children = (
93AA285819DD1269C3EAD80A /* Radroots.app */,
+ 318804462AADCA05FB04ACD9 /* RadrootsTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -189,6 +211,7 @@
children = (
9458C318B571871852A3FD1B /* Packages */,
5FD6379AE27C57D02E8C7EE1 /* Radroots */,
+ 31C88176C5674CFF5F9CFBEA /* RadrootsTests */,
6240123423927396E47D6B3E /* Products */,
);
sourceTree = "<group>";
@@ -261,6 +284,24 @@
productReference = 93AA285819DD1269C3EAD80A /* Radroots.app */;
productType = "com.apple.product-type.application";
};
+ 67B2EF8D69F6CEA9BE5A8B04 /* RadrootsTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = DCDE79513C7AE684F9540473 /* Build configuration list for PBXNativeTarget "RadrootsTests" */;
+ buildPhases = (
+ 4948BBB44D48B961DE81F508 /* Sources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ C4ECFE4B8C347EE1F784B9BA /* PBXTargetDependency */,
+ );
+ name = RadrootsTests;
+ packageProductDependencies = (
+ );
+ productName = RadrootsTests;
+ productReference = 318804462AADCA05FB04ACD9 /* RadrootsTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -290,6 +331,7 @@
projectRoot = "";
targets = (
469EC50C49E7266DF1C2000B /* Radroots */,
+ 67B2EF8D69F6CEA9BE5A8B04 /* RadrootsTests */,
);
};
/* End PBXProject section */
@@ -329,6 +371,14 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 4948BBB44D48B961DE81F508 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 456DE610453A759C6E9C7E67 /* RadrootsSmokeTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
78F7810CC77628CB591F8CD2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -362,6 +412,14 @@
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ C4ECFE4B8C347EE1F784B9BA /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 469EC50C49E7266DF1C2000B /* Radroots */;
+ targetProxy = 5B242C3EC56D6F3216103D77 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin PBXVariantGroup section */
8D19AA8D515FC8F5D2407378 /* Localizable.strings */ = {
isa = PBXVariantGroup;
@@ -392,6 +450,24 @@
};
name = Debug;
};
+ 8113D02CF1312FB10249F707 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ GENERATE_INFOPLIST_FILE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 18.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
+ SDKROOT = iphoneos;
+ SWIFT_VERSION = 6.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Radroots.app/Radroots";
+ };
+ name = Release;
+ };
D930E9391B5B63DB518922D2 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 08FA88664E5E3ED3A24D56CC /* Release.xcconfig */;
@@ -410,6 +486,24 @@
};
name = Release;
};
+ F1654BB285BEA5667F11CBD2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ GENERATE_INFOPLIST_FILE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 18.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ "@loader_path/Frameworks",
+ );
+ SDKROOT = iphoneos;
+ SWIFT_VERSION = 6.0;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Radroots.app/Radroots";
+ };
+ name = Debug;
+ };
F4E5B115657562F65E2A7C00 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -550,6 +644,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
+ DCDE79513C7AE684F9540473 /* Build configuration list for PBXNativeTarget "RadrootsTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F1654BB285BEA5667F11CBD2 /* Debug */,
+ 8113D02CF1312FB10249F707 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Debug;
+ };
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
diff --git a/Radroots.xcodeproj/xcshareddata/xcschemes/Radroots.xcscheme b/Radroots.xcodeproj/xcshareddata/xcschemes/Radroots.xcscheme
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1430"
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES"
+ runPostActionsOnFailure = "NO">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "469EC50C49E7266DF1C2000B"
+ BuildableName = "Radroots.app"
+ BlueprintName = "Radroots"
+ ReferencedContainer = "container:Radroots.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ onlyGenerateCoverageForSpecifiedTargets = "NO">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "469EC50C49E7266DF1C2000B"
+ BuildableName = "Radroots.app"
+ BlueprintName = "Radroots"
+ ReferencedContainer = "container:Radroots.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <Testables>
+ <TestableReference
+ skipped = "NO"
+ parallelizable = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "67B2EF8D69F6CEA9BE5A8B04"
+ BuildableName = "RadrootsTests.xctest"
+ BlueprintName = "RadrootsTests"
+ ReferencedContainer = "container:Radroots.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <CommandLineArguments>
+ </CommandLineArguments>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "469EC50C49E7266DF1C2000B"
+ BuildableName = "Radroots.app"
+ BlueprintName = "Radroots"
+ ReferencedContainer = "container:Radroots.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "469EC50C49E7266DF1C2000B"
+ BuildableName = "Radroots.app"
+ BlueprintName = "Radroots"
+ ReferencedContainer = "container:Radroots.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/RadrootsFFI/Makefile b/RadrootsFFI/Makefile
@@ -123,6 +123,7 @@ build: ensure-toolchain
$(CARGO) build --manifest-path $(FFI_MANIFEST) $(CARGO_FEATURE_FLAGS) --release
generate:
+ rm -rf $(GENERATED_DIR) $(HEADERS_DIR)
mkdir -p $(GENERATED_DIR) $(HEADERS_DIR)
cd $(FFI_CRATE_DIR) && $(CARGO) run --manifest-path Cargo.toml $(CARGO_FEATURE_FLAGS) --bin uniffi-bindgen -- \
generate --library $(LIB_HOST) \
diff --git a/RadrootsTests/RadrootsSmokeTests.swift b/RadrootsTests/RadrootsSmokeTests.swift
@@ -0,0 +1,7 @@
+import XCTest
+
+final class RadrootsSmokeTests: XCTestCase {
+ func testSmoke() {
+ XCTAssertTrue(true)
+ }
+}
diff --git a/project.yml b/project.yml
@@ -36,3 +36,24 @@ targets:
script: |
GIT_SHA=$(git rev-parse --short HEAD || echo "unknown")
echo "GIT_SHA = $GIT_SHA" > "$SRCROOT/Radroots/radroots.git.xcconfig"
+ RadrootsTests:
+ type: bundle.unit-test
+ platform: iOS
+ deploymentTarget: "18.0"
+ sources:
+ - path: RadrootsTests
+ settings:
+ base:
+ SWIFT_VERSION: 6.0
+ GENERATE_INFOPLIST_FILE: YES
+ dependencies:
+ - target: Radroots
+
+schemes:
+ Radroots:
+ build:
+ targets:
+ Radroots: all
+ test:
+ targets:
+ - RadrootsTests