Skip to content

moljac/Xamarin.Tools.XamariniOS.UnifiedSupportTransformer

Repository files navigation

Xamarin.iOS Unified Support for components

Unified GUIDs

  1. Library
    1. iOS {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
    2. Bindings project {F5B4F3BC-B597-4E2B-B552-EF5D8A32436F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
  2. Applications (exes) Universal, iPhone and iPad {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}

Xamarin.iOS Library Unified assembly

  1. Library
    1. Project modifications
      1. rename existing *.csproj to *-Classic.csproj

      2. copy to *-Classic.csproj to to .csproj unified=.csproj classic will become obsolete with time

      3. open unified project file *.csproj

        1. change project GUID

        2. change project type to Xamarin iOS Unified Library projects from: * to: {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}

        3. change references fro unified Support from: <Reference Include="monotouch" /> to: <Reference Include="Xamarin.iOS" />

        4. change targets for unified support from: <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" /> to: <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />

        5. preprocessor directive to support ios Unified from: <DefineConstants>DEBUG</DefineConstants> to: <DefineConstants>DEBUG;__UNIFIED__</DefineConstants> 1.

      4. open classic support *-Classic.csproj

        1. change output folders to: <IntermediateOutputPath>obj\classic\$(Configuration)\</IntermediateOutputPath> so from: <ConsolePause>false</ConsolePause> to: <ConsolePause>false</ConsolePause> <IntermediateOutputPath>obj\unified\$(Configuration)\</IntermediateOutputPath>
    2. Source code modifications
      1. add following code in the files to fix usings `` #if UNIFIED using UIKit; using Foundation; using CoreAnimation; using CoreGraphics; #else using MonoTouch.UIKit; using MonoTouch.Foundation; using MonoTouch.CoreAnimation; using MonoTouch.CoreGraphics;

        using System.Drawing;
        using CGRect = global::System.Drawing.RectangleF;
        using CGPoint = global::System.Drawing.PointF;
        using CGSize = global::System.Drawing.SizeF;
        #endif
        

        ``

  2. Sample supporting Xamarin.ios unified

About

Xamarin.iOS.UnifiedSupportTransformer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published