Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7006113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:26:09+00:00 2026-05-27T21:26:09+00:00

My phonegap/iOS application has a file named data.js which contains an array. The application

  • 0

My phonegap/iOS application has a file named data.js which contains an array. The application works with this array and some changes are stored into it.

Now when the user quits my application I want it to save the changes to the data.js file. Is there any way to do this?

UPDATE This is my array (the only thing in data.js):

var data = [
    [0, "A", "B", "0", "0"],
    [1, "C", "D", "0", "0"],
    [2, "E", "F", "0", "0"],
    ...
];

SOLVED!
I used JSON to stringify my array and save it to the localStorage. It only has to work with Mobile Safari, so this is a good solution. Thanks for giving me the hints that made me solve my problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:26:10+00:00Added an answer on May 27, 2026 at 9:26 pm

    If you are using phonegap than for sure you can work with file system.
    Solution is to encode your array into JSON using serializeArray() method in JQuery.

    Once you encode your array you will get JSON string which you have to store in a file using PhoneGap’s Filewriter() function. For more detail on that visit this link.

    I hope it helped you :-).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a PhoneGap application for Android (will work on iOS too). The
I'm writing an application in PhoneGap that I want to run on iOS, Android,
We are building a PhoneGap app (both for iOS and Android) that has a
I have a IOS application created through phonegap framework. I have registered a particular
I am writing a iphone application using phonegap and ios. I have a weird
Can I get a phonegap application running on iOS 4 to have a background
I'm writing a PhoneGap application, and it's already works on Android, but on iPhone
Does anyone know how to sort the contact data that phonegap liberates from iOS
I'm writing a phonegap plugin for iOS. In javascript file , I need to
I'm looking to integrate some sort of barcode scanner into a phonegap application. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.