When calling a Swift function, method, or initializer, Xcode may report:
Argument labels do not match any available overloads
This error means that the argument-label combination at the call site does not match any available overload of the function, method, or initializer the compiler is considering.
Common causes include misspelled labels, confusing external argument labels with internal parameter names, adding labels to unlabeled parameters, using outdated API signatures, changing custom initializers, passing the wrong argument types, or selecting the wrong SwiftUI overload because of a Binding or optional mismatch.
The most reliable fix is to inspect the current declaration and make the argument labels, order, and types match one available signature exactly.
- What does “Argument labels do not match any available overloads” mean?
- What is an argument label?
- What is an overload?
- Typical situations where this error appears
- Common causes
- 1. A simple argument-label typo
- 2. Using the internal parameter name at the call site
- 3. Adding a label to an unlabeled parameter
- 4. Omitting a required argument label
- 5. Arguments are supplied in the wrong order
- 6. The function signature changed
- 7. An initializer uses different labels
- 8. A custom initializer changed the available call syntax
- 9. No overload accepts the supplied label combination
- 10. A wrong argument type removes the intended overload
- 11. Optional and non-optional types do not match
- 12. A SwiftUI Binding is replaced with a plain value
- 13. A custom SwiftUI @Binding property receives the wrong value
- 14. A trailing-closure label is wrong
- 15. Multiple trailing-closure labels do not match
- 16. An SDK update renamed an argument label
- 17. An old tutorial or sample uses outdated syntax
- 18. A generic type mismatch prevents the correct overload from being selected
- 19. A same-named function or type exists in another module
- 20. An earlier argument is the real problem
- What to check first
- Solution 1: Match argument labels to the declaration
- Solution 2: Use external argument labels
- Solution 3: Do not label parameters declared with _
- Solution 4: Do not omit required labels
- Solution 5: Follow parameter order
- Solution 6: Update calls after changing a function signature
- Solution 7: Use Xcode rename refactoring
- Solution 8: Match initializer labels exactly
- Solution 9: Check the effect of custom initializers
- Solution 10: Add the overload the call actually needs
- Solution 11: Fix argument types
- Solution 12: Unwrap optionals before calling a non-optional overload
- Solution 13: Pass SwiftUI bindings correctly
- Solution 14: Pass bindings to custom @Binding properties
- Solution 15: Inspect custom SwiftUI view initializers
- Solution 16: Match trailing-closure labels
- Solution 17: Match every multiple trailing-closure label
- Solution 18: Update old labels after an SDK change
- Solution 19: Do not assume old sample code still matches
- Solution 20: Add generic type context when overload resolution is ambiguous
- Solution 21: Make closure types explicit
- Solution 22: Qualify same-named types with the module
- Solution 23: Check access control
- Solution 24: Reduce a complex call to a known valid signature
- Solution 25: Use typed intermediate values
- Solution 26: Validate arguments from left to right
- Solution 27: Match SwiftUI Picker selection and tag types
- Solution 28: Keep NavigationLink and navigationDestination types consistent
- Solution 29: Simplify overloaded APIs when possible
- Solution 30: Rebuild the call from Xcode autocomplete
- If the error occurs in SwiftUI
- If the error occurs in an initializer
- If the error occurs in a function call
- If the labels appear correct
- Will Clean Build Folder or deleting DerivedData fix it?
- What you should avoid
- Fast troubleshooting checklist
- Summary
What does “Argument labels do not match any available overloads” mean?
Swift allows multiple functions with the same name when their parameter lists differ.
For example:
func show(name: String) { print(name) }
func show(id: Int) {
print(id)
}
These calls are valid:
show(name: "Alice") show(id: 10)
This one is not:
show( username: "Alice" )
No overload accepts the label username:.
What is an argument label?
A Swift parameter can have an external argument label and a separate internal parameter name:
func move( from start: Int, to end: Int ) { print(start) print(end) }
Here:
- External argument labels: from and to
- Internal parameter names: start and end
The call site uses the external labels:
move( from: 1, to: 10 )
This is incorrect:
move( start: 1, end: 10 )
What is an overload?
Functions can share the same name while differing in argument labels, parameter types, or parameter counts:
func load(id: Int) { }
func load(name: String) {
}
func load(
name: String,
cached: Bool
) {
}
Swift uses the call site’s labels and types to choose an overload.
If none of the available signatures match, overload resolution fails.
Typical situations where this error appears
- An argument label is misspelled
- An internal parameter name is used instead of the external label
- A label is added to an unlabeled parameter
- A required argument label is omitted
- Arguments are in the wrong order
- A function signature changed
- An initializer label changed
- Old API labels are used after an SDK or package update
- A SwiftUI initializer is being called incorrectly
- A custom view initializer no longer matches its call sites
- A Binding is confused with a plain value
- An optional mismatch removes the intended overload candidate
- A trailing-closure label is wrong
- A generic type mismatch prevents overload selection
Common causes
1. A simple argument-label typo
func greet( name: String ) { }
greet(
name: "Alice"
)
Using username: instead would not match this declaration.
2. Using the internal parameter name at the call site
func move( from start: Int, to end: Int ) { }
Incorrect:
move( start: 1, end: 10 )
Correct:
move( from: 1, to: 10 )
3. Adding a label to an unlabeled parameter
func square( _ value: Int ) -> Int { value * value }
Incorrect:
square( value: 10 )
Correct:
square(10)
4. Omitting a required argument label
func show( title: String ) { }
show(
title: "Hello"
)
Calling show("Hello") does not match this signature.
5. Arguments are supplied in the wrong order
func register( name: String, email: String ) { }
register(
name: "Alice",
email: "alice@example.com"
)
6. The function signature changed
Old:
func save( name: String ) { }
New:
func save( filename: String ) { }
An old call still using name: will no longer match.
7. An initializer uses different labels
struct User { let name: String
init(
username: String
) {
self.name = username
}
}
let user = User(
username: "Alice"
)
8. A custom initializer changed the available call syntax
struct ProfileView: View { let name: String
init(
userName: String
) {
self.name = userName
}
var body: some View {
Text(name)
}
}
ProfileView(
userName: "Alice"
)
9. No overload accepts the supplied label combination
func open( id: Int ) { }
func open(
name: String
) {
}
No existing overload accepts both id and name together.
10. A wrong argument type removes the intended overload
func show( title: String, count: Int ) { }
show(
title: "Items",
count: 10
)
If title were an Int instead, the intended overload would stop matching even though the labels look correct.
11. Optional and non-optional types do not match
func show( user: User ) { }
let user: User? = loadUser()
An optional must usually be unwrapped before calling the User overload.
12. A SwiftUI Binding is replaced with a plain value
@State private var name = ""
TextField(
"Name",
text: $name
)
$name is Binding<String>, while name is String.
13. A custom SwiftUI @Binding property receives the wrong value
struct EditView: View { @Binding var name: String
var body: some View {
Text(name)
}
}
EditView(
name: $name
)
14. A trailing-closure label is wrong
func perform( success: () -> Void, failure: () -> Void ) { }
perform {
print("Success")
} failure: {
print("Failure")
}
15. Multiple trailing-closure labels do not match
Later trailing closures must use the labels declared by the function.
16. An SDK update renamed an argument label
If an older call uses:
SomeAPI( value: data )
but the current API expects:
SomeAPI( content: data )
the old label will no longer match.
17. An old tutorial or sample uses outdated syntax
Swift, SwiftUI, and third-party package APIs can evolve over time.
18. A generic type mismatch prevents the correct overload from being selected
The labels may be correct, but unresolved or incompatible generic arguments can eliminate the intended overload.
19. A same-named function or type exists in another module
You may be calling the overloads of a different declaration than the one you intended.
20. An earlier argument is the real problem
Once Swift fails to match an earlier label or type, later arguments can produce misleading overload diagnostics.
What to check first
1. Inspect the current declaration
Use Xcode’s definition navigation to inspect the real signature.
For:
func move( from start: Int, to end: Int )
the call-site labels are from: and to:.
2. Check Xcode autocomplete
Retype the function or initializer name and inspect the overloads Xcode currently offers.
This is especially useful after refactoring or updating an SDK or package.
3. Verify argument types as well as labels
A matching label is not enough if its value has the wrong type.
Important: Despite the wording of the diagnostic, the root cause may be an optional, Binding, generic, or other type mismatch rather than the label itself.
Solution 1: Match argument labels to the declaration
func greet( name: String ) { }
greet(
name: "Alice"
)
Solution 2: Use external argument labels
func move( from start: Int, to end: Int ) { }
move(
from: 1,
to: 10
)
Solution 3: Do not label parameters declared with _
func square( _ value: Int ) -> Int { value * value }
let result = square(10)
Solution 4: Do not omit required labels
func show( title: String ) { }
show(
title: "Hello"
)
Solution 5: Follow parameter order
func send( to address: String, subject: String, body: String ) { }
send(
to: "example@example.com",
subject: "Hello",
body: "Message"
)
Solution 6: Update calls after changing a function signature
func save( filename: String ) { }
save(
filename: "data.json"
)
Solution 7: Use Xcode rename refactoring
When changing parameter names or argument labels, Xcode’s rename refactoring can update call sites and reduce stale labels throughout the project.
Solution 8: Match initializer labels exactly
struct User { let name: String
init(
username: String
) {
self.name = username
}
}
let user = User(
username: "Alice"
)
Solution 9: Check the effect of custom initializers
struct Product { let name: String let price: Int
init(
title: String,
price: Int
) {
self.name = title
self.price = price
}
}
let product = Product(
title: "Book",
price: 1000
)
Do not assume the property names automatically remain the initializer labels after defining a custom init.
Solution 10: Add the overload the call actually needs
func load( id: Int, name: String ) { }
if callers legitimately need to provide both values together.
Solution 11: Fix argument types
func show( title: String, count: Int ) { }
show(
title: "Items",
count: 10
)
Solution 12: Unwrap optionals before calling a non-optional overload
func show( user: User ) { }
if let user {
show(
user: user
)
}
Solution 13: Pass SwiftUI bindings correctly
@State private var text = ""
TextField(
"Name",
text: $text
)
Solution 14: Pass bindings to custom @Binding properties
struct EditView: View { @Binding var name: String
var body: some View {
TextField(
"Name",
text: $name
)
}
}
struct ContentView: View {
@State private var name = ""
var body: some View {
EditView(
name: $name
)
}
}
Solution 15: Inspect custom SwiftUI view initializers
struct UserView: View { let name: String
var body: some View {
Text(name)
}
}
UserView(
name: "Alice"
)
If you want a different label, define a custom initializer that provides it.
Solution 16: Match trailing-closure labels
func perform( success: () -> Void, failure: () -> Void ) { }
perform {
print("Success")
} failure: {
print("Failure")
}
Solution 17: Match every multiple trailing-closure label
Later trailing closures must use the exact labels required by the declaration.
Solution 18: Update old labels after an SDK change
If the current signature uses:
SomeAPI( content: content )
replace older calls that still use a renamed label.
Use current Xcode autocomplete, Quick Help, the declaration, and current package documentation.
Solution 19: Do not assume old sample code still matches
When code is copied from an older article or Q&A, compare every argument label with the API version your project currently compiles against.
Solution 20: Add generic type context when overload resolution is ambiguous
let values: [String] = []
process(values)
Giving empty or otherwise ambiguous values a concrete type can restore the intended overload candidate.
Solution 21: Make closure types explicit
let result = numbers.map { (value: Int) -> String in
String(value)
}
This can help when generic closure inference is contributing to overload failure.
Solution 22: Qualify same-named types with the module
MyFramework.User( name: "Alice" )
This makes it clear which initializer set should be considered.
Solution 23: Check access control
An initializer expected from another module may not be visible unless its access level allows it:
public init( name: String ) { self.name = name }
Solution 24: Reduce a complex call to a known valid signature
For a large call such as:
CustomView( title: title, user: user, settings: settings, enabled: enabled )
compare each argument against one specific initializer rather than trying to reason about every overload at once.
Solution 25: Use typed intermediate values
let titleValue: String = title let userValue: User = user let enabledValue: Bool = enabled
CustomView(
title: titleValue,
user: userValue,
enabled: enabledValue
)
This separates label problems from type problems.
Solution 26: Validate arguments from left to right
If:
SomeView( title: count, enabled: true )
uses an Int where title requires String, fix that first:
SomeView( title: String(count), enabled: true )
A later overload diagnostic may disappear.
Solution 27: Match SwiftUI Picker selection and tag types
@State private var selected = 0
Picker(
"Option",
selection: $selected
) {
Text("One").tag(0)
Text("Two").tag(1)
}
A mismatched tag type can make the intended generic Picker initializer impossible to resolve.
Solution 28: Keep NavigationLink and navigationDestination types consistent
struct User: Hashable { let id: Int }
NavigationLink(
value: user
) {
Text("Open")
}
.navigationDestination(
for: User.self
) { user in
UserView(user: user)
}
SwiftUI generic APIs require both labels and generic data types to line up.
Solution 29: Simplify overloaded APIs when possible
Large sets of similar overloads can make compiler diagnostics harder to interpret.
Clearer names can sometimes be preferable:
func loadUser(id: Int) { }
func loadUser(name: String) {
}
Solution 30: Rebuild the call from Xcode autocomplete
If an old call has several stale labels, retyping the method or initializer name and selecting a current autocomplete candidate can be faster and safer than patching the old call manually.
If the error occurs in SwiftUI
Check the following in order:
- Inspect the currently available initializer overloads.
- Check argument labels.
- Check argument order.
- Check every argument type.
- Check @Binding versus plain values.
- Check optional versus non-optional values.
- Check trailing-closure labels.
- Check generic data types.
- Fix any earlier compiler error first.
If the error occurs in an initializer
struct User { let name: String let age: Int
init(
username: String,
userAge: Int
) {
self.name = username
self.age = userAge
}
}
let user = User(
username: "Alice",
userAge: 20
)
The call must use the initializer’s external labels, not necessarily the stored-property names.
If the error occurs in a function call
func upload( file data: Data, completion: () -> Void ) { }
upload(
file: data
) {
print("Completed")
}
The external label and trailing closure match the declaration.
If the labels appear correct
Check for these less obvious causes:
- An argument has the wrong type
- Optional versus non-optional mismatch
- Binding versus plain value mismatch
- A generic parameter cannot be inferred
- The compiler is considering another overload
- A custom initializer changed available signatures
- A same-named type from another module is being used
- The SDK version changed the API signature
Will Clean Build Folder or deleting DerivedData fix it?
Usually not.
This diagnostic normally reflects a mismatch between source code and an available function or initializer signature.
You can clean the build folder:
Product → Clean Build Folder
or delete DerivedData:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
when troubleshooting stale build artifacts, but neither action corrects invalid argument labels or incompatible types.
Note: Inspect the declaration and call site before treating this as an Xcode cache problem.
What you should avoid
Do not randomly add or remove argument labels until the compiler accepts the call.
Argument labels communicate the meaning of each parameter and form part of Swift’s function-call interface.
For example:
move( from: 1, to: 10 )
is intentionally expressive. Use the labels defined by the API rather than treating them as arbitrary syntax.
Fast troubleshooting checklist
- Open the function, method, or initializer declaration.
- Check external argument labels.
- Do not confuse external labels with internal parameter names.
- Check whether a parameter uses _ and therefore has no label.
- Verify argument order.
- Verify every argument type.
- Check optional versus non-optional values.
- In SwiftUI, check Binding versus plain values.
- Review custom initializers.
- Inspect available overloads in autocomplete.
- Check trailing-closure labels.
- Check generic type inference.
- Check for API signature changes after SDK or package updates.
- Inspect arguments before the highlighted problem.
- Split complex calls and add explicit types when needed.
Summary
Swift’s “Argument labels do not match any available overloads” error means that the argument-label combination at a call site does not match any function, method, or initializer overload currently available.
Common causes include misspelled labels, confusing external labels with internal parameter names, labeling an unlabeled parameter, incorrect argument order, function signature changes, and outdated API calls.
However, the labels themselves are not always the real problem. A wrong argument type, optional mismatch, SwiftUI Binding mismatch, or generic inference failure can remove the intended overload and leave Xcode reporting a label mismatch.
Start by inspecting the current declaration with Xcode’s definition navigation, Quick Help, and autocomplete. Then compare every label, argument order, and type with one specific overload.
In SwiftUI and generic APIs, also fix earlier type or binding diagnostics first because the argument-label error may only be a secondary result of overload resolution failure.
