Apple notarization fails with install4j generated DMG - install4j

Struggling to notarize DMG created with install4j v8.0.8. This is what I do:
the install4j runs on Windows machine
we use "MacOS folder archive" media packaged into DMG
everything is signed as required with valid "Developer ID Application" certificate
the DMG then taken to MacOS machine (Big Sur) where we do notarization with our own scripts
notarization fails with an error "The signature of the binary is invalid" pointing to one specific file
When I check the signature of that binary with Mac tools it looks perfectly fine. When I check the signature of the DMG, it looks fine too:
$ codesign -vd --verbose=4 path-to-failed-binary
$ codesign -vvv --deep --display path-to.dmg
When I remove this particular binary from the package, the app gets notarized fine (there are many other binaries inside the package, like JRE). Looking around I see similar problems related to the way the package is zipped.
Which makes me wander if it even possible to create DMG on Windows machines with install4j and then doing the manual notarization on Mac? Or, there is something wrong in install4j creating the DMG package?

Related

CoreServices.h file not found in portaudio build on macOS 10.11 Xcode 8.0

This is called though cocoa.h and foundation.h, then NSURLError.h. Not sure why this compiler error just came up when I added portaudio and some other needed frameworks. The error first comes from some existing code. Indeed, there is no CoreServices/CoreServices.h anywhere on the whole system. Do I need to update Xcode?
I found an Apple help answer that said "Those are not makefile directives. How are you trying to build it? Most projects like this come with "configure" scripts that you just need to run from the command line. The only thing you need from Xcode are the Command Line Tools." I don't know what this means or how to do this.
I did run the port audio/configure terminal script, but saw nothing about CoreServices.h being generated. Where does this need to come from?
Thanks.
I further note that in the CoreServices frameworks directory associated with the Xcode project, there is a terminal file called "CoreServices" that when run, generates the error "CoreServices.framework/Versions/A/CoreServices: cannot execute binary file" . What could it be missing?
It's hard to answer your question in this specific case but:
I believe that CoreServices.h can be found at /System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h, is it not the case on your machine? If not, you might have to re-install Xcode
To install PortAudio, you can also use brew with the command brew install portaudio and then link your project with its headers and libs (/usr/local/Cellar/portaudio/19.6.0/include and /usr/local/Cellar/portaudio/19.6.0/lib) in your Xcode project (under the tab Build Phases > Link Binary with Libraries). That might be the easiest option.

How to add Java sub directory to Resources directory of mac app bundle

I would like to use install4j to make it easier to deploy my Java application to Windows, Mac, and Linux. I am evaluating install4j on my Windows development machine to make sure it can do what I need before I purchase it.
So far, I can get it to work for Windows and Linux but not for the Mac. The Mac app bundle that I cobbled together (without install4j) currently has the following structure where the Java dir contains external jar files (such as derby.jar) required by my application.
myApp.app
Contents
MacOS
Resources
Java
Perhaps I can use a simpler structure but this is what I have for now and it works. Unfortunately, the structure install4j builds does not work (it cannot find my derby.jar) and I cannot figure out how to get install4j to duplicate the app bundle directory structure that I know does work.
Any suggestions?

buildozer android debug deploy (run)

I am currently stuck in deploying an app into into my phone.
The app is part of this tutorial. Everything concerning the main.py and buildozer.spec files is set according this tutorial. The app works just fine when run in Eclipse (though some console "errors").
My phone is a Samsung GT-15500, Android version 2.2. and i am also running an apk installer and kivy launcher.
Additionally inside my phone files /mnt/sdcard i cant find a /kivy directory in order to place my app and a simple text file as mentioned here.
Anyway, the thing is that both in the tutorial and the kivy docs the following command: buildozer android debug deploy run fails into my machine. The given error is produced:
# Android packaging done!
# APK Kivyapp1-1.2.0-debug.apk available in the bin directory
# Run '/home/user/.buildozer/android/platform/android-sdk-21/platform-tools/adb devices'
# Cwd None
/home/user/.buildozer/android/platform/android-sdk-21/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
# Command failed: /home/user/.buildozer/android/platform/android-sdk-21/platform-tools/adb devices
I am suspecting there has something to do with my ADT and SDK tools, configuration etc.
Any suggestions??
Oh and thanks in advance for your time.!
Edit: I am running a Linux Mint 16 distro
Edit2: corrected main.app to main.py and added info about the error.
Everything concerning the main.app
Just to be clear, you mean main.py right?
My phone is a Samsung GT-15500, Android version 2.2. and i am also running an apk installer and kivy launcher.
Have you tried kivy programs in the kivy launcher? Do they work? Phones old enough to use android 2.2 can sometimes have some graphics driver problems or bugs even if they technically meet the kivy requirements.
This wouldn't affect the buildozer compilation though, it's just another thing.
The given error is produced:
Could you set your log_level to 2 in buildozer.spec (the video covers this), run the build again, and paste the full log here. It isn't possible to debug from that single line.
==============
Edit: Okay, it looks like the apk is actually built correctly, and you should be able to find it in the 'bin' subfolder of wherever you ran buildozer. Assuming that's the case, you can try copying it to your phone some other way (email or whatever should work).
The step that's actually failing is the 'deploy' part that should push the apk to your device. I don't know what the error is, and I've never seen buildozer complain about curses before, though I guess you could check that you have curses installed?
My best suggestion is to investigate by navigating to the directory with adb in and playing with it manually. You can look up the commands, like adb install ... to install an apk to your phone - that's what buildozer tries to do.
You should also check that adb is enabled on your phone.

libXcodeDebuggerSupport.dylib is missing in iOS 4.2.1 development SDK

