@@ -70,16 +70,16 @@ public UIImageView ImageView {
70
70
}
71
71
}
72
72
73
- public class UrlSessionDelegate : NSUrlSessionDownloadDelegate
74
- {
73
+ public class UrlSessionDelegate : NSObject , INSUrlSessionDownloadDelegate
74
+ {
75
75
public SimpleBackgroundTransferViewController controller ;
76
76
77
77
public UrlSessionDelegate ( SimpleBackgroundTransferViewController controller )
78
78
{
79
79
this . controller = controller ;
80
80
}
81
81
82
- public override void DidWriteData ( NSUrlSession session , NSUrlSessionDownloadTask downloadTask , long bytesWritten , long totalBytesWritten , long totalBytesExpectedToWrite )
82
+ public void DidWriteData ( NSUrlSession session , NSUrlSessionDownloadTask downloadTask , long bytesWritten , long totalBytesWritten , long totalBytesExpectedToWrite )
83
83
{
84
84
Console . WriteLine ( "Set Progress" ) ;
85
85
if ( downloadTask == controller . downloadTask ) {
@@ -91,7 +91,7 @@ public override void DidWriteData (NSUrlSession session, NSUrlSessionDownloadTas
91
91
}
92
92
}
93
93
94
- public override void DidFinishDownloading ( NSUrlSession session , NSUrlSessionDownloadTask downloadTask , NSUrl location )
94
+ public void DidFinishDownloading ( NSUrlSession session , NSUrlSessionDownloadTask downloadTask , NSUrl location )
95
95
{
96
96
Console . WriteLine ( "Finished" ) ;
97
97
Console . WriteLine ( "File downloaded in : {0}" , location ) ;
@@ -121,7 +121,7 @@ public override void DidFinishDownloading (NSUrlSession session, NSUrlSessionDow
121
121
}
122
122
}
123
123
124
- public override void DidCompleteWithError ( NSUrlSession session , NSUrlSessionTask task , NSError error )
124
+ public void DidCompleteWithError ( NSUrlSession session , NSUrlSessionTask task , NSError error )
125
125
{
126
126
Console . WriteLine ( "DidComplete" ) ;
127
127
if ( error == null )
@@ -137,12 +137,12 @@ public override void DidCompleteWithError (NSUrlSession session, NSUrlSessionTas
137
137
controller . downloadTask = null ;
138
138
}
139
139
140
- public override void DidResume ( NSUrlSession session , NSUrlSessionDownloadTask downloadTask , long resumeFileOffset , long expectedTotalBytes )
140
+ public void DidResume ( NSUrlSession session , NSUrlSessionDownloadTask downloadTask , long resumeFileOffset , long expectedTotalBytes )
141
141
{
142
142
Console . WriteLine ( "DidResume" ) ;
143
143
}
144
144
145
- public override void DidFinishEventsForBackgroundSession ( NSUrlSession session )
145
+ public void DidFinishEventsForBackgroundSession ( NSUrlSession session )
146
146
{
147
147
using ( AppDelegate appDelegate = UIApplication . SharedApplication . Delegate as AppDelegate ) {
148
148
var handler = appDelegate . BackgroundSessionCompletionHandler ;
0 commit comments