Skip to content

Commit 9996457

Browse files
committed
Fix iOS simulator smoke build
1 parent 43a6724 commit 9996457

3 files changed

Lines changed: 22 additions & 56 deletions

File tree

.github/workflows/ios-simulator-smoke.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
shell: bash
8181
run: |
8282
set -euo pipefail
83-
mkdir -p build/ios-derived-data
83+
mkdir -p build/ios-derived-data build
8484
xcodebuild \
8585
-project iosApp/iosApp.xcodeproj \
8686
-scheme iosApp \
@@ -91,26 +91,36 @@ jobs:
9191
CODE_SIGNING_ALLOWED=NO \
9292
CODE_SIGNING_REQUIRED=NO \
9393
CODE_SIGN_IDENTITY="" \
94-
build
94+
DEVELOPMENT_TEAM="" \
95+
build | tee build/xcodebuild.log
9596
9697
- name: Install and launch app in smoke mode
9798
shell: bash
9899
run: |
99100
set -euo pipefail
100-
APP_PATH="build/ios-derived-data/Build/Products/Debug-iphonesimulator/ScoutEventi.app"
101+
APP_PATH="$(find build/ios-derived-data/Build/Products -maxdepth 2 -type d -name '*.app' | head -n 1)"
101102
BUNDLE_ID="it.buonacaccia.scouteventi.ios"
102103
104+
test -n "$APP_PATH"
103105
test -d "$APP_PATH"
106+
echo "Using app bundle at $APP_PATH"
104107
105108
xcrun simctl install "${{ steps.simulator.outputs.udid }}" "$APP_PATH"
106109
xcrun simctl terminate "${{ steps.simulator.outputs.udid }}" "$BUNDLE_ID" || true
107110
xcrun simctl launch "${{ steps.simulator.outputs.udid }}" "$BUNDLE_ID" --scouteventi-smoke-data
108111
sleep 10
112+
xcrun simctl spawn "${{ steps.simulator.outputs.udid }}" log show --style compact --last 5m --predicate 'eventMessage CONTAINS "SCOUTEVENTI_SMOKE_READY"' | tee build/ios-smoke-log.txt
113+
grep -q "SCOUTEVENTI_SMOKE_READY" build/ios-smoke-log.txt
109114
xcrun simctl io "${{ steps.simulator.outputs.udid }}" screenshot build/ios-simulator-smoke.png
110115
xcrun simctl terminate "${{ steps.simulator.outputs.udid }}" "$BUNDLE_ID"
111116
112-
- name: Upload simulator screenshot
117+
- name: Upload simulator artifacts
118+
if: always()
113119
uses: actions/upload-artifact@v4
114120
with:
115121
name: ios-simulator-smoke
116-
path: build/ios-simulator-smoke.png
122+
if-no-files-found: ignore
123+
path: |
124+
build/ios-simulator-smoke.png
125+
build/xcodebuild.log
126+
build/ios-smoke-log.txt

iosApp/iosApp.xcodeproj/project.pbxproj

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
058557BA273AAA24004C7B11 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1818
058557D8273AAEEB004C7B11 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
1919
2152FB032600AC8F00CF470E /* iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSApp.swift; sourceTree = "<group>"; };
20-
7555FF7B242A565900829871 /* My application.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "My application.app"; sourceTree = BUILT_PRODUCTS_DIR; };
20+
7555FF7B242A565900829871 /* ScoutEventi.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ScoutEventi.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2121
7555FF82242A565900829871 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
2222
7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2323
AB3632DC29227652001CCB65 /* Config.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
@@ -94,7 +94,6 @@
9494
isa = PBXNativeTarget;
9595
buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "iosApp" */;
9696
buildPhases = (
97-
05D91A912A5EF49C00F138EB /* Compile Kotlin */,
9897
7555FF77242A565900829871 /* Sources */,
9998
7555FF79242A565900829871 /* Resources */,
10099
F85CB1118929364A9C6EFABC /* Frameworks */,
@@ -104,8 +103,8 @@
104103
dependencies = (
105104
);
106105
name = iosApp;
107-
productName = iosApp;
108-
productReference = 7555FF7B242A565900829871 /* My application.app */;
106+
productName = ScoutEventi;
107+
productReference = 7555FF7B242A565900829871 /* ScoutEventi.app */;
109108
productType = "com.apple.product-type.application";
110109
};
111110
/* End PBXNativeTarget section */
@@ -153,27 +152,6 @@
153152
};
154153
/* End PBXResourcesBuildPhase section */
155154

