-
Re: cannot copy application into /Applications folder
john daniel Oct 28, 2019 5:07 PM (in response to cristeab)On Catalina, you will have to use the Finder to copy an app into Applications or use the data volume path.
-
Re: cannot copy application into /Applications folder
eskimo Oct 29, 2019 1:56 AM (in response to john daniel)On Catalina, you will have to use the Finder to copy an app into Applications or use the data volume path.
What makes you say that? I’m able to copy things to
/Applications/
from Terminal just fine:$ cp -R ManOpen.app /Applications $ ls -lhd /Applications
Also, the data volume path for
/Applications/
is/Applications/
. It’s the system applications that were relocated, to/System/Applications/
:$ ls -lh /System/Applications total 0 drwxr-xr-x 3 root wheel 96B Sep 13 23:06 App Store.app …
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: cannot copy application into /Applications folder
john daniel Oct 29, 2019 12:15 PM (in response to eskimo)eskimo wrote:
What makes you say that?
I assumed that the OP was a beginner programmer learning C++ and trying install an app into the Applications folder. I thought an end-user approach using the Finder would be more helpful along with a comment about the data volume that might encourage them to learn more about it.
I'm not entirely sure what jrumo's co-worker relationship to the OP is or why an Objective-C API would work in a C++ program. Perhaps I don't know all the details.
I always thought that /Applications in Catalina was a firmlink to /System/Volumes/Data/Applications on the data volume. I have seen some really interesting re-arragements of system files in Catalina. And I have seen people doing some truly bizzare things with system files. I realize that firmlinks are perfectly useable, but I really would not recommend people engage in command-line operations on this particular path. Either they don't know what they are doing and need to learn the proper way to install apps or they need to fully understand what has changed in Catalina before they start applying hacks.
-
Re: cannot copy application into /Applications folder
jrumo Oct 31, 2019 4:52 AM (in response to john daniel)Thanks John! That's helpful to know.
Btw, the application is written in the Qt framework, and already had some Objective-C code, so it was easy to switch over to the NSFileManager API.
-
Re: cannot copy application into /Applications folder
john daniel Oct 31, 2019 10:09 AM (in response to jrumo)I guess I was wrong about the beginner assumption then. You are going to have to be really careful using something like Qt. Those open source frameworks are often years behind developments on macOS. If you have a bunch of C++ code that you can't do without, there are better ways to integrate it into a modern app, especially on macOS. iOS is more of a challenge. It is best to stick to Apple's frameworks for Apple's UI.
-
-
-
-
-
Re: cannot copy application into /Applications folder
eskimo Oct 29, 2019 2:01 AM (in response to cristeab)First up, I recommend that you not copy applications by shelling out to
cp
. Rather, you should use an API for this. The best API for this isNSFileManager
, but if you want to avoid Objective-C / Swift thencopyfile
is just fine. See its man page for details.IMPORTANT If you continue using
cp
, use the-R
flag. The-r
flag will break the app if it contains any symlinks (I relearnt that lesson the hard way recently)-:Once you switch to an API, things will either work or you’ll get some sort of error. If it’s the latter, please post info about that error.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: cannot copy application into /Applications folder
jrumo Oct 29, 2019 4:44 AM (in response to eskimo)(I am working with Bogdan)
Thanks eskimo! Your suggestion to use the NSFileManager API worked. I used the copyItemAtPath method.
-
Re: cannot copy application into /Applications folder
eskimo Oct 30, 2019 2:01 AM (in response to jrumo)Your suggestion to use the NSFileManager API worked.
Excellent news.
Oh, and btw, john daniel’s comment about hard coding paths is important. I’ve just posted some advice on how to find these directories on another thread.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
-