Search code examples
iosiphoneswifttoday-extension

iOS 8 widget doesn't run on iPhone 6+ 8.0.2. xCode 6.1


I have a cocoapods workspace project written in obj-c with ios7 target and ios8.1 sdk. When i add a new widget (today extension) target, and set the app id to .today, add a provisioning profile, it runs fine on the simulator. On the device however, i can't start it using debugging (Xcode is stuck in 'waiting to attach' mode) and if i manually open 'Today' view i can't see my app name in the 'Edit' button. The host app works just fine after adding the new target. I have arm64 architecture enabled in the widget. I tried the widget in both swift and obj-c.


Solution

    1. Under project settings, for your widget's target, make sure the "iOS Deployment Target" is set to a value that is equal to or less than the iOS version installed on your device.

    (For example, my device was on 8.0, but the deployment target was set to 8.1 by default. Changing it to 8.0 fixed my problem.)

    1. Once you have done that, run the host application. Then go to your today view, tap "Edit" and your widget should be in the list. Once your host application is deployed to the device, you should be able to run and debug your widget target directly.