today-extension

Ensuring 'Today' extension has updated information from Core Data

这一生的挚爱 提交于 2019-12-13 00:40:31
问题 I have an application and a today extension that are sharing a Core Data persistent store using a security group identifier. The main app updates the Core Data store and the extension only reads from the store. I am using a NSFetchedResultsController in both the app and the extension to retrieve the objects. This basically works, except that when the main app adds new objects to the store they aren't visible to the extension immediately. Similarly the extension can still see objects after

Size problems by converting iOS 9 today extension to iOS 10

那年仲夏 提交于 2019-12-12 17:11:38
问题 Good evening! I have big problems by understanding today extensions. I've read lot of tutorials and introductions but nothing helped me to understanding the problem. On iOS 9 the extension works fine - on iOS 10 not. My big issue is the auto resizing(?) of the widget in iOS 10. On iOS 9 the widget show my table view in portrait and landscape perfect - iOS 10 crash that organization and break the view. The question on StackOverflow about that has only the answers like that: https:/

Share data between main app and today widget macOS

醉酒当歌 提交于 2019-12-12 05:26:17
问题 I'm trying to share data between my main macOS app and the extension I created. I saw I have to use the "App Groups" and share the data with "UserDefault(suiteName: "name")" The problem : After turned on App Groups on the main app and added a name, I then turn on App Groups on extension and the list is empty, I don't see the group I'v just created ? Any idea ? btw: the team profil is the same on both app and extension. I'v tried to delete temporary file, clean project, restored Xcode and

Using Firebase in the App and Today Extension doesn't work

跟風遠走 提交于 2019-12-12 04:08:55
问题 I'm using Firebase in My App, I used it via pod and everything was work correctly, Then we Add Today Extensions (2 extensions) to our app, and also we need to use Firebase in it, so I added it to podfile like this: use_frameworks! project ‘projectName.xcodeproj' target ‘appName’ do pod 'Firebase/Core' post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end end target

How to build a Today Widget / App Extension with Cordova?

女生的网名这么多〃 提交于 2019-12-12 03:44:02
问题 An app I am working on needs a Today Extension / Widget. Are there any resources on how to build one into an Cordova app? I found this, but it's not written very clearly and from what I understood seems to be a native app that only uses a HTML5 element in the app and widget to display some data :/ 回答1: Yes you are right, today extension are a native thing. I recently also did a lot of research on how to integrate one into a cordova project dynamically and ended up creating my own cordova

iOS8 Today Extension: Detect removed or added today extension

£可爱£侵袭症+ 提交于 2019-12-11 07:42:45
问题 I would like to know how to detect when user removes or adds today extension. If Apple does not have any method to do that, please suggest some ways for me to detect it. Thank you very much for your time to answer my question. 回答1: You cannot detect when the user adds or removes a today extension. You can detect when an extension is run for the first time by reading/writing a value to NSUserDefaults, but that's about it. 回答2: If you don't need 100% accuracy, you could post [UIDevice

Communicate data between WatchOS & Today Extension widget

拟墨画扇 提交于 2019-12-11 04:44:16
问题 Standard set up for Watch OS > 2. WCSessionDelegate used to coordinte data between main application and Watch. An App Group "group.***********.TodayExtensionWidget" used to coordinate data between main application and its Today Extension widget via UserDefaults(suiteName: "group.***********.TodayExtensionWidget") When I make a change from the watch it communicates that change with the main application. Then the main application (once launched) communicates this on to the Today Extension. What

Getting width of the Notification-Center inside Today-Extension

拜拜、爱过 提交于 2019-12-10 18:43:05
问题 I am currently trying to put a CollectionView inside a Today Extension. But there is some thing that bothers me. I want to achieve that every cell fits inside one row of my collection-view. So calculate the cells width, depending on the items count. Everything works fine on the iPhone but on the iPad it just doesn't look right. The cells width are way to big. So i debugged my code and it seems that self.view.frame.width or self.view.bounds.width returns the full width of the Screen and not

Set notifications from Today Extension Widget

匆匆过客 提交于 2019-12-10 17:07:43
问题 I am creating a simple timer app which will have a lot of focus on the today extension widget features. Users can start the timer from here by tapping. The only problem is that I need to set a local notification from the widget. I have tried to use [[UIApplicaton sharedApplication] scheduleLocalNotification] but Xcode throws an error saying that shared application is unavailable in app extension. Is there any solution for setting a local notification from Today extension? Thanks in advance.

NSExtensionContext openURL not working on Mac OS X Today Widget

我们两清 提交于 2019-12-10 10:08:24
问题 No matter what I do, the following code just returns 'Success: 0' (i.e., it won't launch the hosting app): NSURL *url = [NSURL URLWithString:@"myapp://launch"]; [[self extensionContext] openURL:url completionHandler:^(BOOL success) { NSLog(@"Success? %i", success); }]; If I try the myapp://launch URL directly in Safari, it works and launches my app. However the Today Widget refuses to launch it. It's sandboxed and I've checked 'Outgoing Connections' capabilities ON as well, but no luck.