Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by MichaelTaylor3d · Jan 12, 2013 at 10:47 PM · iosemail

Open file with email into iOS app

Has anyone figured out how to associate a custom file type with a unity iOS app so that it opens the app and then the app opens that file.

From the email app?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image badescuga9 · Jan 08, 2014 at 03:07 PM 0
Share

@$$anonymous$$ichaelTaylor3d have you figgured a way to do this?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by MichaelTaylor3d · Jan 08, 2014 at 03:24 PM

Its all explained here.

Right now I have it working pretty well.

Edit: one thing that I forgot to add is that I followed these instructions and put the info.plist file in the plugins/ios folder.

I then created a post processor script that automatically sends the plist to the iOS project when you build it.

 using UnityEngine;
 using UnityEditor;
 using UnityEditor.Callbacks;
 
 public class BuildPostprocessor {
     
     #if UNITY_IPHONE
     private static string sourceFile = Application.dataPath + "/Plugins/iOS/info.plist";
     
     [PostProcessBuild]
     public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) 
     {
         System.IO.File.Copy(sourceFile, pathToBuiltProject + "/info.plist", true);
     }
     #endif
 }
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by badescuga9 · Jan 08, 2014 at 03:32 PM

yea, but this is native code. I can suggest an alternative way. I just found this out.

If you set the property "Application supports iTunes file sharing" to true in Xcode -> Info -> Custom iOS Target Properties, you will see that the file you've opened with your app is visible in itunes -> your_device -> Apps -> File Sharing in a folder named "Inbox".

So, what unity3d does, it makes a copy of the file you've opened with your app and stores it in your Documents folder for your app under the Inbox folder. Hope this is useful.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MichaelTaylor3d · Jan 08, 2014 at 04:41 PM 0
Share

See my edit, I forgot that there was one more step

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can't send email from ios device when email body contains arabic characters! 2 Answers

How to send email using smtp to IOS? 2 Answers

Error sending Email form the game, using SMTPClient Class 2 Answers

social network & share function 4 Answers

How do I send an email on IOS using Application.OpenURL with more than one line of body text? 4 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges