Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
iPhone Application Development CourseNSURLConnection              (Case study)                       Mr.Chalermchon Somman...
Outline●Connect URL●Receive Data from URL change to XML Parser●Read XML Parser●Create Class for XML●Present XML Data
Overview             Connect URL                           PHP                                 Query database             ...
Connect URLCase Study web service URL●    ●   http://203.185.96.228/sarakham2011/xplog/showFollowLike.php    ●   http://20...
NSURLConnection delegate●Start connection   didReceiveResponse●Receive data from URL   didReceiveData●End connection  conn...
XMLParser delegateStart Document●    parserDidStartDocumentStart Element●    didStartElementCharacter●    foundCharactersE...
XML Structurehttp://203.185.96.228/sarakham2011/xplog/showFollowLike.php        <ShowTopi c Fol l owLi ke>            <t o...
Custom Class: TopicTopic Class:{    NSInteger tid,star;    NSString *tTitle,*tSource,*tDesc;}
Workshop
iPhone Application Development CourseNSURLConnectionContact usBrightest IDEA: http://www.brightest-idea.comMr.Chalermchon ...
Connection Source code
Connection Source code (2)
XMLParser Source code
XMLParser Source code (2)
XMLParser Source code (3)
Topic Class Source code
Upcoming SlideShare
Loading in …5
×

iPhone NSURLConnection-2

999 views

Published on

iphone nsurlconnection webservice with case study XPLog's web service

see more android/iOS application Development : http://adayd3sign.wordpress.com/
join me : http://www.brightest-idea.com

  • Be the first to like this

iPhone NSURLConnection-2

  1. 1. iPhone Application Development CourseNSURLConnection (Case study) Mr.Chalermchon Sommana Brightest IDEA Date: 9 May 2011
  2. 2. Outline●Connect URL●Receive Data from URL change to XML Parser●Read XML Parser●Create Class for XML●Present XML Data
  3. 3. Overview Connect URL PHP Query database XML MySQL iPhone
  4. 4. Connect URLCase Study web service URL● ● http://203.185.96.228/sarakham2011/xplog/showFollowLike.php ● http://203.185.96.228/sarakham2011/xplog/checkLogin.php●Create NSURL with string●URLRequest●Connection and set delegate
  5. 5. NSURLConnection delegate●Start connection didReceiveResponse●Receive data from URL didReceiveData●End connection connectionDidFinishLoading●Error report didFailWithError
  6. 6. XMLParser delegateStart Document● parserDidStartDocumentStart Element● didStartElementCharacter● foundCharactersEnd Element● didEndElementEnd Document● parserDidEndDocument
  7. 7. XML Structurehttp://203.185.96.228/sarakham2011/xplog/showFollowLike.php <ShowTopi c Fol l owLi ke> <t opi c > <t _i d>14238</ t _i d> <t _t i t l e>ตรอกบ้านจีน</ t _ t i t l e > <s t ar >45</ s t ar > <s our c e >0111110952426710112. j pg</ s our c e > <des c >กดดูรายละเอียด</ de s c > </ t opi c > … </ ShowTopi c Fol l owLi ke >
  8. 8. Custom Class: TopicTopic Class:{ NSInteger tid,star; NSString *tTitle,*tSource,*tDesc;}
  9. 9. Workshop
  10. 10. iPhone Application Development CourseNSURLConnectionContact usBrightest IDEA: http://www.brightest-idea.comMr.Chalermchon SommanaBlog: http://adayd3sign.wordpress.comThank you.
  11. 11. Connection Source code
  12. 12. Connection Source code (2)
  13. 13. XMLParser Source code
  14. 14. XMLParser Source code (2)
  15. 15. XMLParser Source code (3)
  16. 16. Topic Class Source code

×