ios8-share-extension

How to extract a zip file and get the extracted components in a Share Extension in Swift

痴心易碎 提交于 2019-12-05 11:41:45
I need to do the following- I have another app in which i will export the users config(.txt) and contacts(.vcf) in a zip format. In the second app i have a share extension to get the exported zip and in the share extension, i need to extract the zip file and get both the txt and vcf files and then upload them to a parse server. I have done till opening the exported zip in the share extension. but i could not get the zip extracted. I couldn't get the answer in internet. Here is my ShareViewController import UIKit import Social import Parse import MobileCoreServices import SSZipArchive class

iOS 8 share extension and authentication flows

给你一囗甜甜゛ 提交于 2019-12-05 11:06:27
问题 I have an iOS 8 share extension for posting content from a web browser. Users need to be prompted to login if they've never logged in via the containing app. Pinterest appears to support fast-switching to the containing app (I'm assuming they've implemented a share extension). iOS documentation suggests that only Today extensions can open containing apps. Is there a way to fast-switch to the containing app via a share extension for authentication? 来源: https://stackoverflow.com/questions

iOS 8 extension dependencies issues. Importing one project file to extension view controller

你。 提交于 2019-12-05 06:38:23
I am working on iOS 8 extension. I read many manuals and all of them just show how simple add extension to your app, and seems that's enough. But here are many pitfalls: After adding your extension you will need to import some of your classes to view controller that were created when you added new extension target. The big use here that you will need add all of them and if you have huge project it's not a simple task. Solution can be select extension target then in Build Phases -> Compile Sources press plus button and add all .m files to your target using hot key CMD+A. After adding all files

How to Just launch app from share extension without post popup in Swift?

我的未来我决定 提交于 2019-12-05 04:30:41
I am a begginer in iOS app development and I would like to launch my app on copy link from another app. added shared extension on click it is displaying popup. But my requirement is it should not display popup and directly open my app on click of my shared extension. What I did: 1) Added rules in info.plist <dict> <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> <integer>1</integer> </dict> Screen short : Please someone help me to fix this issue. Thanks Update : After adding below code popup is not coming but my app is not opening objective C : - (BOOL)isContentValid { return YES; }

How to Get the title in share extension view controller?

我只是一个虾纸丫 提交于 2019-12-04 19:43:01
-(void)viewDidLoad { [super viewDidLoad]; NSExtensionItem *item = self.extensionContext.inputItems[0]; NSItemProvider *itemProvider = item.attachments[0]; NSLog(@"%@",itemProvider); if ([itemProvider hasItemConformingToTypeIdentifier:(NSString *)kUTTypePlainText]) { [itemProvider loadItemForTypeIdentifier:(NSString *)kUTTypePlainText options:nil completionHandler:^(NSString *item, NSError *error) { if (item) { textString=item; } }]; } I am using share extension in my app. I am using it as a subclass of a UIViewController not SLcomposer.In the viewDidLoad i am trying to access the text in the

NSExtension Share Extension limit Photos count

时间秒杀一切 提交于 2019-12-04 19:22:57
I have developed a Share Extension and import Photos and Notes from Photos and Notes App. I want to limit the count of Photos which can be import to only 10 but for Photos i am able to select unlimited photos. Below is the query from info.plist of extension. Can anyone look into it and guide me to correct query. <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <string>SUBQUERY ( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" ).

iOS 8.3 Share Extension - Launching URL Schemes

℡╲_俬逩灬. 提交于 2019-12-04 08:42:37
问题 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";

iOS 8 share extension and authentication flows

爷,独闯天下 提交于 2019-12-03 23:19:25
I have an iOS 8 share extension for posting content from a web browser. Users need to be prompted to login if they've never logged in via the containing app. Pinterest appears to support fast-switching to the containing app (I'm assuming they've implemented a share extension). iOS documentation suggests that only Today extensions can open containing apps . Is there a way to fast-switch to the containing app via a share extension for authentication? 来源: https://stackoverflow.com/questions/26188931/ios-8-share-extension-and-authentication-flows

Retrieve google user from ios extension

别说谁变了你拦得住时间么 提交于 2019-12-03 22:25:34
I am trying to create a share extension for my application which requires to login to Google from the extension. I've setup the sharing group keychain and am able to write from the main application and read the extension target. But I can't login to Google from the extension because GIDSignIn.sharedInstance().hasAuthInKeychain() always returns false. Is there any way to login to Google from an extension and how do I do that? Any help would be appreciated. 1. In Bridging-Header.h import <GoogleSignIn/GoogleSignIn.h> import <Google/Core.h> 2. In AppDelegate.swift import Google In application

Share Extension is not working in Chrome

亡梦爱人 提交于 2019-12-03 16:52:36
I am working on Share Extension Here is code of info.plist file . this is working fine in Safari, But not in Chrome. <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <dict> <key>NSExtensionActivationSupportsImageWithMaxCount</key> <integer>0</integer> <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> <integer>1</integer> </dict> </dict> <key>NSExtensionMainStoryboard</key> <string>MainInterface</string> <key>NSExtensionPointIdentifier</key> <string>com.apple.share-services</string> </dict> Any idea? how to enable share