OS X application crashes when installed from pkg but copying the .app folder runs fine - osx-mavericks

I created a .pkg installer using Iceberg on OS X.
The installer runs fine, but when I try to run the installed application, it crashes within a couple seconds.
However if I take the same .app folder from the XCode build and copy it in the Finder to the Applications folder, the application runs fine and does not crash.
So the only difference is the copy method. From the .pkg installer the app crashes. If I just do a simple copy, the application runs fine.
In Iceberg, I even turned off "compress" in the archiving options to see if that was causing problems.
Can you think of any reason why the .PKG .app folder would be different?
Thanks for your help.

I figured it out.
It was a permissions problem, although I am not sure why.
Basically the installer pkg was set to copy everything with 755 permissions. Even though none of the files in the .app folder need write access in my code, I guess OS X must need group write permissions on some of the files.
Once I changed everything in the install to 775 permissions, the app started working fine. But with 755, the app would crash/exit right away.
Anyone know if there are certain system files in an application that need group write permissions?

Related

Cannot rename files from within sandbox

Do Win10 handle file permissions differently than Win7? Even when Properties > Security > Advanced permissions for files/folders seem to be identical?
Problem:
For several years, I've been running my browser within a Sandboxie sandbox. Now I migrated from Win7 to Win10, using the same Sandboxie configuration. But in Win10, the sandboxed applications have troubles in renaming files. Sandboxie does work with Win10, and no one reported the troubles I have.
For example: When I run Notepad in SB, it is unable to rename any files, not even those it just created. When I run Firefox from within SB, it does not remember its configuration from the previous run - that's because it is unable to rename .tmp files with updated configuration (e.g. "extensions.json.tmp" to "extensions.json"). Everything else seems to work fine.
Q: Do I have to set anything differently in Win10 than it was set in Win7?
Details: Without SB everything works correctly, in SB only the file rename seems not to work. The only difference I found is that without SB the apps are executed under my win accout, while in SB they are executed under the "ANONYMOUS LOGON" account. The privileges of both accounts seems to be almost identical (checked using the "Process Explorer" app).
The whole directories and everything within them is owned by me, and SYSTEM, Administrators and OWNER (myself) have full control on all files and folders, recursively.
When I create a folder, and then a file within that folder, I can rename that file even from within the sandbox. But I see no difference in privileges of this new folder/file and other folders/files created earlier (they all are owned by me, and SYSTEM, Administrators and OWNER have full control in all cases).
The same setup works in Win7Pro, but not in Win10Home. What's the problem?
Version: Win10Home x64 v10.0.18362, Sandboxie 5.30
The problem was in Sandboxie 5.30. It has been already fixed in 5.31.2.

How to Remove External Directory during uninstall macos x

I've created the application and installed it. When i start the application, it creates the directory in user home. When i uninstall the application in /Application/App-Name, the folder still remains. It'll affect my updated version. So Can Anybody share How to delete the directory along with uninstalling the application.
Thanks

How can I add a file to an existing Mac OS X .app bundle?

I'm writing a modification for Arduino that turns an Arduino board into a game controller.
In order to add my board-specific files to the programming environment, right now, the user needs to open up the Arduino.app package, and then add a few different files into a various folders in the Arduino.app package. It is hardly user friendly. How can I make an installer which automatically moves my files into the appropriate locations within Arduino.app, or is that impossible?
You can download PackageMaker (available here, in the Auxiliary Tools for Xcode download).
You will then be able to make a .pkg that the user will be able to install simply by double clicking. You can also make a script that will check if Arduino is already installed and stop the installation if it's not. You get the idea.
Normally, especially in today's code-signed MacOS app approach (where any modifications to the app or its resources/files would break the app & make it not-launchable), I would say "you're out of luck".
But Arduino is one of the rare OPEN SOURCE apps.
You can fetch the source code from this page:
http://arduino.cc/en/Main/Software
And make your modifications to the project and then build a fresh, customized copy for yourself.
I figured out how to do it using the magic of scripting!
You can take a look at my solution here:
http://code.google.com/p/unojoy/source/browse/#hg%2FLeoJoy%2FLeoJoy%20Installer.app%2FContents%2FMacOS
The folder structure it's in makes it show up as an app on OSX, and the two scripts (LeoJoy Installer and LeoJoyInstaller.command) copy the files. There's two scripts there because I wanted to have a console window pop up to show the user progress, and that's the only way I could figure out how to do that. But, if you run this app in the same directory as the Arduino app, it copies files from the installer app into the Arduino.app package, updating the Arduino app so I don't have to distribute a whole separate version of Arduino.

xcode 4 distribution build problem

When trying to test my application created in XCode 4 on another computer (sent from an archive, just like the user guide says to do), I get this error in console. Any ideas?
3/27/11 10:20:16 PM com.apple.launchd.peruser.501[106] ([0x0-0x27be7bc].xxx.test[86534]) posix_spawn("/Users/Matt/Dropbox/test.app/Contents/MacOS/test", ...): Permission denied
The permissions appear to be fine on everything, I can't figure it out.
Dropbox does strange things to file permissions in bundles (Mac / iOS apps are bundles). It seems like you changed Xcode's default build folders (now called "derived data", etc.) to point at this DropBox folder. Don't do that.
Make sure the app is built somewhere aside from this folder and I'll bet it'll work.

Mac Application installation testing process

Hello I am new to mac development and having some problem with my installation testing process
When i archive my application and open with it installer it says that installation has been successful but the application actually does not show up.I have also deleted the built directory in order to avoid the multiple installation but it still does not work.Someone please help me.
If an application with the same bundle identifier as the one you are installing already exists in the system, then the installer will overwrite the application at that location and will not install it to /Applications. So make sure that any duplicate copies of your app have been deleted from the system before you test the installer.

Resources