[MacOS] remove extra dll from maps
This commit is contained in:
Родитель
bddf4dcdf5
Коммит
73b9489370
|
@ -1,33 +0,0 @@
|
|||
using CoreLocation;
|
||||
using Foundation;
|
||||
|
||||
namespace Xamarin.Forms.Maps.MacOS.Extra
|
||||
{
|
||||
delegate void CLGeocodeCompletionHandler(CLPlacemark[] placemarks, NSError error);
|
||||
|
||||
[BaseType(typeof(NSObject))]
|
||||
interface CLGeocoder
|
||||
{
|
||||
[Export("isGeocoding")]
|
||||
bool Geocoding { get; }
|
||||
|
||||
[Export("reverseGeocodeLocation:completionHandler:")]
|
||||
[Async]
|
||||
void ReverseGeocodeLocation(CLLocation location, CLGeocodeCompletionHandler completionHandler);
|
||||
|
||||
[Export("geocodeAddressDictionary:completionHandler:")]
|
||||
[Async]
|
||||
void GeocodeAddress(NSDictionary addressDictionary, CLGeocodeCompletionHandler completionHandler);
|
||||
|
||||
[Export("geocodeAddressString:completionHandler:")]
|
||||
[Async]
|
||||
void GeocodeAddress(string addressString, CLGeocodeCompletionHandler completionHandler);
|
||||
|
||||
[Export("geocodeAddressString:inRegion:completionHandler:")]
|
||||
[Async]
|
||||
void GeocodeAddress(string addressString, CLRegion region, CLGeocodeCompletionHandler completionHandler);
|
||||
|
||||
[Export("cancelGeocode")]
|
||||
void CancelGeocode();
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using Foundation;
|
||||
|
||||
// This attribute allows you to mark your assemblies as “safe to link”.
|
||||
// When the attribute is present, the linker—if enabled—will process the assembly
|
||||
// even if you’re using the “Link SDK assemblies only” option, which is the default for device builds.
|
||||
|
||||
[assembly: LinkerSafe]
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
[assembly: AssemblyTitle("Xamarin.Forms.Maps.MacOS.Extra")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{6346D187-BA87-4F18-A165-F27C5B7F25D0}</ProjectGuid>
|
||||
<ProjectTypeGuids>{810C163F-4746-4721-8B8E-88A3673A62EA};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Xamarin.Forms.Maps.MacOS.Extra</RootNamespace>
|
||||
<AssemblyName>Xamarin.Forms.Maps.MacOS.Extra</AssemblyName>
|
||||
<MacResourcePrefix>Resources</MacResourcePrefix>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DefineConstants></DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.Mac" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.ObjcBinding.CSharp.targets" />
|
||||
</Project>
|
Двоичные данные
Xamarin.Forms.Maps.MacOS/Libs/Xamarin.Forms.Maps.MacOS.Extra.dll
Двоичные данные
Xamarin.Forms.Maps.MacOS/Libs/Xamarin.Forms.Maps.MacOS.Extra.dll
Двоичный файл не отображается.
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -25,15 +25,21 @@
|
|||
<EnablePackageSigning>false</EnablePackageSigning>
|
||||
<IncludeMonoRuntime>false</IncludeMonoRuntime>
|
||||
<UseSGen>false</UseSGen>
|
||||
<HttpClientHandler></HttpClientHandler>
|
||||
<TlsProvider></TlsProvider>
|
||||
<LinkMode></LinkMode>
|
||||
<XamMacArch></XamMacArch>
|
||||
<HttpClientHandler>
|
||||
</HttpClientHandler>
|
||||
<TlsProvider>
|
||||
</TlsProvider>
|
||||
<LinkMode>
|
||||
</LinkMode>
|
||||
<XamMacArch>
|
||||
</XamMacArch>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<DefineConstants></DefineConstants>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<EnableCodeSigning>false</EnableCodeSigning>
|
||||
|
@ -41,18 +47,19 @@
|
|||
<EnablePackageSigning>false</EnablePackageSigning>
|
||||
<IncludeMonoRuntime>false</IncludeMonoRuntime>
|
||||
<UseSGen>false</UseSGen>
|
||||
<HttpClientHandler></HttpClientHandler>
|
||||
<TlsProvider></TlsProvider>
|
||||
<LinkMode></LinkMode>
|
||||
<XamMacArch></XamMacArch>
|
||||
<HttpClientHandler>
|
||||
</HttpClientHandler>
|
||||
<TlsProvider>
|
||||
</TlsProvider>
|
||||
<LinkMode>
|
||||
</LinkMode>
|
||||
<XamMacArch>
|
||||
</XamMacArch>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.Mac" />
|
||||
<Reference Include="Xamarin.Forms.Maps.MacOS.Extra">
|
||||
<HintPath>Libs\Xamarin.Forms.Maps.MacOS.Extra.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
@ -83,8 +90,5 @@
|
|||
<Name>Xamarin.Forms.Maps</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Libs\Xamarin.Forms.Maps.MacOS.Extra.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
|
||||
</Project>
|
|
@ -3,16 +3,8 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using Contacts;
|
||||
using CoreLocation;
|
||||
|
||||
#if __MOBILE__
|
||||
using AddressBookUI;
|
||||
using CCLGeocoder = CoreLocation.CLGeocoder;
|
||||
#else
|
||||
using Xamarin.Forms.Maps.MacOS.Extra;
|
||||
using CCLGeocoder = Xamarin.Forms.Maps.MacOS.Extra.CLGeocoder;
|
||||
#endif
|
||||
|
||||
#if __MOBILE__
|
||||
namespace Xamarin.Forms.Maps.iOS
|
||||
#else
|
||||
namespace Xamarin.Forms.Maps.MacOS
|
||||
|
@ -29,7 +21,7 @@ namespace Xamarin.Forms.Maps.MacOS
|
|||
static Task<IEnumerable<string>> GetAddressesForPositionAsync(Position position)
|
||||
{
|
||||
var location = new CLLocation(position.Latitude, position.Longitude);
|
||||
var geocoder = new CCLGeocoder();
|
||||
var geocoder = new CLGeocoder();
|
||||
var source = new TaskCompletionSource<IEnumerable<string>>();
|
||||
geocoder.ReverseGeocodeLocation(location, (placemarks, error) =>
|
||||
{
|
||||
|
@ -58,7 +50,7 @@ namespace Xamarin.Forms.Maps.MacOS
|
|||
|
||||
static Task<IEnumerable<Position>> GetPositionsForAddressAsync(string address)
|
||||
{
|
||||
var geocoder = new CCLGeocoder();
|
||||
var geocoder = new CLGeocoder();
|
||||
var source = new TaskCompletionSource<IEnumerable<Position>>();
|
||||
geocoder.GeocodeAddress(address, (placemarks, error) =>
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче