<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — iOS access denied when using ClearAllCaches()]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=692&amp;type=atom" />
	<updated>2017-11-22T00:41:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=692</id>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3036#p3036" />
			<content type="html"><![CDATA[<p>1. This is a very unexpected exception.<br />I just checked it and ... it&#039;s implemented.<br />If possible, please send your scene (as a package) to us in support (support@infinity-code.com). I very-very want to see how this is possible.</p><p>2. Open &quot;Online Maps Tileset Control / Materials &amp; Shaders&quot; and make sure you use all shader fields. <br />Perhaps you (asset) have lost some reference.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-11-22T00:41:15Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3036#p3036</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3035#p3035" />
			<content type="html"><![CDATA[<p>I tried your suggestion and replaced the line of code, and now this 2 errors occur when running the game.</p><p>First:<br /><span style="color: #FF0000">NotImplementedException: The requested feature is not implemented.<br />&nbsp; at OnlineMapsControlBase.GetCoords (System.Double&amp; lng, System.Double&amp; lat, Vector2 position) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsControlBase.ZoomOnPoint (Int32 zoomOffset, Vector2 screenPosition) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsControlBase.UpdateGestureZoom () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsControlBase.Update () [0x00000] in &lt;filename unknown&gt;:0 </span></p><p>Second:<br /><span style="color: #FF0000">NullReferenceException<br />&nbsp; at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsTileSetControl.InitMapSubMeshTriangles (UnityEngine.Material[]&amp; materials, Int32 x, Int32 y, Int32 w, Int32 h, Int32 subMeshVX, Int32 subMeshVZ, UnityEngine.Shader tileShader) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsTileSetControl.InitMapMesh () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsTileSetControl.OnAwakeBefore () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMaps.Awake () [0x00000] in &lt;filename unknown&gt;:0 </span></p><p>There&#039;s a problem with some shader but I don&#039;t know what shader it&#039;s talking about. How can I make sure that all the shaders used are in the build? Which shaders are you talking about in your answer? The game still crashes a few seconds after the second error raises</p>]]></content>
			<author>
				<name><![CDATA[nahuel93]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=548</uri>
			</author>
			<updated>2017-11-21T19:28:32Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3035#p3035</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3020#p3020" />
			<content type="html"><![CDATA[<p>1, 3. Try this (OnlineMapsCache.cs line: 222):<br /></p><div class="codebox"><pre><code>if (fileCacheLocation == CacheLocation.persistentDataPath) builder.Append(Application.persistentDataPath).Append(&quot;/&quot;).Append(&quot;OnlineMapsCache&quot;);</code></pre></div><p>2. Please make sure that all the shaders used are in the build.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-11-20T02:46:58Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3020#p3020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3010#p3010" />
			<content type="html"><![CDATA[<p>Hi alex, i&#039;ve just tried the new version. This is now causing this errors in iOS device (ipad2), also related to OnlineMapsCache.</p><p>First (appears 4 times in a row, same stacktrace):</p><p><span style="color: #FF0000">UnauthorizedAccessException: Access to the path &quot;/var/mobile/Containers/Data/Application/AC253ABF-8603-44F9-9B3A-DECA180E52B8/Documents\OnlineMapsCache&quot; is denied.<br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.DirectoryInfo.Create () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.DirectoryInfo.Create () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.DirectoryInfo.Create () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.DirectoryInfo.Create () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.DirectoryInfo.Create () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.DirectoryInfo.Create () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.DirectoryInfo.Create () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsCache+FileCacheAtlas.Add (.OnlineMapsCache cache, .OnlineMapsTile tile, System.Byte[] bytes) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsCache.AddFileCacheItem (.OnlineMapsTile tile, System.Byte[] bytes) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsCache.OnTileDownloaded (.OnlineMapsTile tile) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMaps.OnTileWWWComplete (.OnlineMapsWWW www) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsWWW.Finish () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsWWW+&lt;WaitResponse&gt;c__Iterator0.MoveNext () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in &lt;filename unknown&gt;:0 </span></p><p>Second:</p><p><span style="color: #FF0000"> NullReferenceException<br />&nbsp; at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsTileSetControl.InitMapSubMeshTriangles (UnityEngine.Material[]&amp; materials, Int32 x, Int32 y, Int32 w, Int32 h, Int32 subMeshVX, Int32 subMeshVZ, UnityEngine.Shader tileShader) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsTileSetControl.InitMapMesh () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsTileSetControl.OnAwakeBefore () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMaps.Awake () [0x00000] in &lt;filename unknown&gt;:0 </span></p><p>And finally:</p><p><span style="color: #FF0000">UnauthorizedAccessException: Access to the path &quot;/var/mobile/Containers/Data/Application/AC253ABF-8603-44F9-9B3A-DECA180E52B8/Documents\OnlineMapsCache&quot; is denied.<br />&nbsp; at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsCache+FileCacheAtlas.Save (.OnlineMapsCache cache) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsCache.OnDisable () [0x00000] in &lt;filename unknown&gt;:0 <br />UnityEngine.GameObject:SetActive(Boolean)</span></p><p>After this last error, the game crashes (quits unexpectedly). Any thoughts on this? Thanks for your time</p>]]></content>
			<author>
				<name><![CDATA[nahuel93]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=548</uri>
			</author>
			<updated>2017-11-17T21:13:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3010#p3010</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3007#p3007" />
			<content type="html"><![CDATA[<p>Yes, of course we fixed the bug, and the new version is already available.</p><p>In new versions there is nothing scary.<br />Basically it&#039;s bug fixes.</p><p>How to fix the problem if you really do not want to update (OnlineMapsCache.cs line: 222):<br /></p><div class="codebox"><pre><code>if (fileCacheLocation == CacheLocation.persistentDataPath) builder.Append(Application.persistentDataPath).Append(&quot;\\&quot;).Append(&quot;OnlineMapsCache&quot;);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-11-15T20:45:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3007#p3007</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=3006#p3006" />
			<content type="html"><![CDATA[<p>Hi Alex, could you fix this bug? I&#039;m working with online maps version&nbsp; 2.5.16.1, just in case this bug was fixed in a newer version (please let me know if that&#039;s the case). We haven&#039;t updated version just in case something stops working.</p>]]></content>
			<author>
				<name><![CDATA[nahuel93]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=548</uri>
			</author>
			<updated>2017-11-14T12:44:12Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=3006#p3006</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2983#p2983" />
			<content type="html"><![CDATA[<p>Thanks Alex! If you need more information about my code to help you fix it, please ask.</p>]]></content>
			<author>
				<name><![CDATA[nahuel93]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=548</uri>
			</author>
			<updated>2017-11-08T14:09:04Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2983#p2983</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2980#p2980" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Thank you for bug report.<br />I think the problem is on our side.<br />We will fix this and release an update within two days.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-11-08T07:39:02Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2980#p2980</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[iOS access denied when using ClearAllCaches()]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2978#p2978" />
			<content type="html"><![CDATA[<p>I get this error while running an app built for iOS (iPad):<br />&nbsp; <span style="color: #FF0000"><br />&nbsp; UnauthorizedAccessException: Access to the path &quot;/var/mobile/Containers/Data/Application/CC58E86B-C0FA-4DF5-83F0-5D7D68C61E44/Documents&quot; is denied.</span></p><p><span style="color: #FF0000">&nbsp; at System.IO.Directory.Delete (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.RecursiveDelete (System.String path) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at System.IO.Directory.Delete (System.String path, Boolean recursive) [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsCache.ClearFileCache () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at OnlineMapsCache.ClearAllCaches () [0x00000] in &lt;filename unknown&gt;:0 <br />&nbsp; at GameManager.Awake () [0x00000] in &lt;filename unknown&gt;:0<br />&nbsp; <br />&nbsp; (Filename: currently not available on il2cpp Line: -1)<br /></span></p><p>Is there a way to use this functionality in an iOS device? Am I missing something? Nobody had this problem before?</p><p>Here&#039;s a screenshot of the last few lines in the mentioned GameManager.Awake()</p><p>Edit: In android works without problems, this happens only on iOS devices (also tested it in an iPhone 7, same problem)</p><p>Edit2: I call that method more than once, in different places, and it doesn&#039;t matters where I call it from, it always raises <em>UnauthorizedAccessException</em></p>]]></content>
			<author>
				<name><![CDATA[nahuel93]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=548</uri>
			</author>
			<updated>2017-11-07T12:45:58Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2978#p2978</id>
		</entry>
</feed>
