How can I run my .app from my server and have the wrong version? - macos

I have an AppleScript script that I saved as a .app file and I am simply moves directories in the correct location. The script works perfectly when on my local machine but when I upload it to my server and download from my server (trying to create the user experience) then the script has has a circle and a line running through it with this error:
"You can’t use this version of the application “myapp” with this version of macOS. You have macOS 10.12.3. The application requires macOS 2573.6 or later."
I tried googling macOS 2573.6 and nothing comes up and I have no idea what that is. I don't even think that is a real macOS version. If anyone has any idea how to fix this issue I would be extremely grateful.

You are likely breaking all kinds of attributes in the App Bundle during the transfer.
Compress the app bundle first, then copy that to the server. Then, to test, re-download that archive and uncompress it locally.
It should run.

Related

Unity game compiled in Windows doesn’t open in Mac

I created an Unity game in Windows and I wanted to pass it to a Mac computer. I built it for Mac and I uploaded the .app folder to Google Drive as a .rar. Then, I downloaded it in a Mac and I unzipped it. When I try to open it, it shows the error message “Someapp.app can’t be opened”. It doesn’t explain why. I think the problem isn’t from Unity because the log file is empty after the error. Can anyone help me?
I needed to make the actual executable in the .app folder, well, “executable”.
Please try:
Open up a Terminal and navigate to your app folder:
cd <PATH_TO_YOUR_APP>/<APP_NAME>.app/Contents/MacOS/
This folder contains the actual executable file which Windows apparently didn’t make executable. Let’s add the executable flag:
chmod +x <APP_NAME>
Afterwards I could start the app.
I made the Build for my project for both PC and Mac, however I had massive issues getting the Mac one to actually work. Here is the tutorial I used to make the builds which was suppppper helpful, but it didn't help fix my issue:
https://www.youtube.com/watch?time_continue=3&v=7nxKAtxGSn8&feature=emb_title
I just figured out how to make the Mac build work with a friend and it was a bit of work. Once you follow the video's directions exactly for the Mac version, you can send the file to your Mac but when you do it will be labeled MacOS and then when you try to open it it will most likely fail and say missing application to open.
From what I have learned, this is because the compression actually corrupts the executable file to open it on the Mac. To fix this, you have to use Terminal to navigate your way into the file and unlock the permission settings that were changed due what we believe is from the compression.
I honestly can't remember where I found this code but the navigation part I got from the other answer here, but you need to open up a Terminal and navigate to your app folder:
cd <PATH_TO_YOUR_APP>/<APP_NAME>.app/Contents/MacOS/
and add the following:
chmod -R 777 [applicationName].app
This unlocked the permissions on the application but when the app was opened, we had to allow permission through the Mac firewall to let it run on the computer. Once we approved permission, the app ran no problem.
I hope this helps and I'm by no means a professional with this so but my friend and I can try to help in anyway possible.

qt program deployed on mac. config file not writing when standalone app launched, works when run from within qt creator

I have a program that I have developed for mac osx. When the program is run from within Qt creator, a log file and a config.cfg file are created in the myapp.app/Contents/MacOS folder, alongside the executable. This is the correct behaviour, the program needs these files.
When I deploy the app to run standalone (by linking the required libraries using macdeploymentqt tool) the app launches and runs correctly however the log and config.cfg file do not get written to the myapp.app/Contents/MacOS folder and so settings can't be read in.
Is there anyway to get around this? Has anyone encountered this before?
Mitch
osx will likely not allow you writing to your bundle location on installed apps, for security reasons and because it may conflict when multiple users are using your app.
To be cross platform, you could write instead to:
QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)
which resolves to
~/Library/Application Support/<APPNAME>
and
C:/Users/<USER>/AppData/Local/<APPNAME>
or equivalent on windows.
You're never supposed to write to the application bundle, whether on Mac or on Windows. Even on Windows, it will not work if your user isn't an administrator. This idea last made sense on Windows 95 - not even on Windows NT. Don't do it.

Web update application with Firemonkey on MacOS

I'm making a Firemonkey application for both Windows and MacOS, and now I'm working on making it able to check online for updates and download the update. I have got it to work on Windows, by renaming the running .exe file, download the new one and then run the downloaded .exe, works as it should.
Now my problem is MacOS, I don't have much experience with MacOS, so I don't really have any idea how I should do this :/
And even less idea as I store somedata files inside the 'program.app' folder.
So I'd really appreciate some help or ideas on how I should try to solve this problem?
Apps on OSX are really just a package of files. If you go into finder on OSX and right click on an app you will see show package contents. Open that up and you will see the constituent files that make up the "app". From there you have to decide what you need to replace.

OS X: Run my application automatically right after installing this .pkg file

I have developed a mac application and using Product->Archive->Share in Xcode to create a .pkg file and will be submitting to Appstore. I would like to run my application automatically right after installing this .pkg file doing this way. I know using PackageMaker, it is possible to write pre and post scripts. But, Appstore is not accepting any .pkg file which are created using PackageMaker, so i'm using Product->Archive->Share in Xcode to create pkg file.
Could someone advise how can i run my application automatically right after installing this .pkg file?
Thank you!
You're not supposed to be able to do this. Part of the point of the App Store is that there's a uniform, consistent installation experience—the app downloads, installs silently, then shows up in LaunchPad for you to run if you want to.
Remember when getting Xcode from the App Store used to mean you got an app called "Install Xcode.app" in /Applications, and then you had to run that installer? That confused half of Xcode's users, who are about as technically savvy a user base as any app is likely to have, and it's from Apple, and even they couldn't get around the problem by auto-launching "Install Xcode.app".

Mac .Pkg File Opened In Windows...Strange Happenings

I am a windows developer and I had to port an app to Mac. I built it fine and have everything working except my installer. I built my Package file (.pkg) which installs fine and works great on a Mac.
However, I want to move the file to a windows OS over a network to upload it to an ftp server. My ftp client is on Windows. I have done this before without issues on previous .pkg files but I just created one that is acting strange. When I view most .pkg files in windows explorer, they are treated almost like an unknown file type. Windows lets me see the file but I can't really do anything with it. This is fine because I just want to move the file, not use it in any other way.
Unfortunately, I have a new .pkg file that windows strangely treats like a directory instead of just a single file. I can open it and see the "Contents" folder and some internal files/binaries/whatever that I don't want to see. While this is similar to the MacOS functionality, it causes problems because it is uploaded as a directory rather than a file. I just want to drag it to my server and let people download it. Why is this happening?
I have looked online a fair amount and nobody seems to have this issue. It does seem to be permissions related. I saw a good amount of people complaining about "Custom Access" and oddly enough, when I click "get info" on the file, it does say I have "custom access". .Pkg files that seem to display correctly in windows explorer do not have this set. Anyways I would really appreciate the help. I could probably just get an ftp client on the Mac but this does seem really strange and it may help others if there is a solution.
Historically, Mac OS X installer files have been built as bundles, or a directory that appears as a file in OS X. These types of installers will always appear as directories in Windows. However, Mac OS X 10.5 added support for a new format, which is simply the important parts of the installer compressed using xar. Since this format is an archive and not a bundle, it will show up as a single file in Windows.
PackageMaker can produce either format depending on the minimum target version you specified for the package. If you specify 10.5, it will create the new xar format, but if you specify an older version, it will create a bundled installer. If your application will only work for 10.5 and later, you can change the minimum version in PackageMaker by going to Project > Install Properties (Command+I) and changing the Minimum Target dropdown. If you want to support older versions of OS X, then your only choice is to create the bundle version and either compress it as a zip file, or create a disk image to hold it.

Resources