SlideShare a Scribd company logo
SQLite & WebKit
   Ricardo Salazar @risalba
WebKit persistence

• Cookies

• LocalStorage

• SQLite
WebKit & SQLite
• Easy to use asynchronous SQL Api
SQLite default directory
                 Previous to iOS 5.1


• [app path]/Library/Webkit/Databases

• Can be changed in NSUserDefaults

   • WebDatabaseDirectory

   • It used to be empty by default
SQLite default directory
                     From iOS 5.1
• WebDatabaseDirectory      is now set to

    • [app path]/Library/Caches

• You can still change it

• When iOS is upgraded the old version is not
  moved. It's deleted! :(

• The problem also affects to LocalStorage
iOS 5.1 bug related to
    WebKit persistence
• When an App is updated it's absolute path changes

• WebDatabaseDirectory   setting doesn't update
 automatically to the new path :S

• Your WebKit based apps can't open their BBDD

• And again, the problem affects to LocalStorage too
  (WebKitLocalStorageDatabasePathPreferenceKey)
How to fix it?
• Always set the WebDatabaseDirectory setting to
  something else than .../Library/Webkit/Databases
  or .../Library/Webkit/Databases

• If the device is running iOS 5.1 change the
  LocalStorage Setting too
  (WebKitLocalStorageDatabasePathPreferenceKey)

   • You can't change it in previous versions, the
     data will be lost when the user upgrades :(

More Related Content

PDF
Drupal: Internet Lego - What Modules Do I Use?
PPTX
SQL Server & SQL Azure Temporal Tables - V2
PPTX
Architecting Single Page Applications
PDF
Ember and SharePoint
PPTX
Introducing Office Web Apps as a Tool for Developing Content Rich Applications
PDF
SPSNJ 2014: EmberJS & SharePoint
PPTX
Azure SQL & SQL Server 2016 JSON
PPTX
Introduction to React
Drupal: Internet Lego - What Modules Do I Use?
SQL Server & SQL Azure Temporal Tables - V2
Architecting Single Page Applications
Ember and SharePoint
Introducing Office Web Apps as a Tool for Developing Content Rich Applications
SPSNJ 2014: EmberJS & SharePoint
Azure SQL & SQL Server 2016 JSON
Introduction to React

What's hot (9)

PPTX
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
PPTX
Moving to Libguides2.0
PPTX
SQL Server 2016 What's New For Developers
PPTX
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
PPTX
SharePoint Highlights: SharePoint Site Provisioning On-premises and in the Cl...
PPTX
Schema less table & dynamic schema
PDF
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
PPTX
BackboneJS
PPTX
ASP.NET Lecture 3
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
Moving to Libguides2.0
SQL Server 2016 What's New For Developers
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
SharePoint Highlights: SharePoint Site Provisioning On-premises and in the Cl...
Schema less table & dynamic schema
Supercharging Backups and Restores (For Fun and Profit!) (SQL Saturday Boston...
BackboneJS
ASP.NET Lecture 3
Ad

Viewers also liked (7)

PDF
Master Thesis Rita Sousa
PPT
Big Tent 2013 Engaging Discipleship
PPT
2.0 s1 pp 1 24-14
PDF
Data-driven Hypothesis Management
PPTX
The outdoor environment as a teaching resource
PPTX
Nordcad PCB and Footprint flow menus for OrCAD / Allegro
PPT
Generous congregation Charleston-Atlantic
Master Thesis Rita Sousa
Big Tent 2013 Engaging Discipleship
2.0 s1 pp 1 24-14
Data-driven Hypothesis Management
The outdoor environment as a teaching resource
Nordcad PCB and Footprint flow menus for OrCAD / Allegro
Generous congregation Charleston-Atlantic
Ad

Similar to I os webkit sq-lite - ios 5.1 bug en (20)

PPTX
iOS Beginners Lesson 3
PPT
Persistent Offline Storage White
PPTX
Local storage
KEY
jQuery Conference Boston 2011 CouchApps
PDF
Persistence on iOS
PDF
Html5 storage suggestions for challenges.pptx
KEY
CouchConf NYC CouchApps
PDF
Local Storage
PDF
An Overview of HTML5 Storage
PDF
Get Ahead with HTML5 on Moible
PPTX
Getting started with Couchbase
PDF
your browser, my storage
PDF
We4IT lcty 2013 - captain mobility - mobile domino applications offline capab...
PDF
Local Storage for Web Applications
PDF
Naked and afraid Offline Mobile
PDF
Naked and afraid Offline mobile
KEY
iPhone Apps without Objective-C
PDF
your browser, your storage
PPT
HTML5 Data Storage
PDF
The Hitchhikers Guide to client Side Persistent Storage
iOS Beginners Lesson 3
Persistent Offline Storage White
Local storage
jQuery Conference Boston 2011 CouchApps
Persistence on iOS
Html5 storage suggestions for challenges.pptx
CouchConf NYC CouchApps
Local Storage
An Overview of HTML5 Storage
Get Ahead with HTML5 on Moible
Getting started with Couchbase
your browser, my storage
We4IT lcty 2013 - captain mobility - mobile domino applications offline capab...
Local Storage for Web Applications
Naked and afraid Offline Mobile
Naked and afraid Offline mobile
iPhone Apps without Objective-C
your browser, your storage
HTML5 Data Storage
The Hitchhikers Guide to client Side Persistent Storage

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Cloud computing and distributed systems.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
CIFDAQ's Market Insight: SEC Turns Pro Crypto
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Spectral efficient network and resource selection model in 5G networks
“AI and Expert System Decision Support & Business Intelligence Systems”
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Monthly Chronicles - July 2025
Cloud computing and distributed systems.
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

I os webkit sq-lite - ios 5.1 bug en

  • 1. SQLite & WebKit Ricardo Salazar @risalba
  • 2. WebKit persistence • Cookies • LocalStorage • SQLite
  • 3. WebKit & SQLite • Easy to use asynchronous SQL Api
  • 4. SQLite default directory Previous to iOS 5.1 • [app path]/Library/Webkit/Databases • Can be changed in NSUserDefaults • WebDatabaseDirectory • It used to be empty by default
  • 5. SQLite default directory From iOS 5.1 • WebDatabaseDirectory is now set to • [app path]/Library/Caches • You can still change it • When iOS is upgraded the old version is not moved. It's deleted! :( • The problem also affects to LocalStorage
  • 6. iOS 5.1 bug related to WebKit persistence • When an App is updated it's absolute path changes • WebDatabaseDirectory setting doesn't update automatically to the new path :S • Your WebKit based apps can't open their BBDD • And again, the problem affects to LocalStorage too (WebKitLocalStorageDatabasePathPreferenceKey)
  • 7. How to fix it? • Always set the WebDatabaseDirectory setting to something else than .../Library/Webkit/Databases or .../Library/Webkit/Databases • If the device is running iOS 5.1 change the LocalStorage Setting too (WebKitLocalStorageDatabasePathPreferenceKey) • You can't change it in previous versions, the data will be lost when the user upgrades :(

Editor's Notes