iPhone app

Hey guys. I’m looking into developing an iPhone app for FreeAgent. Has
anyone looked into hitting the API with Objective-C? My first attempt
keeps returning an error of -1202 … any ideas?

Thanks Mike. I will take a look. Does it handle the authentication?On 13 Nov 2009, at 18:03, Mike Wilson <mike.wilson@evolvedsoftwarestudios.com wrote:

Hi Lee,

Likewise, I’m also getting started although I code for a living my
design skills aren’t the best so I’m hoping for something that doesn’t
brick devices but still passes for usability :@). If you’re just
starting out, the FreeAgent API, whilst very well documented and easy
to use as far as API’s go still requires knowledge of the iPhone
technology stack.

What I’ve done and highly recommend for you to look into (as does
Apple recommend) is to use the Foundation Networking classes
(NSURLConnection) for the transport and NSXML to parse through the XML
nodes. I guess you’re already using NSXML for your parsing but you
might have missed NSURLConnection?

I don’t know what this third party library offers. I generally try to
avoid using third party libraries as much as possible (there are
already Flash-to-iPhone and .NET-to-iPhone compilers) unless they’re
well supported. (I’m very unsure about the Flash and .NET iPhone
utilities…)

I do recommend rolling your own but in the spirit of not reinventing
the wheel, I’ll take a look at that wrapper class when I can.

Hope this helps.

Best,

Mike

On Nov 12, 11:05 am, Lee Probert leeprob...@gmail.com wrote:

Hey Mike. Firstly, you have nothing to fear regards competition
from me and
my iPhone skills … I’m literally just starting out with iPhone
development
and trying to build something around the FreeAgent API is a way for
me to
learn Obj-C and the iPhone SDK. I seriously don’t expect to build
anything
usable by the masses. and if i did I’d probably get lynched for
bricking
loads of devices!

I found a wrapper class for hitting RESTful services and have been
experimenting with that. I’m not getting past the authentication at
the
moment.

I need to look into it a bit more closely … just thought the
error ID
might be a common problem.

the wrapper class is here :http://github.com/akosma/iphonerestwrapper

:slight_smile:

On Thu, Nov 12, 2009 at 10:46 AM, Mike Wilson < mike.wil...@evolvedsoftwarestudios.com> wrote:

Hi Lee,

Exactly what error do you get and what are you attempting to do
(HTTP
POST/GET, etc)? Have you tried all the usual debugging methods
(checking your call stack, etc).

Best,

Mike (also developing an iPhone app for FreeAgent)

You received this message because you are subscribed to the Google
Groups
“FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=.

http://lyraspace.comhttp://blog.lyraspace.comhttp://rezzynet.com

i...@lyraspace.com
skype: lee.probert
google/MSN : leeprob...@gmail.com
twitter : @lyraspace
tel: 01892 837 654
mob: 07540 723783 <-- NEW
24 Allington Road,
Paddock Wood,
Tonbridge,
Kent.
TN12 6AN

You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freeagent_api?hl=
.

Hey Mike. Firstly, you have nothing to fear regards competition from me and
my iPhone skills … I’m literally just starting out with iPhone development
and trying to build something around the FreeAgent API is a way for me to
learn Obj-C and the iPhone SDK. I seriously don’t expect to build anything
usable by the masses. and if i did I’d probably get lynched for bricking
loads of devices!

I found a wrapper class for hitting RESTful services and have been
experimenting with that. I’m not getting past the authentication at the
moment.

I need to look into it a bit more closely … just thought the error ID
might be a common problem.

the wrapper class is here : http://github.com/akosma/iphonerestwrapper

:-)On Thu, Nov 12, 2009 at 10:46 AM, Mike Wilson < mike.wilson@evolvedsoftwarestudios.com> wrote:

Hi Lee,

Exactly what error do you get and what are you attempting to do (HTTP
POST/GET, etc)? Have you tried all the usual debugging methods
(checking your call stack, etc).

Best,

Mike (also developing an iPhone app for FreeAgent)

