MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.59k stars 623 forks source link

SPM Binary URL Fix #1949

Closed mattmaddux closed 1 year ago

mattmaddux commented 1 year ago

This PR puts the SPM binaries directly in the repository (under the "bin" directory). It also updates the Package.swift file to reflect that change.

Minor changes were also made to the SPM build script so the url is now correct.

However, the SPM script might not build correctly with the newest version of Xcode and the most recent changes to MailCore2, and this does not fix that. It should allow SPM to work correctly, though.

rbosch commented 1 year ago

@mattmaddux appreciate the work. I tried it, but getting the following error: failed downloading 'https://github.com/MailCore/mailcore2/raw/master/bin/MailCore2-2020-09-24.xcframework.zip' which is required by binary target 'MailCore2': badResponseStatusCode(404)

What I did was the following. gh repo clone https://github.com/MailCore/mailcore2 cd mailcore2 gh pr checkout 1949 then added the mailcore2 to my xcode project (via local)

When I try to access the URL, the following error occurs: https://github.com/MailCore/mailcore2/raw/master/bin/MailCore2-2020-09-24.xcframework.zip Github response with: The 'MailCore/mailcore2' repository doesn't contain the 'bin/MailCore2-2020-09-24.xcframework.zip' path in 'master'.

mattmaddux commented 1 year ago

Yeah, the url points to the MailCore repo, so it won't work until it's merged.

rbosch commented 1 year ago

Aha, Ok. Thanks for the feedback!

IMCHO commented 1 year ago

I'm just wondering when it's gonna be merged. 👀

mattmaddux commented 1 year ago

@IMCHO I have updated the Package.swift over on my fork so that the url points to it's own copy of the binaries, rather than this repo. That should mean that in the meantime you should be able to add my fork to your project instead and it should work. I'm not going to be maintaining it, however. So it's just a temporary measure until this gets merged.

You can find it at https://github.com/mattmaddux/mailcore2

rbosch commented 1 year ago

thanks @mattmaddux ! Works now.

ryanleesipes commented 1 year ago

Any plans to merge this?

IMCHO commented 1 year ago

@dinhvh Please check this PR, if you don't mind. Thanks.

rokas-ambrazevicius commented 1 year ago

It allows adding the package 👍 Works on simulator and works on iOS 16 with Xcode 14 when:

var session = MCOIMAPSession()
session.isVoIPEnabled = false

Further reading regarding iOS 16 and Xcode 14 - https://github.com/MailCore/mailcore2/issues/1955

Big thanks 🙇‍♂️ to @mattmaddux

haithngn commented 1 year ago

Many thanks, @mattmaddux. @dinhvh please consider storing the binary files on another repository of our Mailcore organizer.