ios-app-extension

Red dot (circle) next to the app name below the app icon on the iPhone Home Screen on iOS 8

旧街凉风 提交于 2019-11-29 04:26:14
问题 What does the red dot (circle) next to the app name below the app icon mean? I added a Today Extension (Widget) to the app. It appears only when I launch the app on the iOS 8, it does not appear on iOS 7 simulator. Even though I removed the extension and cleared the simulator, it still appears before the app name. 回答1: An Orange dot next to an app normally means it's a beta version, as installed through Testflight. I have a couple of those at the moment, though one looks more red. Trying to

iOS 8 Beta Today extension widget not showing in a Swift app?

笑着哭i 提交于 2019-11-29 03:07:07
Today extension doesn't show up in a Swift app, but it does in a Objective C app. What I did was to add a UILabel with some content on the storyboard for the swift and objective c apps. It showed up when I ran the Objective C app, but not when I executed the Swift app. Am I missing something here? You can comment out the supplied init method. // init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { // super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) // // Custom initialization // } This will allow your extension to run properly. The issue seems to be caused by

Why won't app groups work inside my WatchKit extension?

只愿长相守 提交于 2019-11-29 01:23:05
I've seen all the other posts of SO about sharing NSUserDefaults data between host apps and app extensions, but mine still doesn't work. Here's everything I've done: Enable App Groups on Xcode's "Capabilities" tab for the extension and host app. Set the group name to "group.com.mycompany.foo" and confirmed the extension and host app are added to the group. Confirmed an entitlements file exists for both with the "com.apple.security.application-groups" key set to my app group name. (For what it's worth, I'm also using the shared keychain capabilities between extension and host app and that is

Writing an iOS 8 share extension without a storyboard

岁酱吖の 提交于 2019-11-29 00:58:25
问题 Does anyone know of a good way to write an iOS 8 share extension without the MainInterface.storyboard that comes with the template? When I delete the file or remove the NSExtensionMainStoryboard from Info.plist , the extension stops working (nothing happens when you tap on the button in the share pane). We tried replacing NSExtensionMainStoryboard with NSExtensionPrincipalClass which also didn't work. Any ideas? 回答1: Figured it out! Turns out there's a weird module naming thing going on in

Get full string in iOS8 Custom Keyboard Extension

一笑奈何 提交于 2019-11-28 21:21:58
问题 I'm creating a Custom Keyboard Extension for iOS 8. I want to get the whole string that the user wrote in the text input field. Unfortunately I stumble in to two main problems: 1) I get null in this callback: - (void)textDidChange:(id<UITextInput>)textInput 2) I only get partial String When I call these methods: - [self.textDocumentProxy documentContextAfterInput]; - [self.textDocumentProxy documentContextBeforeInput]; I want to get the whole string in the text input the user is currently

Sharing Extension in IOS8 beta

↘锁芯ラ 提交于 2019-11-28 20:35:36
问题 I'm trying to create a sharing extension using the new iOS 8 app extensions. I tried to get the current URL of a Safari site to show it in a UILabel. Simple enough. I was working trough the official extension guide from apple here https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Share.html#//apple_ref/doc/uid/TP40014214-CH12-SW1 but some things are not working as expected. I know it is only in beta but maybe I'm just doing something wrong. Here is

iOS 8 Share Extension custom view controller size

巧了我就是萌 提交于 2019-11-28 18:41:19
I'm building a share extension for my iOS app and I can't use the default SLComposeServiceViewController , so I created (in the storyboard) a basic UIViewController and embedded in a navigation controller. I get to present it, dismiss it etc but it's always full screen. I would like to make it look more like a dialog. I have tried using self.preferredContentSize on my view controller, tried Use Preferred Explicit Size on the navigation controller in Interface Builder, but it doesn't work. This can be done easily and directly using the storyboard but is not immediately obvious. There is no need

iOS 10 iMessage app extension: how do i calculate the height of the extra tall navbar

谁都会走 提交于 2019-11-28 18:21:01
I downloaded the Xcode 8 beta and was trying to play around with the iMessages app extension sdk but ran into an issue with their seemingly nonstandard nav bar height when i transition into the app's expanded view, my image with the following frame CGRect(x: 0, y: 0, width: 100, height: 100) ends up partially hidden behind the nav bar. i would like it to appear below the nav bar. i tried self.navigationController?.navigationBar.isTranslucent = false but it didn't work, which i guess makes sense since it's out of my app's scope to control. has anyone played around with this yet? i want to avoid

Fit width in iOS 8 Today Extensions

落花浮王杯 提交于 2019-11-28 17:29:29
When I make any iOS 8 Today Extension, there is an empty space on the left of approximately 48px, even if in Interface Builder I place a label on the left side at x=0. I have seen that some apps, however, use a full-width widget. How can I achieve something similar? Thanks! UPDATE: SOLVED I put here the sample code because I guess it will be useful to someone. As suggested by @matteo-lallone, the correct way to do this is: -(UIEdgeInsets)widgetMarginInsetsForProposedMarginInsets:(UIEdgeInsets)defaultMa‌​rginInsets{ return UIEdgeInsetsZero; } Matteo Lallone Straight from the docs: A Today

How to set the height of a Today Widget Extension?

时间秒杀一切 提交于 2019-11-28 16:31:27
How can i change the height of my App's Today Extension in the Notification Center? I tried it with the Interface Builder and with Code, the Interface Builder Displays the View with height 600, but it's not applying this height on the device. It seems I can't get it bigger than some 80 pixels... Santa Claus In your widget UIViewController.m (Objective-C): self.preferredContentSize = CGSizeMake(0, 200); Will make your widget have a height of 200. Note that the width will have no affect on the view, as widgets must fit in the exact width of notification center, which is handled automagically.