Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 1aa145a

Browse files
committed
[background] update project
1 parent e4158ec commit 1aa145a

24 files changed

+112
-85
lines changed

SimpleBackgroundTransfer/Metadata.xml

-10
This file was deleted.

SimpleBackgroundTransfer/README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ urlFragment: simplebackgroundtransfer
1010
---
1111
# SimpleBackgroundTransfer
1212

13-
## Overview
13+
SimpleBackgroundTransfer is a simple app that illustrates how to use background transfers - press the **Start** button to initiate a large image download in the background.
1414

15-
SimpleBackgroundTransfer is a simple app that illustrates how to use background transfers.
15+
The app must be properly signed to run on the simulator, so ensure that the bundle identifier is correct and your provisioning profiles are configured correctly (otherwise you might see [this isssue](https://github.com/xamarin/xamarin-macios/issues/7101)).
1616

17-
Right now this sample only works on iOS devices (not the simulator).
17+
![App showing a world map image](Screenshots/02-sml.png)
1818

19-
![App showing a world map image](Screenshots/IMG_0002.PNG)
20-
21-
This is a port of Apple's WWDC2013 sample SimpleBackgroundTransfer.
22-
Link to Apple’s sample:https://developer.apple.com/downloads/index.action?name=WWDC%202013#
19+
This is a port of Apple's [WWDC2013 sample](https://developer.apple.com/downloads/index.action?name=WWDC%202013) SimpleBackgroundTransfer.
478 KB
Loading
Loading
3.38 MB
Loading
-19.8 KB
Binary file not shown.
-1.22 MB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"images":[{"idiom":"iphone","filename":"Icon.png","size":"57x57","scale":"1x"},{"idiom":"iphone","filename":"[email protected]","size":"57x57","scale":"2x"},{"idiom":"iphone","filename":"[email protected]","size":"60x60","scale":"2x"},{"idiom":"iphone","filename":"Icon-Small.png","size":"29x29","scale":"1x"},{"idiom":"iphone","filename":"[email protected]","size":"29x29","scale":"2x"},{"idiom":"iphone","filename":"[email protected]","size":"40x40","scale":"2x"}],"info":{"version":1,"author":"xcode"}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict/>
5+
</plist>

SimpleBackgroundTransfer/SimpleBackgroundTransfer/Info.plist

+11-10
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@
1111
<key>UIMainStoryboardFile</key>
1212
<string>MainStoryboard</string>
1313
<key>MinimumOSVersion</key>
14-
<string>9.0</string>
14+
<string>12.0</string>
1515
<key>CFBundleIdentifier</key>
1616
<string>com.xamarin.BackgroundSession</string>
17-
<key>CFBundleIconFiles</key>
18-
<array>
19-
<string>Icon</string>
20-
<string>Icon@2x</string>
21-
<string>Icon-Small</string>
22-
<string>Icon-Small@2x</string>
23-
<string>Icon-60@2x</string>
24-
<string>Icon-Small-40@2x</string>
25-
</array>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
<key>XSAppIconAssets</key>
22+
<string>Assets.xcassets/AppIcon.appiconset</string>
23+
<key>CFBundleName</key>
24+
<string>BgTransfer</string>
25+
<key>UILaunchStoryboardName</key>
26+
<string>LaunchScreen</string>
2627
</dict>
2728
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller-->
8+
<scene sceneID="gAE-YM-kbH">
9+
<objects>
10+
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
13+
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
16+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+
<subviews>
19+
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
20+
<rect key="frame" x="270" y="270" width="60" height="60"/>
21+
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
22+
</imageView>
23+
</subviews>
24+
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
25+
<constraints>
26+
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
27+
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
28+
</constraints>
29+
</view>
30+
</viewController>
31+
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
32+
</objects>
33+
<point key="canvasLocation" x="349" y="339"/>
34+
</scene>
35+
</scenes>
36+
<resources>
37+
<image name="Icon-60.png" width="180" height="180"/>
38+
</resources>
39+
</document>

SimpleBackgroundTransfer/SimpleBackgroundTransfer/SimpleBackgroundTransfer.csproj

+22-13
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
<DefineConstants>DEBUG;</DefineConstants>
2323
<ErrorReport>prompt</ErrorReport>
2424
<WarningLevel>4</WarningLevel>
25-
<MtouchLink>None</MtouchLink>
25+
<MtouchLink>SdkOnly</MtouchLink>
2626
<ConsolePause>false</ConsolePause>
2727
<MtouchDebug>true</MtouchDebug>
2828
<MtouchArch>x86_64</MtouchArch>
2929
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
30+
<CodesignKey>iPhone Developer</CodesignKey>
31+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
3032
</PropertyGroup>
3133
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
3234
<DebugType>full</DebugType>
@@ -38,6 +40,7 @@
3840
<ConsolePause>false</ConsolePause>
3941
<MtouchArch>x86_64</MtouchArch>
4042
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
43+
<CodesignKey>iPhone Developer</CodesignKey>
4144
</PropertyGroup>
4245
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
4346
<DebugSymbols>true</DebugSymbols>
@@ -54,6 +57,7 @@
5457
<MtouchI18n></MtouchI18n>
5558
<MtouchArch>ARM64</MtouchArch>
5659
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
60+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
5761
</PropertyGroup>
5862
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
5963
<DebugType>full</DebugType>
@@ -65,31 +69,32 @@
6569
<ConsolePause>false</ConsolePause>
6670
<MtouchArch>ARM64</MtouchArch>
6771
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
72+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
6873
</PropertyGroup>
6974
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' ">
7075
<DebugType>full</DebugType>
7176
<Optimize>true</Optimize>
7277
<OutputPath>bin\iPhone\Ad-Hoc</OutputPath>
7378
<ErrorReport>prompt</ErrorReport>
7479
<WarningLevel>4</WarningLevel>
75-
<CodesignKey>iPhone Distribution</CodesignKey>
80+
<CodesignKey>iPhone Developer</CodesignKey>
7681
<BuildIpa>true</BuildIpa>
7782
<ConsolePause>false</ConsolePause>
78-
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
7983
<MtouchArch>ARM64</MtouchArch>
8084
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
85+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
8186
</PropertyGroup>
8287
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
8388
<DebugType>full</DebugType>
8489
<Optimize>true</Optimize>
8590
<OutputPath>bin\iPhone\AppStore</OutputPath>
8691
<ErrorReport>prompt</ErrorReport>
8792
<WarningLevel>4</WarningLevel>
88-
<CodesignKey>iPhone Distribution</CodesignKey>
93+
<CodesignKey>iPhone Developer</CodesignKey>
8994
<ConsolePause>false</ConsolePause>
90-
<CodesignProvision>Automatic:AppStore</CodesignProvision>
9195
<MtouchArch>ARM64</MtouchArch>
9296
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
97+
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
9398
</PropertyGroup>
9499
<ItemGroup>
95100
<Reference Include="System" />
@@ -102,6 +107,7 @@
102107
</ItemGroup>
103108
<ItemGroup>
104109
<None Include="Info.plist" />
110+
<None Include="Entitlements.plist" />
105111
</ItemGroup>
106112
<ItemGroup>
107113
<Compile Include="Main.cs" />
@@ -113,23 +119,26 @@
113119
</ItemGroup>
114120
<ItemGroup>
115121
<InterfaceDefinition Include="MainStoryboard.storyboard" />
122+
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
116123
</ItemGroup>
117124
<ItemGroup>
118-
<BundleResource Include="Resources\Default-568h%402x.png" />
119-
<BundleResource Include="Resources\Default.png" />
120-
<BundleResource Include="Resources\Default%402x.png" />
121125
<BundleResource Include="Resources\iTunesArtwork.png" />
122126
<BundleResource Include="Resources\iTunesArtwork%402x.png" />
123-
<BundleResource Include="Resources\Icon.png" />
124-
<BundleResource Include="Resources\Icon%402x.png" />
125-
<BundleResource Include="Resources\Icon-Small.png" />
126-
<BundleResource Include="Resources\Icon-Small%402x.png" />
127+
<BundleResource Include="Resources\Icon-60%403x.png" />
127128
<BundleResource Include="Resources\Icon-60%402x.png" />
128-
<BundleResource Include="Resources\Icon-Small-40%402x.png" />
129129
</ItemGroup>
130130
<ItemGroup>
131131
<ITunesArtwork Include="Resources\iTunesArtwork%402x" />
132132
<ITunesArtwork Include="Resources\iTunesArtwork" />
133133
</ItemGroup>
134+
<ItemGroup>
135+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
136+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon.png" />
137+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon%402x.png" />
138+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-60%402x.png" />
139+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small.png" />
140+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small%402x.png" />
141+
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon-Small-40%402x.png" />
142+
</ItemGroup>
134143
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
135144
</Project>

SimpleBackgroundTransfer/SimpleBackgroundTransfer/SimpleBackgroundTransferViewController.designer.cs

+30-45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)