Skip to content
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

[SR-5922] Fix-it for API availability inserts iOSApplicationExtension instead of iOS on frameworks #48481

Open
NachoSoto opened this issue Sep 18, 2017 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation

Comments

@NachoSoto
Copy link
Contributor

Previous ID SR-5922
Radar rdar://problem/34519059
Original Reporter @NachoSoto
Type Bug
Environment

Swift version 4.0 (swiftlang-900.0.63 clang-900.0.37)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI
Assignee None
Priority Medium

md5: e3ad821af15630b21949107e255f13e2

Issue Description:

On an iOS framework with a deployment target of iOS 10.0, the following code:

let view = UIStackView()
view.setCustomSpacing(0, after: UIView())

Produces:

'setCustomSpacing(_:after:)' is only available on iOS application extension 11.0 or newer
Add 'if #available' version check

With this fixit:

if #available(iOSApplicationExtension 11.0, *) {
  ...
}

However, that code ends up not being invoked, because the container is not an extension (in my particular project, this framework is used in an app AND an extension though, not sure if that's relevant).

@belkadan
Copy link
Contributor

@devincoughlin, do you remember how we pick a platform for this?

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation
Projects
None yet
Development

No branches or pull requests

2 participants