Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by Tatchou · Jul 05, 2017 at 02:55 PM · iphonefileaccess

Iphone: How to read a file created by another application ?

Hi everyone, I have a problem: i'm trying to save a .txt file with an app and read it with another one.

But it doesn't work. I tried to use Application.persistentdatapath but when i try to access to the persistentdatapath of another application the access is just locked.

I heard on iphone there are some paths/directories where i can write and read files but i don't know wich one i can use :/ Maybe there are some tips to share a file between 2 apps on Iphone ?

On android it works perfectly but on iphone i just don't understand..

If someone can help me please ?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by iwaldrop · Jul 06, 2017 at 03:01 AM

This is not possible on the iOS platform by design. Each app runs in a sandbox and so only has access to the data that it creates. You'd need some external storage solution, like integrating dropbox or google drive to make this work. Another option may be to use a custom url scheme to pass data between the apps, but application A cannot access the contents of application B's data; sorry.

https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html

An app is generally prohibited from accessing or creating files outside its container directories. One exception to this rule is when an app uses public system interfaces to access things such as the user’s contacts or music. In those cases, the system frameworks use helper apps to handle any file-related operations needed to read from or modify the appropriate data stores.

Comment
Add comment · Show 4 · 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 Tatchou · Jul 06, 2017 at 12:38 PM 0
Share

Thank you very much for your answer ! I lost a lot of time with that.

Url scheme seems to be a good solution because i just need to send a data from an app 'A' wich will launch my application 'B' and sending it a data. But i admit i don't know how to use it... $$anonymous$$aybe have you a link for a good tutorial to use Url sheme with unity ?

avatar image LilGames · Jul 06, 2017 at 02:38 PM 0
Share

I think Apple allows an app developer/publisher to share/access files between THEIR OWN APPS. So the question to the OP is whether they have control of BOTH apps being talked about here?

Actually, as of iOS 8 there is a mechanism to share to any apps: https://www.engadget.com/2014/06/02/apple-ios-apps-extensibility-share-data-features/

So the question is more about how to do it with Unity.

avatar image Tatchou · Jul 07, 2017 at 03:16 PM 0
Share

I found this tutorial concerning the URL SCHE$$anonymous$$E : http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

But now my problem it's I don't understand how i can link this native iOS code with unity... This tutorial talks about that : http://blog.ashwanik.in/2014/04/ios-plugin-for-unity3d.html

If anyone can help me :/

avatar image Amitbuc Tatchou · Nov 11, 2017 at 11:06 PM 0
Share

@Tatchou Hi, did you find a way to implement this?

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

78 People are following this question.

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

Related Questions

,HELP -- iOS Empty project exceeds iphone size limit ! 1 Answer

Access Unity assets natively on Android and iPhone? 0 Answers

iPhone log files? 1 Answer

Are there some restrictions of filename on Unity(, Android, or iPhone) ? 0 Answers

[help]How can I read the file in StreamingAssets on iPad/iPhone platform??? 0 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