Skip to content

A Unity plugin to open native sharing dialogs on iOS and Android, primarily for sharing screenshots.

Notifications You must be signed in to change notification settings

alwaysakil/unity-native-sharing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity-native-sharing

A Unity plugin to open native sharing dialogs on iOS and Android, primarily for sharing screenshots.

To use, copy the iOSNativeShare.h and iOSNativeShare.m files to Assets/Plugins/iOS and NativeShare.cs to Assets/Plugins, then call the Share method in NativeShare.cs. See NativeShare.cs for details. For Android, you'll need to have Write Access set to External(SDCard) under Android Build Settings/Other Settings.

This plugin combines code from:

Android Native sharing by Daniele Olivieri http://www.daniel4d.com/blog/sharing-image-unity-android/

iOS Native sharing by Tushar Sonu Lambole http://tusharlambole.blogspot.com/2014/06/ios-native-plugin-for-unity3d.html

Huge thank you to both of those folks for sharing their code!

Documentation on Android intents http://developer.android.com/reference/android/content/Intent.html Documentation on iOS UIActivityViewController https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivityViewController_Class/index.html

Built in Unity 5.1.1p4 and tested on Android 5.1 (HTC One M7) and iOS 8.4 (iPhone 5S)

by Christopher Maire (http://www.twitter.com/DINOSAURSSSSSSS) www.chrismaire.com

This software is licensed under the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE http://www.wtfpl.net/

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                Version 2, December 2004

Copyright (C) 2004 Sam Hocevar sam@hocevar.net

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  1. You just DO WHAT THE FUCK YOU WANT TO.

About

A Unity plugin to open native sharing dialogs on iOS and Android, primarily for sharing screenshots.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 63.2%
  • C# 36.8%