Skip to content

Commit

Permalink
Added in a TestFlight sample application
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisntr committed Nov 2, 2011
1 parent 2e6c00b commit 62221f6
Show file tree
Hide file tree
Showing 13 changed files with 620 additions and 0 deletions.
41 changes: 41 additions & 0 deletions TestFlight/sample/TestFlightSample/AppDelegate.cs
@@ -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;
}
}
}

Binary file added TestFlight/sample/TestFlightSample/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions TestFlight/sample/TestFlightSample/Info.plist
@@ -0,0 +1,30 @@
<?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>TestFlight</string>
<key>CFBundleIconFiles</key>
<array>
<string>Images/57_icon.png</string>
<string>Images/114_icon.png</string>
<string>Images/512_icon.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.xamarin.testflight</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<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>
19 changes: 19 additions & 0 deletions TestFlight/sample/TestFlightSample/Main.cs
@@ -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");
}
}
}
94 changes: 94 additions & 0 deletions TestFlight/sample/TestFlightSample/TestFlightSample.csproj
@@ -0,0 +1,94 @@
<?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>
<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>
<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>
<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>
<MtouchI18n />
<BuildIpa>true</BuildIpa>
<IpaPackageName />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="monotouch" />
</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" />
<ItemGroup>
<Folder Include="Images\" />
</ItemGroup>
<ItemGroup>
<Content Include="Images\114_icon.png" />
<Content Include="Images\512_icon.png" />
<Content Include="Images\57_icon.png" />
<Content Include="Default.png" />
<Content Include="Default%402x.png" />
</ItemGroup>
</Project>
27 changes: 27 additions & 0 deletions TestFlight/sample/TestFlightSample/TestFlightSample.sln
@@ -0,0 +1,27 @@

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
Distribution|iPhone = Distribution|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);
}
}
}

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

0 comments on commit 62221f6

Please sign in to comment.