ios-app-extension

How to set the height of a Today Widget Extension?

北慕城南 提交于 2019-11-27 09:45:25
问题 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... 回答1: 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,

Provisioning profile for Today Widget extension

只愿长相守 提交于 2019-11-27 09:20:48
问题 I am trying to archieve my app for submission however I am running into issues with code signing. Basically I have a Today Widget extension for my app. I am unsure about what I should be setting the provisioning profile as. I assumed that I would just use the same profile that I have used for my app, however I get this error: The provisioning profile specified in your build settings (“AppName”) has an AppID of “BundleID” which does not match your bundle identifier “BundleID2”. Xcode can

Xcode 6 error: “Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.”

谁都会走 提交于 2019-11-27 05:31:57
问题 I'm trying to build an extension project and Xcode keeps throwing the error in subject. Needless to day, the extension's bundle id is prefixed with app's bundle id. Product Name: ro.chitza.TodayPics.$(TARGET_NAME:rfc1034identifier I've tried cleaning the build folder and rebuilding, no luck. The funny thing is the entire project got built for a few times, but after some code and UI changes it started failing. Even if I create new projects, the same thing happens after about 5-6 builds. Did

Accessing Core Data SQL Database in iOS 8 Extension (Sharing Data Between App and Widget Extension)

こ雲淡風輕ζ 提交于 2019-11-27 05:07:30
问题 Problem: Unable to access application's Core Data database from within a Widget Extension in the Today View. The app itself is able to read and write to the database as per normal under iOS 8, but the extension will fail to create the store, giving the error, unable to write to file. The log is the following: Error Domain=NSCocoaErrorDomain Code=512 "The operation couldn’t be completed. (Cocoa error 512.)" reason = "Failed to create file; code = 2 回答1: Widgets are unable to access the

How to detect Orientation Change in Custom Keyboard Extension in iOS 8?

谁说胖子不能爱 提交于 2019-11-27 04:16:06
问题 In Custom Keyboard Extension , we can't use `didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation` and sharedApplication . I need to detect portrait or landscape in keyboard when rotate. How can i detect when orientation change in Custom Keyboard extension? 回答1: In order to update your custom keyboard when the orientation changes, override viewDidLayoutSubviews in the UIInputViewController . As far as I can tell, when a rotation occurs this method is always

Today App Extension Widget Tap To Open Containing App

大城市里の小女人 提交于 2019-11-27 03:31:35
I've implemented a Today widget for my application +Quotes which displays the day's quote within the notification center with the help of these Apple Docs . What I'd like to accomplish is opening the Containing App, in this case +Quotes, when the user taps the +Quotes widget within their Today notification view, not entirely sure what to call this, as Calendar would if you tapped it in the Today view. I've tried overlaying a button over the label which would call -(void)openURL:(NSURL *)URL completionHandler:(void (^)(BOOL success))completionHandler upon it being tapped, then open the Custom

App is not showing in the share menu of shared options in shared extension in iOS8

送分小仙女□ 提交于 2019-11-27 02:46:18
问题 I'm developing share extension for my app. Every thing is fine, but i'm facing one main problem, my app is not in the share menu while sharing from photos app. Below is the plist of my shared extension. It's not showing in the list, below is the screenshot: But when i go to more option, set the switch of my extension off and on, now it is showing in the list, But i need to do it every time, below are the screenshots: Every time i ran the extension from X-Code, It's not showing the share menu,

Sharing data between an iOS 8 share extension and main app

╄→尐↘猪︶ㄣ 提交于 2019-11-27 02:42:28
Recently, I've been making a simple iOS 8 share extension to understand how the system works. As Apple states in its App Extension Programming Guide : By default, your containing app and its extensions have no direct access to each other’s containers. Which means the extension and the containing app do not share data. But in the same page Apple brings a solution: If you want your containing app and its extensions to be able to share data, use Xcode or the Developer portal to enable app groups for the app and its extensions. Next, register the app group in the portal and specify the app group

Communicating with/opening Containing app from Share extension [closed]

二次信任 提交于 2019-11-27 01:25:03
问题 Here is what I have tried that has NOT worked: Using openURL to attempt to open the containing app Here is what I have thought of that wouldn't work: Using local notifications to provide a link to the containing app (creating the local notification from the extension) Here are options I am considering: Using a UIDocumentInteractionController and a custom file extension type to provide a link to my containing app (and my containing app only) Starting a "fake" NSURL session to get the following

openURL from App Extension

跟風遠走 提交于 2019-11-26 20:56:07
问题 On iOS 8 beta 2 it should be possible to use openUrl from app extension as written into the release notes: however when I try to use this API (on Xcode 6 beta 2) I get the following error: Beta 2 really fixed this issue or not? 回答1: you may use this code: [self.extensionContext openURL:url completionHandler:^(BOOL success) { NSLog(@"fun=%s after completion. success=%d", __func__, success); }]; the API document: openURL:completionHandler: you could also refer to this question: openURL not work