BLACK FRIDAY: Save 50% on all my Swift books and bundles! >>

Removing a widget family

Forums > iOS

While noodling around with widgets I added a .systemMedium type. I have not been able to make it look good so I removed it from my code in three places

  1. The PreviewProvider struct only has one for .systemSmall
  2. the Widget struct says supportedFamilies([.systemSmall])
  3. The ....WidgetEntryView doesn't reference it any more

and yet, when I build and deploy the app I get this error in Xcode. I've deleted the app and done a fresh install, but something is still insisting that it wants a systemMedium widget even though I have removed it

"Request widget family (systemMedium) is not supported by this widget kind"

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.test.Weather-Widget' error: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "com.apple.springboard" failed." UserInfo={NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace)., BSErrorCodeDescription=RequestDenied, NSUnderlyingError=0x48c01a880 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=3 "Request widget family (systemMedium) is not supported by this widget kind (Weather_Widget)" UserInfo={NSLocalizedDescription=Request widget family (systemMedium) is not supported by this widget kind (Weather_Widget)}},

1      

Found it, it's a scheme setting

Product > Scheme > Edit Scheme (select the widget one) > Run

Under 'Arguments' > 'WidgetKit Environment', change Family to .systemSmall

   

Nice! Thanks for returning with the correct answer!

You have one more task!

PLEASE mark your answer as SOLVED.

Keep Coding!

   

Save 50% in my WWDC sale.

SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.