Opening storyboard in Xcode from VS 2019 for Mac fails

Grime 791 Reputation points
2021-01-22T06:54:36.917+00:00

When double clicking the storyboard in VS 2019 for Mac, the displayed error is:

Visual Studio could not communicate with Xcode
If Xcode is still running, please ensure that all changes have been saved and Xcode has been exited before continuing, otherwise any new changes may be lost.

I have tried deleting the Xcode folder created in previous attempts (under appname.iOS > obj ) with no luck.
This error is well documented but I have yet to see a working solution.
I am running:

  • VS for Mac V.8.8.6 (build 15)
  • MacOS Catalina V.10.15.7
  • Xcode V.12.3 (12C33)
Developer technologies | .NET | Xamarin
{count} votes

Accepted answer
  1. Grime 791 Reputation points
    2021-10-20T04:06:08.433+00:00

    I used a workaround - I downloaded someone else's LaunchScreen.storyboard XML that simply put an image/logo in the centre of the screen, then simply changed the two references to that image (<image name=...> to my own image that was stored in the app. Works a treat!

    The code I used was:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
        <dependencies>
            <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
        </dependencies>
        <scenes>
            <!--View Controller-->
            <scene sceneID="gAE-YM-kbH">
                <objects>
                    <viewController id="X5k-f2-b5h" sceneMemberID="viewController">
                        <layoutGuides>
                            <viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
                            <viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
                        </layoutGuides>
                        <view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
                            <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                            <subviews>
                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="fartzIco256.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
                                    <rect key="frame" x="270" y="270" width="60" height="60"/>
                                    <rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
                                </imageView>
                            </subviews>
                            <color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
                            <constraints>
                                <constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
                                <constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
                            </constraints>
                        </view>
                    </viewController>
                    <placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
                </objects>
                <point key="canvasLocation" x="349" y="339"/>
            </scene>
        </scenes>
        <resources>
            <image name="fartzIco256.png" width="180" height="180"/>
        </resources>
    </document>
    

    Just change my "fartzIco256.png" to your own image stored in your app.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.