Note: getting this on Xcode 4.3.2? Check out the answer to this question.
Note: creating a symbolic link to use the 4.2 lib seems to work fine
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1\ \(8C148\)/Symbols/
sudo ln -s ../../4.2\ \(8C134\)/Symbols/Developer
After upgrading from 4.2.0 (beta, I believe) to 4.2.1, the libXcodeDebuggerSupport.dylib file is missing, which results in:
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
which I guess isn't good. Looking at the directory in question I note:
.../DeviceSupport/4.2 (8C134)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib
but
.../DeviceSupport/4.2.1 (8C148)/Symbols/System/
.../DeviceSupport/4.2.1 (8C148)/Symbols/usr/
the above two dirs make up all the content in the 4.2.1 folder. No "Developer" folder. Checking the /usr/ dir there, I find no libXcodeDebuggerSupport.dylib file in the lib dir either, so ln -s'ing isn't an option.
Worth mentioning: after the upgrade, I plugged the iPad in and had to click "Use for development" in Xcode organizer. Doing so, I got a message about symbols missing for that version, and Xcode proceeded to generate such, then failed. I restored the iPad and did "Use for development" again, and nothing about missing symbols appeared...
Update: deletion of /Developer and reinstallation of Xcode from scratch does not fix this issue.
Update 2: I just realized that after the reinstall of Xcode,
.../DeviceSupport/4.2 (8C134)/Symbols
is now a symbolic link,
lrwxr-xr-x 1 root admin 36 Dec 3 17:17 Symbols -> ../../Developer/SDKs/iPhoneOS4.2.sdk
And the directory in question has the appropriate files. Maybe this is simply a matter of linking the 4.2.1 dir in the same fashion? I'll try that and see if Xcode freaks out. If someone who has this file could provide a md5 sum that would be splendid. This is what it says for me:
$ md5 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2\ \(8C134\)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib
MD5 (/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2 (8C134)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib)
= 08f93a0a2e3b03feaae732691f112688
If the MD5 sum is identical to the output of
$ md5 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1\ \(8C148\)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib
then we're all set.
What I just did to solve this problem was:
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols
and created the symlink was missing:
ln -s ../../4.2\ \(8C134\)/Symbols/Developer/ Developer
It solves my problem.
If you do not have anything to lose, just dump the whole Developer folder (or Developer4.2 or however you call it). Reinstall from scratch with the official release of iOS 4.2 SDK - "Xcode 3.2.5 and iOS SDK 4.2".
I did that and found everything gets installed under 4.2 (8C134) only, and does not use 4.2.1 at all.
I do not have enough points to comment to the accepted answer.
Trinca's solution works for me.
Only one addition though:
I got a permission denied in Xterm when I tried to execute the ln command.
just had to enter
sudo xterm
and enter my admin password for the system
and repeat the process in the new terminal.
I am wondering how many people out there are re-installing Xcode because of this issue.
It is definitely a huge waste of time, if people went ahead with re-installation without checking for a better solution. Apple has to keep enough reviewers for sdk runtime checks, and not just for our apps :).
Trashing the folder does not properly uninstall Xcode.
Here are the steps to uninstall Xcode from the PDF readme distributed with the installer:
Uninstalling Xcode Developer Tools
To uninstall Xcode developer tools on the
boot volume along with the
directory, from a Terminal window
type:
$ sudo <Xcode>/Library/uninstall-devtools -mode=all
To remove the underlying developer content on the boot volume,
but leave the directory and
supporting files untouched, from a
Terminal window type:
$ sudo <Xcode>/Library/uninstall-devtools --mode=systemsupport
To just remove the UNIX development support on the
boot volume, but leave the
directory and supporting files
untouched, from a Terminal window
type:
$ sudo <Xcode>/Library/uninstall-devtools --mode=unixdev
Finally, to just uninstall the directory you
can simply drag it to the trash, or
from a Terminal window type:
$ sudo <Xcode>/Library/uninstall-devtools --mode=xcodedir
NOTE: The uninstaller that ships with previous versions of
the Xcode developer tools will not
clean everything off of your system
properly. You should use the one
installed with these Xcode developer
tools.
My gut feeling tells me that this process will properly nuke/replace dylibs like the one that is causing you trouble. At the very least, all trying this will cost you is time.
Do you have the image in ~/Library/iTunes/iPhone Software Updates you could add that to the xcode organizer and get the symbols from there maybe.
I had this issue as well and this did not work for me:
Quit XCode
Delete the folder /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1\ (8C148)
Plug in your iPhone
Bring up the organizer. It should ask you to collect the symbols from your phone.
Wait while it collects and processes the symbols off your phone.
To resolve this issue, I simply copied the the following directories to the /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols directory:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib/info/
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/Developer/
Once copied over, debugging on the device works normally and no more error messages in the console are received.
Hopefully this helps others that are struggling with debugging on 4.2.1 devices.
Happy Holidays!
What I did was just navigate over to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest/Symbols/ and just drop the whole Developer folder into /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/
Worked! :)

Error while executing symbolicatecrash command "Can't exec "/usr/bin/xcode-select": No such file or directory at /usr/bin/symbolicatecrash"

My application get crash in apple's testing phase. I have crash log. When I am execute symbolicatecrash command, I get an error
Can't exec "/usr/bin/xcode-select": No such file or directory at /usr/bin/symbolicatecrash
or some how command get executed then it shows same crash file.
My .app & .dSYM files are in same directory.
I don't know what is problem. kindly help me in solving above issue.
Thanks.
xcode-select is missing from /usr/bin. Try installing XCode again, and making sure you choose to install the optional Unix support and the Developer Tools System.
xcode-select is a program which should be in usr/bin that manages the path to XCode if you have multiple XCode versions installed. Versions of tools such as xcodebuild in /usr/bin are just shims that redirect to which ever version of XCode you are choosing to use.
See this Apple link and this man page. In particular, note this: "When writing software that uses the Xcode UNIX tools, Apple recommends using the copy of those tools installed in Xcode/usr instead of /usr, because your users may not have tools in /usr if they have disabled the optional UNIX Development Support choice in the Xcode installer. Your software can find the path to the directory with the xcode-select command (see previous section)."