ios-extensions

How to structure a Xcode project with Frameworks, Extensions and CocoaPods

六月ゝ 毕业季﹏ 提交于 2019-12-02 17:37:06
NB: Here is a more abstract and simplified sub-set of this question . With the addition of Touch Frameworks, Extensions and the Apple Watch Xcode 6 projects and workspaces are getting more and more complex. If you add CocoaPods into this mix things start to get almost unmanageable. How would I structure an Xcode project/Workspace with the following targets and dependancies? (Assumptions: I am using Git for all the components, I am using CocoaPods for all third party code, I am using Xcode 6). MyCoolApp Several 3rd Party UI libraries via CocoaPods MyCoolNetworking.framework, a framework

How can I guarantee unique entries in a Core Data store in a shared app container used by both the host app and an extension?

最后都变了- 提交于 2019-12-02 17:11:16
To ask my question effectively, let's first consider the exact scenario I'm facing: General Setup A host iOS 8 app. One or more iOS 8 extensions (WatchKit, Share, etc.) bundled with the host app. The host app and all extensions share the same Core Data SQLite store in the shared app group container. Each app/extension has its own NSPersistentStoreCoordinator and NSManagedObjectContext. Each persistent store coordinator uses a persistent store that shares the same SQLite resources in the group container as all the other persistent stores. The app and all extensions use a common codebase for

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

﹥>﹥吖頭↗ 提交于 2019-12-02 17:10:46
问题 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

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

UIActivityViewController: Exclude non-Apple sharing extensions?

落花浮王杯 提交于 2019-12-01 18:54:24
I would like to prevent my app to share its content to certain other apps using the extensions mechanism. For instance, I want the user to be able to share a link, but not with the Gmail app. My understanding of the documentary is that the following should work: // vieController previously initialised like this: UIActivityViewController(activityItems: [provider], applicationActivities: nil) viewController.excludedActivityTypes = ["com.google.Gmail.ShareExtension"] This doesn't work. Am I missing something? Are non-Apple activity types not working with this mechanism? Apparently, since iOS 8.1

UIActivityViewController: Exclude non-Apple sharing extensions?

筅森魡賤 提交于 2019-12-01 18:00:25
问题 I would like to prevent my app to share its content to certain other apps using the extensions mechanism. For instance, I want the user to be able to share a link, but not with the Gmail app. My understanding of the documentary is that the following should work: // vieController previously initialised like this: UIActivityViewController(activityItems: [provider], applicationActivities: nil) viewController.excludedActivityTypes = ["com.google.Gmail.ShareExtension"] This doesn't work. Am I

How to share notes data with share extension in iOS 9?

白昼怎懂夜的黑 提交于 2019-12-01 09:18:07
My application is working fine till iOS 8 But in iOS 9 Beta I am not able to share Notes text/image so can you please suggest me what thinks I need to implement for this? Add **NSExtensionActivationDictionaryVersion** Attributes in your plist file. see this image for reference. What to use if I am using NSPredicate for NSExtensionActivationRule? <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <string> SUBQUERY( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"

How to share notes data with share extension in iOS 9?

假如想象 提交于 2019-12-01 07:01:33
问题 My application is working fine till iOS 8 But in iOS 9 Beta I am not able to share Notes text/image so can you please suggest me what thinks I need to implement for this? 回答1: Add **NSExtensionActivationDictionaryVersion** Attributes in your plist file. see this image for reference. 回答2: What to use if I am using NSPredicate for NSExtensionActivationRule? <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <string> SUBQUERY( extensionItems, $extensionItem, SUBQUERY (

iOs Widget background update

拟墨画扇 提交于 2019-11-30 13:02:23
According to what apple says about widgetPerformUpdateWithCompletionHandler:, the iOs Widget can update his content also when the widget is not visible. In my debug session i've noted that the todayViewController is deallocated everytime the notification center view disappear, so my questions are: How my todayViewController can respond to widgetPerfomrUpdateWithComplationHandler if it is deallocated ? I need that every hour the widget update his content also if it is not visible, how can i do that? How is the iOs widget lifecycle? Help me please :) Thanks The widget life-cycle is managed by

How do I set NSExtensionActivationRule predicates?

你。 提交于 2019-11-30 09:14:11
Even people far smarter than I am find the syntax for NSExtensionActivationRule arcane, but even a fool like me should be able to copy/paste examples, no? Unfortunately I can't even get Apple's examples to work. The host app for my action extension crashes when you hit the share sheet button (stack trace below). You should be able to just set NSExtensionActivationRule as a string, right? It works fine when I set it to TRUEPREDICATE for debugging purposes. But if I take this simple example from Apple (slightly modified for public.image ) and paste it in, I get a crash: {extensionItems = ({