Skip to content
Permalink
Browse files

Add Xamarin.iOS Support

        * Added Xamarin.iOS Binding
        * Added Xamarin.iOS Sample app
        * Added creation of Xamarin Component for the Component Store

Special Notes:
        Inside Xamarin folder there is a makefile that handles everything for you
	make: Will compile TaplyticsSDK.csproj and create TaplyticsSDK.dll
	make component: Will create TaplyticsSDK.dll, download xamarin-component.exe and create the .xam file that is the one you upload to Xamarin Component Store
  • Loading branch information...
dalexsoto committed Apr 11, 2014
1 parent 4feb562 commit 5bc138d05efdef1f2c6f5df2d955dd20c76614d6
@@ -16,3 +16,11 @@ profile
*.moved-aside
DerivedData
.idea/
# Xamarin
*.userprefs
/bin
*.DS_Store
[Bb]in
[Dd]ebug*/
obj/
tmp/
@@ -0,0 +1,28 @@
# Path to mono's xbuild
MONOXBUILD=/Library/Frameworks/Mono.framework/Commands/xbuild

# Target to build the TaplyticsSDK.dll
all: TaplyticsSDK.dll

# Target to download Xamarin-Component.exe
xpkg:
echo "* Downloading xamarin-component..."
mkdir xpkg
curl -L https://components.xamarin.com/submit/xpkg > xpkg/xpkg.zip
cd xpkg && unzip -qq -o xpkg.zip
mono xpkg/xamarin-component.exe

# Target to build the TaplyticsSDK.dll
TaplyticsSDK.dll:
$(MONOXBUILD) /p:Configuration=Release binding/TaplyticsSDK.csproj
cp binding/bin/Release/TaplyticsSDK.dll TaplyticsSDK.dll

# Target to build the Taplytics Xamarin Component
component: TaplyticsSDK.dll xpkg
mono xpkg/xamarin-component.exe package

# Clean everything
clean:
rm -rf xpkg *.xam *.dll
rm -rf binding/*.dll binding/bin/ binding/obj/ binding/*.sln binding/*.userprefs
rm -rf samples/TaplyticsSample/TaplyticsSample/bin samples/TaplyticsSample/TaplyticsSample/obj
@@ -0,0 +1,62 @@
using System;
using System.Drawing;
using MonoTouch.ObjCRuntime;
using MonoTouch.Foundation;
using MonoTouch.UIKit;

namespace TaplyticsSDK
{
delegate void TLExperimentHandler (NSDictionary variables);
delegate void TLBackgroundFetchHandler (UIBackgroundFetchResult result);

interface ITaplyticsDelegate {}

[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface TaplyticsDelegate {

[Export ("taplyticsExperimentChanged:variationName:")]
void ExperimentChanged (string experimentName, [NullAllowed] string variationName);

[Export ("taplyticsDeviceInfo:")]
void DeviceInfo (NSDictionary deviceInfo);

[Export ("taplyticsLastApps:")]
void LastApps (NSObject[] lastApps);
}

[BaseType (typeof (NSObject))]
interface Taplytics {

[Static]
[Export ("startTaplyticsAPIKey:")]
void StartTaplytics (string apiKey);

[Static]
[Export ("startTaplyticsAPIKey:options:")]
void StartTaplytics (string apiKey, [NullAllowed] NSDictionary options);

[Since (7,0)]
[Static]
[Export ("performBackgroundFetch:")]
void PerformBackgroundFetch (TLBackgroundFetchHandler completionHandler);

[Static]
[Export ("setTaplyticsDelegate:")]
void SetTaplyticsDelegate ([NullAllowed] ITaplyticsDelegate taplyticsDelegate);

[Static]
[Export ("runCodeExperiment:withBaseline:variations:")]
void RunCodeExperiment (string experimentName, TLExperimentHandler baselineHandler, [NullAllowed] NSDictionary variationNamesAndBlocks);

[Static]
[Export ("goalAchieved:")]
void GoalAchieved (string goalName);

[Static]
[Export ("goalAchieved:value:")]
void GoalAchieved (string goalName, NSNumber value);
}
}

@@ -0,0 +1,6 @@
using System;

namespace TaplyticsSDK
{
}

@@ -0,0 +1,4 @@
using System;
using MonoTouch.ObjCRuntime;

[assembly: LinkWith ("Taplytics", LinkTarget.Simulator | LinkTarget.ArmV7 | LinkTarget.ArmV7s, Frameworks = "CFNetwork Security CoreTelephony SystemConfiguration", LinkerFlags = "-ObjC -licucore", SmartLink = true, ForceLoad = true)]
@@ -0,0 +1,59 @@
<?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>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5758D66D-11C4-4271-8F3B-19B8E18AAB0A}</ProjectGuid>
<ProjectTypeGuids>{F5B4F3BC-B597-4E2B-B552-EF5D8A32436F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>TaplyticsSDK</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>TaplyticsSDK</AssemblyName>
</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>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</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>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="monotouch" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
</ItemGroup>
<ItemGroup>
<ObjcBindingCoreSource Include="StructsAndEnums.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Xamarin.ObjcBinding.CSharp.targets" />
<ItemGroup>
<Compile Include="Taplytics.linkwith.cs">
<DependentUpon>Taplytics</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ObjcBindingNativeLibrary Include="..\..\..\Taplytics.framework\Versions\A\Taplytics">
<Link>Taplytics</Link>
</ObjcBindingNativeLibrary>
</ItemGroup>
</Project>
@@ -0,0 +1,16 @@
version: 1.2.46
name: Taplytics SDK
id: taplytics
publisher: Syrp Inc.
publisher-url: https://taplytics.com
summary: Mobile A/B testing for everyone.
libraries:
ios: TaplyticsSDK.dll
samples:
- name: "iOS Sample"
path: samples/TaplyticsSample/TaplyticsSample.sln
configuration: "Release|iPhone"
screenshots:
- component/screenshots/taplytics-buttons.png
- component/screenshots/taplytics-colors.png
- component/screenshots/taplytics-livechanges.png
@@ -0,0 +1,22 @@

Enjoy the benefits of live changes.
===================================

Deliver endless variations of your app to users in real time. All the while the Taplytics platform keeps your app completely native so it will deliver the experience your users have come to love.

![](taplytics-livechanges.png)


Increase engagement and conversions.
====================================

Taplytics makes native mobile A/B testing a breeze. With one line SDK integration, live updates to your users and real time analytics, we have built something we know you will love. Implement Taplytics and start getting the most out of your app.

![](taplytics-colors.png)

Turn design decisions into incontrovertible data.
===========================================

Master the feedback loop. Run A/B tests with a segment of your audience and let the data make the call. Taplytics' real time analytics engine lets you see quickly and easily which variations are winning and when you have achieved statistically significant results.

![](taplytics-buttons.png)
@@ -0,0 +1,18 @@
We have worked hard to make implementing the Taplytics SDK as simple as possible, all you need is to initialize the sdk as follows:

```csharp
using TaplyticsSDK;
// ...
// Get your Taplytics API key from:
// https://taplytics.com/
const string apiKey = "YOUR_TAPLYTICS_APIKEY_HERE";
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
Taplytics.StartTaplytics (apiKey);
// ...
}
```

In order to get your API Key please visitit [Taplytics website.](http://help.taplytics.com/hc/en-us/sections/200118704)

0 comments on commit 5bc138d

Please sign in to comment.
You can’t perform that action at this time.