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

Commit 3090e88

Browse files
authored
de-duplicate csproj GUIDs (#379)
* update PassKit * update newsstand consider deleting in future * update iclouduidoc * update customcollectionviewattributes * update touchgesturerecognizers * update phonewordmultiscreen * update lazytablesasync * update lazytables * update watchkit-getstarted consider deleting in future * update HostedNonConsumables * update duplicate guid * fix whitespace/formatting
1 parent e3b52b2 commit 3090e88

File tree

51 files changed

+535
-426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+535
-426
lines changed

CustomCollectionViewLayoutAttributes/CustomCollectionViewLayoutAttributes.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
66
<ProductVersion>10.0.0</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{384451B5-3210-4F89-B5DF-4822101D265D}</ProjectGuid>
8+
<ProjectGuid>0D585654-21B2-47F1-B156-220F68876F23</ProjectGuid>
99
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1010
<OutputType>Exe</OutputType>
1111
<RootNamespace>SimpleCollectionView</RootNamespace>

CustomCollectionViewLayoutAttributes/CustomCollectionViewLayoutAttributes.sln

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 11.00
33
# Visual Studio 2010
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomCollectionViewLayoutAttributes", "CustomCollectionViewLayoutAttributes.csproj", "{384451B5-3210-4F89-B5DF-4822101D265D}"
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomCollectionViewLayoutAttributes", "CustomCollectionViewLayoutAttributes.csproj", "0D585654-21B2-47F1-B156-220F68876F23"
55
EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,18 +13,18 @@ Global
1313
AppStore|iPhone = AppStore|iPhone
1414
EndGlobalSection
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{384451B5-3210-4F89-B5DF-4822101D265D}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17-
{384451B5-3210-4F89-B5DF-4822101D265D}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18-
{384451B5-3210-4F89-B5DF-4822101D265D}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19-
{384451B5-3210-4F89-B5DF-4822101D265D}.AppStore|iPhone.Build.0 = AppStore|iPhone
20-
{384451B5-3210-4F89-B5DF-4822101D265D}.Debug|iPhone.ActiveCfg = Debug|iPhone
21-
{384451B5-3210-4F89-B5DF-4822101D265D}.Debug|iPhone.Build.0 = Debug|iPhone
22-
{384451B5-3210-4F89-B5DF-4822101D265D}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23-
{384451B5-3210-4F89-B5DF-4822101D265D}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24-
{384451B5-3210-4F89-B5DF-4822101D265D}.Release|iPhone.ActiveCfg = Release|iPhone
25-
{384451B5-3210-4F89-B5DF-4822101D265D}.Release|iPhone.Build.0 = Release|iPhone
26-
{384451B5-3210-4F89-B5DF-4822101D265D}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27-
{384451B5-3210-4F89-B5DF-4822101D265D}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
16+
0D585654-21B2-47F1-B156-220F68876F23.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17+
0D585654-21B2-47F1-B156-220F68876F23.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18+
0D585654-21B2-47F1-B156-220F68876F23.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19+
0D585654-21B2-47F1-B156-220F68876F23.AppStore|iPhone.Build.0 = AppStore|iPhone
20+
0D585654-21B2-47F1-B156-220F68876F23.Debug|iPhone.ActiveCfg = Debug|iPhone
21+
0D585654-21B2-47F1-B156-220F68876F23.Debug|iPhone.Build.0 = Debug|iPhone
22+
0D585654-21B2-47F1-B156-220F68876F23.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23+
0D585654-21B2-47F1-B156-220F68876F23.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24+
0D585654-21B2-47F1-B156-220F68876F23.Release|iPhone.ActiveCfg = Release|iPhone
25+
0D585654-21B2-47F1-B156-220F68876F23.Release|iPhone.Build.0 = Release|iPhone
26+
0D585654-21B2-47F1-B156-220F68876F23.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27+
0D585654-21B2-47F1-B156-220F68876F23.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
2828
EndGlobalSection
2929
GlobalSection(MonoDevelopProperties) = preSolution
3030
StartupItem = CustomCollectionViewLayoutAttributes.csproj
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 2012
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Phoneword_iOS", "Phoneword_iOS\Phoneword_iOS.csproj", "{4279435A-D323-44F1-87D8-98E436909EBF}"
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Phoneword_iOS", "Phoneword_iOS\PhonewordMultiscreen_iOS.csproj", "{98C6E14E-46B9-4527-853A-DF57A34FE620}"
55
EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,13 +11,13 @@ Global
1111
Debug|iPhone = Debug|iPhone
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{4279435A-D323-44F1-87D8-98E436909EBF}.Debug|iPhone.ActiveCfg = Debug|iPhone
15-
{4279435A-D323-44F1-87D8-98E436909EBF}.Debug|iPhone.Build.0 = Debug|iPhone
16-
{4279435A-D323-44F1-87D8-98E436909EBF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
17-
{4279435A-D323-44F1-87D8-98E436909EBF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
18-
{4279435A-D323-44F1-87D8-98E436909EBF}.Release|iPhone.ActiveCfg = Release|iPhone
19-
{4279435A-D323-44F1-87D8-98E436909EBF}.Release|iPhone.Build.0 = Release|iPhone
20-
{4279435A-D323-44F1-87D8-98E436909EBF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
21-
{4279435A-D323-44F1-87D8-98E436909EBF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
14+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Debug|iPhone.ActiveCfg = Debug|iPhone
15+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Debug|iPhone.Build.0 = Debug|iPhone
16+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
17+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
18+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Release|iPhone.ActiveCfg = Release|iPhone
19+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Release|iPhone.Build.0 = Release|iPhone
20+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
21+
{98C6E14E-46B9-4527-853A-DF57A34FE620}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
2222
EndGlobalSection
2323
EndGlobal

Hello_iOS/Hello.iOS_MultiScreen/Phoneword_iOS/Phoneword_iOS.csproj renamed to Hello_iOS/Hello.iOS_MultiScreen/Phoneword_iOS/PhonewordMultiscreen_iOS.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
66
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
7-
<ProjectGuid>{4279435A-D323-44F1-87D8-98E436909EBF}</ProjectGuid>
7+
<ProjectGuid>{98C6E14E-46B9-4527-853A-DF57A34FE620}</ProjectGuid>
88
<OutputType>Exe</OutputType>
99
<RootNamespace>Phoneword_iOS</RootNamespace>
1010
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>

IntroToiOS7/TransitionDemos/InteractiveTransitionLayout/InteractiveTransitionLayout.sln

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 11.00
33
# Visual Studio 2010
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveTransitionLayout", "InteractiveTransitionLayout\InteractiveTransitionLayout.csproj", "{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}"
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteractiveTransitionLayout", "InteractiveTransitionLayout\InteractiveTransitionLayout.csproj", "{F18D25E1-6AE6-4603-894A-5241C1491B88}"
55
EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,18 +13,18 @@ Global
1313
AppStore|iPhone = AppStore|iPhone
1414
EndGlobalSection
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.AppStore|iPhone.Build.0 = AppStore|iPhone
20-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Debug|iPhone.ActiveCfg = Debug|iPhone
21-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Debug|iPhone.Build.0 = Debug|iPhone
22-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Release|iPhone.ActiveCfg = Release|iPhone
25-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Release|iPhone.Build.0 = Release|iPhone
26-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27-
{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
16+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
17+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
18+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
19+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.AppStore|iPhone.Build.0 = AppStore|iPhone
20+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Debug|iPhone.ActiveCfg = Debug|iPhone
21+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Debug|iPhone.Build.0 = Debug|iPhone
22+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
23+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
24+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Release|iPhone.ActiveCfg = Release|iPhone
25+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Release|iPhone.Build.0 = Release|iPhone
26+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
27+
{F18D25E1-6AE6-4603-894A-5241C1491B88}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
2828
EndGlobalSection
2929
GlobalSection(MonoDevelopProperties) = preSolution
3030
StartupItem = InteractiveTransitionLayout\InteractiveTransitionLayout.csproj

IntroToiOS7/TransitionDemos/InteractiveTransitionLayout/InteractiveTransitionLayout/InteractiveTransitionLayout.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
66
<ProductVersion>10.0.0</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{CC048781-29C0-4B2E-98A3-965E3DD6C6F7}</ProjectGuid>
8+
<ProjectGuid>{F18D25E1-6AE6-4603-894A-5241C1491B88}</ProjectGuid>
99
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1010
<OutputType>Exe</OutputType>
1111
<RootNamespace>InteractiveTransitionLayout</RootNamespace>

IntroductionToiCloud/iCloudUIDoc/iCloudUIDoc.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
66
<ProductVersion>8.0.30703</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{367D4ECC-D04A-41FB-A784-4D10F30666C8}</ProjectGuid>
8+
<ProjectGuid>{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}</ProjectGuid>
99
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1010
<OutputType>Exe</OutputType>
1111
<RootNamespace>iCloudSample</RootNamespace>

IntroductionToiCloud/iCloudUIDoc/iCloudUIDoc.sln

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 11.00
33
# Visual Studio 2010
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iCloudUIDoc", "iCloudUIDoc.csproj", "{367D4ECC-D04A-41FB-A784-4D10F30666C8}"
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iCloudUIDoc", "iCloudUIDoc.csproj", "{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}"
55
EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,14 +11,14 @@ Global
1111
Release|iPhone = Release|iPhone
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Debug|iPhone.ActiveCfg = Debug|iPhone
15-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Debug|iPhone.Build.0 = Debug|iPhone
16-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
17-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
18-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Release|iPhone.ActiveCfg = Release|iPhone
19-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Release|iPhone.Build.0 = Release|iPhone
20-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
21-
{367D4ECC-D04A-41FB-A784-4D10F30666C8}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
14+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Debug|iPhone.ActiveCfg = Debug|iPhone
15+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Debug|iPhone.Build.0 = Debug|iPhone
16+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
17+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
18+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Release|iPhone.ActiveCfg = Release|iPhone
19+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Release|iPhone.Build.0 = Release|iPhone
20+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
21+
{DC7EA164-6ADE-4F64-A6E8-A3FF9FCF6F78}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
2222
EndGlobalSection
2323
GlobalSection(MonoDevelopProperties) = preSolution
2424
StartupItem = iCloudUIDoc.csproj

LazyTableImages/AppDelegate.cs

Lines changed: 94 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -32,85 +32,98 @@
3232
using System.Net;
3333
using System.Collections.ObjectModel;
3434

35-
namespace LazyTableImages {
36-
/// <summary>
37-
/// The UIApplicationDelegate for the application. This class is responsible for launching the
38-
/// User Interface of the application, as well as listening (and optionally responding) to
39-
/// application events from iOS.
40-
/// </summary>
41-
42-
[Register ("AppDelegate")]
43-
public partial class AppDelegate : UIApplicationDelegate {
44-
45-
static readonly Uri RssFeedUrl = new Uri ("http://phobos.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/limit=75/xml");
46-
47-
UINavigationController NavigationController { get; set; }
48-
49-
RootViewController RootController { get; set; }
50-
51-
public override UIWindow Window { get; set; }
52-
53-
/// <summary>
54-
/// This method is invoked when the application has loaded and is ready to run. In this
55-
/// method you should instantiate the window, load the UI into it and then make the window
56-
/// visible.
57-
/// </summary>
58-
/// <remarks>
59-
/// You have 5 seconds to return from this method, or iOS will terminate your application.
60-
/// </remarks>
61-
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
62-
{
63-
Window = new UIWindow (UIScreen.MainScreen.Bounds);
64-
RootController = new RootViewController ("RootViewController", null);
65-
NavigationController = new UINavigationController (RootController);
66-
Window.RootViewController = NavigationController;
67-
68-
// make the window visible
69-
Window.MakeKeyAndVisible ();
70-
71-
BeginDownloading ();
72-
return true;
73-
}
74-
75-
void BeginDownloading ()
76-
{
77-
// Show the user that data is about to be downloaded
78-
UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true;
79-
80-
// Retrieve the rss feed from the server
81-
var downloader = new GzipWebClient ();
82-
downloader.DownloadStringCompleted += DownloadCompleted;
83-
downloader.DownloadStringAsync (RssFeedUrl);
84-
}
85-
86-
void DownloadCompleted (object sender, DownloadStringCompletedEventArgs e)
87-
{
88-
// The WebClient will invoke the DownloadStringCompleted event on a
89-
// background thread. We want to do UI updates with the result, so process
90-
// the result on the main thread.
91-
UIApplication.SharedApplication.BeginInvokeOnMainThread (() => {
92-
// First disable the download indicator
93-
UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;
94-
95-
// Now handle the result from the WebClient
96-
if (e.Error != null) {
97-
DisplayError ("Warning", "The rss feed could not be downloaded: " + e.Error.Message);
98-
} else {
99-
try {
100-
RootController.Apps.Clear ();
101-
foreach (var v in RssParser.Parse (e.Result))
102-
RootController.Apps.Add (v);
103-
} catch {
104-
DisplayError ("Warning", "Malformed Xml was found in the Rss Feed.");
105-
}
106-
}
107-
});
108-
}
109-
110-
void DisplayError (string title, string errorMessage, params object[] formatting)
111-
{
112-
var alert = new UIAlertView (title, string.Format (errorMessage, formatting), null, "ok", null);
113-
alert.Show ();
114-
}
115-
}
35+
namespace LazyTableImages
36+
{
37+
/// <summary>
38+
/// The UIApplicationDelegate for the application. This class is responsible for launching the
39+
/// User Interface of the application, as well as listening (and optionally responding) to
40+
/// application events from iOS.
41+
/// </summary>
42+
43+
[Register("AppDelegate")]
44+
public partial class AppDelegate : UIApplicationDelegate
45+
{
46+
47+
/// <summary>
48+
/// Choose a feed from https://rss.itunes.apple.com/
49+
/// </summary>
50+
static readonly Uri RssFeedUrl = new Uri("https://rss.itunes.apple.com/api/v1/us/ios-apps/top-free/all/50/non-explicit.atom");
51+
52+
53+
UINavigationController NavigationController { get; set; }
54+
55+
RootViewController RootController { get; set; }
56+
57+
public override UIWindow Window { get; set; }
58+
59+
/// <summary>
60+
/// This method is invoked when the application has loaded and is ready to run. In this
61+
/// method you should instantiate the window, load the UI into it and then make the window
62+
/// visible.
63+
/// </summary>
64+
/// <remarks>
65+
/// You have 5 seconds to return from this method, or iOS will terminate your application.
66+
/// </remarks>
67+
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
68+
{
69+
Window = new UIWindow(UIScreen.MainScreen.Bounds);
70+
RootController = new RootViewController("RootViewController", null);
71+
NavigationController = new UINavigationController(RootController);
72+
Window.RootViewController = NavigationController;
73+
74+
// make the window visible
75+
Window.MakeKeyAndVisible();
76+
77+
BeginDownloading();
78+
return true;
79+
}
80+
81+
void BeginDownloading()
82+
{
83+
// Show the user that data is about to be downloaded
84+
UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true;
85+
86+
// Retrieve the rss feed from the server
87+
var downloader = new GzipWebClient();
88+
downloader.DownloadStringCompleted += DownloadCompleted;
89+
downloader.DownloadStringAsync(RssFeedUrl);
90+
}
91+
92+
void DownloadCompleted(object sender, DownloadStringCompletedEventArgs e)
93+
{
94+
// The WebClient will invoke the DownloadStringCompleted event on a
95+
// background thread. We want to do UI updates with the result, so process
96+
// the result on the main thread.
97+
UIApplication.SharedApplication.BeginInvokeOnMainThread(() =>
98+
{
99+
// First disable the download indicator
100+
UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;
101+
102+
// Now handle the result from the WebClient
103+
if (e.Error != null)
104+
{
105+
DisplayError("Warning", "The rss feed could not be downloaded: " + e.Error.Message);
106+
}
107+
else
108+
{
109+
try
110+
{
111+
RootController.Apps.Clear();
112+
foreach (var v in RssParser.Parse(e.Result))
113+
RootController.Apps.Add(v);
114+
}
115+
catch
116+
{
117+
DisplayError("Warning", "Malformed Xml was found in the Rss Feed.");
118+
}
119+
}
120+
});
121+
}
122+
123+
void DisplayError(string title, string errorMessage, params object[] formatting)
124+
{
125+
var alert = new UIAlertView(title, string.Format(errorMessage, formatting), null, "ok", null);
126+
alert.Show();
127+
}
128+
}
116129
}

LazyTableImages/Info.plist

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
@@ -20,7 +20,7 @@
2020
<string>UIInterfaceOrientationLandscapeRight</string>
2121
</array>
2222
<key>MinimumOSVersion</key>
23-
<string>9.0</string>
23+
<string>11.0</string>
2424
<key>UIDeviceFamily</key>
2525
<array>
2626
<integer>1</integer>
@@ -29,5 +29,15 @@
2929
<string>LazyTableImages</string>
3030
<key>CFBundleIdentifier</key>
3131
<string>com.xamarin.LazyTableImages</string>
32+
<key>CFBundleName</key>
33+
<string>Lazy Images</string>
34+
<key>CFBundleShortVersionString</key>
35+
<string>2</string>
36+
<key>CFBundleVersion</key>
37+
<string>1</string>
38+
<key>UILaunchStoryboardName</key>
39+
<string>LaunchScreen</string>
40+
<key>UIMainNibFile</key>
41+
<string>RootViewController</string>
3242
</dict>
3343
</plist>

0 commit comments

Comments
 (0)