ios-extensions

How to use Crashlytics with iOS / OS X today view extensions?

房东的猫 提交于 2019-11-28 05:50:32
Since today extensions run as separated a process I am sure they will not log any crashes out of the box. I assume we need to initialize Crashlytics on the widget separately. E.g. in the viewDidLoad method of the TodayViewController . Is anybody already using Crashlytics inside any iOS / OS X extensions? If so, how did you implemented it? I am also wondering if it would make sense to create a separate app in Crashlytics just for the extension. martn_st Crashlytics support got in touch with me and provided these steps. I tested them and it now works for me iOS 8 app. Add the Crashlytics Run

NSUserDefaults(suiteName:) on iOS 9 and WatchOS 2 - not working?

僤鯓⒐⒋嵵緔 提交于 2019-11-28 00:46:00
问题 I've done this before but nothing seems to be working. Here's my code: Saving in the iOS App let groupDefaults = NSUserDefaults(suiteName: "group.company.appSharedDefaults") groupDefaults?.setObject(theArray, forKey: "theKey") groupDefaults?.synchronize() Reading (works on iOS but not WatchOS 2) let groupDefaults = NSUserDefaults(suiteName: "group.company.appSharedDefaults") if groupDefaults!.objectForKey("theKey") != nil { textEmojiArray = NSMutableArray(array: groupDefaults!.objectForKey(

How to use Notification service extension with UNNotification in iOS10

血红的双手。 提交于 2019-11-27 14:57:50
问题 Apple introduce new extension names "UNNotificationServiceExtension", but how to launch it from push notification ? I read that service extension provide end to end encryption for payload. Which key is required to set payload of push notification ? How to identify payload and how to launch service extension from push notification ? 回答1: Let me take it step by step. UNNotificationServiceExtension - What it is? UNNotificationServiceExtension is an App Extenstion target that you bundle along

Retrieve ALAsset or PHAsset from file URL

十年热恋 提交于 2019-11-27 06:50:52
问题 Selecting images in Photos.app to pass to an action extension seems to yield paths to images on disk (e.g.: file:///var/mobile/Media/DCIM/109APPLE/IMG_9417.JPG ). Is there a way to get the corresponding ALAsset or PHAsset? The URL looks like it corresponds to the PHImageFileURLKey entry you get from calling PHImageManager.requestImageDataForAsset . I'd hate to have to iterate through all PHAssets to find it. 回答1: I did what I didn't want to do and threw this dumb search approach together. It

How to paste image from pasteboard on UITextView?

▼魔方 西西 提交于 2019-11-27 06:24:46
问题 I have the following code on a keyboard extensión let pasteboard = UIPasteboard.generalPasteboard() var image = UIImage(named: "myimage"); pasteboard.image = image; This doesn't work on a UITextView I have on my container application, paste context menu never shows up. It works on other applications like "messages" but not on mine. My code works if I try to paste text instead of an image using string property so I'm quite near. I could need to set up my text view different but I don't know

How to use Crashlytics with iOS / OS X today view extensions?

岁酱吖の 提交于 2019-11-27 01:04:59
问题 Since today extensions run as separated a process I am sure they will not log any crashes out of the box. I assume we need to initialize Crashlytics on the widget separately. E.g. in the viewDidLoad method of the TodayViewController . Is anybody already using Crashlytics inside any iOS / OS X extensions? If so, how did you implemented it? I am also wondering if it would make sense to create a separate app in Crashlytics just for the extension. 回答1: Crashlytics support got in touch with me and