Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/ios-sweep-alert/.revyl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Most files in .revyl are local runtime state.
# Only the shared project config and test definitions belong in git.
*

# Keep this file itself.
!.gitignore

# Shared Revyl project files.
!config.yaml
!tests/
!tests/**
15 changes: 15 additions & 0 deletions apps/ios-sweep-alert/.revyl/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
project:
name: sweep-alert-ios

build:
system: Xcode
platforms:
ios:
app_id: ee303738-1c98-4c7b-b471-ed70d8ea5245
command: xcodebuild -project SweepAlertSwift.xcodeproj -scheme SweepAlertSwift -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -derivedDataPath build
output: build/Build/Products/Debug-iphonesimulator/SweepAlertSwift.app
scheme: SweepAlertSwift

defaults:
open_browser: false
timeout: 1800
15 changes: 15 additions & 0 deletions apps/ios-sweep-alert/SweepAlertSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
A1000010 /* PushNotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2000011 /* PushNotificationService.swift */; };
B1000001 /* SweepAlertWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2000001 /* SweepAlertWidget.swift */; };
B1000002 /* SweepAlertWidget.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = B2000003 /* SweepAlertWidget.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
C1000001 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = C2000001 /* Localizable.xcstrings */; };
C1000002 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = C2000001 /* Localizable.xcstrings */; };
C1000003 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C2000002 /* InfoPlist.strings */; };
C1000004 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C2000003 /* InfoPlist.strings */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -61,6 +65,9 @@
B2000001 /* SweepAlertWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SweepAlertWidget.swift; sourceTree = "<group>"; };
B2000002 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B2000003 /* SweepAlertWidget.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = SweepAlertWidget.appex; sourceTree = BUILT_PRODUCTS_DIR; };
C2000001 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
C2000002 /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = pa.lproj/InfoPlist.strings; sourceTree = "<group>"; };
C2000003 /* InfoPlist.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = pa.lproj/InfoPlist.strings; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -105,6 +112,8 @@
A2000006 /* Auth0.plist */,
A2000005 /* sweeping.json */,
A2000003 /* Assets.xcassets */,
C2000001 /* Localizable.xcstrings */,
C2000002 /* InfoPlist.strings */,
);
path = SweepAlertSwift;
sourceTree = "<group>";
Expand All @@ -123,6 +132,7 @@
children = (
B2000001 /* SweepAlertWidget.swift */,
B2000002 /* Info.plist */,
C2000003 /* InfoPlist.strings */,
);
path = SweepAlertWidget;
sourceTree = "<group>";
Expand Down Expand Up @@ -196,6 +206,7 @@
knownRegions = (
en,
Base,
pa,
);
mainGroup = A4000001;
packageReferences = (
Expand All @@ -219,13 +230,17 @@
A1000003 /* Assets.xcassets in Resources */,
A1000004 /* sweeping.json in Resources */,
A1000005 /* Auth0.plist in Resources */,
C1000001 /* Localizable.xcstrings in Resources */,
C1000003 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B6000002 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C1000002 /* Localizable.xcstrings in Resources */,
C1000004 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
10 changes: 5 additions & 5 deletions apps/ios-sweep-alert/SweepAlertSwift/AuthenticationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class AuthenticationService: ObservableObject {
.start()

guard credentialsManager.store(credentials: credentials) else {
errorMessage = "Could not store Auth0 credentials."
errorMessage = String(localized: "Could not store Auth0 credentials.")
return
}

Expand All @@ -66,7 +66,7 @@ final class AuthenticationService: ObservableObject {
} catch {
isAuthenticated = false
convexSynced = false
errorMessage = "Login failed: \(error.localizedDescription)"
errorMessage = String(localized: "Login failed: \(error.localizedDescription)")
}
}

Expand All @@ -80,7 +80,7 @@ final class AuthenticationService: ObservableObject {
.webAuth(clientId: AppConfiguration.auth0ClientID, domain: AppConfiguration.auth0Domain)
.clearSession()
} catch {
errorMessage = "Logout session clear failed: \(error.localizedDescription)"
errorMessage = String(localized: "Logout session clear failed: \(error.localizedDescription)")
}

_ = credentialsManager.clear()
Expand Down Expand Up @@ -223,7 +223,7 @@ final class AuthenticationService: ObservableObject {
convexSynced = true
} catch {
convexSynced = false
errorMessage = "Convex sync failed: \(error.localizedDescription)"
errorMessage = String(localized: "Convex sync failed: \(error.localizedDescription)")
}
}

Expand All @@ -243,7 +243,7 @@ final class AuthenticationService: ObservableObject {
let token = try await pushNotifications.requestDeviceToken()
try await convexService.registerDevice(pushToken: token, idToken: credentials.idToken)
} catch {
errorMessage = "Push registration failed: \(error.localizedDescription)"
errorMessage = String(localized: "Push registration failed: \(error.localizedDescription)")
}
}
}
Expand Down
Loading