ios8-share-extension

iOS add share extension on maps

痴心易碎 提交于 2019-12-03 14:02:29
问题 I want to add share extension on Apple's Maps, does anyone know how to do. I try to set NSExtensionAttributes as below but it don't work, my APP doesn't show in the Maps's share sheet. NSExtensionAttributes NSExtensionActivationRule NSExetnsionActivationSupportsWebURLWithMaxCount NSExetnsionActivationSupportsWebPageWithMaxCount 回答1: I'm not sure why NSExtensionActivationSupportsText doesn't work with Maps, but I get the same result when I try. What you need is a more complex activation rule.

Network request from share or action extension ios

匆匆过客 提交于 2019-12-03 09:42:28
I've searched around this title, but didn't find any appropriate information. I've found ways to make network request that sends it's result to containing app. However, I wanna get response directly back to extension and show information there. I've faced some ways to use javascript to access webpage, but there was nothing about making request to backend. Is it possible to make some request and get JSON response in action or share extension in iOS (iPhone, if matters)? Any info or guides will be appreciated! You can use URLSession directly from the extension. There is a good tutorial at https:

UIActivityViewController not showing my custom activity image in the “MORE” list on iOS8

时光毁灭记忆、已成空白 提交于 2019-12-03 06:02:31
问题 Here's the screenshot: In my subclass of UIActivity, I override the -activityImage method to use my own icon for the facebook share item, but it appears in the share panel but disappears in the MORE list. 回答1: Quite old question, but maybe the solution is helpful for others too! In your UIActivity subclass implement/overwrite the method - (UIImage *)activityImage { return [UIImage imageNamed:@"Activity Icon"]; } to return the image to be shown in the UIActivityViewController itself (as you've

iOS add share extension on maps

亡梦爱人 提交于 2019-12-03 03:56:27
I want to add share extension on Apple's Maps, does anyone know how to do. I try to set NSExtensionAttributes as below but it don't work, my APP doesn't show in the Maps's share sheet. NSExtensionAttributes NSExtensionActivationRule NSExetnsionActivationSupportsWebURLWithMaxCount NSExetnsionActivationSupportsWebPageWithMaxCount I'm not sure why NSExtensionActivationSupportsText doesn't work with Maps, but I get the same result when I try. What you need is a more complex activation rule. Set the type of the activation rule to "string", and set up the value using the SUBQUERY format described in

iOS 8.3 Share Extension - Launching URL Schemes

旧时模样 提交于 2019-12-03 00:42:50
since iOS 8.3 update my share extension (which calls my main app using URL Schemes) stopped working. So I found out that the UIWebView approach I had to launch my app is not working anymore. I also tried the approach Apple recommends, using NSExtensionContext, and still no results. Any thoughts about this? My code follows: UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; [self.view addSubview: webView]; NSString *urlString = "com.myappscheme://shareextension"; NSString * content = [NSString stringWithFormat : @"<head><meta http-equiv='refresh' content='0; URL=%@'>

UIActivityViewController not showing my custom activity image in the “MORE” list on iOS8

社会主义新天地 提交于 2019-12-02 20:42:01
Here's the screenshot: In my subclass of UIActivity, I override the -activityImage method to use my own icon for the facebook share item, but it appears in the share panel but disappears in the MORE list. Quite old question, but maybe the solution is helpful for others too! In your UIActivity subclass implement/overwrite the method - (UIImage *)activityImage { return [UIImage imageNamed:@"Activity Icon"]; } to return the image to be shown in the UIActivityViewController itself (as you've done). In addition to this implement/overwrite the method - (UIImage *)activitySettingsImage { return

IOS Share extension: how to read from notes posts

倾然丶 夕夏残阳落幕 提交于 2019-12-01 15:54:20
I want my app to be able to parse text from notes app post as well other text editors posts, so i created an share extension target. Everything worked fine until i prepare the app for publish, replacing the TRUEPREDICATE by NSExtensionActivationRule. Supposedly, in my share extension target, i should add NSExtensionActivationSupportsText key to NSExtensionActivationRule in info.plist, which i did, but still my app extension doesn't show up in the share sheet. According to https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html my info

Code to share file path/file between a share extension and iOS app

和自甴很熟 提交于 2019-12-01 03:03:55
I have added a share extension for my app say SAMPLE (already exists on the app store), called lets say SAMPLESHARE. Whenever a user, say takes a picture and tries to share it, I want them to go through a view controller of an Open In functionality, and not get the Post dialogue from Apple, basically bypassing it. So I am trying to share the picture between the share extension and my app, by creating an app group that is shared between the app and plugin and then passing the file paths to the openURL of the application delegate of my app. So in my main application delegate I have - (BOOL

Take screenshot of host app using iOS share/action extensions?

杀马特。学长 韩版系。学妹 提交于 2019-11-30 19:29:00
问题 I will like to know how to take a screenshot of the iOS host app with the use of a share/action extension. My use case is as follows: use the Safari browser to access a webpage (https such as gmail) tap on the Share button and select the extension the extension will take a screenshot of the current webpage An working example for this use case is the Awesome Screenshot iOS app. I had tried the following methods reload the baseURI (loadRequest) on a UIWebView/WKWebkit (would not be able to

Xcode 6 Archiving and get a warning “Skipping copy phase strip ,binary is code signed” when add “share extension” to target

冷暖自知 提交于 2019-11-30 06:40:23
I got this warning when I added share extension to my project and archiving it warning: skipping copy phase strip, binary is code signed: /Users/xxxx/xxx/xxxx/Build/xxxx/Build/Intermediates/ArchiveIntermediates/xxxx/IntermediateBui ldFilesPath/UninstalledProducts/XXX.appex/XXXX The old question does not provide and insight to correct this . So I decided to ask again. Warning during archive App with iOS 8 Extension in Xcode 6 Can someone please explain why this is happening ? Is it because the extension target is already code signed? If so, how to solve it ? I knew that setting "Strip debug