ios-app-extension

iOS 8 Action Extension icon sizes

扶醉桌前 提交于 2019-12-01 02:38:52
问题 While trying to solve this iOS 8 action extension icon is blank on device (works in simulator) problem, I realized that nowhere are informations available what size an iOS 8 Action Extension icon must have. Also the technical requierement "PNG is recommended" and "monochromatic" are not very clear. Does anybody know where to place the icon for an Action Extension in XCode 6 and what dimensions and format it must have. 回答1: From the Documentation: iOS. Create a template image that represents

Sharing File Data Between Applications in Swift/iOS [duplicate]

只愿长相守 提交于 2019-12-01 01:49:06
问题 This question already has an answer here : Sharing data in between apps in IOS (1 answer) Closed 3 years ago . I've been doing research on how to share data between applications securely. I'd like to get some info on the correct way to handle this before I do a deep dive on implementation using the wrong method. Just cause you can do something does not necessarily mean you should. User Case : I am working on a suite of language learning apps that have a shared audio file base of several

Can I deploy apps with iOS 8 extensions to devices running iOS 7?

时光毁灭记忆、已成空白 提交于 2019-11-30 20:05:22
I am creating an iOS app in swift that has a Notification Center widget. However, I want the app to run on iOS 7 just fine. If I have the widget, can I just run the app on iOS 7 (with the main app, but not the widget working) or do I have to create an iOS 7 version without the widget? Yes, you can. Quoting Apple documentation : If you link to an embedded framework from your containing app, you can still deploy it to versions of iOS older than 8.0, even though embedded frameworks are not available in those versions. And this was in the App Extension Programming Guide . Therefore, it's only

How to toggle a word selection view (change height) in iOS custom keyboard?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 18:52:05
问题 I'd to like to add a word selection view similar to the above in an iOS 8 custom keyboard. How can I change the keyboard view rectangle size dynamically? and notify the active app (such as the built-in Messages app) to reposition the input bar correspondingly? UPDATE: based on this, the height of keyboard is customisable. How can that be possible? 回答1: It IS possible to change the size of the keyboard in the current iOS 8 Taken verbatim from the documentation: " In iOS 8.0, you can adjust a

Change the button titles on SLComposeServiceViewController?

回眸只為那壹抹淺笑 提交于 2019-11-30 17:42:06
Is there a way to change the button titles on the SLComposeServiceViewController? I tried to change the bar button items on the navigation item, but those aren't the right buttons. Simply accessing from navigationController!.navigationBar does the charm. The following should help. self.navigationController!.navigationBar.topItem!.rightBarButtonItem!.title = "Save" I just found a way to do it: class CustomServiceViewController: SLComposeServiceViewController { override func viewDidLoad() { let navigationBar = view.subviews.first?.subviews?.last? as? UINavigationBar let postButton =

Unable to cast UIImage in swift iOS 8 Extension

喜欢而已 提交于 2019-11-30 13:57:27
I have a strange problem, I am trying to build an action extension that will scan barcode from the image provided. Here is the code. override func viewDidLoad() { super.viewDidLoad() // Get the item[s] we're handling from the extension context. // For example, look for an image and place it into an image view. // Replace this with something appropriate for the type[s] your extension supports. var imageFound = false for item: AnyObject in self.extensionContext!.inputItems { let inputItem = item as NSExtensionItem for provider: AnyObject in inputItem.attachments! { let itemProvider = provider as

Warning during archive App with iOS 8 Extension in Xcode 6

北城余情 提交于 2019-11-30 11:44:21
问题 I have a problem while archiving my app. I created a new target for an iOS 8 extension. When I archive the app, I receive a warning. The warning is "PBXCp Warning", "warning: skipping copy phase strip, binary is code signed: /Users/Library/Developer/Xcode/DerivedData/App/Build/Intermediates/ArchiveInter mediates/AppName/IntermediateBuildFilesPath/UninstalledProducts/AppExtappex/AppE xt" The app is in Objective-C. 回答1: Check the "Strip Debug Symbols During Copy" option in your Xcode target's

iOS 8 Share extension loadItemForTypeIdentifier:options:completionHandler: completion closure not executing

时光毁灭记忆、已成空白 提交于 2019-11-30 11:38:59
问题 I'm using the loadItemForTypeIdentifier:options:completionHandler: method on an NSItemProvider object to extract a url from Safari via a Share extension in iOS 8. In Objective-C, this code and works and the block runs. [itemProvider loadItemForTypeIdentifier:(@"public.url" options:nil completionHandler:^(NSURL *url, NSError *error) { //My code }]; In Swift, it looks very similar, however the closure doesn't run. Also, itemProvider.hasItemConformingToTypeIdentifier("public.url") returns YES so

Get the main app bundle from within extension

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 11:24:42
问题 Is it possible to get the containing app's NSBundle from within an app extension? I would like to get the main app's display name, not the extension's display name. 回答1: The +mainBundle method returns the bundle containing the "current application executable", which is a subfolder of your app when called from within an extension. This solution involves peeling off two directory levels from the URL of the bundle, when it ends in "appex". Objective-C NSBundle *bundle = [NSBundle mainBundle]; if

iOS 8 Custom Keyboard

眉间皱痕 提交于 2019-11-30 10:50:50
问题 I am trying to build a custom keyboard, it's like a emoji keyboard, but the keyboard's data is from a json file. After parse this json file and get the data, how to make the custom keyboard use it and show in the keyboard view, like the emoji keyboard that built in? Right now, I follow App Extension Keyboard: Custom Keyboard guide, and there only small bits of information here. Is there any tutorial or guide about how to create a custom emoji keyboard online? The current codes I am trying are