SlideShare a Scribd company logo
1 of 29
Presentation on  iPhone Presented by: Dhananjay Fartyal Sumit Kumar   iPhone Trainee(A-1Technology)
Contents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Technical Specifications
Network Connectivity For checking the network status in iphone we use a class reachability provide by the apple for which we have to import the “SystemConfiguration” framework.which is responsible to get the information about the network connection.
Network Connectivity 1) Add  SystemConfiguration  framework to the project . 2) Add  Reachability.h and Reachability.m  to the project provided  by apple. 3) Add @ class Reachability ; to the .h file of where you are  implementing the code.
Cont.. 4)  Import at the beginning of  implementation file #import "Reachability.h" Reachability *r = [Reachability reachabilityWithHostName:@"www.google.com"]; NetworkStatus internetStatus = [r currentReachabilityStatus]; if ((internetStatus != ReachableViaWiFi) && (internetStatus != ReachableViaWWAN)){ //   ALEART HERE (connection not available)   } else {  // WHATEVER WE WANT(connection available) }
SQLite SQLite is an open source library, written in C, that implements a self contained SQL relational database engine. You can use SQLite to store large amounts of relational data, and it is optimized for use on embedded devices like the iPhone.
Why SQLite ,[object Object],[object Object],[object Object],[object Object],[object Object]
SQLite in iPhone ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SQLite in iPhone ,[object Object],[object Object],[object Object],[object Object]
Sample Code // Open the database connection - (void)initializeDatabase { // Get the database from the application bundle. NSString *path = [[NSBundle mainBundle] pathForResource:@”DATABASE_NAME”ofType:@”db”]; // Open the database. if (sqlite3_open([path UTF8String], & database) == SQLITE_OK) { NSLog(@”Opening Database”); } else{ // Call close to properly clean up sqlite3_close(database); NSAssert1(0, @”Failed to open database: ‘%s’.”, sqlite3_errmsg(database)); }}
Cont.. // The SQL statement const char *sql = “SELECT product.ID,product.Name FROM TABLE_NAME; // The SQLite statement object that will hold our result set sqlite3_stmt *statement; // Prepare the statement to compile the SQL query into byte-code int sqlResult = sqlite3_prepare_v2(database, sql, -1, & statement, NULL); // Getting the row. while(sqlite3_step(statement) == SQLITE_ROW) // finalize the statement to release its resources sqlite3_finalize(statement);
Core Location The Core Location framework lets you determine the current location or heading associated with a device. The framework uses the available hardware to determine the user’s position and heading. You use the classes and protocols in this framework to configure and schedule the delivery of location and heading events. You can also use it to define geographic regions and monitor when the user crosses the boundaries of those regions.
Current location cont. GETTING  THE LATITUDE AND LONGITUDE: NSString * lat  = [[NSString alloc] initWithFormat:@"%g", newLocation.coordinate.latitude]; NSString * long  = [[NSString alloc] initWithFormat:@"%g",  newLocation.coordinate.longitude];
Current Location.... Framework: Core Location #import <CoreLocation/CoreLocation.h> Delegate: <CLLocationManagerDelegate> Methods: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation; - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error;
Displaying Maps Framework :  MKMapKit #import <MapKit/MapKit.h> Class : MKMapView class Delegate method: - (MKAnnotationView *) mapView:(MKMapView *)thisMapView  viewForAnnotation:(MapAnnotations *)annotation{ } MKCoordinateRegion region;  // Area currently displaying region.center =  newLocation.coordinate ; region.span=span; [mapView setRegion:region animated:TRUE];
 
