How to notarize a Java app bundled in .dmg created by Install4j? - macos

I need to notarize a Java app that is bundled by Install4J.
At the end of the process I get:
.dmg: rejected (the code is valid but does not seem to be an app)
It seems I need to sign items within .dmg according to this and this.
I am uncertain how this signing relates to that of made by install4j.
Do I need to use a Code Signing Identity used by install4j or my own to pass to 's' option?

It's not possible with install4j 7.x, but it is going to be supported directly in install4j 8.x, to be released this summer.

Related

Go - How to link Go macOS binary in an Xcode project?

I'm completely new to macOS development, this might sound quite basic.
I need to distribute a Golang app for macOS.
I built the Go executable for macOS, the executable works fine on macOS.
I made its .app structure following this tutorial
But before distributing it, I need to do a few things like code signing & integrating Sparkle (for updates).
For that, I need to open this .app as a Xcode project. How do I do that ?
Xcode recognizes .xcodeproj extension
I created a sample Xcode Objective-C project but how do I get this project to run my executable/.app ?
You do not need to open the app as an Xcode project - that doesn't make sense as such and cannot be done, as the app is not an Xcode project.
I would suggest instead using the gon tool you can find here for code signing.
The easiest way to install it is usually through HomeBrew by running:
brew tap mitchellh/gon
brew install mitchellh/gon/gon
The above requires you to have HomeBrew installed in advance.
After installing, you create a config.json file as described on the gon GitHub page, and then run:
gon config.json
That will sign, zip, notarize and staple your application for you - creating a .dmg file for distribution.
In regards to Sparkle for easily updating your program, this is something you have to integrate into your Go program. You can find an example of how to do that here.
The example contains a simply Objective-C function sparkle_checkUpdates() that uses the Sparkle framework to invoke the updating mechanism. It also contains a Go function sparkle_checkUpdates() that use C imports to call that C function described before.
In your existing Go program, you just need to call that sparke_checkUpdates from somewhere when the user wants to check for updates.

Missing entitlement - 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit'

I have released my app a couple of times and had the process under control until most recently when I updated from XCode 9 to XCode 10 due to a 3rd party lib requirement.
Everything seems fine when I compile and run on the emulator; but, when I come to the "Validate" (Archive) the app prior to uploading to the app store I am getting an error.
My Setup:
MacOS 10.14.2 (Mojave)
Using XCode 10.1 (10B61)
Error message:
Missing entitlement. watchOS extension
'XXX.app/Watch/aw-xxx.app/PlugIns/aw-xxx Extension.appex' uses
'UIBackgroundModes' value 'workout-processing' without the required
entitlement 'com.apple.developer.healthkit' signed into the bundle.
Watch Extension Capabilities:
The app is built using cordova-8.1.1 and cordova-ios-4.5.5
cordova build ios --buildFlag='-UseModernBuildSystem=0'
In addition to that, the project on XCode 10 has been set to 'Legacy Build System' on File -> Project Settings.
Lastly, the 'aw-xxx Extension.entitlements' has the 'HealthKit' key value set to 'YES' under the 'aw-xxx Extension' folder as one could expect.
Any help or pointers would be much appreciated.
I'm happy to provide more info, logs, etc as well, thanks!
After following the comment below I managed to get my app to validate once again on XCode 10:
Hi #guikeller Just wondering if it is related. I had similar issue while doing a ionic cordova app release. I figured the
com.apple.developer.healthkit
is missing in my platforms/ios/myApp/Entitlements-Release.plist. It does exist in Entitlements-Debug.plist. All I did is copied the key from the debug file to release and app store accepted it.
Source: https://github.com/apache/cordova-ios/issues/475#issuecomment-450174628
In addition to that, I was also able to submit my app into the app store.

Upload Xamarin.Forms project to AppStore - Error: Invalid Signature (Code object is not signed at all)

We are actually trying to upload our Xamarin mobile application to AppStore. Application is built using Xamarin.Forms and uses Pspdfkit for pdf viewing on Ipad. This is the only external library we are using. Project builds correctly but when we try to upload to AppStore, we are getting the following error:
Heading
Invalid Signature - Code object is not signed at all. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html Once these issues have been corrected, you can then redeliver the corrected binary
Can someone gives me the details steps to sign an external library on Xamarin Studio?
The problem you see is most certainly not caused by the PSPDFKit library but by your app itself. iOS apps must be signed using different certificates:
There's one for development
one for Enterprise distribution
one for App Store distribution
You will have to create a proper distribution certificate in order to upload to the store. This involves setting up an App ID, the certificate itself and a provisioning profile which holds everything together.
Your entry point to those certificates is Apple's developer site.
You can read more about the publishing process with regards to Xamarin specific things (it really isn't that different from using an app built with Xcode, other than the different IDE) in Xamarin's documentation.
To automate the process and make it easier to manage you might also want to have a look at a collection of tools called Fastlane.

Packaging NPAPI plugin for Mac App Store

I have a Safari extension built using NPAPI plugin. It was built by a contractor but I was asked to package it up for the Mac App Store.
Now I don't even know if this is possible as it was not built using Cocoa and when I use xcode to Archive it, I get a Generic Xcode Archive as the Archive Type instead of a Mac App Archive, that wont validate.
1. Can this be done in the first place?
2. If so, how do I go about creating the right Archive?
Thanks!
You can't distribute an NPAPI plugin via the App Store:
2.15: Apps must be self-contained, single application installation bundles, and cannot install code or resources in shared locations
An NPAPI plugin isn't an application, and in order to work must be installed in a shared location (the system or user plugin directory), so doesn't meet the App Store criteria.

AdHoc build not getting archived with Titanium SDK 3.2.0

I have implemented cross platform application using Titanium 3.2.0 but when i try archiving the build for iOS AdHoc distribution, it does not get compiled. It keeps giving error with developer name as mentioned below - Invalid "--distribution-name" value ""
I tried building from XCode, Titanium UI and over Terminal as well but same error everywhere. I have referred https://jira.appcelerator.org/browse/TISTUD-5642 and it says that issue is fixed but i still face this issue over every machine updated to 3.2.0 or even when 3.2.0 is installed fresh.
Please help and provide information.
Regards.
Sounds like your Application IDs don't match from your project to your Provisioning Profile.
In your Tiapp.xml file, you may have and application id like com.mycompname.THISappname, but you told the Apple Provisioning Profile that your app id was called com.mycompname.OTHERappname. So they don't match. Change your Tiapp.xml file to match the what the Apple Provisioning Profile expects or creating another profile matching your application id in Titanium Studio.
this worked for me: create a new production certificate AND create a new provisioning profile with the same bundle ID. (Yes, this will work if you are updating an app that is already live). Download the cert and prov. profile and run both (double click). Now repeat step 6 and archive. This should work.

Resources