Visual Studio для Mac может компилироваться, но не может запустить приложение iOS - PullRequest
0 голосов
/ 14 февраля 2019

У меня есть проект Xamarin.Forms в Visual Studio для Mac.В настоящее время я могу создать проект для iOS, но мне не предоставляется возможность его запустить:

top bar with build icon the run tab

Кроме того, у меня есть много доступных типов сборки.Никто из них не позволяет мне бежать.Types of build avaliable

Большая часть прогресса, который я сделал, была в файле iOS csproj, так что вот оно.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.props" Condition="Exists('..\..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">iPhone</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{A49C2037-7B2A-43EB-BCDB-62E1BEEB4EE7}</ProjectGuid>
    <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <OutputType>Exe</OutputType>
    <RootNamespace>APPNAME.iOS</RootNamespace>
    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
    <AssemblyName>APPNAME.iOS</AssemblyName>
    <NuGetPackageImportStamp>
    </NuGetPackageImportStamp>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\iPhone\Debug</OutputPath>
    <DefineConstants>DEBUG</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <ConsolePause>false</ConsolePause>
    <MtouchArch>ARM64</MtouchArch>
    <CodesignKey>iPhone Developer</CodesignKey>
    <MtouchDebug>true</MtouchDebug>
    <!--<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>-->
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
    <DefineConstants>DEBUG</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <ConsolePause>false</ConsolePause>
    <MtouchArch>x86_64</MtouchArch>
    <MtouchLink>None</MtouchLink>
    <MtouchDebug>true</MtouchDebug>
    <CodesignEntitlements></CodesignEntitlements>
    <CodesignKey>iPhone Developer</CodesignKey>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
    <DebugType>none</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\iPhone\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <MtouchArch>ARMv7, ARM64</MtouchArch>
    <ConsolePause>false</ConsolePause>
    <CodesignKey>iPhone Developer</CodesignKey>
    <!--<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>-->
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
    <DebugType>none</DebugType>
    <Optimize>True</Optimize>
    <OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <ConsolePause>False</ConsolePause>
    <MtouchArch>ARMv7, ARM64</MtouchArch>
    <BuildIpa>True</BuildIpa>
    <CodesignProvision>Automatic:AdHoc</CodesignProvision>
    <CodesignKey>iPhone Distribution</CodesignKey>
    <!--<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>-->
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
    <DebugType>none</DebugType>
    <Optimize>True</Optimize>
    <OutputPath>bin\iPhone\AppStore</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <ConsolePause>False</ConsolePause>
    <MtouchArch>ARMv7, ARM64</MtouchArch>
    <CodesignProvision>Automatic:AppStore</CodesignProvision>
    <CodesignKey>iPhone Distribution</CodesignKey>
    <!--<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>-->
  </PropertyGroup>
  <PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
    <AppExtensionDebugBundleId />
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="Data\NetworkConnection.cs" />
    <Compile Include="Data\SQL_IOS.cs" />
    <Compile Include="Helpers\Settings.cs" />
    <Compile Include="Main.cs" />
    <Compile Include="AppDelegate.cs" />
    <None Include="app.config" />
    <None Include="Entitlements.plist" />
    <None Include="Info.plist" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <ITunesArtwork Include="iTunesArtwork" />
    <ITunesArtwork Include="iTunesArtwork@2x" />
    <None Include="packages.config" />
    <Compile Include="PicturePickerImplementation.cs" />
  </ItemGroup>
  <ItemGroup>
    <BundleResource Include="Resources\Default-568h%402x.png" />
    <BundleResource Include="Resources\Default-Portrait.png" />
    <BundleResource Include="Resources\Default-Portrait%402x.png" />
    <BundleResource Include="Resources\Default.png" />
    <BundleResource Include="Resources\Default%402x.png" />
    <BundleResource Include="Resources\Icon-60%402x.png" />
    <BundleResource Include="Resources\Icon-60%403x.png" />
    <BundleResource Include="Resources\Icon-76.png" />
    <BundleResource Include="Resources\Icon-76%402x.png" />
    <BundleResource Include="Resources\Icon-Small-40.png" />
    <BundleResource Include="Resources\Icon-Small-40%402x.png" />
    <BundleResource Include="Resources\Icon-Small-40%403x.png" />
    <BundleResource Include="Resources\Icon-Small.png" />
    <BundleResource Include="Resources\Icon-Small%402x.png" />
    <BundleResource Include="Resources\Icon-Small%403x.png" />
    <InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
    <BundleResource Include="Resources\passwordicon.png" />
    <BundleResource Include="Resources\usernameicon.png" />
    <BundleResource Include="Resources\checkmark.png" />
    <BundleResource Include="Resources\loading.jpg" />
    <BundleResource Include="Resources\noimage.jpeg" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="Plugin.Settings, Version=3.1.1.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Settings.Abstractions, Version=3.1.1.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\..\packages\Xam.Plugins.Settings.3.1.1\lib\Xamarin.iOS10\Plugin.Settings.Abstractions.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core" />
    <Reference Include="Xamarin.iOS" />
    <Reference Include="SQLitePCLRaw.core">
      <HintPath>..\..\packages\SQLitePCLRaw.core.1.1.11\lib\Xamarin.iOS10\SQLitePCLRaw.core.dll</HintPath>
    </Reference>
    <Reference Include="SQLitePCLRaw.provider.sqlite3">
      <HintPath>..\..\packages\SQLitePCLRaw.provider.sqlite3.ios_unified.1.1.11\lib\Xamarin.iOS10\SQLitePCLRaw.provider.sqlite3.dll</HintPath>
    </Reference>
    <Reference Include="SQLitePCLRaw.batteries_green">
      <HintPath>..\..\packages\SQLitePCLRaw.bundle_green.1.1.11\lib\Xamarin.iOS10\SQLitePCLRaw.batteries_green.dll</HintPath>
    </Reference>
    <Reference Include="SQLitePCLRaw.batteries_v2">
      <HintPath>..\..\packages\SQLitePCLRaw.bundle_green.1.1.11\lib\Xamarin.iOS10\SQLitePCLRaw.batteries_v2.dll</HintPath>
    </Reference>
    <Reference Include="SQLite-net">
      <HintPath>..\..\packages\sqlite-net-pcl.1.5.231\lib\netstandard1.1\SQLite-net.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Connectivity.Abstractions">
      <HintPath>..\..\packages\Xam.Plugin.Connectivity.3.2.0\lib\Xamarin.iOS10\Plugin.Connectivity.Abstractions.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Connectivity">
      <HintPath>..\..\packages\Xam.Plugin.Connectivity.3.2.0\lib\Xamarin.iOS10\Plugin.Connectivity.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Forms.Core">
      <HintPath>..\..\packages\Xamarin.Forms.3.4.0.1008975\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Forms.Platform">
      <HintPath>..\..\packages\Xamarin.Forms.3.4.0.1008975\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Forms.Platform.iOS">
      <HintPath>..\..\packages\Xamarin.Forms.3.4.0.1008975\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath>
    </Reference>
    <Reference Include="Xamarin.Forms.Xaml">
      <HintPath>..\..\packages\Xamarin.Forms.3.4.0.1008975\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
    </Reference>
    <Reference Include="WebP.Touch">
      <HintPath>..\..\packages\WebP.Touch.1.0.8\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath>
    </Reference>
    <Reference Include="FFImageLoading">
      <HintPath>..\..\packages\Xamarin.FFImageLoading.2.4.4.859\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath>
    </Reference>
    <Reference Include="FFImageLoading.Platform">
      <HintPath>..\..\packages\Xamarin.FFImageLoading.2.4.4.859\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath>
    </Reference>
    <Reference Include="FFImageLoading.Forms">
      <HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.4.4.859\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath>
    </Reference>
    <Reference Include="FFImageLoading.Forms.Platform">
      <HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.4.4.859\lib\Xamarin.iOS10\FFImageLoading.Forms.Platform.dll</HintPath>
    </Reference>
    <Reference Include="FFImageLoading.Transformations">
      <HintPath>..\..\packages\Xamarin.FFImageLoading.Transformations.2.4.4.859\lib\Xamarin.iOS10\FFImageLoading.Transformations.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Permissions">
      <HintPath>..\..\packages\Plugin.Permissions.3.0.0.12\lib\xamarinios10\Plugin.Permissions.dll</HintPath>
    </Reference>
    <Reference Include="Plugin.Media">
      <HintPath>..\..\packages\Xam.Plugin.Media.4.0.1.5\lib\xamarinios10\Plugin.Media.dll</HintPath>
    </Reference>
    <Reference Include="System.Net.Http" />
    <Reference Include="Xamarin.Auth">
      <HintPath>..\..\packages\Xamarin.Auth.1.6.0.4\lib\Xamarin.iOS10\Xamarin.Auth.dll</HintPath>
    </Reference>
    <Reference Include="System.Json" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\APPNAME\APPNAME.csproj">
      <Project>{B1A336E0-3016-4315-8143-1ED508B427B2}</Project>
      <Name>APPNAME</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <Content Include="Resources\Brushed.png" />
    <Content Include="Resources\metal.png" />
  </ItemGroup>
  <ItemGroup>
    <BundleResource Include="Resources\icon.png">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </BundleResource>
  </ItemGroup>
  <ItemGroup>
    <Content Include="Resources\logo.png">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
  <Import Project="..\..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.3.4.0.1008975\build\Xamarin.Forms.targets')" />
</Project>

Я могу собратьи запустите новый проект xamarin для iOS.

Как настроить свой проект, чтобы разрешить мне запускать приложение для iOS?

1 Ответ

0 голосов
/ 22 февраля 2019

Во-первых, проверьте в Solution Options (щелкните правой кнопкой мыши Решение -> Параметры или щелкните дважды решение), если в вашем проекте iOS проверено свойство Build: solution options check.

Возможно, вы такжеобнаружите, что свойство build проверено, но для конфигурации задано что-то отличное от Debug | iPhoneSimulator.Вы можете отредактировать конфигурацию в Debug | iPhoneSimulator, нажав на нее: config

Во-вторых, на панели выберите Debug | iPhone simulator, выберите симулятор, который вы хотите использовать, и вы должны быть готовы.

...