JSON Parsing in iPhone JSON (JavaScript Object Notation) data format in client-server  communications when writing an iPhone application. JSON  is a lightweight data-interchange format.  It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming  Language.
Using JSON-framework •  Adds functionality to NSObject / NSString via Obj-C categories •  Convert from a plist value to JSON string •  Convert from a JSON string to plist value (NSArray or NSDictionary) #import <JSON/JSON.h> // NSObject.h - (NSString *)JSONRepresentation; // NSString+SBJSON.h - (id)JSONValue;
JSON Example { “ auto-part” : {  “ part-id” : 314, “ name” : “Flux Capacitor”,  … .. #import <JSON/JSON.h> NSString *jsonString = [NSString stringWithContentsOfURL:url];  NSDictionary *partsStore = [jsonString JSONValue]; NSDictionary *autoPart = [partsStore objectForKey:@”auto-part”];  NSString *partName = [autoPart objectForKey:@”name”];
Overview of In App Purchase Store Kit communicates with the App Store on behalf of your application. Your application uses Store Kit to receive localized information from the App Store about products you want to offer in your application. Your application displays this information to users and allows them to purchase items. When a user wants to purchase an item, your app calls Store Kit to collect payment from the user.
In-app purchase on iphone
E-Print iOS now incorporates support for wireless printing from iPhone and iPad applications. For the most part, the objects provided by  UIKit  do all of the heavy lifting associated with printing. They manage the printing interfaces, work with your application to render the printable content, and handle the scheduling and execution of print jobs on the printer. Wireless printing is available only on devices that support multitasking. You can use the  UIPrintInteractionController  object to detect whether printing is available in your application.
 
 
AirPlay AirPlay is a technology that lets your application stream audio to Apple TV and to third-party AirPlay speakers and receivers. AirPlay support is built in to the AV Foundation framework and the Core Audio family of frameworks. Any audio content you play using these frameworks is automatically made eligible for AirPlay distribution. Once the user chooses to play your audio using AirPlay, it is routed automatically by the system.
[object Object],[object Object],[object Object],[object Object]
  THANKS

More Related Content

Viewers also liked

WAFIC Social Media Presentation
WAFIC Social Media PresentationWAFIC Social Media Presentation
WAFIC Social Media PresentationJustin Tamsett
 
Future of Mobile iPhone Presentation
Future of Mobile iPhone PresentationFuture of Mobile iPhone Presentation
Future of Mobile iPhone PresentationBrian Fling
 
iPhone Seminar Part 1
iPhone Seminar Part  1iPhone Seminar Part  1
iPhone Seminar Part 1NAILBITER
 
iOS 8 for iPhone
iOS 8 for iPhoneiOS 8 for iPhone
iOS 8 for iPhoneAmir Khella
 
Iphone-evolution-history-all models-Specifications
Iphone-evolution-history-all models-SpecificationsIphone-evolution-history-all models-Specifications
Iphone-evolution-history-all models-SpecificationsSagar Dixit
 
Certified Management Accountants of Saskatchewan Social Media Presentation
Certified Management Accountants of Saskatchewan Social Media PresentationCertified Management Accountants of Saskatchewan Social Media Presentation
Certified Management Accountants of Saskatchewan Social Media PresentationShane Gibson
 
Submarine
SubmarineSubmarine
Submarinemia132
 
History of iOS
History of iOSHistory of iOS
History of iOSpyro2927
 
Submarine Presentation Pwrpt
Submarine Presentation PwrptSubmarine Presentation Pwrpt
Submarine Presentation Pwrptjbahls68
 
Web 2.0 Social Media Presentation
Web 2.0 Social Media PresentationWeb 2.0 Social Media Presentation
Web 2.0 Social Media PresentationBobby Gill
 
Social Media Presentation
Social Media PresentationSocial Media Presentation
Social Media PresentationRobyn Tippins
 
Marketing mix of apple
Marketing mix of appleMarketing mix of apple
Marketing mix of appleMohit Malviya
 
iPhone 7 Overview with Features
iPhone 7 Overview with FeaturesiPhone 7 Overview with Features
iPhone 7 Overview with FeaturesNexSoftsys
 
Marketing mix of dell and apple
Marketing mix of dell and appleMarketing mix of dell and apple
Marketing mix of dell and appleMalko29
 

Viewers also liked (20)

WAFIC Social Media Presentation
WAFIC Social Media PresentationWAFIC Social Media Presentation
WAFIC Social Media Presentation
 
Future of Mobile iPhone Presentation
Future of Mobile iPhone PresentationFuture of Mobile iPhone Presentation
Future of Mobile iPhone Presentation
 
iPhone Seminar Part 1
iPhone Seminar Part  1iPhone Seminar Part  1
iPhone Seminar Part 1
 
iOS 8 for iPhone
iOS 8 for iPhoneiOS 8 for iPhone
iOS 8 for iPhone
 
Iphone-evolution-history-all models-Specifications
Iphone-evolution-history-all models-SpecificationsIphone-evolution-history-all models-Specifications
Iphone-evolution-history-all models-Specifications
 
Certified Management Accountants of Saskatchewan Social Media Presentation
Certified Management Accountants of Saskatchewan Social Media PresentationCertified Management Accountants of Saskatchewan Social Media Presentation
Certified Management Accountants of Saskatchewan Social Media Presentation
 
Submarine
SubmarineSubmarine
Submarine
 
History of iOS
History of iOSHistory of iOS
History of iOS
 
Submarine Presentation Pwrpt
Submarine Presentation PwrptSubmarine Presentation Pwrpt
Submarine Presentation Pwrpt
 
Pazarlama planı
Pazarlama planıPazarlama planı
Pazarlama planı
 
Web 2.0 Social Media Presentation
Web 2.0 Social Media PresentationWeb 2.0 Social Media Presentation
Web 2.0 Social Media Presentation
 
Features of iOS-7
Features of iOS-7Features of iOS-7
Features of iOS-7
 
Social Media Presentation
Social Media PresentationSocial Media Presentation
Social Media Presentation
 
Apple iOS Report
Apple iOS ReportApple iOS Report
Apple iOS Report
 
The iPhone Evolution
The iPhone EvolutionThe iPhone Evolution
The iPhone Evolution
 
Ios operating system
Ios operating systemIos operating system
Ios operating system
 
Marketing mix of apple
Marketing mix of appleMarketing mix of apple
Marketing mix of apple
 
iPhone 7 Overview with Features
iPhone 7 Overview with FeaturesiPhone 7 Overview with Features
iPhone 7 Overview with Features
 
Marketing mix of dell and apple
Marketing mix of dell and appleMarketing mix of dell and apple
Marketing mix of dell and apple
 
Pazarlama stratejileri
Pazarlama stratejileriPazarlama stratejileri
Pazarlama stratejileri
 

Similar to iphone presentation

Similar to iphone presentation (20)

iPhone Programming
iPhone ProgrammingiPhone Programming
iPhone Programming
 
iOS Course day 2
iOS Course day 2iOS Course day 2
iOS Course day 2
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
MOCA iBeacons SDK for iOS 7
MOCA iBeacons SDK for iOS 7MOCA iBeacons SDK for iOS 7
MOCA iBeacons SDK for iOS 7
 
XCode8.0
XCode8.0XCode8.0
XCode8.0
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
 
Stmik bandung
Stmik bandungStmik bandung
Stmik bandung
 
Java lab-manual
Java lab-manualJava lab-manual
Java lab-manual
 
Mariana Alupului Inventions
Mariana Alupului InventionsMariana Alupului Inventions
Mariana Alupului Inventions
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
I phone app develoment ppt
I phone app develoment   pptI phone app develoment   ppt
I phone app develoment ppt
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
ioS Einstieg und Ausblick - Mobile DevCon Hamburg 2011 - OPITZ CONSULTING - S...
 
Migrating JavaME Apps to Android
Migrating JavaME Apps to AndroidMigrating JavaME Apps to Android
Migrating JavaME Apps to Android
 
Ios
IosIos
Ios
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
ios basics
ios basicsios basics
ios basics
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 

Recently uploaded

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

iphone presentation

  • 1. Presentation on iPhone Presented by: Dhananjay Fartyal Sumit Kumar iPhone Trainee(A-1Technology)
  • 2.
  • 3.
  • 5. Network Connectivity For checking the network status in iphone we use a class reachability provide by the apple for which we have to import the “SystemConfiguration” framework.which is responsible to get the information about the network connection.
  • 6. Network Connectivity 1) Add SystemConfiguration framework to the project . 2) Add Reachability.h and Reachability.m to the project provided by apple. 3) Add @ class Reachability ; to the .h file of where you are implementing the code.
  • 7. Cont.. 4) Import at the beginning of implementation file #import &quot;Reachability.h&quot; Reachability *r = [Reachability reachabilityWithHostName:@&quot;www.google.com&quot;]; NetworkStatus internetStatus = [r currentReachabilityStatus]; if ((internetStatus != ReachableViaWiFi) && (internetStatus != ReachableViaWWAN)){ // ALEART HERE (connection not available) } else { // WHATEVER WE WANT(connection available) }
  • 8. SQLite SQLite is an open source library, written in C, that implements a self contained SQL relational database engine. You can use SQLite to store large amounts of relational data, and it is optimized for use on embedded devices like the iPhone.
  • 9.
  • 10.
  • 11.
  • 12. Sample Code // Open the database connection - (void)initializeDatabase { // Get the database from the application bundle. NSString *path = [[NSBundle mainBundle] pathForResource:@”DATABASE_NAME”ofType:@”db”]; // Open the database. if (sqlite3_open([path UTF8String], & database) == SQLITE_OK) { NSLog(@”Opening Database”); } else{ // Call close to properly clean up sqlite3_close(database); NSAssert1(0, @”Failed to open database: ‘%s’.”, sqlite3_errmsg(database)); }}
  • 13. Cont.. // The SQL statement const char *sql = “SELECT product.ID,product.Name FROM TABLE_NAME; // The SQLite statement object that will hold our result set sqlite3_stmt *statement; // Prepare the statement to compile the SQL query into byte-code int sqlResult = sqlite3_prepare_v2(database, sql, -1, & statement, NULL); // Getting the row. while(sqlite3_step(statement) == SQLITE_ROW) // finalize the statement to release its resources sqlite3_finalize(statement);
  • 14. Core Location The Core Location framework lets you determine the current location or heading associated with a device. The framework uses the available hardware to determine the user’s position and heading. You use the classes and protocols in this framework to configure and schedule the delivery of location and heading events. You can also use it to define geographic regions and monitor when the user crosses the boundaries of those regions.
  • 15. Current location cont. GETTING THE LATITUDE AND LONGITUDE: NSString * lat = [[NSString alloc] initWithFormat:@&quot;%g&quot;, newLocation.coordinate.latitude]; NSString * long = [[NSString alloc] initWithFormat:@&quot;%g&quot;, newLocation.coordinate.longitude];
  • 16. Current Location.... Framework: Core Location #import <CoreLocation/CoreLocation.h> Delegate: <CLLocationManagerDelegate> Methods: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation; - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error;
  • 17. Displaying Maps Framework : MKMapKit #import <MapKit/MapKit.h> Class : MKMapView class Delegate method: - (MKAnnotationView *) mapView:(MKMapView *)thisMapView viewForAnnotation:(MapAnnotations *)annotation{ } MKCoordinateRegion region; // Area currently displaying region.center = newLocation.coordinate ; region.span=span; [mapView setRegion:region animated:TRUE];
  • 18.  
  • 19. JSON Parsing in iPhone JSON (JavaScript Object Notation) data format in client-server communications when writing an iPhone application. JSON is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language.
  • 20. Using JSON-framework • Adds functionality to NSObject / NSString via Obj-C categories • Convert from a plist value to JSON string • Convert from a JSON string to plist value (NSArray or NSDictionary) #import <JSON/JSON.h> // NSObject.h - (NSString *)JSONRepresentation; // NSString+SBJSON.h - (id)JSONValue;
  • 21. JSON Example { “ auto-part” : { “ part-id” : 314, “ name” : “Flux Capacitor”, … .. #import <JSON/JSON.h> NSString *jsonString = [NSString stringWithContentsOfURL:url]; NSDictionary *partsStore = [jsonString JSONValue]; NSDictionary *autoPart = [partsStore objectForKey:@”auto-part”]; NSString *partName = [autoPart objectForKey:@”name”];
  • 22. Overview of In App Purchase Store Kit communicates with the App Store on behalf of your application. Your application uses Store Kit to receive localized information from the App Store about products you want to offer in your application. Your application displays this information to users and allows them to purchase items. When a user wants to purchase an item, your app calls Store Kit to collect payment from the user.
  • 24. E-Print iOS now incorporates support for wireless printing from iPhone and iPad applications. For the most part, the objects provided by UIKit do all of the heavy lifting associated with printing. They manage the printing interfaces, work with your application to render the printable content, and handle the scheduling and execution of print jobs on the printer. Wireless printing is available only on devices that support multitasking. You can use the UIPrintInteractionController object to detect whether printing is available in your application.
  • 25.  
  • 26.  
  • 27. AirPlay AirPlay is a technology that lets your application stream audio to Apple TV and to third-party AirPlay speakers and receivers. AirPlay support is built in to the AV Foundation framework and the Core Audio family of frameworks. Any audio content you play using these frameworks is automatically made eligible for AirPlay distribution. Once the user chooses to play your audio using AirPlay, it is routed automatically by the system.
  • 28.