-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS compatibility changes #3
Comments
Hey @ivucica! |
If anyone else is looking how to get this to run on aarch64 and is encountering
or
The problem is OpenJDK. To get it to work, I uninstalled OpenJDK, installed Oracle JDK 19 aarch64 and set JAVA_HOME, changed dependencies in the pom.xml from |
@claudiosv. Thanks for the guide. For those of us, not so knowledgeable on Java, programming or compiling, would you care to detail further your instructions? |
Thanks for the guide. How to get the JavaFX package version ( |
I'm not a java developer, so I have no clue if these steps are strictly necessary, but what I did to get it working is as follows:
This is all in addition to what the previous commenters suggested. |
@danem This works, thanks! |
I did not have to go through all of these steps, but changing the JDK definitely fixed the issue. Thank you sir! |
Hi,
As someone that's not comfortable with Java, after a bit of effort, I managed to run iTunes Backup Explorer on OS X.
While I won't grab the time to put effort into a coherent PR, here's some things (a mixture of instructions for Mac OS users with some small patches):
I had Java 8 installed; I believe it was some sort of "system" Java. Not sure if it was the old Apple-provided build. I needed to bump Java to something newer. As I have Homebrew installed, I used:
This installed OpenJDK 17.
Per instructions printed by Homebrew, I exposed this to Apple's wrappers like so:
I'm not sure if I had to
export JAVA_HOME=$(/usr/libexec/java_home -v17)
.I had Maven installed from before. It was a Homebrew version (
brew install maven
).At this point I could build iTunes-Backup-Explorer using
mvn compile
.java -jar target/itunes-backup-explorer-1.0-SNAPSHOT.jar
did not work, butmvn javafx:run
did.JavaFX 13 has bugs on MacOS Catalina+. https://bugs.openjdk.java.net/browse/JDK-8234916
I've switched
javafx-controls
andjavafx-fxml
to version 15 in pom.xmlThis fixes the UI and now it renders correctly.
I had to run this from Terminal.app or iTerm.app which has been first allowlisted in System Preferences's Security & Privacy pane for "Full Disk Access" -- otherwise I could not
ls ~/Library/Application Support/MobileSync/Backup
, and neither could it be accessed by iTunes-Backup-Explorer.By allowlisting the terminal app,
java
process inherits these permissions.There is likely an API to request full disk access, but I have not done serious Cocoa work in years, and definitely not in Java.
Unfortunately, the code also hardcodes the path to
MobileSync/Backup
toSystem.getenv("APPDATA"), "Apple Computer\\MobileSync\\Backup"
.This is easy to resolve with
System.getenv("HOME"), "Library/Application Support/MobileSync/Backup"
.Even though that's technically incorrect: one should use
+[NSFileManager URLForDirectory:inDomains:]
to find the paths toNSApplicationSupportDirectory
inNSUserDomainMask
orNSAllDomainsMask
-- accepting there can be more than one such directory. Now, how to do that in Java? I don't really know.Of course, this is very much a Mac-specific code change, meaning it should be isolated from other supported OSes, so in lieu of spending time figuring that out, I'm just writing this issue and going back to recovering my Safari tabs :-)
The text was updated successfully, but these errors were encountered: