Skip to content

Add dedicated secrets file for Reader #24463

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

Merged
merged 6 commits into from
Apr 16, 2025
Merged

Add dedicated secrets file for Reader #24463

merged 6 commits into from
Apr 16, 2025

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Apr 16, 2025

As a result, the secrets files for the other apps updated too. That's because since the last update we removed the App Center API key from them (see also
9348997)

Part of https://linear.app/a8c/issue/CMM-260/configure-reader-target

Note

The only Reader-specific values currently tracked are the WordPress.com app id and the Sentry DSN

As a result, the secrets files for the other apps updated too.
That's because since the last update we removed the App Center API key
from them.

See also
9348997
@mokagio mokagio requested review from crazytonyli, kean and a team April 16, 2025 02:54
@mokagio mokagio added this to the 25.9 milestone Apr 16, 2025
@mokagio mokagio added the Tooling Build, Release, and Validation Tools label Apr 16, 2025
@mokagio mokagio self-assigned this Apr 16, 2025
@mokagio mokagio enabled auto-merge April 16, 2025 02:55
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 25.9. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 16, 2025

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number27363
VersionPR #24463
Bundle IDorg.wordpress.alpha
Commit910775d
Installation URL6fo7o14qe0390
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 16, 2025

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number27363
VersionPR #24463
Bundle IDcom.jetpack.alpha
Commit910775d
Installation URL7b22ifk2bj7kg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@@ -3,4 +3,4 @@

WP_PUSH_NOTIFICATION_APP_ID = TBD
WP_BUILD_CONFIGURATION = alpha
WP_APP_URL_SCHEME = TBD
WP_APP_URL_SCHEME = wpreader
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This value could also be specialized by build configuration, e.g.:

WP_APP_URL_SCHEME = wpdebug

WP_APP_URL_SCHEME = wordpress

but I'm not sure if we need to?

Copy link
Contributor

Choose a reason for hiding this comment

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

WP_APP_URL_SCHEME should be one for each app identifier. If I'm not mistaken, debug and release builds share the same app identifier, but alpha builds use a different one.

We need to use the bundle to the class, otherwise UIKit will look for
the storyboard in the app (Reader) when the file is in Keystone.
@@ -32,9 +32,12 @@
"file": "iOS/JPiOS/Jetpack-Secrets.swift",
"destination": "~/.configure/wordpress-ios/secrets/Jetpack-Secrets.swift",
"encrypt": true
},
{
"file": "iOS/Reader/Reader-Secrets.swift",
Copy link
Contributor Author

@mokagio mokagio Apr 16, 2025

Choose a reason for hiding this comment

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

Something not obvious to me was that the source file cannot be called Secrets.swift, even though the Reader prefix seems redundant in a folder called Reader.

The reason for that is that when configure encrypts the files locally, it uses the file name. And given we already have a source file called Secrets.swift we cannot name this new one that.

@@ -108,7 +108,7 @@ final class ReaderTabViewController: UITabBarController, UITabBarControllerDeleg
}

private func makeNotificationsViewController() -> UIViewController {
let notificationsVC = UIStoryboard(name: "Notifications", bundle: nil)
let notificationsVC = UIStoryboard(name: "Notifications", bundle: Bundle(for: Self.self))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Required to avoid a crash due to the storyboard in Reader being part of Keystone, not the app bundle

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#24464 follows up to this and addresses all such accesses for the notifications storyboard.

This is so we can make it use the bundle of the class conforming to it
instead of using `.main`, which fails if the class and its nib are in a
framework (Keystone)
@mokagio mokagio added this pull request to the merge queue Apr 16, 2025
Merged via the queue into trunk with commit 3458122 Apr 16, 2025
32 of 34 checks passed
@mokagio mokagio deleted the mokagio/reader-secrets branch April 16, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tooling Build, Release, and Validation Tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants