Issue #4 new
Anonymous created an issue

It seams that for the latest IOS 7.0.4, Only Application(without documents) can be archived.

  • (BOOL)archive:(NSString*)bundleid container:(BOOL)container payload:(BOOL)payload uninstall:(BOOL)uninstall

mode @"ALL" not work on 7.0.4 mode @"DocumentsOnly" not work on 7.0.4 mode @"ApplicationOnly" works

Really appreciate for sharing. Great job!

Comments (10)

  1. Jeff Laing repo owner

    Are you sure you have not changed some security/privacy/lock setting in the device? I am away from home at the moment, but can't see why the DocumentsOnly methods would stop working - I believe that is how iTunes backs up. I will try to look into it when I get back.— Sent from Mailbox for iPad

  2. Jeff Laing repo owner

    Ok, I'm back in town and have had a look at this one. As far as I can tell, on my iPad Air running 7.0.4, DocumentsOnly works fine as does ApplicationOnly. I have to hack my testbed up a little more to check "All" but I'm not anticipating a problem - I think you need to double-check that you don't have some other setting on your device. Perhaps you have encrypted data, or something and need to specify a pass code?

    Do you see any error information in the responses passed to the delegate from archive:container:payload:uninstall: ?

    One problem I am aware of is "Already Archived" which will happen if you already tried once, and left the archive file around - once you use "archive:container:payload:uninstall", you probably want to copy the file off the device and then use a corresponding removeArchive:

    If you delete the file, but don't do the removeArchive:, you end up in a world of pain because the installation proxy has a database that it trusts more than the output directory, but it won't delete entries from the database if it can't delete them from the disk. The simplest way to fix it is to use something like PhoneDisk or iFunBox and put a dummy .zip file back, then use the formal API.

  3. Jeff Laing repo owner

    I have reworked the code a little to be cleaner with the error handling. I believe in the past it may have got stuck in a loop if the archive already existed. It should now catch the error case and exit cleanly. Please try it to see if this fixes your issue.

  4. Jeff Laing repo owner

    One other difference that occurs to me is that "ApplicationOnly" uses a filename ending in .ipa whereas the other two use a filename ending in .zip - perhaps there are other "overwriting" rules in the device-side service that are coming into play.

  5. hac

    Jeff, can you confirm whether this still works after the 8.3 update? I'm having a success code of 0 every time. Thank you!!

  6. Jeff Laing repo owner

    Hmmm, now I'm seeing the "DocumentsOnly" key fail to be respected. This doesn't completely surprise me, of course, given Apples apparent desire to close off access to applications that don't want their documents shared.

    What I can't track down is why I can't even get to apps that have file sharing enabled. Some people have claimed that that path works, but it goes nowhere for me.

  7. hac

    Thanks Jeff! I have seen both keys work with apps that have been locally code signed, only. I'll let you know if I learn more.

  8. Jeff Laing repo owner

    I assume you mean IOS Apps that are signed by you, or do you need to sign the OSX app that is doing the reading? That wouldn't surprise me either...

  9. hac

    Actually I was thinking of something slightly different. I was thinking about accessing the file system (the AFCDirectoryAccess functions) inside of app sandboxes. Maybe there is something similar going on with the installation functions... The app itself has the be a development build.

  10. Jeff Laing repo owner

    Hmmm, I've just seen a console message from installd saying:

    -[MIApplicationArchiveManager _onQueue_createArchiveForIdentifier:withOptions:forClient:error:]
    Client specified archive type DocumentsOnly, but we only support ApplicationOnly; ignoring.

    and another from mobile_house_arrest saying:

    <Error>: handle_vending: Only containers for xcode-installed apps (apps with validated profiles) can be queried

    Not much ambiguity there... remains to be seen how iTunes can do it though.

  11. Log in to comment