New Widget Warning with latest Xcode Beta

Hi all,
I'm getting a new warning which says:

init(kind:provider:placeholder:content:)' is deprecated: use init(kind:provider:content:) instead

Which I changed according to the above, then got:

Incorrect argument label in call (have 'kind:provider:content:_:', expected 'kind:provider:placeholder:content:')

Tried to look in the Widget docs and they aren't updated yet.

Thanks,
Dan Uff


Answered by Documentation Engineer in 623068022
It doesn't look like you've changed the initialization of the StaticConfiguration to remove the placeholder: parameter. That was removed in Beta 3. Instead you need to add an implementation of placeholder(with:) to the Provider. I just posted some details in this thread: https://developer.apple.com/forums/thread/655182. See if that doesn't help get things back on track.
Can you post your code that you're using?
Sure, in a few mins. Thanks.
Here you go:



Accepted Answer
It doesn't look like you've changed the initialization of the StaticConfiguration to remove the placeholder: parameter. That was removed in Beta 3. Instead you need to add an implementation of placeholder(with:) to the Provider. I just posted some details in this thread: https://developer.apple.com/forums/thread/655182. See if that doesn't help get things back on track.
Yes, that worked. THANK YOU!
New Widget Warning with latest Xcode Beta
 
 
Q