Search code examples
ioswidgetios8ios-app-extension

How to create a Today widget programmatically without storyboard on iOS8?


I tried to delete the storyboard file and related Info.plist entry but this time extension stopped working; it doesn't even launch from XCode.

The operation couldn’t be completed. (LaunchServicesError error 0.)

It is easy on the regular app (containing app) as we see it's entry point and application delegate, but how to do it on extensions too?


Solution

  • Remove NSExtensionMainStoryboard from Info.plist Add NSExtensionPrincipalClass = YourViewController

    Don't forget to create your own view in loadView