Hello Apple Support Team,
We are developing a macOS application that allows users to import and view PST files (Microsoft Outlook archives). These files contain a complex, proprietary format that requires specialized parsing libraries. To achieve this, we are using Aspose Email for Java, which is currently one of the few reliable libraries that support complete PST parsing across platforms.
Why we are using Java & Aspose
The Aspose Email Java library provides a comprehensive API to extract mail data (including metadata, attachments, and folder structure) from .pst files.
A native Swift or Objective-C alternative with full .pst parsing capability does not exist, which is why we opted for a Java-based helper module that runs in the background and communicates with the macOS app over a Unix domain socket.
How we bundle it
We package the AsposeEmail.jar and a custom JRE (Java Runtime Environment) created using jlink, tailored to run only our jar.
This entire setup (JAR + JRE) is bundled within the Contents/Resources directory of the macOS app, and we invoke the Java runtime using standard process launch APIs from Swift.
Problem during App Store Submission
When we archive the app and submit it to the App Store, the validation step raises an error:
ITMS-90284: Invalid Code Signing - The executable 'com.app.sample.appstore.pkg/Payload/Sample.app/Contents/Resources/custom-jre-universal/lib/cli ent/libjsig.dylib' must be signed with the certificate that is contained in the provisioning profile.
ITMS-90284: Invalid Code Signing - The executable 'com.app.aample.appstore.pkg/Payload/Sample.app/Contents/Resources/custom-jre-universal/lib/cli ent/libjvm.dylib' must be signed with the certificate that is contained in the provisioning profile.
When we attempt to code sign the custom JRE, especially the .dylib files inside, the runtime breaks. Java is unable to launch correctly and throws permission errors and execution failures.
Alternative we thought of (On-Demand Download)
To avoid the code signing issue, we decided to remove the JRE from the bundle and instead download it on demand when the user performs an action like "Import PST".
However, we realized this may violate the App Store Review Guideline 2.5.2:
Our use case, while not dynamically modifying features, does download and execute a Java runtime, which could be interpreted as executing new code post-installation.
How can we proceed?
We are looking for Apple’s guidance on the correct and compliant path forward:
-
Is there a recommended way to bundle and codesign a custom JRE so it is accepted by the App Store?
-
Is on-demand download of a custom runtime for a very specific parsing task permitted, assuming it doesn't modify app features but simply supports user-initiated operations?
We would greatly appreciate any guidance or best practices on how to handle this situation, particularly with respect to App Store compliance.
Regards,
Maaz Hussain
A better idea might be the new .
That’s cool tech, but you still need a Java runtime to run the Java side of this.
Is on-demand download of a custom runtime … permitted …?
That’s a policy question, and thus outside of my wheelhouse. I can only point you to the App Review Guidelines. Clause 2.4.5(iv) seems pretty clear to me, but I don’t work for App Review and thus can’t make definitive statements about their policies.
On the technical side, Etresoft already pointed you at Placing Content in a Bundle, which is the definitive answer to such questions. Note this comment:
If you put content in the wrong location, you may encounter hard-to-debug code signing and distribution problems.
Java runtimes are notorious for not following the rules in that doc, and thus often produce weird problems like this.
In many cases you can get around those by manually signing your code, as explained in Creating distribution-signed code for macOS. That’s because macOS is often more forgiving than our tools when it comes to code signing. However, that’s a bunch effort and doesn’t guarantee a solution. You may still have tooling issues, and it’s also possible that you might encounter runtime issues in future versions of macOS [1].
One specific thing to watch out for here is bundling native code in JAR files. The App Store distribution process re-signs your code [2], and it’s unable to do that if the code is in a JAR file. If your Java code relies on native code in JAR files, you’ll need to rework that packaging so that the native code is outside the JAR file, which allows App Store to re-sign it.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] While I’m not aware of any such changes pending, this sort of thing has happened before. For example, there’s the whole Separate read-only and read/write content section in Embedding nonstandard code structures in a bundle. Historically cross-platform apps might’ve been able to get away with writing data back to the app’s bundle, but that technique was completely broken by app bundle protection. For more on that change, see the link in Trusted Execution Resources.
[2] Something I talk more about in TN3161 Inside Code Signing: Certificates.