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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:42:48+00:00 2026-06-13T09:42:48+00:00

I am trying to use objective zip (v1.01e) in an IOS4 application as I

  • 0

I am trying to use objective zip (v1.01e) in an IOS4 application as I want the ability to send password protected zip files via email.

I have got the objective zip source code files in my application, but am experiencing some problems following this getting started guide. http://code.google.com/p/objective-zip/wiki/GettingStarted

I use the following command

ZipFile *zipFile= [[ZipFile alloc] initWithFileName:@"yourFiles.zip" mode:ZipFileModeCreate];

But this always fails returning null via the code shown below from method zipOpen2 (line 507). Here:

if (ziinit.filestream == NULL)
        return NULL;

Following the stack trace it passes though the following methods:

//First
- (id) initWithFileName:(NSString *)fileName mode:(ZipFileMode)mode 

//Second
extern zipFile ZEXPORT zipOpen (pathname, append)

//Third
extern zipFile ZEXPORT zipOpen2 (pathname, append, globalcomment, pzlib_filefunc_def)

However, I notice the second method has this code.

extern zipFile ZEXPORT zipOpen (pathname, append)
    const char *pathname;
    int append;
{
    return zipOpen2(pathname,append,NULL,NULL);
}

When I query the value of the string pathname (in GDB) from this method on I get:

0x1b7f30 does not appear to point to a valid object.

So my questions:

  1. What is const char *pathname, what does it do and is it messing up the pathname? AFAIK char is a single character which cant possibly represent a file name??
  2. The code shown comes from source code of the objective zip project and not my own so I assume its working. It may be my misunderstanding of it. So what other possible reasons could be causing this problem?

For some more info initWithFileName: takes the parameter, filename and passes it on to zipOpen() by creating a pointer to file name as follows.

_fileName = [fileName retain];
  • 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-06-13T09:42:50+00:00Added an answer on June 13, 2026 at 9:42 am

    Eventually I managed to solve this problem. The issue was because I was not appending the application’s documents directory location to the beginning of the file name.

    Once I did this all was well.

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

Sidebar

Related Questions

I am trying to use Objective-C blocks in an iPhone 3.1.3 app but am
I'm trying to convert a piece of Objective-C code into C# for use with
I am trying use gem tire to search in my application. I have tables
I was trying to use the objective c class extension header (only the .h)
I'm trying to use an Objective-C class made in Python to do this but
I am trying to use the UINavigationController class in Objective-C, but I am having
I am trying to use the following script by duckrowing ( http://www.duckrowing.com/2010/03/18/documenting-objective-c-with-doxygen-part-ii/ ), to
I'm trying to use Associated Objects on my objective-c category and I'm getting this
I am trying to use Mach port messages in Objective-C but I cannot find
I'm new to Objective C. I'm trying to use a protocol as I would

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.