156-
/* Begin PBXShellScriptBuildPhase section */
157-
05D91A912A5EF49C00F138EB /* Compile Kotlin */ = {
158-
isa = PBXShellScriptBuildPhase;
159-
buildActionMask = 2147483647;
160-
files = (
161-
);
162-
inputFileListPaths = (
163-
);
164-
inputPaths = (
165-
);
166-
name = "Compile Kotlin";
167-
outputFileListPaths = (
168-
);
169-
outputPaths = (
170-
);
171-
runOnlyForDeploymentPostprocessing = 0;
172-
shellPath = /bin/sh;
173-
shellScript = "cd \"$SRCROOT/..\"\n./gradlew :shared:embedAndSignAppleFrameworkForXcode\n";
174-
};
175-
/* End PBXShellScriptBuildPhase section */
176-
177155
/* Begin PBXSourcesBuildPhase section */
178156
7555FF77242A565900829871 /* Sources */ = {
179157
isa = PBXSourcesBuildPhase;
@@ -314,24 +292,13 @@
314292
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
315293
DEVELOPMENT_TEAM = "${TEAM_ID}";
316294
ENABLE_PREVIEWS = YES;
317-
FRAMEWORK_SEARCH_PATHS = (
318-
"$(inherited)\n",
319-
"$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n",
320-
);
321295
INFOPLIST_FILE = iosApp/Info.plist;
322296
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
323297
LD_RUNPATH_SEARCH_PATHS = (
324298
"$(inherited)",
325299
"@executable_path/Frameworks",
326300
);
327-
OTHER_LDFLAGS = (
328-
"$(inherited)",
329-
"-framework",
330-
"shared\n$(inherited)",
331-
"-framework",
332-
"shared\n",
333-
);
334-
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
301+
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}";
335302
PRODUCT_NAME = "${APP_NAME}";
336303
PROVISIONING_PROFILE_SPECIFIER = "";
337304
SWIFT_VERSION = 5.0;
@@ -348,24 +315,13 @@
348315
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
349316
DEVELOPMENT_TEAM = "${TEAM_ID}";
350317
ENABLE_PREVIEWS = YES;
351-
FRAMEWORK_SEARCH_PATHS = (
352-
"$(inherited)\n",
353-
"$(SRCROOT)/../shared/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)\n",
354-
);
355318
INFOPLIST_FILE = iosApp/Info.plist;
356319
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
357320
LD_RUNPATH_SEARCH_PATHS = (
358321
"$(inherited)",
359322
"@executable_path/Frameworks",
360323
);
361-
OTHER_LDFLAGS = (
362-
"$(inherited)",
363-
"-framework",
364-
"shared\n$(inherited)",
365-
"-framework",
366-
"shared\n",
367-
);
368-
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
324+
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}";
369325
PRODUCT_NAME = "${APP_NAME}";
370326
PROVISIONING_PROFILE_SPECIFIER = "";
371327
SWIFT_VERSION = 5.0;

iosApp/iosApp/ContentView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ private actor BuonaCacciaService {
245245
let afterLocation = min(range.location + range.length, nsHtml.length)
246246
let after = nsHtml.substring(from: afterLocation)
247247

248-
let rowStart = before.range(of: "<tr", options: [.caseInsensitive, .backwards])
249-
let rowEnd = after.range(of: "</tr>", options: .caseInsensitive)
248+
let rowStart = (before as NSString).range(of: "<tr", options: [.caseInsensitive, .backwards])
249+
let rowEnd = (after as NSString).range(of: "</tr>", options: .caseInsensitive)
250250
if rowStart.location != NSNotFound, rowEnd.location != NSNotFound {
251251
let start = rowStart.location
252252
let end = afterLocation + rowEnd.location + rowEnd.length

0 commit comments

Comments
 (0)