ios8-extension

Custom KeyBoard get terminated due to memory pressure in iOS 8

穿精又带淫゛_ 提交于 2020-01-20 03:27:46
问题 Custom KeyBoard get terminated due to memory pressure in iOS 8 Initially my custom keyboard is taking around 25mb of memory, but this memory is not deallocated with I dissmiss the keyboard. Memory keep on increase when we open custom keyboard again and again and finally terminated due to memory pressure. Help me out with this issue? 回答1: You can dealloc some things in ViewWillDisappear function of KeyboardViewController 回答2: The keyboard extension runs in a process that persists after the

Sharing code between original iOS App and App Extension

不想你离开。 提交于 2020-01-09 07:30:19
问题 Sharing class between iOS app and extension app I want to use a custom class in both my app and the extension app. If I just have the class in the main app folder, the extension doesn't pick up on it. I tried making a copy of it and putting it into the extension folder, but I of course get a invalid redeclaration of [my class] error. What's the best solution for this? It's just one class, not multiple resources. 回答1: Nothing should be copied. Just add required files to compile sources for

Google plus sign-in for xcode share extension

谁说我不能喝 提交于 2020-01-02 07:05:17
问题 I’m writing an iOS app to share web page links by email, and as part of it I want users to be able to sign in to google plus. I’ve got the containing app working fine using the instructions from here: https://developers.google.com/+/mobile/ios/sign-in and now I’m trying to add a share extension that can also access the user’s google+ profile. I started off by trying to add the sign in button in to the share extension, but I don’t think that’s going to work because after clicking the button

Swift: Missing argument in call to argumentless extension of SequenceOf

吃可爱长大的小学妹 提交于 2019-12-23 01:52:14
问题 Can anybody see light on this bug? The playground insists that argument #2 is missing, but there is no argument #1! The intention of the code to to count the number of runs of a equatable value, and return a sequence of tuples consisting of the values and their counts. I've worked on this code extensively, optimising it and refining it until I'm pretty sure that it should work… but although it compiles, I cannot call it the way it was intended. The error i get from calling the code below is

Using UILexicon to implement autocorrect in iOS 8 Keyboard Extension

六月ゝ 毕业季﹏ 提交于 2019-12-22 03:48:54
问题 I've seen that this question has been asked a few times, but no one seems to have an answer. I am trying to create an autocorrect feature on a custom keyboard, but I am completely lost as to how to do so. Apple gives some documentation, but it's not very detailed. I know it has something to do with UILexicon data, but I'm not sure what to do with it and how to use it to correct strings of text the user is typing. Any help would be greatly appreciated. What I have found so far: let controller

How to detect from iOS keyboard extension that a textfield is cleared via actions like hitting “Send” in iMessage?

爱⌒轻易说出口 提交于 2019-12-20 12:29:09
问题 In my iOS keyboard app, I currently have a text suggestions bar much like the default iOS 8 Keyboard's suggestion bar. I would like to clear all text on the suggestion bar whenever the user does something that clears the text field (for example, when someone hits " Send " on iMessage or Whatsapp,). As hitting "Send" is not a keystroke , I was wondering if there is way to detect from the keyboard when a textfield is cleared. I have tried detecting empty text "" or new line "\n" , but so far

Prevent custom keyboard in textfield

六月ゝ 毕业季﹏ 提交于 2019-12-18 19:04:29
问题 I was experimenting with how a custom keyboard affects my app. I installed Swype on my iPhone 6. I find that in some of my views where I have custom inputView property set on a text field, the Swype keyboard is overriding and presenting instead of my picker. This completely breaks my UI and cannot be allowed. Is there a way to explicitly tell iOS 8 only to use the inputView I have set? Is this a bug, perhaps? It is not at all expected behavior to allow a third party to override my input spec?

NSInvalidUnarchiveOperationException cannot decode object error in Apple Watch extension

微笑、不失礼 提交于 2019-12-18 15:52:35
问题 I've got a user object that I need to store in NSUserDefaults and share with an iOS 8 extension app (Watchkit). In the main container app, I can encode and decode the object without any problem. However, when I try to retrieve the stored user object in the Extension, I get a "'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class" error. As far as I can see NSCoding has been implemented correctly in the object (and I'm able

Height of iOS8 Today Extension using Only Auto Layout Gives Broken Constraints

柔情痞子 提交于 2019-12-17 22:29:52
问题 Apple documentation suggests setting the height of Today Extensions using autolayout. If a widget has additional content to display, you can rely on Auto Layout constraints to adjust the widget’s height as appropriate. If you don’t use Auto Layout, you can use the UIViewController property preferredContentSize to specify the widget’s new height. However, every example and tutorial I have seen ends up using preferredContentSize . All of my attempts to set the height via autolayout lead to

How to include an Objective-C Extension in my Swift ActivityViewController?

試著忘記壹切 提交于 2019-12-16 18:06:25
问题 I have included the 1Password extension in my Browser app by following this question. However, I already have an iOS 8 Share Sheet (ActivityViewController) on my app and would like to include the 1Password inside this share sheet inside of using it's own. My app is in Swift but the 1Password is in Objective-C. Here's the code I'm using for the ActivityViewController: @IBAction func _shareButton(sender: UIButton) { var shareContent = _searchBar.text if let myWebsite = NSURL(string: "\(