Skip to content

Apple Native Apps#272

Open
Kief5555 wants to merge 7 commits into
devfrom
kief5555/ios
Open

Apple Native Apps#272
Kief5555 wants to merge 7 commits into
devfrom
kief5555/ios

Conversation

@Kief5555
Copy link
Copy Markdown
Collaborator

@Kief5555 Kief5555 commented Apr 12, 2026

This pull request introduces a new native iOS SwiftUI prototype app for OpenNOW, including a Live Activity widget for queue status, and updates the project documentation to reference the new iOS app. The changes add all necessary Xcode project files, asset catalogs, and widget implementation for the iOS prototype.

iOS App and Widget Addition:

  • Added a new iOS SwiftUI prototype app under ios/OpenNOWiOS/, including all required Xcode project files, workspace, and schemes for both the main app and the Live Activity widget. [1] [2] [3]
  • Implemented a Live Activity widget (OpenNOWWidget) using WidgetKit and ActivityKit, with custom queue status display for lock screen and Dynamic Island, including supporting views and logic in QueueLiveActivityWidget.swift. [1] [2] [3]

Assets and Resources:

  • Added asset catalogs for app icons and store images (Steam and Epic), as well as accent colors, to support the iOS app’s UI. [1] [2] [3] [4] [5]

Documentation Updates:

  • Updated README.md to mention the new iOS SwiftUI prototype and include it in the project directory structure. [1] [2]

@Kief5555 Kief5555 marked this pull request as draft April 12, 2026 04:46
Copy link
Copy Markdown
Contributor

@capy-ai capy-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 2 comments

Comment thread .gitignore

package-lock.json
!opennow-stable/package-lock.json
opennow-stable/package-lock.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[🟠 High] [🔵 Bug]

The ! negation prefix was removed from !opennow-stable/package-lock.json, turning it into a redundant positive-match pattern. The general package-lock.json rule on line 45 already ignores all files with that name. Previously, !opennow-stable/package-lock.json explicitly un-ignored the Electron app's lock file so it stayed committed. Without it, opennow-stable/package-lock.json is now git-ignored, which will cause non-reproducible dependency installations for the main application.

# .gitignore
package-lock.json
opennow-stable/package-lock.json   # was: !opennow-stable/package-lock.json

This contradicts the PR itself, which modifies opennow-stable/package-lock.json (+150/-44).

Suggested change
opennow-stable/package-lock.json
!opennow-stable/package-lock.json


