wordpress-mobile / WordPress-iOS-Shared

Shared components used in building the WordPress iOS apps and other library components
GNU General Public License v2.0
18 stars 22 forks source link

Add Swift Package Manager support #321

Closed crazytonyli closed 1 year ago

crazytonyli commented 1 year ago

Unlike similar PRs to other libraries, I didn't split this SPM support change into two PRs, because the complication of "WPAnalyticsTests". I can't get this test to compile in Swift Package Manager, due to we have to use Swift version of Quick and OCMock (which is Objective-C).

And, I ended up deleting this test case. 🥲

Can't get it to compile is the main reason of course, but also I don't see this test provides much value. I'm not familiar with OCMock, but just by reading the code, I think the verification logic (invoked from OCMock) seems all about "verifying a method is indeed called when a method is called".


crazytonyli commented 1 year ago

If I understand it correctly, Test Analytics of this project is set to only collect test data of the trunk branch. I'll merge this PR and check out the trunk branch to make sure the Test Analytics set up is not broken.

crazytonyli commented 1 year ago

I'll merge this PR and check out the trunk branch to make sure the Test Analytics set up is not broken.

Yep, it's broken. 🤦‍♂️

I've opened an issue for it #324, and I'll look into it later.