Search Unity

mail attachment -> open with Unity app

Discussion in 'iOS and tvOS' started by tosi, Feb 26, 2014.

  1. tosi

    tosi

    Joined:
    Jul 5, 2012
    Posts:
    45
    Hey everyone,

    since I didn't find any relating entry using the search function with the words "open with", I am asking this in a new topic:

    I want to create a file right inside my Unity app. Then I want to mail this file to someone. I want to assign the app with a custom file extension, so that the receiver gets the option "open with unity app" when clicking on the attachment. All this shouldn't be a problem at all. But what code do I have to put inside my app, so that the app does something, if it gets opened with the file? So, I don't want you to write the code for me. Just point me in the right direction, because I didn't find anything on this last bit of the story.

    Thank you so much.
     
  2. tosi

    tosi

    Joined:
    Jul 5, 2012
    Posts:
    45
    So, Unity does not provide a possibility to be opened with a file?
     
  3. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
  4. tosi

    tosi

    Joined:
    Jul 5, 2012
    Posts:
    45
    Thank you for your answer. But that is the part I already know. My question is, what to do inside Unity, if the user has tapped on the file, which opens the App, because I want to read the file inside Unity. Or in other words: How do I read a file my app was opened with?
     
  5. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
  6. tosi

    tosi

    Joined:
    Jul 5, 2012
    Posts:
    45
    So, there is no built-in-Unity-solution to catch that file, right? I would have to implement this method in Objective C, that you mentioned and somehow inform Unity about the file and hand it over manually.
     
  7. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
    There would be editor settings if something like that existed in Unity by default.