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 6647713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:34:13+00:00 2026-05-26T00:34:13+00:00

I am using phonegap for IOS. I created a Plugin to unzip files. But

  • 0

I am using phonegap for IOS. I created a Plugin to unzip files. But now I am trying to test it but its unable to get the correct file path I’m assuming. Right now here is the snippet of where I cal the unzip method, from my ZipArchive plugin class:

NSLog(@"Trying to unzip file");
if([ za UnzipOpenFile:@"../www/data/test.zip"]){
  NSLog(@"UnzipOpenFile passed");
}

The structure of the phonegap is something like this

- ProjectName
  - www
    - data
      - test.zip
  - Plugin
    - ZipArchive.m //where the above snippet lies

I am thinking I can’t use relative path like that because in the end product, when compiled and testing on simulator, the path will probably be different. How would I access the www/data folder from ZipArchive.m? Thanks.

  • 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-26T00:34:14+00:00Added an answer on May 26, 2026 at 12:34 am

    You should be able to get a path to things in the www folder with:

    [[[NSBundle mainBundle] resourcePath]
     stringByAppendingPathComponent:@"www/data/test.zip"];
    

    Where are you planing to unzip to? Im quite sure the resource path is read-only when running on a real device. But the documents path and a tmp folder is writeable.

    http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/RuntimeEnvironment/RuntimeEnvironment.html

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

Sidebar

Related Questions

I created iOS app using PhoneGap version 0.9.6 long back. Now I am going
I am using PhoneGap along with the associated Screenshot Plugin for iOS. It is
I'm trying to use html5's web-database using phonegap for an iOS app for the
I'm using phonegap to create an app. I'm having a problem when I'm trying
I am using PhoneGap for an iOS project and everything is working except I
I am using phonegap and sqlite to develop cross-platform mobile app for android,ios,blackberry.For reference
I'm currently using phonegap to create and ios app. While getting familiar to the
I am writing a iphone application using phonegap and ios. I have a weird
I've been using PhoneGap for a while mainly focused at iOS and using mostly
I'm coding an app for iOS / WP7 / Android using PhoneGap and it

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.