Xamarin iOS Support
Summary: Since there's a couple of changes after last month pr of #280 , here's a new pr for Xamarin support #276 , the idea is to add Xamarin iOS, Mac and Android support. - Add Xamarin iOS support for Yoga, by providing a wrapper for the native lib. - Add Xamarin iOS Unit testing project ~~- Adds a YogaKit shared implementation in c#.~~ ~~- Adds a YogaKIt iOS implementation.~~ ~~- Adds Yoga/YogaKit iOS sample application~~ Facebook.Yoga.iOS.Tests.exe : 169 ms Tests run: 114 Passed: 114 Inconclusive: 0 Failed: 0 Ignored: 0  Closes https://github.com/facebook/yoga/pull/324 Reviewed By: emilsjolander Differential Revision: D4401408 Pulled By: splhack fbshipit-source-id: ecdae7967060361bef2bc25a5ef759cb9a957322
This commit is contained in:
committed by
Facebook Github Bot
parent
47266b9ae8
commit
a3d7d72421
20
csharp/iOS/Facebook.Yoga.iOS/ApiDefinition.cs
Normal file
20
csharp/iOS/Facebook.Yoga.iOS/ApiDefinition.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
using UIKit;
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
using CoreGraphics;
|
||||
|
||||
namespace Facebook.Yoga.iOS
|
||||
{
|
||||
//this is needed
|
||||
}
|
10
csharp/iOS/Facebook.Yoga.iOS/CustomBuildAction.targets
Normal file
10
csharp/iOS/Facebook.Yoga.iOS/CustomBuildAction.targets
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CompileDependsOn>CopyInNativeLib;$(CompileDependsOn)</CompileDependsOn>
|
||||
</PropertyGroup>
|
||||
<!-- The # and , in this path does not play nice with the binding project logic, so make a copy -->
|
||||
<Target Name="CopyInNativeLib" Inputs="..\..\..\buck-out\gen\csharp\yoganet-ios\libyoga.a" Outputs="$(ProjectDir)libyoga.a">
|
||||
<Copy SourceFiles="..\..\..\buck-out\gen\csharp\yoganet-ios\libyoga.a" DestinationFiles="$(ProjectDir)/libyoga.a" />
|
||||
</Target>
|
||||
</Project>
|
50
csharp/iOS/Facebook.Yoga.iOS/Facebook.Yoga.iOS.csproj
Normal file
50
csharp/iOS/Facebook.Yoga.iOS/Facebook.Yoga.iOS.csproj
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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>{128FB32A-C4A1-4363-BF06-0A36E700B7FA}</ProjectGuid>
|
||||
<ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Facebook.Yoga.iOS</RootNamespace>
|
||||
<AssemblyName>Facebook.Yoga.iOS</AssemblyName>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
</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>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
<Reference Include="System.Core" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BundleResource Include="CustomBuildAction.targets" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<NativeReference Include="libyoga.a">
|
||||
<Kind>Static</Kind>
|
||||
<SmartLink>False</SmartLink>
|
||||
</NativeReference>
|
||||
</ItemGroup>
|
||||
<Import Project="..\..\Facebook.Yoga\Facebook.Yoga.Shared.projitems" Label="Shared" Condition="Exists('..\..\Facebook.Yoga\Facebook.Yoga.Shared.projitems')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
|
||||
<Import Project="CustomBuildAction.targets" />
|
||||
</Project>
|
Reference in New Issue
Block a user