Mac OSX Sierra Directory Problem

With the Mac upgrade to Sierra I’m having problems with an app I distribute on the web failing.

When the app is run from a memory stick or from the hard disk it runs fine.
When the same app is downloaded from a website (after changing security settings to allow it to run) it fails.

The problem involves the calls to find which directory the App is in and where its associated files are.
For the non-web downloaded app a call to Getfolderitem “Filename:”.Absolutepath correctly returns
MacintoshHD:Users:AlecIMac:Documents:Webfolders:FluidSim313Public:

For the same program downloaded though my web server the same call returns:
54BA8A84-F3F6-AB5B-A1F2-9Cf884CAA291:d:
which is sort of useless.

Anybody else have a similar problem. I suspect this is an Apple problem, but so far no response from them.

But it means that my app that I distribute over the web is useless!!!

It’s the whole Translocation thing. There’s several threads floating around where we’re all trying to guess how it works.
Apple won’t consider it a problem. It’s a feature.

Associated files should be copied into the app’s resources folder with a CopyFiles step, and not stored next to the app.
This will fix your issue right away.

Translocation is a tricky beast, it requires a mixture of your app being code signed just the right way, and your user manually moving your app somewhere to get removed from translocation quarantine. I see from your post “changing security settings to allow it to run,” and I’m assuming this means you don’t codesign. I don’t think you’ll ever get out a downloaded app that isn’t codesigned out of Translocation quarantine.

I tried to download your app to take a peek and see if you really need to be using GetFolderItem, but the downloads portal wanted to connect on non-standard ports - so that’s a nope.

You shouldn’t be using GetFolderItem. If it’s an app resource it needs to be inside your app, and you should access it there. If it’s a file you’re going to modify and store data with, but the user doesn’t need to access, it should be in SpecialFolder.ApplicationData

You should be able to get it working by using today’s security and coding standards. We’re happy to help here :slight_smile:

This is deprecated in recent Xojo versions. THe IDE told to change that to .NativePath.

This may or may not resolve your issue.

I suggest using AppWrapper to code sign your apps now. It takes care of all the pitfalls in Sierra.

Thanks Tim, Emile and Christoph
I can tell that you guys know what you are talking about and I am way out of my depth.
I am an aging scientist and have been using, and modifying this simulation program for years. So I know enough to get it to do what I want. But I am certainly not a programmer to the degree that you all are. I can see the steps I would have to take. Upgrade my XoJo version and get rid of deprecated calls, etc. Then re-structure it the way you suggest. Big job. It includes over 60 data files.
But then there’s also other issues to deal with. My “download portal” is an off-the-shelf Synology box with default settings but apparently using non-standard ports. Maybe I should understand that better before I rely on it.
Or alternatively, maybe I should accept that we are trying to do something that requires experts, but we don’t have the proper resources to do it properly. Things just aren’t as simple as they used to be.
So maybe its time to hang it up and go fishing. I’ll have to think about it for a while…
But thanks again for the reality check.

Apple thinks they know better than the rest of us and they are trying to solve a problem that doesn’t exist.

At this point I’ve refused to upgrade to Sierra because I’m frankly, scared, of it. Apple continues to butcher their OS and make it more and more “protected.” You have to have a degree in Apple’s security features to do anything. I hate to say it, but it’s almost more enjoyable coding for Windows now…

Well, once you get to UWP and the Desktop App Converter, security is not exactly lax.

I am not against a system becoming more secure. heck, I am not even against the convergence with iOS. What I don’t like is the inconsistency. What I don’t like is that MacOS does not benefit from touch. And it is not a gadget like the touch bar that will make me change. Are they really serious ?

If the app is for yourself then this whole security stuff doesn’t matter. If you have users then you have to learn. It’s so terribly annoying but we are here to help. The biggest parts are installing the certificates and using AppWrapper to sign everything (including dmg or zip).

And everyone is aging.

The problem with code signing (besides the fact that is seems to be an arcane art from what I see here) is that it costs money. If you don’t make a living coding and want to distributing a free app you created (let’s say it’s a special purpose app for a club or a non-profit) all of a sudden it costs you money to do it if you are not using “SneakerNet” (Do people still use that term? )…

Having the security feature itself is not bad, BUT the end user should be able to disable translocation for any apps THEY chose to.

BTW does translocation apply to apps that someone gets from a local file server? How about FTP?

  • karen

Bzzzzzzt! Signing with an Apple Developer ID cert is all you need if distributing outside of the Mac App Store. And it’s free.

Did not know that…I thought you need a paid apple developer membership to get one. Did not know know it was different for outside of the store.

  • Karen

Bzzzzzt! Am I misremembering? I thought they made that free but maybe it was just the ability to build and test on a device that they made free?

I don’t know… I’m asking you! :wink:

  • karen

Sadly you still need a paid membership to get the Developer ID Certificate, good news is that they last for 5 years instead of one. So you only need to renew every 5 years (providing you do not upgrade your computer).

Providing you do not have to upgrade your current computer because the it crashed beyond repair :frowning:
(or MBL replacement)

Been there, done that, Time Machine backup kept everything working

I was referring more to using SpecialFolder.ApplicationData and CopyFiles/Resources to keep data in proper places instead of folders next to the app. For the most part, when you keep your data in the proper location your app won’t run into many issues. There are exceptions, and Sam can tell you all about Security Scoped Bookmarks.

You can disable it on a per-app basis by removing the quarantine flag using command line. I’m not sure if there’s a global system preference like there is for Gatekeeper.

I’m not sure, I had mentioned that we were all guessing how it works in several other threads. You’ll have to ask them, because I don’t have a definitive answer for you. Translocation is easy to spot though, your App.ExecutableFile.NativePath becomes randomized.

I’ve brought my signing certificates across two “upgrade” Macs. I bought a used MBP that was faster than my Mini, and transferred the cert manually - that worked fine. I upgraded from the used MBP to an iMac and used Migration Assistant which also moved the cert for me, and it still works :slight_smile:

Did they change how the certificates work? I got mine August 2014

I too have encountered a problem with my shareware written many years ago on REALbasic and later Xojo which has worked on every version of Mac OS until Sierra and ironically was written in the days of Windows XP and still works without any modifications on Windows 7,8 and 10.

It is simply that I distribute as a zip which has a folder with my application program, my user guide PDF and one text file which the user can edit, hence it is kept there for convenience, and is loaded into the program as a kind of simple database.

I don’t have a developer account, I couldn’t justify the cost or hassle of using the MAS, I did use that many years ago (using Xojo) for one project and vowed never to bother with it again. This is a hobby not a business.

It looks like I am completely locked out of distributing my application for Sierra.

Before I throw in the towel and hang up my programming boots, is there anyway of distributing software for Sierra that doesn’t involve signing DMG files and modifying my program?

Get yourself a dev account and codesign your apps is the way nowadays.

In other words no hobbyists allowed unless they are willing to play Apple for distributing free software?

  • Karen