Skip to content

feat(mac): build full install URL for keyboard downloads 🍎 - #16463

Open
sgschantz wants to merge 6 commits into
epic/mac-configfrom
feat/mac/download-url
Open

feat(mac): build full install URL for keyboard downloads 🍎#16463
sgschantz wants to merge 6 commits into
epic/mac-configfrom
feat/mac/download-url

Conversation

@sgschantz

@sgschantz sgschantz commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Build the correct URL for downloading and installing packages, ensuring that they can be downloaded in the browser as a .kmp or download and installed directly in the Keyman Configuation app.

Fixes: #15541

Build-bot: release:mac

User Testing

  • TEST_PRIMARY_LANGUAGE:
    Select the preferred language in System Settings > General > Language & Region to Khmer.
    Inside Keyman Configuration, click on the Add Keyboard button and verify that it is presented in Khmer.

  • TEST_INSTALL_LINK:
    Inside Keyman Configuration, click on the Add Keyboard button to see the Keyboard Search window.
    Navigate to any keyboard listed, and press the "Install keyboard" button.
    Confirm that the keyboard installation begins.

  • TEST_DOWNLOAD_LINK:
    Inside Keyman Configuration, click on the Add Keyboard button to see the Keyboard Search window.
    Navigate to any keyboard listed, and scroll past the "Install keyboard" button to the link labeled "Package Download" -- the link should have a file name ending in '.kmp'.
    Click the link and verify that the .kmp file downloads to your Mac's downloads folder.

invoke download directly with url
change build to pass tier into info.plist of
configuration app so that it can be added to URL
pass language with keyboard search URL

Fixes: #15541
@keymanapp-test-bot

keymanapp-test-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

User Test Results

Test specification and instructions

Test Artifacts

@keymanapp-test-bot keymanapp-test-bot Bot changed the title feat(mac): build full install URL for keyboard downloads feat(mac): build full install URL for keyboard downloads 🍎 Aug 30, 2026
@keymanapp-test-bot keymanapp-test-bot Bot added this to the A19S36 milestone Aug 30, 2026
@keyman-server keyman-server modified the milestones: A19S36, B19S1 Aug 30, 2026
@sgschantz

Copy link
Copy Markdown
Contributor Author

@mcdurdin, a couple questions:
In DownloadCoordinator.swift, line 86, I've retained some logic around URLs that begin with "keyman" or "keyman:link". Is this obsolete now?
In SettingsContainer.swift, line 107, I use the same base url as in the Keyman 18, which includes a hard-coded '14.0' for the version. Should this be set dynamically to the major and minor version that is in use?

@sgschantz
sgschantz marked this pull request as ready for review August 31, 2026 13:48
@sgschantz
sgschantz requested a review from mcdurdin August 31, 2026 13:48
@sgschantz sgschantz linked an issue Aug 31, 2026 that may be closed by this pull request
@mcdurdin

Copy link
Copy Markdown
Member

In DownloadCoordinator.swift, line 86, I've retained some logic around URLs that begin with "keyman" or "keyman:link". Is this obsolete now?

We have logic on keyman.com which references keyman: but it is not used for macOS - only for Windows and Linux.

/**
 * Build a keyman://download/keyboard/<id>?bcp47=<bcp47> link
 * @param {string} id     id of keyboard to download
 * @param {string} bcp47  bcp47 tag to associate with keyboard on install
 */
function buildStandardKeymanProtocolDownloadLink(id, bcp47) {
  const url =
    'keyman://download/keyboard/' + encodeURIComponent(id) +
    (bcp47 == '' ? '' : '?bcp47=' + encodeURIComponent(bcp47));
  return url;
}

https://github.com/keymanapp/keyman.com/blob/474a0a72149aa280823ce3dd47c6823b7fa21fe2/cdn/dev/keyboard-search/install.js#L23-L33

I think we can eliminate it from here.


In SettingsContainer.swift, line 107, I use the same base url as in the Keyman 18, which includes a hard-coded '14.0' for the version. Should this be set dynamically to the major and minor version that is in use?

The version number should be hard-coded to '14.0'. This is the version of Keyman in which the surface was introduced. Only if we make changes, will we bump the surface version to the current Keyman version. That reduces the number of version number schemes we have to deal with -- and I wish all our APIs were versioned similarly -- tied to the min version of Keyman that works with them.

@mcdurdin mcdurdin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, only minor thoughts

Comment thread mac/Config/Config/DownloadCoordinator.swift Outdated
Comment thread mac/KeymanSettings/Sources/KeymanSettings/SettingsContainer.swift
@Meng-Heng

Meng-Heng commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Test Specs

  1. macOS Sequoia
  2. Keyman for macOS 19.0.277-alpha-test-16463

Test Prerequisites

  1. Remove previous version of Keyman for macOS from ~/Library/Input Method

Test Results

  • TEST_PRIMARY_LANGUAGE (PASSED):
  1. Select the preferred language in System Settings > General > Language & Region to Khmer
  2. In Keyman Configuration, click on the "Add Keyboard" button
  3. VERIFIED: It is presented in Khmer.
  • TEST_INSTALL_LINK (PASSED):
  1. Inside Keyman Configuration, click on the "Add Keyboard" button to see the Keyboard Search window
  2. Navigate to the Popular Keyboards list, and press the "Install keyboard" button
  3. VERIFIED: The keyboard installation begins
  4. Installed successfully.
  • TEST_DOWNLOAD_LINK (PASSED):
  1. Inside Keyman Configuration, click on the "Add Keyboard" button to see the Keyboard Search window
  2. Navigate to all keyboard list, and scroll past the "Install keyboard" button to the link labeled "Package Download"
  3. Click the link
  4. VERIFIED: The .kmp file downloaded to Mac's downloads folder.

@keymanapp-test-bot keymanapp-test-bot Bot removed the user-test-required User tests have not been completed label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

feat(mac): pass current display language to keyboard search

4 participants