private func persistAuthSession(_ session: AuthSession) {
if let encoded = try? JSONEncoder().encode(session) {
defaults.set(encoded, forKey: authSessionKey)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[🟡 Medium] [🟡 Investigate]

The persistAuthSession method stores the full AuthSession (containing accessToken, refreshToken, and idToken) in UserDefaults as JSON. UserDefaults are stored in a plain plist file and are accessible from unencrypted device backups. Apple's security guidance recommends using the Keychain for sensitive credentials.

// OpenNOWStore.swift
private func persistAuthSession(_ session: AuthSession) {
    if let encoded = try? JSONEncoder().encode(session) {
        defaults.set(encoded, forKey: authSessionKey)
    }
}

For a prototype this is understandable, but if this ships to users, tokens should be stored in the iOS Keychain (SecItemAdd/SecItemCopyMatching) to protect against backup extraction and unauthorized access.

@Kief5555 Kief5555 changed the title iOS Native App Apple Native Apps Apr 22, 2026
@Kief5555 Kief5555 marked this pull request as ready for review April 22, 2026 05:45
Copy link
Copy Markdown
Contributor

@capy-ai capy-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 2 comments

Comment thread ios/OpenNOWiOS/OpenNOWiOS/StreamerView.swift
</dict>
<key>printedwaste.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[🟡 Medium] [🟡 Investigate]

The NSAppTransportSecurity exception for printedwaste.com sets NSExceptionAllowsInsecureHTTPLoads: true with NSIncludesSubdomains: true but does not specify NSExceptionMinimumTLSVersion. This allows plain HTTP for all subdomains of printedwaste.com, meaning queue data and latency measurements could be sent/received over unencrypted connections and intercepted on untrusted networks. The nvidiagrid.net exception at least specifies TLSv1.2. Either add NSExceptionMinimumTLSVersion: TLSv1.2 and remove NSExceptionAllowsInsecureHTTPLoads, or verify that the PrintedWaste API only serves over HTTPS (in which case the insecure HTTP exception is unnecessary and should be removed).

<!-- Info.plist -->
<key>printedwaste.com</key>
<dict>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <true/>
    <key>NSIncludesSubdomains</key>
    <true/>
</dict>

Kief5555 and others added 6 commits April 25, 2026 16:50
Merge Latest Desktop Into iOS for compatibility
…erformance

- Updated layout logic in StreamLoadingView to separate wide and compact views, enhancing responsiveness.
- Introduced a new landscapeQueueLayout function for better organization of UI elements in landscape mode.
- Adjusted gameHeader and queueProgressPanel functions to support compact mode with conditional rendering.
- Enhanced styling and padding for various UI components to improve visual consistency.
- Modified StreamerView's HTML/CSS for better touch handling and layout adjustments.
- Improved stats display in StreamerView for better readability and user experience.
- Added prevention for text selection and context menu in StreamerView to enhance touch interaction.
@Kief5555 Kief5555 changed the base branch from main to dev May 9, 2026 17:51
Copilot AI review requested due to automatic review settings May 10, 2026 05:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the new ios/OpenNOWiOS SwiftUI prototype by improving the queue/stream UX, adding richer streaming & input settings (including Touchscreen Mode), adding favorites, and refining tvOS behavior (sign-in + embedded streamer + platform-specific controls).

Changes:

  • Refactors queue/loading and streamer UI for better layout responsiveness, richer status, and safer session exit handling.
  • Adds/expands settings and streaming profile resolution/bitrate logic, plus new favorites support across the catalog UI.
  • Improves tvOS support by enabling the embedded streamer path and tailoring controls/preferences for the platform.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ios/OpenNOWiOS/OpenNOWiOS/StreamLoadingView.swift Reworks queue/loading layout (portrait/landscape), status messaging, step UI, and ad card presentation.
ios/OpenNOWiOS/OpenNOWiOS/StreamerView.swift Adds exit confirmation UI and significantly expands the embedded streamer HTML/JS (touchscreen mode, stats, tvOS controls, reconnect UX).
ios/OpenNOWiOS/OpenNOWiOS/SettingsView.swift Splits settings into multiple sections; adds resolution/bitrate/keyboard/language/L4S/live-activity toggles; persists on change.
ios/OpenNOWiOS/OpenNOWiOS/SessionView.swift Improves resumable session rows with artwork + clearer status labeling.
ios/OpenNOWiOS/OpenNOWiOS/PrintedWasteQueueView.swift Adds routing explanation text and improves TCP probe completion handling + selector presentation gating.
ios/OpenNOWiOS/OpenNOWiOS/OpenNOWStore.swift Adds settings fields + stream profile resolver, favorites, live-activity gating, tvOS streaming enablement, and session/profile request changes.
ios/OpenNOWiOS/OpenNOWiOS/LoginView.swift Simplifies tvOS sign-in path to use the store’s unified signIn() flow.
ios/OpenNOWiOS/OpenNOWiOS/LibraryView.swift Adds “Favorites only” filtering.
ios/OpenNOWiOS/OpenNOWiOS/HomeView.swift Adds a Favorites section + favorite affordances in detail/cards.
ios/OpenNOWiOS/OpenNOWiOS/ContentView.swift Persists/normalizes queue pill edge state and improves drag modifier behavior.
ios/OpenNOWiOS/OpenNOWiOS/BrowseView.swift Adds “Favorites only” filtering.
ios/OpenNOWiOS/OpenNOWiOS.xcodeproj/project.pbxproj Bumps project/build versions for app and widget targets.
Comments suppressed due to low confidence (1)

ios/OpenNOWiOS/OpenNOWiOS/StreamerView.swift:695

  • The markup no longer defines elements with ids physicalControllerBtn / physicalControllerValue, but the JS still queries them here. Either restore those ids in the HTML or remove these unused bindings to avoid silently-null UI elements.
  const gpValue = document.getElementById('gpValue');
  const physicalControllerBtn = document.getElementById('physicalControllerBtn');
  const physicalControllerValue = document.getElementById('physicalControllerValue');
  const controllerState = document.getElementById('controllerState');

Comment on lines +3332 to +3335
providers = fetchedProviders.isEmpty ? [GFNConstants.defaultProvider] : fetchedProviders
if settings.selectedProviderIdpId.isEmpty {
settings.selectedProviderIdpId = providers.first?.idpId ?? GFNConstants.defaultProvider.idpId
persistSettings()
}
}
if authSession != nil {
Task {
Comment on lines 925 to 930
function updatePhysicalControllerButton() {
const enabled = streamerPreferences.physicalControllerPassthrough;
if (physicalControllerValue) {
physicalControllerValue.textContent = enabled ? 'On' : 'Off';
}
setToggleRowState(physicalControllerBtn, enabled);
}
function togglePhysicalControllerPassthrough() {
updateStreamerPreference('physicalControllerPassthrough', !streamerPreferences.physicalControllerPassthrough);
updatePhysicalControllerButton();
if (!streamerPreferences.physicalControllerPassthrough && nativeGamepadState?.connected) {
sendCurrentGamepadState(null);
physicalControllerValue.textContent = 'Auto';
}
setToggleRowState(physicalControllerBtn, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants