Skip to content

Xcode 14 - Warnings related to iOS 11 support (Swift Package Manager)#610

Merged
NSExceptional merged 3 commits into
FLEXTool:masterfrom
kikeenrique:master
Jul 31, 2022
Merged

Xcode 14 - Warnings related to iOS 11 support (Swift Package Manager)#610
NSExceptional merged 3 commits into
FLEXTool:masterfrom
kikeenrique:master

Conversation

@kikeenrique

@kikeenrique kikeenrique commented Jul 17, 2022

Copy link
Copy Markdown
Contributor

Hi,
I would like to contribute fixing a recent warning.

The new Xcode 14 uses iOS SDK 11.0 as base, and compiling in this Xcode shows a warning.
Handle this restriction relying on swift version.

Regards and comments welcomed

@NSExceptional

Copy link
Copy Markdown
Collaborator

Hi, thank you!

How does this compile though? Shouldn't there be a plain #else instead of an #elseif?

@kikeenrique

Copy link
Copy Markdown
Contributor Author

I don't think it's needed to provide all if alternatives to be compilable.
In this case, 5.0 is prior to package file swift-tools-version 5.3, which correspond to swift version 5.3. So it won't be possible to compile with a version out of the covered toolchain.

I did tested it in a custom project, I will test it on the example SPM in the repo, just in case.

@kikeenrique

kikeenrique commented Jul 17, 2022

Copy link
Copy Markdown
Contributor Author

An unexpected problem, example SPM project uses Reflex (I just learned this existed) instead of Flex package.
Also, current example SPM project doesn't compile, as it points to a local directory
repositoryURL = "file:///Users/tanner/Repos/Reflex";

To check that it was working, in my fork I've updated example SPM project in branch update-example to use a local Flex package, which uses SPM from the local repo (it uses a relative path), instead of resolving to GitHub

@NSExceptional

Copy link
Copy Markdown
Collaborator

I guess it's not technically required since it will compile as long as you're using swift 5 at least, but for clarity's sake, can we change the else to just an #else and remove the condition?

@kikeenrique

Copy link
Copy Markdown
Contributor Author

Yes, of course. Tested and pushed.

@kikeenrique

Copy link
Copy Markdown
Contributor Author

Hi, I've updated branch with latests commits. It's still in good shape.

@NSExceptional

Copy link
Copy Markdown
Collaborator

I missed your reply, whoops! Thank you! Merging now

@NSExceptional
NSExceptional merged commit 56d9074 into FLEXTool:master Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants