0
votes

I started a new Xamarin cross platform project in VS 2017 on a windows. The android portion works fine, but when I try to open the iOS Main.Storyboard file, I get an error. I am connected to a mac which has xcode 8.3.

Xamarin.iOS version on windows VS - 10.4.0.123

Xamarin iOS version on VS community 2017 on mac - 10.12.0.18

I cannot find any answers other than downgrading xcode. I think the issue probably has to do with the Xamarion.iOS versions not matching, but I can't figure out how to resolve that. Any help is greatly appreciated!!

Full error log:

System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass256_0`1.<EnsureSession>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXmlWithPartialReloadRetry>d__175.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXmlWithPartialReloadRetry>d__175.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXml>d__174.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXml>d__174.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<ReloadItemsAsync>d__170.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Tasks.<Cancellable>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<ReloadItems>d__169.MoveNext()
---> (Inner Exception #0) System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()<---


Contents of C:\Users\Jdoyle\AppData\Local\Xamarin\Logs\15.0\iOSDesigner-11168.2017-08-21__16-14-59.log:
MDAddinsHash: 1363a8d943bab7700c93a97474060b6734aa7f94

[2017-08-21 16:17:10.2] INFO: Starting full reload...
[2017-08-21 16:17:10.8] INFO: Reloading: Serialization took 0ms
[2017-08-21 16:17:30.4] INFO: Reloading: Deserialization took 13ms
[2017-08-21 16:17:30.4] INFO: Reloading: Server rendering completed in 19520ms with 52744 bytes
[2017-08-21 16:17:30.4] ERROR: EnsureSession (counter 1): System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()<---

Edit Solution

For anyone having this same issue, installing the Xamarin updates extension for VS & updating the Xamarin Apple SDK fixed this issue for me. Follow the steps here.

2

2 Answers

0
votes

Updating to the latest version fixes it.

In addition when using Visual Studio 2017 on Windows I had the same issue. Upgrading Xamarin (stable channel on mac & windows) and updating Visual Studio 2017 to the latest version (15.0.26228.12) fixed it for me.

see: [https://releases.xamarin.com/technical-bulletin-xcode-8-3-support-for-vs-2017/][1]

0
votes

My best advice to this issue is to NEVER use the IOS designer. It's rubbish. Always use Xcode Interface Builder. The main reason is, you're guaranteed the storyboard will be valid with IOS. I once created an empty storyboard in IOS Designer and compared the XML it generated to an empty storyboard created in Xcode. It was totally different. The designer version was missing a hell of a lot of information. Since then I have never trusted the IOS designer. Not only that, but constraints are pain in the ass to use on the IOS designer, whereby, they're a lot easier in Xcode. I've also have storyboards render totally wrong in the IOS designer if the layout is particularly complex.