-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use external DittoPresenceViewerCore dependency #166
base: main
Are you sure you want to change the base?
Conversation
36e7fd5
to
8f85300
Compare
This will now depend on getditto/DittoPresenceViewerCore#5 and a matching new release of the new package to avoid undoing the work in #167. Marking as a draft for now. |
// MARK: Constants | ||
|
||
private struct LocalizedStrings { | ||
static let title = NSLocalizedString("Ditto Presence", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't actually have any matching localized strings (or any at all in the package), and I was getting some inconsistent build errors from Xcode 16.2 around the Bundle+FrameworkBundle.swift
code - removing this single usage allowed me to remove that extension as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zmarkan I was seeing the links from the other comment thread not working, this is the localization removal
This now depends on getditto/DittoPresenceViewerCore#7 |
And here is this used in the POS demo app, showcasing no breaking changes for consuming apps: getditto/demoapp-pos-kds#69 |
@@ -128,7 +120,7 @@ final class DittoPresenceViewController: PlatformViewController { | |||
#if canImport(UIKit) | |||
guard navigationController == nil else { return } | |||
|
|||
navigationItem.title = LocalizedStrings.title | |||
navigationItem.title = "Ditto Presence" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move to hardcode strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #166 - essentially we didn't actually do any localization and all the machinery to make it work was causing other build issues with the current Xcode version.
If we want to revisit localization later the tools need a much larger overhaul
@@ -83,7 +75,7 @@ final class DittoPresenceViewController: PlatformViewController { | |||
override func viewDidLoad() { | |||
super.viewDidLoad() | |||
|
|||
title = LocalizedStrings.title | |||
title = "Ditto Presence" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move to hardcoded strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #166 - essentially we didn't actually do any localization and all the machinery to make it work was causing other build issues with the current Xcode version.
If we want to revisit localization later the tools need a much larger overhaul
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks compilation for tvOS, as there are numerous platform deltas.
My understanding is that the Presence Viewer (as it relies on js) is entirely incompatible on tvOS (it is excluded from the menu entirely), so I'll work out cleanly excluding all the relevant source from the platform (as opposed to resolving issues, or line-by-line workarounds)
That's right, presence viewer doesn't work today on tvOS, but we should still ensure that it compiles so customers can use the other tools. I'm hoping that's as simple as some |
Slightly more involved than !tvOS, but I'm working on a fix. Should be able to push tomorrow. I want to snip the tv condition as high up the food chain as possible. Got it nearly worked out. |
Updates to use the presence viewer from its own repo / package as part of the path to a single source of truth for the presence viewer's web code (JS & HTML). All the Swift code stays here.
Depends on getditto/DittoPresenceViewerCore#7
Closes CXTOOLS-358
Part of CXTOOLS-337