ios8-today-widget

Custom button not displaying in Today Extension

随声附和 提交于 2019-12-07 02:45:25
I have some custom buttons in my host app that I'd like to use in the Today Extension. They work just fine in the app but do not display in the widget. The button on the left is my custom button class, the one on the right is a UIButton. If I change it to my custom class it too disappears. Any thoughts why this might be happening? ----------------------EDIT------------------------ Well, somehow I managed to get it to display but sometimes it's not drawing the whole button and sometimes it's drawing the button incorrectly. Any help would be appreciated! Thanks 来源: https://stackoverflow.com

Exception when fetching parse.com user data in iOS 8 Today Extension

会有一股神秘感。 提交于 2019-12-05 13:07:06
I am trying to fetch a list of PFObjects of a PFUser to display in the iOS 8 Today Widget. Following this blog post by Parse, I've enabled the same App Groups and Keychain Sharing in both my main app and extension in Xcode. I've also enabled the following in the AppDelegate of my main app and the viewDidLoad of my Today Extension: [Parse enableLocalDatastore]; [Parse enableDataSharingWithApplicationGroupIdentifier:@"group.com.me.myapp" containingApplication:@"com.me.myapp"]; [Parse setApplicationId:@"myAppId" clientKey:@"myClientId"]; In widgetPerformUpdateWithCompletionHandler , I constructed

WCSession and Today Widget

自古美人都是妖i 提交于 2019-12-04 15:59:13
问题 I've an app with a today extension and a watch app. From the main app WCSession works fine and data is transferred to the watch and received correctly but when I try to send or receive data through the WCSession in the today widget the property paired and watchAppInstalled of the session are set to false so calling transferUserInfo: does nothing and session:didReceiveUserInfo: is never called. I know I can open the app using openURL and then send the new data but I want to do that without

Today Extension height for iPad much larger than specified

霸气de小男生 提交于 2019-12-04 14:55:55
问题 My Today extension needs to have a dynamic height based on the contents the widget is displaying. I was able to achieve this by adding a constraint on my bottom-most element: bottom layout guide's top is less than or equal to the bottom most element's bottom, with a constant of 0, priority 999, multiplier 1. This works exactly as expected on iPhones - the widget height fits all content plus the default bottom margin is applied before the next widget is shown. But on iPad it seems to be

Today Extension Crashes before launching on iOS 8.1.2

本小妞迷上赌 提交于 2019-12-03 10:28:07
I've been making a today extension that downloads articles from a feed and display the latest ones. The whole thing worked fine on iOS 8, still worked on iOS 8.1, then came iOS 8.1.2 and we started having complaints about the today extension not working anymore. I tried debugging on iOS 8.1.2 devices, and before the extension even launch, it crashes with this error : Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: <__NSConcreteUUID 0x174027280> 5AFB07AB-5DCD-46FE-8D07-44DE0F3789F2)' I have read this post about

WCSession and Today Widget

大兔子大兔子 提交于 2019-12-03 10:13:28
I've an app with a today extension and a watch app. From the main app WCSession works fine and data is transferred to the watch and received correctly but when I try to send or receive data through the WCSession in the today widget the property paired and watchAppInstalled of the session are set to false so calling transferUserInfo: does nothing and session:didReceiveUserInfo: is never called. I know I can open the app using openURL and then send the new data but I want to do that without leaving Notification Center. Does anyone know a nice workaround for this problem? If the watch app is

Today Extension height for iPad much larger than specified

此生再无相见时 提交于 2019-12-03 09:17:59
My Today extension needs to have a dynamic height based on the contents the widget is displaying. I was able to achieve this by adding a constraint on my bottom-most element: bottom layout guide's top is less than or equal to the bottom most element's bottom, with a constant of 0, priority 999, multiplier 1. This works exactly as expected on iPhones - the widget height fits all content plus the default bottom margin is applied before the next widget is shown. But on iPad it seems to be setting my widget's height equal to the max height Notification Center will allow a widget to be - there's a

How to rename an iOS 8 Today Widget?

*爱你&永不变心* 提交于 2019-12-03 04:56:36
I've just started experimenting with adding an iOS 8 Today Widget to my app, it's going ok so far but I followed the original template and got my widget created with TodayWidget as its name. In the context of my app's files in Xcode that target/product name is fine. But sadly this is the name that also displays within notification centre, above my widget. I've tried tracing through various names in my project that match what's being displayed but so far I've yet to find one that lets me update the name displayed. Anyone got any ideas? Select your widget under Project -> Targets. Under Info ->

Can we share App class in Today- Widget-Extension

徘徊边缘 提交于 2019-12-02 19:06:32
问题 I am developing an application where I have to use my some class in Today- Widget-Extension. But I am not getting any way to access those class. Is it possible to access application class in Today- Widget-Extension. 回答1: It is possible. First you need to set targets of your class to both aplication and extension. Second you need to put public keyword to your class. You can read more on that here. 来源: https://stackoverflow.com/questions/31158925/can-we-share-app-class-in-today-widget-extension

Can we share App class in Today- Widget-Extension

别等时光非礼了梦想. 提交于 2019-12-02 09:13:32
I am developing an application where I have to use my some class in Today- Widget-Extension. But I am not getting any way to access those class. Is it possible to access application class in Today- Widget-Extension. It is possible. First you need to set targets of your class to both aplication and extension. Second you need to put public keyword to your class. You can read more on that here . 来源: https://stackoverflow.com/questions/31158925/can-we-share-app-class-in-today-widget-extension