Cancelling Apple Music

Like many as soon as the Apple music service started I immediately jumped on to the trial.

If you did the same please remember that the trial will end on the 30th of September. I have not utilised the service so it would be a waste to actually continue the service. Continue reading “Cancelling Apple Music”

Issue when implementing NSURLSession

I have recently been playing with NSURLSession and seeing the benefits of using this over the old method.

Today I came across a slight issue that is worth noting. During my programming session I was implementing the delegates. I started with NSURLSessionDelegate then moved onto NSURLSessionTaskDelegate. At this point I decided to test the code and found that the following method was called in my delegate object

– (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error

I tried to output the error using

NSLog(@”%@”, [error localizedDescription]);

But unfortunately this was not helpful as I received Null. I originally thought that there was an error in my coding however I could not locate 1. On further checking I found that I have made a couple of assumptions and I believe they were quite well founded.

The description of – URLSession:task:didCompleteWithError: is as follows:

Tells the delegate that the task finished transferring data.

Unfortunately I do not believe the method is named very well. As the description states this method is called when an error occurs. If no errors occur then the task completed successfully.

To ensure that the request was successful something along the lines of the example brow will work.

- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
{
    //TODO Implement method
    if (error == Nil) {
        //TODO ascertain the failure and report failure to the caller
        return;
    }
    //TODO Report success
}

Potential Security Issue With iPhone App

I recently decided to purchase an app from the iPhone app store. I do not do this often but I believe that this app would be extremely useful.

The app I decided to download was SSH Term Pro. As the name suggests this is a SSH terminal app for the iPhone and iPad. Of course this makes it extremely easy to manage your server on the move. The application allows you to add unlimited amount of servers details so you can quickly and easily connect up to a server that you manage. The application also allows you to lock it down so that you can only access the application fully once you have entered a password that you had set up.

Unfortunately on investigation everything is not as good as I had hoped: Continue reading “Potential Security Issue With iPhone App”