This commit is contained in:
Rolf Bjarne Kvinge 2015-04-29 17:00:40 +02:00
Коммит cb4ca601c4
114 изменённых файлов: 4760 добавлений и 0 удалений

40
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,40 @@
#Autosave files
*~
#build
[Oo]bj/
[Bb]in/
packages/
TestResults/
# globs
Makefile.in
*.DS_Store
*.sln.cache
*.suo
*.cache
*.pidb
*.userprefs
*.usertasks
config.log
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.user
*.tar.gz
tarballs/
test-results/
Thumbs.db
#Mac bundle stuff
*.dmg
*.app
#resharper
*_Resharper.*
*.Resharper
#dotCover
*.dotCover

32
README.md Normal file
Просмотреть файл

@ -0,0 +1,32 @@
# Test applications for embedded frameworks in Xamarin.iOS
## embedded-framework (MyFramework.framework)
This is a sample Objective-C framework (MyFramework.framework), used by other
projects. This can be rebuilt by simply executing `make`, although the binary
is also checked in for easy consumption.
## simpleapp
This is a single app with one extension, to demonstrate how Mono.framework is
embedded inside the app bundle and used by both the extension and the main
app.
## simpleapp-with-framework
This is the same app as 'simpleapp' from above, with a binding project that
binds the MyFramework.framework, which is used in both the extension and the
main app.
## simpleapp-with-nativereferences
This is the same app as 'simpleapp' from above, now including
MyFramework.framework using the Native Reference support in the project files
(in both the extension and the container app).
## hugeapp
This is an app with all possible extensions. This can be used to see how much
space is saved when Xamarin.iOS embeds the Mono runtime as a framework once,
instead of linking it statically into every binary.

3
embedded-framework/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
MyFramework.device
MyFramework.simulator

Просмотреть файл

@ -0,0 +1,15 @@
MyFramework.framework/MyFramework: MyFramework.device MyFramework.simulator
lipo -create MyFramework.device MyFramework.simulator -output $@
CODE=code.c objc.m
MyFramework.device: $(CODE) Makefile
xcrun --sdk iphoneos clang -dynamiclib $(CODE) -arch armv7 -arch armv7s -arch arm64 -o$@ -framework Foundation -fapplication-extension
install_name_tool -id @rpath/MyFramework.framework/MyFramework $@
MyFramework.simulator: $(CODE) Makefile
xcrun --sdk iphonesimulator clang -dynamiclib $(CODE) -arch i386 -arch x86_64 -o$@ -framework Foundation -fapplication-extension -mios-simulator-version-min=8.0
install_name_tool -id @rpath/MyFramework.framework/MyFramework $@

Просмотреть файл

@ -0,0 +1,57 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>xamarin.test.myframework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>MyFramework</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3.12</string>
<key>NSPrincipalClass</key>
<string></string>
<key>CFBundleExecutable</key>
<string>Mono</string>
<key>BuildMachineOSBuild</key>
<string>13F34</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12D508</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>8.2</string>
<key>DTSDKBuild</key>
<string>12D508</string>
<key>DTSDKName</key>
<string>iphoneos8.2</string>
<key>DTXcode</key>
<string>0620</string>
<key>DTXcodeBuild</key>
<string>6C131e</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
</dict>
</plist>

Двоичные данные
embedded-framework/MyFramework.framework/MyFramework Executable file

Двоичный файл не отображается.

Просмотреть файл

@ -0,0 +1,5 @@
const char *
functionInFramework ()
{
return "This is a string from inside a framework";
}

12
embedded-framework/objc.m Normal file
Просмотреть файл

@ -0,0 +1,12 @@
#include <Foundation/Foundation.h>
@interface MyObjectiveCClass : NSObject
+ (NSString *) callMethod;
@end
@implementation MyObjectiveCClass
+ (NSString *) callMethod
{
return @"My Objective-C method was called";
}
@end

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,29 @@
<?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>WatchKitApp</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.watchkitapp</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.2</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKCompanionAppBundleIdentifier</key>
<string>com.xamarin.hugeapp</string>
<key>WKWatchKitApp</key>
<true/>
<key>XSAppIconAssets</key>
<string>Resources/Images.xcassets/AppIcons.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="6221" systemVersion="14A389" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="AgC-eL-Hgc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6213" />
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="3734" />
</dependencies>
<scenes>
<!--Interface Controller-->
<scene sceneID="aou-V4-d1y">
<objects>
<controller id="AgC-eL-Hgc" customClass="InterfaceController" customModuleProvider="" />
</objects>
<point key="canvasLocation" x="0.0" y="0.0" />
</scene>
<!--Glance Interface Controller-->
<scene sceneID="BOz-TT-tkC">
<objects>
<glanceController spacing="0.0" id="0uZ-2p-rRc" customClass="GlanceController" customModuleProvider="">
<items>
<group alignment="left" id="t8f-Gd-c4y" />
<group alignment="left" id="uCw-4Q-Ouw" />
</items>
<edgeInsets key="margins" left="0.0" right="0.0" top="0.0" bottom="14" />
</glanceController>
</objects>
<point key="canvasLocation" x="0.0" y="263" />
</scene>
<!--Static Notification Interface Controller-->
<scene sceneID="AEw-b0-oYE">
<objects>
<notificationController id="YCC-NB-fut">
<items>
<label alignment="left" text="Alert Label" id="XkS-y5-khE" />
</items>
<notificationCategory key="notificationCategory" id="JfB-70-Muf" />
<connections>
<outlet property="notificationAlertLabel" destination="XkS-y5-khE" id="49B-RR-99y" />
<segue destination="gdX-wl-uQE" kind="relationship" relationship="dynamicNotificationInterface" id="fKh-qV-3T2" />
</connections>
</notificationController>
</objects>
<point key="canvasLocation" x="231" y="0.0" />
</scene>
<!--Notification Controller-->
<scene sceneID="KIl-fV-djm">
<objects>
<controller id="gdX-wl-uQE" customClass="NotificationController" customModuleProvider="" />
</objects>
<point key="canvasLocation" x="462" y="0.0" />
</scene>
</scenes>
</document>

Просмотреть файл

