Tap Forms for document organisation

Viewing 8 reply threads
  • Author
    Posts
  • October 30, 2012 at 5:50 AM #5489

    Ben
    Participant

    Hello,

    I’ve been using Tap Forms Database for OS X since I saw it was released on the App Store — I was so pleased to see it released, as I was on the verge of buying Bento for want of an alternative. Tap Forms is much better, and from these forums and Twitter it seems as though the developer is very responsive!

    I was looking for an application to help me organise photographs and PDF files for historical research, but I couldn’t find anything appropriate and decided that a database would be better so that I could tailor things to my exact requirements (hence my narrowly-aborted union with Bento). Tap Forms is fitting the bill very nicely so far, but there are a few things I’d like to ask about that, if solved, would make Tap Forms the perfect solution to my needs.

    I have three tables (forms): ‘Documents’, ‘People’ and ‘Tags’.

    Documents is used to store information about the document itself, such as published dates and locations, source, etc., along with the actual file itself. I also have two fields linking to the ‘People’ form. One field is for authors, and the other is for people who are featured within the document. I’m assuming that these are handled by Tap Forms as many-to-many relationships.

    When I view the ‘Documents’ form, I’m very easily able to view the people I’ve associated to a particular record as authors or ‘mentioned people’, but I cannot work out how to display the inverse of the relationship, i.e. selecting record in ‘People’ and being able to see all of the documents it is associated/linked to as an author, mentioned person or both.

    The closest I’ve come is adding a linked form field to the People form, and then manually adding the relevant documents. This is pretty laborious, and also makes it pretty easy for me to make mistakes! Is it currently, or if not will it be possible in a future version, to easily view many-to-many relationships?

    Also, I often save articles from websites. I’ve found Safari’s export as PDF functionality to be a bit unreliable, and so I’ve taken to saving web pages in .webarchive format, which makes sense as the document is originally presented as a web page, anyway. I can add these to Tap Forms without any problem, but when I try to open them the following error is displayed: ‘”Document Name” is damaged and can’t be opened. You should move it to the Trash.’

    It seems this error is invoked by Gate Keeper, as when I completely disable it, the message is not displayed and the .webarchive opens perfectly. I’ve tried holding command whilst opening the file with Gate Keeper turned on to MAS and third parties, but this does not work.

    Is this likely to be a problem with Tap Forms, or is it Gate Keeper itself and thus something that cannot be worked around without the intervention of Apple?

    Finally, I’ve been thinking about buying an iPad, which could serve as a nice way to read PDFs rather than printing them. If I bought Tap Forms for iPad and used the iCloud sync feature to browse my document library, is it possible to keep the database synced, but selectively download files? Or is iCloud document syncing an all-or-nothing proposition? I ask because once I’ve catalogued my document library, it will weigh in at several gigabytes, and while I’d consider paying for extra iCloud storage, I wouldn’t want it to gobble up all of the internal storage on the iPad!

    Many thanks for your time and attention, and sorry for what has ended up as a wall of text!

    October 31, 2012 at 10:31 PM #5498

    Brendan
    Keymaster

    Hello Ben,

    At the moment there’s no inverse relationship display, but it’s definitely something I want to add. I’m probably going to add it to an option to the Link to Form field type options screen. Something like “Display Inverse Relationship” or something like that. I haven’t thought it fully through just yet.

    I’ll look into the webarchive issue.

    iCloud sync is all or nothing. All files that you attach using the File Attachment field type are also synced to iCloud.

    Thanks!

    Brendan

    November 5, 2012 at 8:01 AM #5513

    Ben
    Participant

    Hi Brendan,

    Thanks for your quick and helpful reply! I’m looking forward to following Tap Forms’ development, as well as using Tap Forms on my future iPad!

    Cheers,
    Ben

    November 12, 2012 at 2:28 PM #5528

    Brendan
    Keymaster

    Hi Ben,

    I just finally had a chance to look into the Safari web archive problem. It’s very puzzling to me. I don’t really understand why it’s not working when linked from Tap Forms.

    What I do is copy the file in to the Share/Attachments folder inside the Tap Forms Documents folder, which is in ~/Library/Containers/com.tapforms.mac/Data/Documents if not using iCloud and ~/Library/Mobile Documents/FXLPHZS84D~com~clickspace~tapforms/Documents if using iCloud.

    I just did a test where I saved the archive to the desktop and then linked to it in Tap Forms Mac. The file was unable to be opened from Tap Forms or the Finder when opened from the Attachments folder. But the copy of it on the desktop was easily opened. I did a file comparison of the two files using an MD5 checksum and both files are exactly the same. No difference.

    So it’s got to be something else that has happened to the file, such as some sort of file attribute which is causing the trouble. I’ll keep looking.

    Thanks,

    Brendan

    November 15, 2012 at 8:38 AM #5538

    Ben
    Participant

    Hi Brendan,

    Thanks for looking into this!

    I’ve repeated your test by saving a .webarchive to my desktop, and then opening it successfully. I then added it to a Tap Forms record (file field type), and tried opening from the application. No dice. I navigated to the Mobile Documents folder and tried to open it from there — again, failure. I copied this file and pasted it to my Desktop, and it still failed. The strange thing is that it opens in quick look! This is with Gate Keeper set to MAS and third party apps. I repeated your MD5 checksum test, and I too found that the files were identical.

    Following on from your remarks that it must be a file attribute that is causing the problem, I checked the attributes of both the web archive saved to the desktop from Safari, and the copy of the file added to (in effect created by) Tap Forms.

    The file created by Safari had the following attributes:
    Bens-Laptop:~ benhurrell$ xattr ~/Desktop/original.webarchive
    com.apple.FinderInfo
    com.apple.metadata:kMDItemDownloadedDate
    com.apple.metadata:kMDItemWhereFroms

    The file created by Tap Forms had the following output:
    Bens-Laptop:~ benhurrell$ xattr ~/Desktop/copied.webarchive
    com.apple.FinderInfo
    com.apple.ResourceFork
    com.apple.metadata:kMDItemDownloadedDate
    com.apple.metadata:kMDItemWhereFroms
    com.apple.quarantine

    So on the file created by Tap Forms, there is a resource fork (which from what I can gather is an old way of storing metadata) and com.apple.quarantine.

    Running xattr -p (which returns the value of the attribute) to the resource fork returned a massive block of hexadecimal characters. Running the same command on the com.apple.quarantine attribute returns the following:

    Bens-Laptop:~ benhurrell$ xattr -p com.apple.quarantine ~/Desktop/copied.webarchive
    0006;50a25eb8;Tap\x20Forms;

    From what I was able to find out from a brief bit of Googling (in particular this page: http://www.bu.edu/infosec/howtos/bypass-gatekeeper-safely/) it seems this is the attribute used by Gate Keeper to work out whether a file/application should be opened/challenged/I’m not completely sure what.

    What I find strange is that if I turn off Gate Keeper completely, and then re-attempt to open the Tap Forms copy of the file, I am warned that is is potentially unsafe but given the option to continue. I click open, and the file opens in Safari. If I close the tab and then open it again, the file opens with no warning. If I switch Gate Keeper back on, the file will again open, again with no warning issued. The weird thing is that when I check the extended attributes in Terminal, the ‘quarantine’ value is present and has the same value as before. So it seems the vital piece is either inside the resource fork, or that Gate Keeper maintains its own records of whether a file WITH the relevant quarantine attribute has already been passed for execution.

    It all seems quite complicated. I know absolutely nothing about programming, but unless you’re able to explicitly set the quarantine attribute when a file is added to Tap Forms, it would seem as though the matter is out of your control and that fixing it would be the task of Apple (and if the latter were the case we could almost certainly rely on it never being fixed!).

    If I get a minute later I’ll try removing the quarantine attributes in Terminal and running some tests to see what happens (and obviously report back).

    Thanks,
    Ben

    November 15, 2012 at 8:52 AM #5539

    Ben
    Participant

    Just a quick update:

    I stripped the com.apple.quarantine attribute using Terminal on a .webarchive created by Tap Forms and now it opens, even with Gate Keeper switched on, so it seems as though this is what’s causing the problem!

    Thanks,
    Ben

    November 18, 2012 at 2:06 AM #5542

    Brendan
    Keymaster

    Hello Ben,

    Ah, that’s very interesting. I wasn’t aware of that flag, but it makes perfect sense. Although I think that Safari should be able to open the file anyway. I’m simply using the built-in Cocoa NSFileManager copy function to copy the file into the Mobile Documents folder for Tap Forms. I don’t set any attributes or anything. It should work the same as it does for other file types. I’m not sure why a webarchive file would be any different. Perhaps they’re more strict security wise on webarchive files.

    That was pretty good sleuthing you did. Learned something new. Thanks Ben!

    Brendan

    November 27, 2012 at 4:03 AM #5585

    Ben
    Participant

    Hi Brendan,

    Sorry for my slowness in replying!

    Perhaps the rules are stricter for .webarchive files because of their ability to execute scripts and load Java applets, but it still seems odd when a web archive ‘owned’ by Safari has the same characteristics. Still, it appears to be a part of the Gate Keeper system, so perhaps there’s an attack vector whereby a signed and trusted application could generate malicious web archives. I don’t know. Whatever way I think about it, it doesn’t make a tremendous amount of sense, but I’m not a security expert and nor am I a programmer, so unless it is a bug there must be a reason behind it!

    Thanks again for your attention in this matter!

    Ben

    June 4, 2017 at 12:59 PM #23347

    Edwin Lyons
    Participant

    Hi,

    I know this is 5 years later, but this issue still exists. Is there any chance it’ll be fixed?

    Not related to this, but it’d also be really convenient if the file list supported quick look like Bento did – so that pressing the space bar opened a preview of the file. I imagine this would be useful for other file types such as photos.

    Thanks!

Viewing 8 reply threads

You must be logged in to reply to this topic.