Permalink
Browse files

Adding in Sample and updated binding for Test Flight

  • Loading branch information...
1 parent 27b1b1c commit 1ad9dc4826f00383abc7032f8958a8971a59209b @chrisntr committed Oct 11, 2011
View
@@ -1,7 +0,0 @@
-all: testflight.dll
-
-testflight.dll: Makefile testflight.cs
- /Developer/MonoTouch/usr/bin/btouch testflight.cs --out=testflight.dll
-
-clean:
- -rm *dll
@@ -0,0 +1,7 @@
+all: testflight.dll
+
+testflight.dll: Makefile testflight.cs
+ /Developer/MonoTouch/usr/bin/btouch testflight.cs --out=MonoTouch.TestFlight.dll --ns=MonoTouch.TestFlight
+ cp MonoTouch.TestFlight.dll ../Sample/TestFlightSample/MonoTouch.TestFlight.dll
+clean:
+ -rm *dll
Binary file not shown.
File renamed without changes.
@@ -12,6 +12,7 @@
namespace MonoTouch.TestFlight {
+ [BaseType(typeof(NSObject))]
public interface TestFlight {
[Static, Export ("addCustomEnvironmentInformation:forKey:")]
void AddCustomEnvironmentInformation (string information, string key);
@@ -30,4 +31,4 @@ public interface TestFlight {
[Static, Export ("openFeedbackView")]
void OpenFeedbackView ();
}
-}
+}
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+using MonoTouch.TestFlight;
+
+namespace TestFlightSample
+{
+ // The UIApplicationDelegate for the application. This class is responsible for launching the
+ // User Interface of the application, as well as listening (and optionally responding) to
+ // application events from iOS.
+ [Register ("AppDelegate")]
+ public partial class AppDelegate : UIApplicationDelegate
+ {
+ // class-level declarations
+ UIWindow window;
+ TestFlightSampleViewController viewController;
+
+ //
+ // This method is invoked when the application has loaded and is ready to run. In this
+ // method you should instantiate the window, load the UI into it and then make the window
+ // visible.
+ //
+ // You have 17 seconds to return from this method, or iOS will terminate your application.
+ //
+ public override bool FinishedLaunching (UIApplication app, NSDictionary options)
+ {
+ TestFlight.TakeOff("yourTeamTokenHere");
+
+ window = new UIWindow (UIScreen.MainScreen.Bounds);
+
+ viewController = new TestFlightSampleViewController ("TestFlightSampleViewController", null);
+ window.RootViewController = viewController;
+ window.MakeKeyAndVisible ();
+
+ return true;
+ }
+ }
+}
+
@@ -0,0 +1,18 @@
+<?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>MinimumOSVersion</key>
+ <string>3.0</string>
+ <key>UIDeviceFamily</key>
+ <array>
+ <string>1</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MonoTouch.Foundation;
+using MonoTouch.UIKit;
+
+namespace TestFlightSample
+{
+ public class Application
+ {
+ // This is the main entry point of the application.
+ static void Main (string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main (args, null, "AppDelegate");
+ }
+ }
+}
@@ -0,0 +1,90 @@
+<?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)' == '' ">iPhoneSimulator</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{30744326-67E5-48CE-BB96-DD1C5DAEEC81}</ProjectGuid>
+ <ProjectTypeGuids>{6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>TestFlightSample</RootNamespace>
+ <AssemblyName>TestFlightSample</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <MtouchLink>None</MtouchLink>
+ <MtouchDebug>true</MtouchDebug>
+ <MtouchExtraArgs>-nosymbolstrip -nostrip -cxx -gcc_flags "-lgcc_eh -L${ProjectDir} -ltestflight -ObjC"</MtouchExtraArgs>
+ <MtouchI18n />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\iPhoneSimulator\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <MtouchLink>None</MtouchLink>
+ <MtouchExtraArgs>-nosymbolstrip -nostrip -cxx -gcc_flags "-lgcc_eh -L${ProjectDir} -ltestflight -ObjC"</MtouchExtraArgs>
+ <MtouchI18n />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\iPhone\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <MtouchDebug>true</MtouchDebug>
+ <CodesignKey>iPhone Developer</CodesignKey>
+ <MtouchExtraArgs>-nosymbolstrip -nostrip -cxx -gcc_flags "-lgcc_eh -L${ProjectDir} -ltestflight -ObjC"</MtouchExtraArgs>
+ <MtouchI18n />
+ <IpaPackageName />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\iPhone\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <CodesignKey>iPhone Developer</CodesignKey>
+ <MtouchExtraArgs>-nosymbolstrip -nostrip -cxx -gcc_flags "-lgcc_eh -L${ProjectDir} -ltestflight -ObjC"</MtouchExtraArgs>
+ <MtouchI18n />
+ <BuildIpa>true</BuildIpa>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="monotouch" />
+ <Reference Include="MonoTouch.TestFlight">
+ <HintPath>MonoTouch.TestFlight.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Info.plist" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Main.cs" />
+ <Compile Include="AppDelegate.cs" />
+ <Compile Include="TestFlightSampleViewController.cs" />
+ <Compile Include="TestFlightSampleViewController.designer.cs">
+ <DependentUpon>TestFlightSampleViewController.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <InterfaceDefinition Include="TestFlightSampleViewController.xib" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFlightSample", "TestFlightSample.csproj", "{30744326-67E5-48CE-BB96-DD1C5DAEEC81}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Debug|iPhone = Debug|iPhone
+ Release|iPhone = Release|iPhone
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Debug|iPhone.Build.0 = Debug|iPhone
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Release|iPhone.ActiveCfg = Release|iPhone
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Release|iPhone.Build.0 = Release|iPhone
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {30744326-67E5-48CE-BB96-DD1C5DAEEC81}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = TestFlightSample.csproj
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,62 @@
+using MonoTouch.UIKit;
+using System.Drawing;
+using System;
+using MonoTouch.Foundation;
+using MonoTouch.TestFlight;
+
+namespace TestFlightSample
+{
+ public partial class TestFlightSampleViewController : UIViewController
+ {
+ public TestFlightSampleViewController (string nibName, NSBundle bundle) : base (nibName, bundle)
+ {
+ }
+
+ public override void DidReceiveMemoryWarning ()
+ {
+ // Releases the view if it doesn't have a superview.
+ base.DidReceiveMemoryWarning ();
+
+ // Release any cached data, images, etc that aren't in use.
+ }
+
+ public override void ViewDidLoad ()
+ {
+ base.ViewDidLoad ();
+
+ TestFlight.PassCheckpoint("Checkpoint 1");
+
+ //any additional setup after loading the view, typically from a nib.
+ }
+
+ partial void leaveFeedback (MonoTouch.Foundation.NSObject sender)
+ {
+ TestFlight.OpenFeedbackView();
+ }
+
+ partial void passCheckpoint (MonoTouch.Foundation.NSObject sender)
+ {
+ TestFlight.PassCheckpoint("Checkpoint 2");
+ }
+
+ partial void crashApp (MonoTouch.Foundation.NSObject sender)
+ {
+ var emptyString = String.Empty;
+ var breaks = emptyString.Substring(0, 20);
+ }
+
+ public override void ViewDidUnload ()
+ {
+ base.ViewDidUnload ();
+
+ // Release any retained subviews of the main view.
+ // e.g. myOutlet = null;
+ }
+
+ public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
+ {
+ // Return true for supported orientations
+ return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown);
+ }
+ }
+}
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 1ad9dc4

Please sign in to comment.