You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=.

http://lyraspace.com
http://blog.lyraspace.com
http://rezzynet.com

info@lyraspace.com
skype: lee.probert
google/MSN : leeprobert@gmail.com
twitter : @lyraspace
tel: 01892 837 654
mob: 07540 723783 <-- NEW
24 Allington Road,
Paddock Wood,
Tonbridge,
Kent.
TN12 6AN

Hi Lee,

Exactly what error do you get and what are you attempting to do (HTTP
POST/GET, etc)? Have you tried all the usual debugging methods
(checking your call stack, etc).

Best,

Mike (also developing an iPhone app for FreeAgent)

Hi Lee,

Likewise, I’m also getting started although I code for a living my
design skills aren’t the best so I’m hoping for something that doesn’t
brick devices but still passes for usability :@). If you’re just
starting out, the FreeAgent API, whilst very well documented and easy
to use as far as API’s go still requires knowledge of the iPhone
technology stack.

What I’ve done and highly recommend for you to look into (as does
Apple recommend) is to use the Foundation Networking classes
(NSURLConnection) for the transport and NSXML to parse through the XML
nodes. I guess you’re already using NSXML for your parsing but you
might have missed NSURLConnection?

I don’t know what this third party library offers. I generally try to
avoid using third party libraries as much as possible (there are
already Flash-to-iPhone and .NET-to-iPhone compilers) unless they’re
well supported. (I’m very unsure about the Flash and .NET iPhone
utilities…)

I do recommend rolling your own but in the spirit of not reinventing
the wheel, I’ll take a look at that wrapper class when I can.

Hope this helps.

Best,

MikeOn Nov 12, 11:05 am, Lee Probert leeprob...@gmail.com wrote:

Hey Mike. Firstly, you have nothing to fear regards competition from me and
my iPhone skills … I’m literally just starting out with iPhone development
and trying to build something around the FreeAgent API is a way for me to
learn Obj-C and the iPhone SDK. I seriously don’t expect to build anything
usable by the masses. and if i did I’d probably get lynched for bricking
loads of devices!

I found a wrapper class for hitting RESTful services and have been
experimenting with that. I’m not getting past the authentication at the
moment.

I need to look into it a bit more closely … just thought the error ID
might be a common problem.

the wrapper class is here :http://github.com/akosma/iphonerestwrapper

:slight_smile:

On Thu, Nov 12, 2009 at 10:46 AM, Mike Wilson < mike.wil...@evolvedsoftwarestudios.com> wrote:

Hi Lee,

Exactly what error do you get and what are you attempting to do (HTTP
POST/GET, etc)? Have you tried all the usual debugging methods
(checking your call stack, etc).

Best,

Mike (also developing an iPhone app for FreeAgent)

You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=.

http://lyraspace.comhttp://blog.lyraspace.comhttp://rezzynet.com

i...@lyraspace.com
skype: lee.probert
google/MSN : leeprob...@gmail.com
twitter : @lyraspace
tel: 01892 837 654
mob: 07540 723783 <-- NEW
24 Allington Road,
Paddock Wood,
Tonbridge,
Kent.
TN12 6AN

The authentication for the FreeAgent API is HTTP authentication which
comes back in at:

-connection:didReceiveAuthenticationChallenge

The disadvantage of working this way compared to a third party library
that does it all for you is that you will have to write a heap of
extra code but at least it’s your code and you can always fix it
rather than be beholden to a library :stuck_out_tongue:

My decision to go with the Foundation classes is largely because I
already had the class code written (in .NET) for the whole FreeAgent
library from last year. I wanted to reuse my design patterns so it’s
more straightforward to port the same design in Objective C than it is
to start completely from scratch.

As I mentioned earlier, you should check your call stack or at least
place a bunch of NSLog(); statements around your code in order to
determine what that error you receive actually is and where it
actually comes from. If you find the error isn’t in the library, I’d
carry on using the library. If the error is within the library, it
might be worth getting in touch with them to let them know.

Best,

Mike