Hi, anyone know how to display the iOS 6 share menu/screen (with Facebook, Twitter, Email, Message, etc icons)?
you need a plugin, it's the only way. Prime31 is the only one I can think of off the top of my head, that might be selling a plugin to do this. If you want to write it yourself, then you need to import the social framework into xcode. Then make an extern c method create/present an SLComposeViewController object. It's really only a few lines of code, if you know how to do it...
@capitalJmedia, You can write your own plugin like this Unity side: Code (csharp): // LSNativeCall.cs using UnityEngine; using System.Collections; using System.Runtime.InteropServices; public class LSNativeCall { [DllImport("__Internal")] private static extern void UIActivityVC(string text); public static void ShowUIActivityVC(string text) { #if UNITY_IPHONE UIActivityVC(text); #endif } } Code (csharp): //TestNativeCall.cs //for testing, attach to any MonoBehaviour using UnityEngine; using System.Collections; public class TestNativeCall : MonoBehaviour { void OnGUI(){ if (GUI.Button(new Rect(10,10,100,50),"Show")){ LSNativeCall.ShowUIActivityVC("Hello from Unity!"); } XCode Side: Code (csharp): //LSNativeCall.mm #import "LSNativeManager.h" extern "C" { void UIActivityVC(char* text){ [[LSNativeManager sharedInstance] UIActivityVC:[NSString stringWithUTF8String:text]]; } } Code (csharp): //LSNativeManager.h #import <Foundation/Foundation.h> @interface LSNativeManager : NSObject +(LSNativeManager*)sharedInstance; -(void)UIActivityVC:(NSString*)_text; @end Code (csharp): //LSNativeManager.m #import "LSNativeManager.h" @implementation LSNativeManager static LSNativeManager *sharedInstance = nil; -(void)UIActivityVC:(NSString*)_text{ NSArray *activityItems = @[_text]; UIActivityViewController *activityVC = [[UIActivityViewController alloc]initWithActivityItems:activityItems applicationActivities:Nil]; id rootVC = [[[[[UIApplication sharedApplication] keyWindow] subviews] objectAtIndex:0] nextResponder]; [rootVC presentViewController:activityVC animated:TRUE completion:nil]; } #pragma mark Singleton Methods + (id)sharedInstance { @synchronized(self) { if(sharedInstance == nil) sharedInstance = [[super allocWithZone:NULL] init]; } return sharedInstance; } + (id)allocWithZone:(NSZone *)zone { return [[self sharedInstance] retain]; } - (id)copyWithZone:(NSZone *)zone { return self; } - (id)retain { return self; } - (unsigned)retainCount { return UINT_MAX; } - (oneway void)release { } - (id)autorelease { return self; } - (id)init { if (self = [super init]) { } return self; } - (void)dealloc { [super dealloc]; } @end
I created a small package that allows to easily integrate such kind of solution to your games. It's available for free at: https://github.com/vedi/share-bunch-unity3d. It supports Android as well. Any feedback is appreciated.