Skip to content

Commit

Permalink
Initial attempt at adding Unified support.
Browse files Browse the repository at this point in the history
Xamarin.iOS is failing with the follow error:
> Objective-C exception thrown.  Name: NSInvalidArgumentException ..... unrecognized selector sent to instance

https://www.dropbox.com/s/l7k43fheu79uj88/Screenshot%202014-11-21%2007.22.55.png?dl=0

Xamarin.Mac Unified is not working at all. Need to figure out what the #ifdef should be
  • Loading branch information
cdeutsch committed Nov 21, 2014
1 parent 2a9a33b commit bc03620
Show file tree
Hide file tree
Showing 54 changed files with 2,035 additions and 107 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{539F537A-E2E0-4F8E-ADB0-39585A85B078}</ProjectGuid>
<ProjectTypeGuids>{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>JsBridgeMacSample</RootNamespace>
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
<AssemblyName>JsBridge-Mac-Sample</AssemblyName>
<AssemblyName>JsBridge.Mac.Classic.Sample</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -65,9 +65,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral">
<Private>False</Private>
</Reference>
<Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
Expand Down Expand Up @@ -95,16 +93,16 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\JsBridge-Mac\JsBridge-Mac.csproj">
<ProjectReference Include="..\JsBridge.Mac.Classic\JsBridge.Mac.Classic.csproj">
<Project>{58103E60-5558-477F-8CD3-B2B3A51F5D86}</Project>
<Name>JsBridge-Mac</Name>
<Name>JsBridge.Mac.Classic</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="..\JsBridgeExample\www\index.html">
<BundleResource Include="..\JsBridge.iOS.Classic.Sample\www\index.html">
<Link>www\index.html</Link>
</BundleResource>
<BundleResource Include="..\JsBridgeExample\www\js\mt.js">
<BundleResource Include="..\JsBridge.iOS.Classic.Sample\www\js\mt.js">
<Link>www\js\mt.js</Link>
</BundleResource>
</ItemGroup>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{58103E60-5558-477F-8CD3-B2B3A51F5D86}</ProjectGuid>
<ProjectTypeGuids>{42C0BBD9-55CE-4FC1-8D90-A7348ABAFB23};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>JsBridgeMac</RootNamespace>
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
<AssemblyName>JsBridge-Mac</AssemblyName>
<AssemblyName>JsBridge.Mac.Classic</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -66,26 +66,24 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral">
<Private>False</Private>
</Reference>
<Reference Include="MonoMac, Version=0.0.0.0, Culture=neutral" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
<Folder Include="libs\" />
<Folder Include="javascript\" />
</ItemGroup>
<ItemGroup>
<None Include="..\JsBridge\javascript\mt.js">
<None Include="..\JsBridge.iOS.Classic\javascript\mt.js">
<Link>javascript\mt.js</Link>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\JsBridge\libs\SimpleJson.cs">
<Compile Include="..\JsBridge.iOS.Classic\libs\SimpleJson.cs">
<Link>libs\SimpleJson.cs</Link>
</Compile>
<Compile Include="..\JsBridge\JsBridge.cs">
<Compile Include="..\JsBridge.iOS.Classic\JsBridge.cs">
<Link>JsBridge.cs</Link>
</Compile>
</ItemGroup>
Expand Down
22 changes: 22 additions & 0 deletions JsBridge.Mac.Unified.Sample/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;

using Foundation;
using AppKit;

namespace JsBridge.Mac.Unified.Sample
{
public partial class AppDelegate : NSApplicationDelegate
{
MainWindowController mainWindowController;

public AppDelegate ()
{
}

public override void FinishedLaunching (NSObject notification)
{
mainWindowController = new MainWindowController ();
mainWindowController.Window.MakeKeyAndOrderFront (this);
}
}
}
7 changes: 7 additions & 0 deletions JsBridge.Mac.Unified.Sample/AppDelegate.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions JsBridge.Mac.Unified.Sample/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>JsBridge.Mac.Unified.Sample</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com..JsBridge.Mac.Unified.Sample</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>JsBridge.Mac.Unified.Sample</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<key>NSHumanReadableCopyright</key>
<string>cdeutschx</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
103 changes: 103 additions & 0 deletions JsBridge.Mac.Unified.Sample/JsBridge.Mac.Unified.Sample.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?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>
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C28C8866-0041-4C99-AB01-A2FAD80622D0}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>JsBridge.Mac.Unified.Sample</RootNamespace>
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
<AssemblyName>JsBridge.Mac.Unified.Sample</AssemblyName>
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
</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>
<ConsolePause>false</ConsolePause>
<UseSGen>false</UseSGen>
<IncludeMonoRuntime>false</IncludeMonoRuntime>
<EnablePackageSigning>false</EnablePackageSigning>
<CodeSigningKey>Mac Developer</CodeSigningKey>
<EnableCodeSigning>false</EnableCodeSigning>
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<LinkMode>SdkOnly</LinkMode>
<UseSGen>false</UseSGen>
<IncludeMonoRuntime>true</IncludeMonoRuntime>
<EnablePackageSigning>false</EnablePackageSigning>
<CodeSigningKey>Developer ID Application</CodeSigningKey>
<EnableCodeSigning>true</EnableCodeSigning>
<CreatePackage>true</CreatePackage>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\AppStore</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<LinkMode>SdkOnly</LinkMode>
<UseSGen>false</UseSGen>
<IncludeMonoRuntime>true</IncludeMonoRuntime>
<PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey>
<CreatePackage>true</CreatePackage>
<CodeSigningKey>3rd Party Mac Developer Application</CodeSigningKey>
<EnableCodeSigning>true</EnableCodeSigning>
<EnablePackageSigning>true</EnablePackageSigning>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.Mac" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
<Folder Include="www\" />
<Folder Include="www\js\" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainWindow.cs" />
<Compile Include="MainWindow.designer.cs">
<DependentUpon>MainWindow.cs</DependentUpon>
</Compile>
<Compile Include="MainWindowController.cs" />
<Compile Include="MainWindowController.designer.cs">
<DependentUpon>MainWindowController.cs</DependentUpon>
</Compile>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<Compile Include="AppDelegate.designer.cs">
<DependentUpon>AppDelegate.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainWindow.xib" />
<InterfaceDefinition Include="MainMenu.xib" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="..\JsBridge.iOS.Classic.Sample\www\js\mt.js">
<Link>www\js\mt.js</Link>
</None>
<None Include="..\JsBridge.iOS.Classic.Sample\www\index.html">
<Link>www\index.html</Link>
</None>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
</Project>
15 changes: 15 additions & 0 deletions JsBridge.Mac.Unified.Sample/Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;

using AppKit;

namespace JsBridge.Mac.Unified.Sample
{
static class MainClass
{
static void Main (string[] args)
{
NSApplication.Init ();
NSApplication.Main (args);
}
}
}
Loading

0 comments on commit bc03620

Please sign in to comment.