ios-app-extension

iOS 8 today widget stops working after a while

丶灬走出姿态 提交于 2019-12-02 15:16:00
I've made a today widget for the german ice hockey league DEL. I'm loading the next games from our server an show them in a tableView. The loading process is started in the proposed method "widgetPerformUpdateWithCompletionHandler". Initially i'm loading some cached data in "viewWillAppear". Everything works great so far! But after a while (one day) the widget stops working. When I open the notification center the widget appears normal, but it is never updated again. I have to remove the widget from the notification center and have to add it again. After that the widget works for a day and

iOS Action Extension Sample Code Not Working

廉价感情. 提交于 2019-12-02 13:48:32
问题 The iOS Action Extension sample code does not seem to work. In xCode, I create a new Swift project and choose Single View Application. Then I select File > New > Target, and choose Action Extension. I enter a name, choose Swift, and select Action Type: No User Interface Then I test the extension by running the project and choosing Safari. I navigate to the Google website. I enable the extension via the Actions icon in Safari. Then I press the extension icon to run it in Safari, but nothing

How do I export text from iOS Notes app to my app?

a 夏天 提交于 2019-12-02 09:18:43
I know this is possible and is something many big apps do, but I can't figure out among UTIs, extensions, UIActivityTypes, etc. which spell I need to use for this in particular. I'm trying to add my app to the list of apps that appear when you hit the export button in the Notes app on iOS because I want to be able to take a bunch of text inside a note and repeatedly and safely send it into my app. I want my app to appear in this list, exporting directly from Notes. There appear to be duplicates of this question that are very old claiming that "exporting from Notes app is not possible for third

iOS Action Extension Sample Code Not Working

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 05:30:48
The iOS Action Extension sample code does not seem to work. In xCode, I create a new Swift project and choose Single View Application. Then I select File > New > Target, and choose Action Extension. I enter a name, choose Swift, and select Action Type: No User Interface Then I test the extension by running the project and choosing Safari. I navigate to the Google website. I enable the extension via the Actions icon in Safari. Then I press the extension icon to run it in Safari, but nothing happens. I expect the webpage background color to change, as the Action.js code, which is supposed to be

How to customize short preview of notifications in iOS 10+

最后都变了- 提交于 2019-12-02 04:01:49
问题 I have implemented iOS rich notifications in my app based on Local and Remote Notification Programming Guide. I watched WWDC Introduction to Notifications, Advanced Notifications, and Best Practices, and read UNNotificationContentExtension. All of these show that I can implement Notification Content extension to customize notification presentation. But to me it seems that they all assume that we can customize only the expanded view (the view that opens up when we 3D press the short preview).

How to use same Authenticated user token between main iOS app and its Share Extension

早过忘川 提交于 2019-12-02 02:25:46
We have the main app integrated with Firebase SDK. User sign in via main application using email, google or facebook. Now, we have share extension implemented which ideally should share same Authentication session internally so that data can be sent on Firebase with the same user without asking him to login again through the extension. So, does anyone know the way to share Firebase authentication session between the Main app and share extension? Either we sent some internal call to the main app to perform Firebase stuff because it has authentication detail within it. The main app set some

iOS 8 beta - Today extension doesn't recognize embedded framework

淺唱寂寞╮ 提交于 2019-12-02 01:01:58
问题 I'm writing an app which also has a Today extension (or widget). Apple's recommended method of sharing code between extensions and containing apps is to put the shared code inside of an embedded framework which both the app and extension can use. So as I understand it, I'm supposed to write shared code and make the shared code target the framework, and then have the app and extension both declare the framework as a dependency. However, in practice, I'm finding that while the app recognizes

NSUserDefault with App Group is not working in iOS 8 Beta3

戏子无情 提交于 2019-12-02 01:01:37
问题 I have to save Boolean Value to NSUserDefault in my App with custom keyboard extension and share with App Group. My Code is worked in iOS 8 Beta1. self.defaults = [NSUserDefaults standardUserDefaults]; if([self.defaults boolForKey:@"BlackKey"]) { NSLog(@"Black"); } else { NSLog(@"White"); } But Not in iOS 8 Beta3. When i retrieve Boolean value from NSUserDefault , it's return nothing and i can't load from custom keyboard extension. I have also tried with initWithSuiteName in NSUserDefault .

How does iOS determine which share extensions are enabled by default?

让人想犯罪 __ 提交于 2019-12-01 22:44:35
问题 Some apps have their 'Share Extensions' enabled by default when installing the app. Flickr is an example of this. However, other apps do not - OneNote, Wunderlist, etc are not enabled by default. Is there a setting in the plist file that controls this? I'm wondering if I can enable it by default, or have the user consent to enabling it by default, when my app starts up. Thank you! 回答1: These apps have agreements with Apple. If you look at your settings app, you can see these apps that have

KeyboardViewController NSLog IOS 8

拈花ヽ惹草 提交于 2019-12-01 21:59:32
We can log with NSlog in other view in iOS 8 (Xcode Beta Version). However, I can't NSLog in keyboard extension in KeyboardViewController. It didn't appear in log. NSLog(@"viewdidload in keyboard"); I would like to know how to detect/log in real time. David V You just don't see what is being logged in the debug area of Xcode because the Xcode debugger isn't attached to your extension. Extensions are nearly completely independent from their containing app. Answered here: for physical device: https://stackoverflow.com/a/24050325/1453948 for simulator: https://stackoverflow.com/a/24043265/1453948