@ -0,0 +1,108 @@
{
"images": [
{
"size": "29x29",
"scale": "1x",
"idiom": "iphone"
},
{
"size": "29x29",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "29x29",
"scale": "3x",
"idiom": "iphone"
},
{
"size": "40x40",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "40x40",
"scale": "3x",
"idiom": "iphone"
},
{
"size": "57x57",
"scale": "1x",
"idiom": "iphone"
},
{
"size": "57x57",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "60x60",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "60x60",
"scale": "3x",
"idiom": "iphone"
},
{
"size": "29x29",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "29x29",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "40x40",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "40x40",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "50x50",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "50x50",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "72x72",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "72x72",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "76x76",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "120x120",
"scale": "1x",
"idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Просмотреть файл

@ -0,0 +1,80 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{D73F8E79-B4DD-4AB0-A767-D9FA3E2FE740};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{32915E35-1030-494C-9A85-7B6BBB540673}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>frameworkstestappWatchKitApp</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>frameworks-test-appWatchKitApp</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Interface.storyboard" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.WatchApp.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,35 @@
using System;
using WatchKit;
using Foundation;
namespace frameworkstestappWatchKitExtension
{
public partial class GlanceController : WKInterfaceController
{
public GlanceController (IntPtr handle) : base (handle)
{
}
public override void Awake (NSObject context)
{
base.Awake (context);
// Configure interface objects here.
Console.WriteLine ("{0} awake with context", this);
}
public override void WillActivate ()
{
// This method is called when the watch view controller is about to be visible to the user.
Console.WriteLine ("{0} will activate", this);
}
public override void DidDeactivate ()
{
// This method is called when the watch view controller is no longer visible to the user.
Console.WriteLine ("{0} did deactivate", this);
}
}
}

19
hugeapp/WatchKitExtension/GlanceController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace frameworkstestappWatchKitExtension
{
[Register ("GlanceController")]
partial class GlanceController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -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>WatchKitExtension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.watchkitextension</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>com.xamarin.hugeapp.watchkitapp</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
</dict>
<key>RemoteInterfacePrincipleClass</key>
<string>InterfaceController</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,35 @@
using System;
using WatchKit;
using Foundation;
namespace frameworkstestappWatchKitExtension
{
public partial class InterfaceController : WKInterfaceController
{
public InterfaceController (IntPtr handle) : base (handle)
{
}
public override void Awake (NSObject context)
{
base.Awake (context);
// Configure interface objects here.
Console.WriteLine ("{0} awake with context", this);
}
public override void WillActivate ()
{
// This method is called when the watch view controller is about to be visible to the user.
Console.WriteLine ("{0} will activate", this);
}
public override void DidDeactivate ()
{
// This method is called when the watch view controller is no longer visible to the user.
Console.WriteLine ("{0} did deactivate", this);
}
}
}

19
hugeapp/WatchKitExtension/InterfaceController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace frameworkstestappWatchKitExtension
{
[Register ("InterfaceController")]
partial class InterfaceController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,35 @@
using System;
using WatchKit;
using Foundation;
namespace frameworkstestappWatchKitExtension
{
public partial class NotificationController : WKUserNotificationInterfaceController
{
public NotificationController (IntPtr handle) : base (handle)
{
}
public override void Awake (NSObject context)
{
base.Awake (context);
// Configure interface objects here.
Console.WriteLine ("{0} awake with context", this);
}
public override void WillActivate ()
{
// This method is called when the watch view controller is about to be visible to the user.
Console.WriteLine ("{0} will activate", this);
}
public override void DidDeactivate ()
{
// This method is called when the watch view controller is no longer visible to the user.
Console.WriteLine ("{0} did deactivate", this);
}
}
}

19
hugeapp/WatchKitExtension/NotificationController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace frameworkstestappWatchKitExtension
{
[Register ("NotificationController")]
partial class NotificationController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,16 @@
{
"aps": {
"alert": "Test message content",
"title": "Optional title",
"category": "myCategory"
},
"WatchKit Simulator Actions": [
{
"title": "First Button",
"identifier": "firstButtonAction"
}
],
"customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to choose between them in when selecting to debug the notification interface of your Watch App."
}

Просмотреть файл

@ -0,0 +1,101 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>frameworkstestappWatchKitExtension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>frameworks-test-appWatchKitExtension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="GlanceController.cs" />
<Compile Include="GlanceController.designer.cs">
<DependentUpon>GlanceController.cs</DependentUpon>
</Compile>
<Compile Include="InterfaceController.cs" />
<Compile Include="InterfaceController.designer.cs">
<DependentUpon>InterfaceController.cs</DependentUpon>
</Compile>
<Compile Include="NotificationController.cs" />
<Compile Include="NotificationController.designer.cs">
<DependentUpon>NotificationController.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<BundleResource Include="PushNotificationPayload.json" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\WatchKitApp\WatchKitApp.csproj">
<Project>{32915E35-1030-494C-9A85-7B6BBB540673}</Project>
<Name>WatchKitApp</Name>
<IsWatchApp>True</IsWatchApp>
</ProjectReference>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,66 @@
using System;
using System.Drawing;
using MobileCoreServices;
using Foundation;
using UIKit;
namespace appextension
{
public partial class ActionViewController : UIViewController
{
public ActionViewController (IntPtr handle) : base (handle)
{
}
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 ();
// Get the item[s] we're handling from the extension context.
// For example, look for an image and place it into an image view.
// Replace this with something appropriate for the type[s] your extension supports.
bool imageFound = false;
foreach (var item in ExtensionContext.InputItems) {
foreach (var itemProvider in item.Attachments) {
if (itemProvider.HasItemConformingTo (UTType.Image)) {
// This is an image. We'll load it, then place it in our image view.
itemProvider.LoadItem (UTType.Image, null, delegate (NSObject image, NSError error) {
if (image != null) {
NSOperationQueue.MainQueue.AddOperation (delegate {
imageView.Image = (UIImage)image;
});
}
});
imageFound = true;
break;
}
}
if (imageFound) {
// We only handle one image, so stop looking for more.
break;
}
}
}
partial void DoneClicked (NSObject sender)
{
// Return any edited content to the host app.
// This template doesn't do anything, so we just echo the passed-in items.
ExtensionContext.CompleteRequest (ExtensionContext.InputItems, null);
}
}
}

23
hugeapp/appextension/ActionViewController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,23 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace appextension
{
[Register ("ActionViewController")]
partial class ActionViewController
{
[Outlet]
UIKit.UIImageView imageView { get; set; }
[Action ("DoneClicked:")]
partial void DoneClicked (Foundation.NSObject sender);
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,51 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>appextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.appextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.appextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
<integer>0</integer>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
<integer>0</integer>
<key>NSExtensionActivationSupportsText</key>
<false/>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>0</integer>
</dict>
<key>NSExtensionPointName</key>
<string>com.apple.ui-services</string>
<key>NSExtensionPointVersion</key>
<string>1.0</string>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.ui-services</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6154.17" systemVersion="13D65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="ObA-dk-sSI">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6153.11" />
</dependencies>
<scenes>
<!--Action View Controller - Image-->
<scene sceneID="7MM-of-jgj">
<objects>
<viewController title="Image" id="ObA-dk-sSI" customClass="ActionViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="qkL-Od-lgU" />
<viewControllerLayoutGuide type="bottom" id="n38-gi-rB5" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="zMn-AG-sqS">
<rect key="frame" x="0.0" y="0.0" width="320" height="528" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9ga-4F-77Z">
<rect key="frame" x="0.0" y="64" width="320" height="464" />
</imageView>
<navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NOA-Dm-cuz">
<rect key="frame" x="0.0" y="20" width="320" height="44" />
<items>
<navigationItem id="3HJ-uW-3hn">
<barButtonItem key="leftBarButtonItem" title="Done" style="done" id="WYi-yp-eM6">
<connections>
<action selector="DoneClicked" destination="ObA-dk-sSI" id="Qdu-qn-U6V" />
</connections>
</barButtonItem>
</navigationItem>
</items>
</navigationBar>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite" />
<constraints>
<constraint firstAttribute="trailing" secondItem="NOA-Dm-cuz" secondAttribute="trailing" id="A05-Pj-hrr" />
<constraint firstItem="9ga-4F-77Z" firstAttribute="top" secondItem="NOA-Dm-cuz" secondAttribute="bottom" id="Fps-3D-QQW" />
<constraint firstItem="NOA-Dm-cuz" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="HxO-8t-aoh" />
<constraint firstAttribute="trailing" secondItem="9ga-4F-77Z" secondAttribute="trailing" id="Ozw-Hg-0yh" />
<constraint firstItem="9ga-4F-77Z" firstAttribute="leading" secondItem="zMn-AG-sqS" secondAttribute="leading" id="XH5-ld-ONA" />
<constraint firstItem="n38-gi-rB5" firstAttribute="top" secondItem="9ga-4F-77Z" secondAttribute="bottom" id="eQg-nn-Zy4" />
<constraint firstItem="NOA-Dm-cuz" firstAttribute="top" secondItem="qkL-Od-lgU" secondAttribute="bottom" id="we0-1t-bgp" />
</constraints>
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<size key="freeformSize" width="320" height="528" />
<connections>
<outlet property="imageView" destination="9ga-4F-77Z" id="5y6-5w-9QO" />
<outlet property="view" destination="zMn-AG-sqS" id="Qma-de-2ek" />
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="252" y="-124" />
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" />
<simulatedOrientationMetrics key="orientation" />
<simulatedScreenMetrics key="destination" type="retina4" />
</simulatedMetricsContainer>
</document>

Просмотреть файл

@ -0,0 +1,86 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{D49B961A-A4E4-462D-882D-63659E79D0E2}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>appextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>appextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainInterface.storyboard" />
</ItemGroup>
<ItemGroup>
<Compile Include="ActionViewController.cs" />
<Compile Include="ActionViewController.designer.cs">
<DependentUpon>ActionViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,29 @@
using System;
using System.Drawing;
using Foundation;
using UIKit;
namespace documentpickerextension
{
public partial class DocumentPickerViewController : UIDocumentPickerExtensionViewController
{
public DocumentPickerViewController (IntPtr handle) : base (handle)
{
}
public override void PrepareForPresentation (UIDocumentPickerMode mode)
{
// TODO: present a view controller appropriate for picker mode here
base.PrepareForPresentation (mode);
}
partial void OpenDocument (NSObject sender)
{
var url = DocumentStorageUrl.Append ("Untitled.txt", false);
// TODO: if you do not have a corresponding file provider, you must ensure that the URL returned here is backed by a file
DismissGrantingAccess (url);
}
}
}

20
hugeapp/documentpickerextension/DocumentPickerViewController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,20 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace documentpickerextension
{
[Register ("DocumentPickerViewController")]
partial class DocumentPickerViewController
{
[Action ("openDocument:")]
partial void OpenDocument (Foundation.NSObject sender);
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.com.your-company.app-name</string>
</array>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,45 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>documentpickerextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.documentpickerextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.documentpickerextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>UIDocumentPickerModes</key>
<array>
<string>UIDocumentPickerModeImport</string>
<string>UIDocumentPickerModeOpen</string>
<string>UIDocumentPickerModeExportToService</string>
<string>UIDocumentPickerModeMoveToService</string>
</array>
<key>UIDocumentPickerSupportedFileTypes</key>
<array>
<string>public.content</string>
</array>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.fileprovider-ui</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6095.4" systemVersion="13D43" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="J6p-g8-CHO">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6100.2" />
</dependencies>
<scenes>
<!-- View Controller-->
<scene sceneID="Q8I-MS-tKG">
<objects>
<viewController id="J6p-g8-CHO" customClass="DocumentPickerViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="hST-wJ-eYy" />
<viewControllerLayoutGuide type="bottom" id="UQD-kz-Mfv" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Vdh-Gp-eV6">
<rect key="frame" x="0.0" y="0.0" width="350" height="400" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mym-YX-cEY">
<rect key="frame" x="137" y="185" width="76" height="30" />
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES" />
<state key="normal" title="Untitled.txt">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite" />
</state>
<connections>
<action selector="OpenDocument:" destination="J6p-g8-CHO" eventType="touchUpInside" id="HtB-86-uWI" />
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite" />
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<size key="freeformSize" width="350" height="400" />
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="UoZ-ya-W3e" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="-163" y="-156" />
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" />
<simulatedOrientationMetrics key="orientation" />
<simulatedScreenMetrics key="destination" />
</simulatedMetricsContainer>
</document>

Просмотреть файл

@ -0,0 +1,86 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{2B738C97-EA1C-4011-A46A-D99D9592D001}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>documentpickerextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>documentpickerextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainInterface.storyboard" />
</ItemGroup>
<ItemGroup>
<Compile Include="DocumentPickerViewController.cs" />
<Compile Include="DocumentPickerViewController.designer.cs">
<DependentUpon>DocumentPickerViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,11 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.com.your-company.app-name</string>
</array>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,93 @@
using System;
using System.IO;
using Foundation;
using UIKit;
namespace fileproviderextension
{
[Register ("FileProvider")]
public class FileProvider : NSFileProviderExtension
{
public FileProvider ()
{
NSError error;
FileCoordinator = new NSFileCoordinator ();
FileCoordinator.PurposeIdentifier = ProviderIdentifier;
FileCoordinator.CoordinateWrite (DocumentStorageUrl, 0, out error, (newUrl) => {
NSError err;
// ensure that the DocumentStorageUrl actually exists
NSFileManager.DefaultManager.CreateDirectory (newUrl, true, null, out err);
});
}
public NSFileCoordinator FileCoordinator {
get;
private set;
}
public override void ProvidePlaceholderAtUrl (NSUrl url, Action<NSError> completionHandler)
{
var fileName = Path.GetFileName (url.Path);
var placeholder = NSFileProviderExtension.GetPlaceholderUrl (DocumentStorageUrl.Append (fileName, false));
NSNumber size = new NSNumber (0);
NSError error;
// TODO: get file size for file at <url> from model
FileCoordinator.CoordinateWrite (placeholder, 0, out error, (newUrl) => {
var metadata = new NSMutableDictionary ();
NSError err = null;
metadata.Add (NSUrl.FileSizeKey, size);
NSFileProviderExtension.WritePlaceholder (placeholder, metadata, ref err);
});
if (completionHandler != null)
completionHandler (null);
}
public override void StartProvidingItemAtUrl (NSUrl url, Action<NSError> completionHandler)
{
NSError error, fileError = null;
NSData fileData;
// TODO: get the file data for file at <url> from model
fileData = new NSData ();
FileCoordinator.CoordinateWrite (url, 0, out error, (newUrl) => fileData.Save (newUrl, 0, out fileError));
if (error != null)
completionHandler (error);
else
completionHandler (fileError);
}
public override void ItemChangedAtUrl (NSUrl url)
{
// Called at some point after the file has changed; the provider may then trigger an upload
// TODO: mark file at <url> as needing an update in the model; kick off update process
Console.WriteLine ("Item changed at URL {0}", url);
}
public override void StopProvidingItemAtUrl (NSUrl url)
{
// Called after the last claim to the file has been released. At this point, it is safe for the file provider to remove the content file.
// Care should be taken that the corresponding placeholder file stays behind after the content file has been deleted.
NSError err;
FileCoordinator.CoordinateWrite (url, NSFileCoordinatorWritingOptions.ForDeleting, out err, (newUrl) => {
NSError error;
NSFileManager.DefaultManager.Remove (newUrl, out error);
});
ProvidePlaceholderAtUrl (url, null);
}
}
}

Просмотреть файл

@ -0,0 +1,33 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>fileproviderextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.fileproviderextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.fileproviderextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionFileProviderDocumentGroup</key>
<string>group.com.your-company.app-name</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.fileprovider-nonui</string>
<key>NSExtensionPrincipalClass</key>
<string>FileProvider</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,80 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>fileproviderextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>fileproviderextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="FileProvider.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

113
hugeapp/hugeapp.sln Normal file
Просмотреть файл

@ -0,0 +1,113 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hugeapp", "hugeapp\hugeapp.csproj", "{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "appextension", "appextension\appextension.csproj", "{D49B961A-A4E4-462D-882D-63659E79D0E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "keyboardextension", "keyboardextension\keyboardextension.csproj", "{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "documentpickerextension", "documentpickerextension\documentpickerextension.csproj", "{2B738C97-EA1C-4011-A46A-D99D9592D001}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fileproviderextension", "fileproviderextension\fileproviderextension.csproj", "{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "photoeditingextension", "photoeditingextension\photoeditingextension.csproj", "{EB8252E6-14C6-49E2-93F8-ED85264636A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "shareextension", "shareextension\shareextension.csproj", "{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "todayextension", "todayextension\todayextension.csproj", "{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchKitApp", "WatchKitApp\WatchKitApp.csproj", "{32915E35-1030-494C-9A85-7B6BBB540673}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchKitExtension", "WatchKitExtension\WatchKitExtension.csproj", "{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Debug|iPhone.ActiveCfg = Debug|iPhone
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Debug|iPhone.Build.0 = Debug|iPhone
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Release|iPhone.ActiveCfg = Release|iPhone
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Release|iPhone.Build.0 = Release|iPhone
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Debug|iPhone.ActiveCfg = Debug|iPhone
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Debug|iPhone.Build.0 = Debug|iPhone
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Release|iPhone.ActiveCfg = Release|iPhone
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Release|iPhone.Build.0 = Release|iPhone
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{2B738C97-EA1C-4011-A46A-D99D9592D001}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{32915E35-1030-494C-9A85-7B6BBB540673}.Debug|iPhone.ActiveCfg = Debug|iPhone
{32915E35-1030-494C-9A85-7B6BBB540673}.Debug|iPhone.Build.0 = Debug|iPhone
{32915E35-1030-494C-9A85-7B6BBB540673}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{32915E35-1030-494C-9A85-7B6BBB540673}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{32915E35-1030-494C-9A85-7B6BBB540673}.Release|iPhone.ActiveCfg = Release|iPhone
{32915E35-1030-494C-9A85-7B6BBB540673}.Release|iPhone.Build.0 = Release|iPhone
{32915E35-1030-494C-9A85-7B6BBB540673}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{32915E35-1030-494C-9A85-7B6BBB540673}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Debug|iPhone.ActiveCfg = Debug|iPhone
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Debug|iPhone.Build.0 = Debug|iPhone
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Release|iPhone.ActiveCfg = Release|iPhone
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Release|iPhone.Build.0 = Release|iPhone
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Debug|iPhone.ActiveCfg = Debug|iPhone
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Debug|iPhone.Build.0 = Debug|iPhone
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Release|iPhone.ActiveCfg = Release|iPhone
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Release|iPhone.Build.0 = Release|iPhone
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Debug|iPhone.ActiveCfg = Debug|iPhone
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Debug|iPhone.Build.0 = Debug|iPhone
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Release|iPhone.ActiveCfg = Release|iPhone
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Release|iPhone.Build.0 = Release|iPhone
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Debug|iPhone.ActiveCfg = Debug|iPhone
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Debug|iPhone.Build.0 = Debug|iPhone
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Release|iPhone.ActiveCfg = Release|iPhone
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Release|iPhone.Build.0 = Release|iPhone
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{D49B961A-A4E4-462D-882D-63659E79D0E2}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Debug|iPhone.ActiveCfg = Debug|iPhone
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Debug|iPhone.Build.0 = Debug|iPhone
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Release|iPhone.ActiveCfg = Release|iPhone
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Release|iPhone.Build.0 = Release|iPhone
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Debug|iPhone.ActiveCfg = Debug|iPhone
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Debug|iPhone.Build.0 = Debug|iPhone
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Release|iPhone.ActiveCfg = Release|iPhone
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Release|iPhone.Build.0 = Release|iPhone
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{EB8252E6-14C6-49E2-93F8-ED85264636A0}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Debug|iPhone.ActiveCfg = Debug|iPhone
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Debug|iPhone.Build.0 = Debug|iPhone
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Release|iPhone.ActiveCfg = Release|iPhone
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Release|iPhone.Build.0 = Release|iPhone
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,32 @@
using CoreGraphics;
using Foundation;
using UIKit;
namespace HugeApp
{
[Register ("AppDelegate")]
public class AppDelegate : UIApplicationDelegate
{
UIWindow window;
UIViewController vc;
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
vc = new UIViewController ();
vc.View.BackgroundColor = UIColor.FromRGB (255, 204, 204); // light purple
window.RootViewController = vc;
window.MakeKeyAndVisible ();
return true;
}
static void Main (string[] args)
{
UIApplication.Main (args, null, "AppDelegate");
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,41 @@
<?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>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleDisplayName</key>
<string>hugeapp</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207" />
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1" />
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" />
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder" />
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 (C) Rolf Bjarne Kvinge" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="frameworks-test-app" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43" />
<fontDescription key="fontDescription" type="boldSystem" pointSize="36" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC" />
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk" />
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l" />
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0" />
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9" />
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g" />
</constraints>
<nil key="simulatedStatusBarMetrics" />
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<point key="canvasLocation" x="548" y="455" />
</view>
</objects>
</document>

Просмотреть файл

@ -0,0 +1,122 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{2682DA86-D8DC-4CFC-B4AC-57E4D38B5001}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>frameworkstestapp</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>frameworks-test-app</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.xib" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\appextension\appextension.csproj">
<Project>{D49B961A-A4E4-462D-882D-63659E79D0E2}</Project>
<Name>appextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\documentpickerextension\documentpickerextension.csproj">
<Project>{2B738C97-EA1C-4011-A46A-D99D9592D001}</Project>
<Name>documentpickerextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\fileproviderextension\fileproviderextension.csproj">
<Project>{B9F7A956-099C-4FFC-B6E4-5D24AF665A73}</Project>
<Name>fileproviderextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\keyboardextension\keyboardextension.csproj">
<Project>{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}</Project>
<Name>keyboardextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\photoeditingextension\photoeditingextension.csproj">
<Project>{EB8252E6-14C6-49E2-93F8-ED85264636A0}</Project>
<Name>photoeditingextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\shareextension\shareextension.csproj">
<Project>{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}</Project>
<Name>shareextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\todayextension\todayextension.csproj">
<Project>{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}</Project>
<Name>todayextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\WatchKitExtension\WatchKitExtension.csproj">
<Project>{33BA5E3C-7D34-40B2-AB2F-3B65B4FEF70E}</Project>
<Name>WatchKitExtension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,42 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>keyboardextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.keyboardextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.keyboardextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>IsASCIICapable</key>
<false/>
<key>PrefersRightToLeft</key>
<false/>
<key>PrimaryLanguage</key>
<string>en-US</string>
<key>RequestsOpenAccess</key>
<false/>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.keyboard-service</string>
<key>NSExtensionPrincipalClass</key>
<string>KeyboardViewController</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,75 @@
using System;
using ObjCRuntime;
using Foundation;
using UIKit;
namespace keyboardextension
{
public partial class KeyboardViewController : UIInputViewController
{
UIButton nextKeyboardButton;
public KeyboardViewController (IntPtr handle) : base (handle)
{
}
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 UpdateViewConstraints ()
{
base.UpdateViewConstraints ();
// Add custom view sizing constraints here
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Perform custom UI setup here
nextKeyboardButton = new UIButton (UIButtonType.System);
nextKeyboardButton.SetTitle ("Next Keyboard", UIControlState.Normal);
nextKeyboardButton.SizeToFit ();
nextKeyboardButton.TranslatesAutoresizingMaskIntoConstraints = false;
nextKeyboardButton.AddTarget (this, new Selector ("advanceToNextInputMode"), UIControlEvent.TouchUpInside);
View.AddSubview (nextKeyboardButton);
var nextKeyboardButtonLeftSideConstraint = NSLayoutConstraint.Create (nextKeyboardButton, NSLayoutAttribute.Left, NSLayoutRelation.Equal, View, NSLayoutAttribute.Left, 1.0f, 0.0f);
var nextKeyboardButtonBottomConstraint = NSLayoutConstraint.Create (nextKeyboardButton, NSLayoutAttribute.Bottom, NSLayoutRelation.Equal, View, NSLayoutAttribute.Bottom, 1.0f, 0.0f);
View.AddConstraints (new [] {
nextKeyboardButtonLeftSideConstraint,
nextKeyboardButtonBottomConstraint
});
}
public override void TextWillChange (IUITextInput textInput)
{
// The app is about to change the document's contents. Perform any preparation here.
}
public override void TextDidChange (IUITextInput textInput)
{
// The app has just changed the document's contents, the document context has been updated.
UIColor textColor = null;
if (TextDocumentProxy.KeyboardAppearance == UIKeyboardAppearance.Dark) {
textColor = UIColor.White;
} else {
textColor = UIColor.Black;
}
nextKeyboardButton.SetTitleColor (textColor, UIControlState.Normal);
}
}
}

19
hugeapp/keyboardextension/KeyboardViewController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace keyboardextension
{
[Register ("KeyboardViewController")]
partial class KeyboardViewController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,83 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{36C5D47C-BAEE-4E64-8FEB-D0FECFBDFDBA}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>keyboardextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>keyboardextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="KeyboardViewController.cs" />
<Compile Include="KeyboardViewController.designer.cs">
<DependentUpon>KeyboardViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,38 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>photoeditingextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.photoeditingextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.photoeditingextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>PHSupportedMediaTypes</key>
<array>
<string>Image</string>
</array>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.photo-editing</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6136" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="ObA-dk-sSI">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6137" />
</dependencies>
<scenes>
<!--My Image Editor View Controller-->
<scene sceneID="7MM-of-jgj">
<objects>
<viewController id="ObA-dk-sSI" customClass="PhotoEditingViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="qkL-Od-lgU" />
<viewControllerLayoutGuide type="bottom" id="n38-gi-rB5" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="zMn-AG-sqS">
<rect key="frame" x="0.0" y="0.0" width="320" height="528" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello World" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="d1e-fi-ked">
<rect key="frame" x="116" y="253" width="89" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite" />
<constraints>
<constraint firstAttribute="centerY" secondItem="d1e-fi-ked" secondAttribute="centerY" id="H0s-hz-dDP" />
<constraint firstAttribute="centerX" secondItem="d1e-fi-ked" secondAttribute="centerX" id="wFy-hW-Bib" />
</constraints>
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<size key="freeformSize" width="320" height="528" />
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="326" y="-128" />
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" />
<simulatedOrientationMetrics key="orientation" />
<simulatedScreenMetrics key="destination" type="retina4" />
</simulatedMetricsContainer>
</document>

Просмотреть файл

@ -0,0 +1,81 @@
using System;
using System.Drawing;
using Foundation;
using PhotosUI;
using Photos;
using UIKit;
namespace photoeditingextension
{
public partial class PhotoEditingViewController : UIViewController, IPHContentEditingController
{
PHContentEditingInput input;
public PhotoEditingViewController (IntPtr handle) : base (handle)
{
}
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 ();
// Do any additional setup after loading the view.
}
public bool ShouldShowCancelConfirmation {
get { return true; }
}
public bool CanHandleAdjustmentData (PHAdjustmentData adjustmentData)
{
// Inspect the adjustmentData to determine whether your extension can work with past edits.
// (Typically, you use its formatIdentifier and formatVersion properties to do this.)
return false;
}
public void StartContentEditing (PHContentEditingInput contentEditingInput, UIImage placeholderImage)
{
// Present content for editing and keep the contentEditingInput for use when closing the edit session.
// If you returned true from CanHandleAdjustmentData(), contentEditingInput has the original image and adjustment data.
// If you returned false, the contentEditingInput has past edits "baked in".
input = contentEditingInput;
}
public void FinishContentEditing (Action<PHContentEditingOutput> completionHandler)
{
// Update UI to reflect that editing has finished and output is being rendered.
// Render and provide output on a background queue.
NSObject.InvokeInBackground (() => {
// Create editing output from the editing input.
var output = new PHContentEditingOutput (input);
// Provide new adjustments and render output to given location.
// output.AdjustmentData = <#new adjustment data#>;
// NSData renderedJPEGData = <#output JPEG#>;
// renderedJPEGData.Save (output.RenderedContentURL, true);
// Call completion handler to commit edit to Photos.
completionHandler (output);
// Clean up temporary files, etc.
});
}
public void CancelContentEditing ()
{
// Clean up temporary files, etc.
// May be called after finishContentEditingWithCompletionHandler: while you prepare output.
}
}
}

19
hugeapp/photoeditingextension/PhotoEditingViewController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace photoeditingextension
{
[Register ("PhotoEditingViewController")]
partial class PhotoEditingViewController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,86 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{EB8252E6-14C6-49E2-93F8-ED85264636A0}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>photoeditingextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>photoeditingextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainInterface.storyboard" />
</ItemGroup>
<ItemGroup>
<Compile Include="PhotoEditingViewController.cs" />
<Compile Include="PhotoEditingViewController.designer.cs">
<DependentUpon>PhotoEditingViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,40 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>shareextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.shareextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.shareextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>TRUEPREDICATE</string>
<key>NSExtensionPointName</key>
<string>com.apple.share-services</string>
<key>NSExtensionPointVersion</key>
<string>1.0</string>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6150.1" systemVersion="13D65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="j1y-V4-xli">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6148" />
</dependencies>
<scenes>
<!--Share View Controller-->
<scene sceneID="ceB-am-kn3">
<objects>
<viewController id="j1y-V4-xli" customClass="ShareViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="8bI-gs-bmD" />
<viewControllerLayoutGuide type="bottom" id="d5i-Ba-RvD" />
</layoutGuides>
<view key="view" opaque="NO" contentMode="scaleToFill" id="wbc-yd-nQP">
<rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite" />
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight" />
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="CEy-Cv-SGf" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="539" y="97" />
</scene>
</scenes>
</document>

Просмотреть файл

@ -0,0 +1,52 @@
using System;
using System.Drawing;
using Foundation;
using Social;
using UIKit;
namespace shareextension
{
public partial class ShareViewController : SLComposeServiceViewController
{
public ShareViewController (IntPtr handle) : base (handle)
{
}
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 ();
// Do any additional setup after loading the view.
}
public override bool IsContentValid ()
{
// Do validation of contentText and/or NSExtensionContext attachments here
return true;
}
public override void DidSelectPost ()
{
// This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments.
// Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context.
ExtensionContext.CompleteRequest (null, null);
}
public override SLComposeSheetConfigurationItem[] GetConfigurationItems ()
{
// To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here.
return new SLComposeSheetConfigurationItem[0];
}
}
}

19
hugeapp/shareextension/ShareViewController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace shareextension
{
[Register ("ShareViewController")]
partial class ShareViewController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,86 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{DAE61D29-7D13-4973-8DB9-C050CA55CBF2}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>shareextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>shareextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainInterface.storyboard" />
</ItemGroup>
<ItemGroup>
<Compile Include="ShareViewController.cs" />
<Compile Include="ShareViewController.designer.cs">
<DependentUpon>ShareViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,31 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>todayextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.hugeapp.todayextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.todayextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widget-extension</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6095.1" systemVersion="13D37" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="M4Y-Lb-cyx">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6100" />
</dependencies>
<scenes>
<!--My Widget View Controller-->
<scene sceneID="cwh-vc-ff4">
<objects>
<viewController id="M4Y-Lb-cyx" customClass="TodayViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ft6-oW-KC0" />
<viewControllerLayoutGuide type="bottom" id="FKl-LY-JtV" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" simulatedAppContext="notificationCenter" id="S3S-Oj-5AN">
<rect key="frame" x="0.0" y="0.0" width="320" height="37" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="top" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello World" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0"
baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="280" translatesAutoresizingMaskIntoConstraints="NO" id="GcN-lo-r42">
<rect key="frame" x="20" y="8" width="280" height="21" />
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="lightTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<constraints>
<constraint firstItem="FKl-LY-JtV" firstAttribute="top" secondItem="GcN-lo-r42" secondAttribute="bottom" constant="20" symbolic="YES" id="0Q0-KW-PJ6" />
<constraint firstItem="GcN-lo-r42" firstAttribute="leading" secondItem="S3S-Oj-5AN" secondAttribute="leading" constant="20" symbolic="YES" id="6Vq-gs-PHe" />
<constraint firstAttribute="trailing" secondItem="GcN-lo-r42" secondAttribute="trailing" constant="20" symbolic="YES" id="L8K-9R-egU" />
<constraint firstItem="GcN-lo-r42" firstAttribute="top" secondItem="Ft6-oW-KC0" secondAttribute="bottom" constant="20" symbolic="YES" id="mYS-Cv-VNx" />
</constraints>
</view>
<extendedEdge key="edgesForExtendedLayout" />
<nil key="simulatedStatusBarMetrics" />
<nil key="simulatedTopBarMetrics" />
<nil key="simulatedBottomBarMetrics" />
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<size key="freeformSize" width="320" height="37" />
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="vXp-U4-Rya" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="516" y="285" />
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" />
<simulatedOrientationMetrics key="orientation" />
<simulatedScreenMetrics key="destination" type="retina4" />
</simulatedMetricsContainer>
</document>

Просмотреть файл

@ -0,0 +1,45 @@
using System;
using System.Drawing;
using NotificationCenter;
using Foundation;
using Social;
using UIKit;
namespace todayextension
{
public partial class TodayViewController : UIViewController, INCWidgetProviding
{
public TodayViewController (IntPtr handle) : base (handle)
{
}
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 ();
// Do any additional setup after loading the view.
}
[Export ("widgetPerformUpdateWithCompletionHandler:")]
public void WidgetPerformUpdate (Action<NCUpdateResult> completionHandler)
{
// Perform any setup necessary in order to update the view.
// If an error is encoutered, use NCUpdateResultFailed
// If there's no update required, use NCUpdateResultNoData
// If there's an update, use NCUpdateResultNewData
completionHandler (NCUpdateResult.NewData);
}
}
}

19
hugeapp/todayextension/TodayViewController.designer.cs сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace todayextension
{
[Register ("TodayViewController")]
partial class TodayViewController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,86 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{EE88AF0A-F225-4CC2-B081-FFEB6D9C800E}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>todayextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>todayextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainInterface.storyboard" />
</ItemGroup>
<ItemGroup>
<Compile Include="TodayViewController.cs" />
<Compile Include="TodayViewController.designer.cs">
<DependentUpon>TodayViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,38 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>photoeditingextension</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.simpleappwithframework.photoeditingextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.photoeditingextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>PHSupportedMediaTypes</key>
<array>
<string>Image</string>
</array>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.photo-editing</string>
</dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6136" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="ObA-dk-sSI">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6137" />
</dependencies>
<scenes>
<!--My Image Editor View Controller-->
<scene sceneID="7MM-of-jgj">
<objects>
<viewController id="ObA-dk-sSI" customClass="PhotoEditingViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="qkL-Od-lgU" />
<viewControllerLayoutGuide type="bottom" id="n38-gi-rB5" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="zMn-AG-sqS">
<rect key="frame" x="0.0" y="0.0" width="320" height="528" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello World" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="d1e-fi-ked">
<rect key="frame" x="116" y="253" width="89" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite" />
<constraints>
<constraint firstAttribute="centerY" secondItem="d1e-fi-ked" secondAttribute="centerY" id="H0s-hz-dDP" />
<constraint firstAttribute="centerX" secondItem="d1e-fi-ked" secondAttribute="centerX" id="wFy-hW-Bib" />
</constraints>
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<size key="freeformSize" width="320" height="528" />
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="326" y="-128" />
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" />
<simulatedOrientationMetrics key="orientation" />
<simulatedScreenMetrics key="destination" type="retina4" />
</simulatedMetricsContainer>
</document>

Просмотреть файл

@ -0,0 +1,71 @@
using System;
using CoreGraphics;
using Foundation;
using PhotosUI;
using Photos;
using UIKit;
namespace photoeditingextension
{
public partial class PhotoEditingViewController : UIViewController, IPHContentEditingController
{
PHContentEditingInput input;
public PhotoEditingViewController (IntPtr handle) : base (handle)
{
}
public override void ViewDidLoad ()
{
var view = new UILabel (new CGRect (0, 50, View.Bounds.Width, View.Bounds.Height));
view.Text = MyFramework.CallFunction ();
view.TextAlignment = UITextAlignment.Center;
View.Add (view);
var view2 = new UILabel (new CGRect (0, 100, View.Bounds.Width, View.Bounds.Height));
view2.Text = SimpleFrameworkBinding.MyObjectiveCClass.CallMethod ();
view2.TextAlignment = UITextAlignment.Center;
View.Add (view2);
view.BackgroundColor = UIColor.FromRGB (229, 255, 204); // light green
base.ViewDidLoad ();
}
public bool ShouldShowCancelConfirmation {
get { return true; }
}
public bool CanHandleAdjustmentData (PHAdjustmentData adjustmentData)
{
return false;
}
public void StartContentEditing (PHContentEditingInput contentEditingInput, UIImage placeholderImage)
{
input = contentEditingInput;
}
public void FinishContentEditing (Action<PHContentEditingOutput> completionHandler)
{
// Update UI to reflect that editing has finished and output is being rendered.
// Render and provide output on a background queue.
NSObject.InvokeInBackground (() => {
// Create editing output from the editing input.
var output = new PHContentEditingOutput (input);
// Call completion handler to commit edit to Photos.
completionHandler (output);
// Clean up temporary files, etc.
});
}
public void CancelContentEditing ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace photoeditingextension
{
[Register ("PhotoEditingViewController")]
partial class PhotoEditingViewController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,92 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{524ED885-7ED0-493F-86D1-99A27EA13085}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>photoeditingextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>photoeditingextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainInterface.storyboard" />
</ItemGroup>
<ItemGroup>
<Compile Include="PhotoEditingViewController.cs" />
<Compile Include="PhotoEditingViewController.designer.cs">
<DependentUpon>PhotoEditingViewController.cs</DependentUpon>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\simpleapp-with-framework-binding\simpleapp-with-framework-binding.csproj">
<Project>{893DDF88-2D0B-4AB3-B008-12F5765A4510}</Project>
<Name>simpleapp-with-framework-binding</Name>
</ProjectReference>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,17 @@
using System;
using UIKit;
using Foundation;
using ObjCRuntime;
using CoreGraphics;
namespace SimpleFrameworkBinding
{
[BaseType (typeof (NSObject))]
public interface MyObjectiveCClass {
[Static]
[Export ("callMethod")]
string CallMethod ();
}
}

Просмотреть файл

@ -0,0 +1,3 @@
using ObjCRuntime;
[assembly: LinkWith ("MyFramework.framework")]

Просмотреть файл

@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Foundation;
// This attribute allows you to mark your assemblies as “safe to link”.
// When the attribute is present, the linker—if enabled—will process the assembly
// even if youre using the “Link SDK assemblies only” option, which is the default for device builds.
[assembly: LinkerSafe]
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("simple-framework-binding")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("Xamarin")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("(C) Rolf Bjarne Kvinge")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

Просмотреть файл

@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
public static class MyFramework {
public static string CallFunction ()
{
return Marshal.PtrToStringAuto (functionInFramework ());
}
[DllImport ("@rpath/MyFramework.framework/MyFramework")]
static extern IntPtr functionInFramework ();
}

Просмотреть файл

@ -0,0 +1,54 @@
<?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>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{893DDF88-2D0B-4AB3-B008-12F5765A4510}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>simpleframeworkbinding</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>simple-framework-binding</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="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MyFramework.framework.linkwith.cs" />
</ItemGroup>
<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
</ItemGroup>
<ItemGroup>
<ObjcBindingCoreSource Include="StructsAndEnums.cs" />
</ItemGroup>
<ItemGroup>
<ObjcBindingNativeFramework Include="..\..\embedded-framework\MyFramework.framework" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "simpleapp-with-framework", "simpleapp-with-framework\simpleapp-with-framework.csproj", "{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "photoeditingextension", "photoeditingextension\photoeditingextension.csproj", "{524ED885-7ED0-493F-86D1-99A27EA13085}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "simpleapp-with-framework-binding", "simpleapp-with-framework-binding\simpleapp-with-framework-binding.csproj", "{893DDF88-2D0B-4AB3-B008-12F5765A4510}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhone.ActiveCfg = Debug|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhone.Build.0 = Debug|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhone.ActiveCfg = Release|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhone.Build.0 = Release|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhone.ActiveCfg = Debug|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhone.Build.0 = Debug|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhone.ActiveCfg = Release|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhone.Build.0 = Release|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Debug|iPhone.Build.0 = Debug|Any CPU
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Release|iPhone.ActiveCfg = Release|Any CPU
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Release|iPhone.Build.0 = Release|Any CPU
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{893DDF88-2D0B-4AB3-B008-12F5765A4510}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

40
simpleapp-with-framework/simpleapp-with-framework/.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,40 @@
#Autosave files
*~
#build
[Oo]bj/
[Bb]in/
packages/
TestResults/
# globs
Makefile.in
*.DS_Store
*.sln.cache
*.suo
*.cache
*.pidb
*.userprefs
*.usertasks
config.log
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.user
*.tar.gz
tarballs/
test-results/
Thumbs.db
#Mac bundle stuff
*.dmg
*.app
#resharper
*_Resharper.*
*.Resharper
#dotCover
*.dotCover

Просмотреть файл

@ -0,0 +1,42 @@
using CoreGraphics;
using Foundation;
using UIKit;
namespace SimpleFrameworkTest
{
[Register ("AppDelegate")]
public class AppDelegate : UIApplicationDelegate
{
UIWindow window;
UIViewController vc;
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
vc = new UIViewController ();
vc.View.BackgroundColor = UIColor.FromRGB (229, 255, 204); // light green
var view = new UILabel (new CGRect (0, 0, window.Bounds.Width, window.Bounds.Height));
view.Text = MyFramework.CallFunction ();
view.TextAlignment = UITextAlignment.Center;
vc.View.Add (view);
var view2 = new UILabel (new CGRect (0, 50, window.Bounds.Width, window.Bounds.Height));
view2.Text = SimpleFrameworkBinding.MyObjectiveCClass.CallMethod ();
view2.TextAlignment = UITextAlignment.Center;
vc.View.Add (view2);
window.RootViewController = vc;
window.MakeKeyAndVisible ();
return true;
}
static void Main (string[] args)
{
UIApplication.Main (args, null, "AppDelegate");
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,43 @@
<?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>CFBundleIdentifier</key>
<string>com.xamarin.simpleappwithframework</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Resources/Images.xcassets/AppIcons.appiconset</string>
<key>CFBundleDisplayName</key>
<string>simpleapp-with-framework</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,108 @@
{
"images": [
{
"size": "29x29",
"scale": "1x",
"idiom": "iphone"
},
{
"size": "29x29",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "29x29",
"scale": "3x",
"idiom": "iphone"
},
{
"size": "40x40",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "40x40",
"scale": "3x",
"idiom": "iphone"
},
{
"size": "57x57",
"scale": "1x",
"idiom": "iphone"
},
{
"size": "57x57",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "60x60",
"scale": "2x",
"idiom": "iphone"
},
{
"size": "60x60",
"scale": "3x",
"idiom": "iphone"
},
{
"size": "29x29",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "29x29",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "40x40",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "40x40",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "50x50",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "50x50",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "72x72",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "72x72",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "76x76",
"scale": "1x",
"idiom": "ipad"
},
{
"size": "76x76",
"scale": "2x",
"idiom": "ipad"
},
{
"size": "120x120",
"scale": "1x",
"idiom": "car"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207" />
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1" />
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" />
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder" />
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 (C) Rolf Bjarne Kvinge" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="simple-framework-test" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43" />
<fontDescription key="fontDescription" type="boldSystem" pointSize="36" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC" />
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk" />
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l" />
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0" />
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9" />
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g" />
</constraints>
<nil key="simulatedStatusBarMetrics" />
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<point key="canvasLocation" x="548" y="455" />
</view>
</objects>
</document>

Просмотреть файл

@ -0,0 +1,98 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>simpleframeworktest</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>simple-framework-test</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
<MtouchExtraArgs>-vvvv</MtouchExtraArgs>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchI18n>
</MtouchI18n>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.xib" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\photoeditingextension\photoeditingextension.csproj">
<Project>{524ED885-7ED0-493F-86D1-99A27EA13085}</Project>
<Name>photoeditingextension</Name>
<IsAppExtension>True</IsAppExtension>
</ProjectReference>
<ProjectReference Include="..\simpleapp-with-framework-binding\simpleapp-with-framework-binding.csproj">
<Project>{893DDF88-2D0B-4AB3-B008-12F5765A4510}</Project>
<Name>simpleapp-with-framework-binding</Name>
</ProjectReference>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,38 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>com.xamarin.simpleappwithnativereferences.photoeditingextension</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>com.your-company.photoeditingextension</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>PHSupportedMediaTypes</key>
<array>
<string>Image</string>
</array>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.photo-editing</string>
</dict>
<key>CFBundleDisplayName</key>
<string>simpleappwithnativereferences</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6136" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="ObA-dk-sSI">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6137" />
</dependencies>
<scenes>
<!--My Image Editor View Controller-->
<scene sceneID="7MM-of-jgj">
<objects>
<viewController id="ObA-dk-sSI" customClass="PhotoEditingViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="qkL-Od-lgU" />
<viewControllerLayoutGuide type="bottom" id="n38-gi-rB5" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="zMn-AG-sqS">
<rect key="frame" x="0.0" y="0.0" width="320" height="528" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello World" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO"
translatesAutoresizingMaskIntoConstraints="NO" id="d1e-fi-ked">
<rect key="frame" x="116" y="253" width="89" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite" />
<constraints>
<constraint firstAttribute="centerY" secondItem="d1e-fi-ked" secondAttribute="centerY" id="H0s-hz-dDP" />
<constraint firstAttribute="centerX" secondItem="d1e-fi-ked" secondAttribute="centerX" id="wFy-hW-Bib" />
</constraints>
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<size key="freeformSize" width="320" height="528" />
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="X47-rx-isc" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="326" y="-128" />
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" />
<simulatedOrientationMetrics key="orientation" />
<simulatedScreenMetrics key="destination" type="retina4" />
</simulatedMetricsContainer>
</document>

Просмотреть файл

@ -0,0 +1,66 @@
using System;
using CoreGraphics;
using Foundation;
using PhotosUI;
using Photos;
using UIKit;
namespace photoeditingextension
{
public partial class PhotoEditingViewController : UIViewController, IPHContentEditingController
{
PHContentEditingInput input;
public PhotoEditingViewController (IntPtr handle) : base (handle)
{
}
public override void ViewDidLoad ()
{
View.BackgroundColor = UIColor.FromRGB (204, 255, 255); // light blue
var view = new UILabel (new CGRect (0, 50, View.Bounds.Width, View.Bounds.Height));
view.Text = MyFramework.CallFunction ();
view.TextAlignment = UITextAlignment.Center;
View.Add (view);
base.ViewDidLoad ();
}
public bool ShouldShowCancelConfirmation {
get { return true; }
}
public bool CanHandleAdjustmentData (PHAdjustmentData adjustmentData)
{
return false;
}
public void StartContentEditing (PHContentEditingInput contentEditingInput, UIImage placeholderImage)
{
input = contentEditingInput;
}
public void FinishContentEditing (Action<PHContentEditingOutput> completionHandler)
{
// Update UI to reflect that editing has finished and output is being rendered.
// Render and provide output on a background queue.
NSObject.InvokeInBackground (() => {
// Create editing output from the editing input.
var output = new PHContentEditingOutput (input);
// Call completion handler to commit edit to Photos.
completionHandler (output);
// Clean up temporary files, etc.
});
}
public void CancelContentEditing ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,19 @@
//
// This file has been generated automatically by MonoDevelop to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using Foundation;
namespace photoeditingextension
{
[Register ("PhotoEditingViewController")]
partial class PhotoEditingViewController
{
void ReleaseDesignerOutlets ()
{
}
}
}

Просмотреть файл

@ -0,0 +1,95 @@
<?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>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{EE2C853D-36AF-4FDB-B1AD-8E90477E2198};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{524ED885-7ED0-493F-86D1-99A27EA13085}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>photoeditingextension</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>photoeditingextension</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>
<MtouchArch>i386</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<MtouchProfiling>true</MtouchProfiling>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>iPhone Developer</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>i386</MtouchArch>
<ConsolePause>false</ConsolePause>
<MtouchLink>None</MtouchLink>
</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>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchProfiling>true</MtouchProfiling>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainInterface.storyboard" />
</ItemGroup>
<ItemGroup>
<Compile Include="PhotoEditingViewController.cs" />
<Compile Include="PhotoEditingViewController.designer.cs">
<DependentUpon>PhotoEditingViewController.cs</DependentUpon>
</Compile>
<Compile Include="..\simpleapp-with-nativereferences\MyFramework.cs">
<Link>MyFramework.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<NativeReference Include="..\..\embedded-framework\MyFramework.framework">
<IsCxx>False</IsCxx>
<Kind>Framework</Kind>
</NativeReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,33 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "simpleapp-with-nativereferences", "simpleapp-with-nativereferences\simpleapp-with-nativereferences.csproj", "{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "photoeditingextension", "photoeditingextension\photoeditingextension.csproj", "{524ED885-7ED0-493F-86D1-99A27EA13085}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhone.ActiveCfg = Debug|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhone.Build.0 = Debug|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhone.ActiveCfg = Release|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhone.Build.0 = Release|iPhone
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{14DD74BA-837E-45C3-B2D3-2A167BD22B1F}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhone.ActiveCfg = Debug|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhone.Build.0 = Debug|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhone.ActiveCfg = Release|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhone.Build.0 = Release|iPhone
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{524ED885-7ED0-493F-86D1-99A27EA13085}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,40 @@
#Autosave files
*~
#build
[Oo]bj/
[Bb]in/
packages/
TestResults/
# globs
Makefile.in
*.DS_Store
*.sln.cache
*.suo
*.cache
*.pidb
*.userprefs
*.usertasks
config.log
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.user
*.tar.gz
tarballs/
test-results/
Thumbs.db
#Mac bundle stuff
*.dmg
*.app
#resharper
*_Resharper.*
*.Resharper
#dotCover
*.dotCover

Просмотреть файл

@ -0,0 +1,37 @@
using CoreGraphics;
using Foundation;
using UIKit;
namespace SimpleFrameworkTest
{
[Register ("AppDelegate")]
public class AppDelegate : UIApplicationDelegate
{
UIWindow window;
UIViewController vc;
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
window = new UIWindow (UIScreen.MainScreen.Bounds);
vc = new UIViewController ();
vc.View.BackgroundColor = UIColor.FromRGB (204, 255, 255); // light blue
var view = new UILabel (new CGRect (0, 0, window.Bounds.Width, window.Bounds.Height));
view.Text = MyFramework.CallFunction ();
view.TextAlignment = UITextAlignment.Center;
vc.View.Add (view);
window.RootViewController = vc;
window.MakeKeyAndVisible ();
return true;
}
static void Main (string[] args)
{
UIApplication.Main (args, null, "AppDelegate");
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?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>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,41 @@
<?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>CFBundleIdentifier</key>
<string>com.xamarin.simpleappwithnativereferences</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleDisplayName</key>
<string>simpleapp with native references</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
public static class MyFramework {
public static string CallFunction ()
{
return Marshal.PtrToStringAuto (functionInFramework ());
}
[DllImport ("@rpath/MyFramework.framework/MyFramework")]
static extern IntPtr functionInFramework ();
}

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207" />
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1" />
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" />
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder" />
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 (C) Rolf Bjarne Kvinge" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21" />
<fontDescription key="fontDescription" type="system" pointSize="17" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="simple-framework-test" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines"
minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43" />
<fontDescription key="fontDescription" type="boldSystem" pointSize="36" />
<color key="textColor" cocoaTouchSystemColor="darkTextColor" />
<nil key="highlightedColor" />
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" />
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC" />
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk" />
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l" />
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0" />
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9" />
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g" />
</constraints>
<nil key="simulatedStatusBarMetrics" />
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" />
<point key="canvasLocation" x="548" y="455" />
</view>
</objects>
</document>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше