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
0
Question by usephj · Oct 27, 2012 at 08:44 AM · iosxmlipad2

Reading/Loading xml files on iPad 2

I am using a modified version of XML Serializer from this website: http://wiki.unity3d.com/index.php?title=Saving_and_Loading_Data:_XmlSerializer

I tried on my Mac and UnityEditor and it working perfectly. However when I deployed my app onto the iPad 2, It crashes whenever I try to access the XML contents.

I load my XML file on the Start() and I got this error/warning on my Xcode console:

UnauthorizedAccessException: Access to the path "/var/mobile/Applications/ADD2A1E3-C95B-4727-8D38-14D781906719/toteboard.app/Data/crocodileCollection.xml" is denied. at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0 at System.IO.FileStream..ctor (System.String path, FileMode mode) [0x00000] in :0 at CrocodileContainer.Load (System.String pathName) [0x00000] in :0 at CrocodileManager.Start () [0x00000] in :0

I use various methods to solve this issue but none of them work. Including StreamingAssets folder, modify the pathname, etc. I guess I'm really stuck here. Anyone please provide me some advices on this. Thank you

Tool version: Unity3D Pro 3.5.5f, Xcode 4.4.2

Comment
Add comment · Show 3
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 whydoidoit · Oct 27, 2012 at 08:48 AM 0
Share

Is the open mode just File.Open? I'm wondering if it's because it thinks you are trying to write it (which is only possible in Application.persistentDataPath).

You are right in thinking you should put it in Strea$$anonymous$$gAssets - your other choice would be to make it a TextAsset in resources and then get the text from that.

avatar image usephj · Oct 27, 2012 at 09:10 AM 0
Share

Thank you for replying..

To be honest, I don't really understand what is this problem. What does it mean that "Access to the path "..." is denied." Why is it denied? I believed the path name is correct, if not, I'll be getting another error which is something like "Directory not found: blah blah".

As for the File IO, I trying to find out whether by opening the file, will I accidentally modified the content or whatsoever. I will worked on that, Thank you.

avatar image whydoidoit · Oct 27, 2012 at 09:12 AM 0
Share

Access denied means that you cannot access the file due to some restriction - for example you are writing to a read only file or location.

0 Replies

· Add your reply
  • Sort: 

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

10 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

Related Questions

XmlException when trying to read/write XML from iOS device 1 Answer

the XML file doesn't work when i install the app from the app store 0 Answers

How to read local XML file on iOS? 1 Answer

iOS - XML Serialization - JIT exception 1 Answer

Testing unity ios apps on device 2 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