sharing

Attach object using iOS6 UIActivityViewController

不羁的心 提交于 2019-11-29 04:21:36
I'm migrating to use the UIActivityViewController for sharing in iOS6, but I can't figure out how to create email attachment objects to be included when sharing by email. The corresponding code in iOS5 is: MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; [picker addAttachmentData:data mimeType:@"application/XXX" fileName:fileName]; You have very limited control over UIActivityViewController, but if you're attaching well-know mime types, I found you can get it to work correctly by providing the associated file extension in a file URL. For example, if your

UIActivityViewController customize text based on selected activity

偶尔善良 提交于 2019-11-29 02:50:35
I want to customize text for the same information but when I am sharing it on Facebook I don't want to use the twitter hash tags or @username scheme... How can I diversify text for sharing based on which sharing service would be used? Ofcourse I'm using UIActivityViewController: UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@[shareText, shareURL] applicationActivities:nil]; Christopher King Instead of passing the text strings into the initWithActivityItems call, pass in your own sub-class of the UIActivityItemProvider class and when you

How do i add this sharing button? IOS8 with swift

喜欢而已 提交于 2019-11-29 00:42:57
I want there to be a button in my app, that when it is pressed, this(See image below) Pops up. How do i do that? I don't want to create a custom sharing extion, i just want the default one? What code do i use? All the tutorials online are in objective-c. Please give an answer in swift. Image: http://9to5mac.com/2014/06/30/hands-on-1password-beta-shows-off-ios-8s-touch-id-extensions-apis-video/#jp-carousel-330420 Here is my code so far, but i get an error that UIBarButtonItem Is not convetable to UIVIew Why? The action is connected to a navigation bar button item? @IBAction func ActionButton

Facebook stops custom parameters (image,title,description) through FB.ui?

♀尐吖头ヾ 提交于 2019-11-29 00:23:46
Today I check my site and this code not working: <script> ... FB.ui({ display: 'dialog', method: 'share_open_graph', action_type: 'og.likes', hashtag: '#Testing', action_properties: JSON.stringify({ object: { 'og:image': img, 'og:image:secure_url': img, 'og:image:type': 'image/jpeg', 'og:image:width': w, 'og:image:height': h, 'og:image:alt': img, 'og:url': link, 'og:title': title, 'og:description': desc, 'fb:admins': fbadmin } }) }, function(response) { if (typeof response != 'undefined') { //Success } else { //Not Success; } }); </script> With this code, from https://developers.facebook.com

Sharing classes between projects in xcode/objective-c

有些话、适合烂在心里 提交于 2019-11-28 23:47:33
问题 I've got a client<=>server app I'm building for Mac OS X, using Objective-c/Cocoa and xCode. I've created a different project for both the apps I have, and I'm wondering the best way to share classes between them. There are several classes I've made that would be useful to both. This far I've been copying them around, but I feel like this isn't the best solution. How do I share classes effectively? Should I redo it as 1 project and just have two build targets? How do I do this? Any other info

Android sharing Files, by sending them via email or other apps

99封情书 提交于 2019-11-28 19:42:49
问题 I have a list of files in my android app and I want to be able to get the selected items and send them via email or any other sharing app. Here is my code. Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_EMAIL, getListView().getCheckedItemIds()); sendIntent.setType("text/plain"); startActivity(sendIntent); 回答1: this is the code for sharing file in android Intent intentShareFile = new Intent(Intent.ACTION_SEND); File fileWithinMyDir

How to make my iOS app visible in photo sharing options like Facebook and Twitter?

こ雲淡風輕ζ 提交于 2019-11-28 18:55:41
问题 I have a picture sharing app which shares pictures among your app friends. My requirement is to show my app in sharing via pop-up, when iOS user choose any photo from photo gallery. I found solutions for sharing PDF files via custom app, but no luck for iOS "photos". I have also go through this link https://stackoverflow.com/questions/9266079/why-is-my-iOS-app-not-showing-up-in-other-apps-open-in-dialog and did changes in my app, but it seems not to be working. 回答1: This can't be done,

How to Share Entire Android App with Share Intent

扶醉桌前 提交于 2019-11-28 16:28:39
问题 I have used Sharing-type intents before, such as: Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("plain/text"); intent.putExtra(Intent.EXTRA_EMAIL, new String[] { "---" }); intent.putExtra(Intent.EXTRA_SUBJECT, "---"); startActivity(Intent.createChooser(intent, "Contact Us!")); However, this basically shares with Email/MMS and other text or document type apps. How do you do this same things but include Social sharing like Facebook, Twitter and Google Plus (to name the

How to code sharing between Android and iOS

a 夏天 提交于 2019-11-28 15:39:31
I'm moving away from strict Android development and wanting to create iPhone applications. My understanding is that I can code the backend of iOS applications in C/C++ and also that I can use the NDK to include C/C++ code in Android apps. My question however is how? I've googled quite a bit and I can't find any clear and concise answers. When looking at sample code for the NDK, it seems that all the function names etc. are Android (or at least Java) specific and so I would not be able to use this C/C++ backend to develop an iPhone frontend? I'd appreciate some clarification on this issue and

sharing variables between running applications in C#

核能气质少年 提交于 2019-11-28 11:35:53
I am developing in C# two simple applications, running in the same local machine without network requirements. The first application initializes an DLL (Class1) and set a variable. The second application just read it the data which was previously stored. Both applications instanciates the same Class1. Code: DLL (Class1): public class Class1 { private string variableName; public string MyProperty { get { return variableName; } set { variableName = value; } } } Application A: class Program { static void Main(string[] args) { Class1 class1 = new Class1(); string localReadVariable = Console