Skip to content

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented Jun 13, 2025

This is the final part of the CocoaPods removal work. See https://linear.app/a8c/issue/AINFRA-446.

The changes in Simperium/simperium-ios#624 made the Simperium Apple client available via SwiftPM, and this PR switches from the CocoaPods version to it.

While at it, I also removed CocoaPods entirely. In hindsight, I should have saved the removal for a dedicated PR. But the footprint is small enough that I guess we can manage here, too.

Test

I logged into my account from the Simulator and verified that the notes syncing — which is what Simperium is in charge of — still works.

Screen.Recording.2025-06-16.at.11.33.59.AM.mov

Review

Only one developer required to review these changes, but anyone can perform the review.

Release

These changes do not require release notes.

@mokagio mokagio force-pushed the ainfra-446-migrate-simplenote-ios-pods-to-swiftpm-simperium branch from 9be4817 to f957588 Compare June 13, 2025 21:01
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 13, 2025

App Icon📲 You can test the changes from this Pull Request in Simplenote Prototype Build by scanning the QR code below to install the corresponding build.
App NameSimplenote Prototype Build
Build Number1301
VersionPR #1716
Bundle IDcom.codality.NotationalFlow.Alpha
Commiteb0c28d
Installation URL3van243a40el0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@mokagio mokagio force-pushed the ainfra-446-migrate-simplenote-ios-pods-to-swiftpm-simperium branch 2 times, most recently from 672d8fd to a8b0d30 Compare June 13, 2025 21:09
let presentAsPopover = UIDevice.sp_isPad() && traitCollection.horizontalSizeClass == .regular
let presentAsPopover = UIDevice.isPad && traitCollection.horizontalSizeClass == .regular
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When building Simperium via CocaoPods, all headers are accessible. When building with SwiftPM, only those explicitly configured as public in the Xcode project and imported in the umbrella header are.

This resulted in sp_isPad() no longer being available on my first Simperium-via-SwiftPM go. I could have made it public, but I noticed we already have an implementation in the app code base, so I just used that.

@mokagio mokagio force-pushed the ainfra-446-migrate-simplenote-ios-pods-to-swiftpm-simperium branch from a8b0d30 to 150037b Compare June 16, 2025 00:14
@mokagio mokagio marked this pull request as ready for review June 16, 2025 03:37
@mokagio mokagio added this to the Future milestone Jun 16, 2025
@mokagio mokagio added the tooling Related to anything that supports the building & maintaining of the project. label Jun 16, 2025
@mokagio mokagio self-assigned this Jun 16, 2025
@mokagio mokagio requested a review from a team June 16, 2025 03:37
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

Apart from docs nits, LGTM.

I also ran the pod deintegrate to validate that there was not trace left of CocoaPods on the project, and confirmed it didn't generate any diff1.

Footnotes

  1. well to be fair it did generate one, but only about formatting the line 1337 of the project.pbxproj from a one-liner into multiline without semantic change)

Comment on lines -16 to -20
#### CocoaPods

Simplenote for iOS uses [CocoaPods](http://cocoapods.org/) to manage third party libraries.
Third party libraries and resources managed by CocoaPods will be installed by the `rake dependencies` command above.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe instead of deleting this completely, replace it with #### SwiftPM section mentioning that's what it uses now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given SwiftPM is now the standard, or at least the recommended way to manage dependencies, would it be fair to expect folks to assume that's what's in use?

It's also apparent once one opens the project:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough.

And as long as the README for simperium itself indicates how to integrate it via SwiftPM (which arguably is also the now-standard and could be seen as not useful to document, but I still think it's useful to mention, including given it's known to not be super active/rarely updated so one could still wonder if it has been updated to SPM, and because it's integrated as a binary xcframework not source code and one has to provide the GH release path not just the repo and the checksum etc, right?). Once we have than on simperium then I agree no need to mention SPM specifically in SN client repos like here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as long as the README for simperium itself indicates how to integrate it via SwiftPM

Oh, for sure. I haven't had a chance to address your comments on Simplenote macOS and Simperium but I agree that for the library the SwiftPM + XCFramework setup deserves to be documented.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Begun adding docs for SwiftPM in Simperium via Simperium/simperium-ios@ba86678 and Simperium/simperium-ios@e3a3a1b

desc 'Open the project in Xcode'
task xcode: [:dependencies] do
sh "open #{XCODE_WORKSPACE}"
sh "open #{XCODE_PROJECT}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if using xed (command shipped with Xcode Command Line Tools to open a project in Xcode Editor) rather than open wouldn't be more idiomatic there? 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be honest, I think we should get rid of this task.

Maybe it's just me, but I always just use xed from the terminal. Never this.

I'd feel differently if we were code generating the Xcode project with Tuist or similar, because we could make the task kill any open Xcode, regenerate, and reopen Xcode—that's what Beeper does. But here, especially now that we don't have CocoaPods in the dependencies task, it seems unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed

Base automatically changed from ainfra-447-migrate-simplenote-ios-pods-to-swiftpm-wordpress-ratings-ios to trunk June 16, 2025 19:01
mokagio added 2 commits June 17, 2025 05:17
Just to keep in sync with macOS, where the version is necessary because
of code signing.
@mokagio mokagio enabled auto-merge June 16, 2025 19:18
@mokagio mokagio force-pushed the ainfra-446-migrate-simplenote-ios-pods-to-swiftpm-simperium branch from 1593adb to eb0c28d Compare June 16, 2025 19:18
@mokagio mokagio merged commit b484bb0 into trunk Jun 16, 2025
7 of 9 checks passed
@mokagio mokagio deleted the ainfra-446-migrate-simplenote-ios-pods-to-swiftpm-simperium branch June 16, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling Related to anything that supports the building & maintaining of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants