Signed app wont run

Hi


Today I signed an app, so people who use my app, wont get a pop-up about an unidentified developer.

The app used to run without any problems, if you just press'ed run anyway, when the pop-up show. But now that I have signed the app, it wont run at all. The icon just keep bouncing and then after some time say that the application wont respond.


I have developed the app in Qt and have used this to sign the applicatio:


codesign --force --verify --verbose --sign "My Developer ID" ./MyApp.app


find MyApp.app -name *.dylib | xargs -I $ codesign --force --verify --verbose --sign "My Developer ID" $


find MyApp.app -name Qt* -type f | xargs -I $ codesign --force --verify --verbose --sign "My Developer ID" $

*I have changed the Developer Id and the AppName

The App is a Mac app that should be able to download from the internet and not from App Store.

Hope someone can help me.

Thanks in advance.

Replies

One potential cause for this is sandbox violations slowing down your app so much that the launch seems like it’s taking forever. You should open the Console utility and search for sandbox to see if there are lots of violations being reported.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi


I tried the Console Utility and got this result:


CoreServicesUIAgent: Error +60005 creating authorization

CoreServicesUIAgent: Error SecAssessmentCreate: The operation couldn't be completed. (OSStatus error -67061.)

kernel: CODE SIGNING: cs_invalid_page(0x1100bd000): p=1650[CoreServicesUIAg] final status 0x3004a00, denying page sending SIGKILL

kernel: CODE SIGNING: process 650[CoreServicesUIAg]: rejecting invalid page at address 0x1100bd000 from 0x0 in file "/User/..../MyApp" (cs_mtime: 1491218743.0) (signed:1 validated: 1 wpmapped: 0 slid: 0)

com.apple.xpc.launchd: (com.apple.coreservices.uiagent[1650]) binary is improperly signed.

diagnosticd: error evaluating process info - pid: 1650, puniqueid: 1650


I can't seem to find any solutions and have tried to sign the application in different ways, but with the same result.

It looks like your binary really is improperly signed. What does

codesign
show if you run it with the ‘verify’ option?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

codesign -dvvv --deep MyApp.app


Identifier=com.yourcompany.MyApp

Format=app bundle with Mach-O thin (x86_64)

CodeDirectory v=20200 size=20223 flags=0x0(none) hashes=626+3 location=embedded

Hash type=sha256 size=32

CandidateCDHash sha1=0abbb369eb51bc53316ec5749e251d5f85968884

CandidateCDHash sha256=1aa4cbead6e89fa46315fc8137784952e23a79f8

Hash choices=sha1,sha256

CDHash=1aa4cbead6e89fa46315fc8137784952e23a79f8

Signature size=8919

Authority=MY DEVID

Authority=Developer ID Certification Authority

Authority=Apple Root CA

Timestamp=03 Apr 2017 16:06:34

Info.plist entries=8

TeamIdentifier=Z23FDA2U32

Sealed Resources version=2 rules=12 files=24

Nested=Frameworks/libssl.1.1.dylib

Nested=Frameworks/libcrypto.1.1.dylib

Nested=PlugIns/imageformats/libqgif.dylib

Nested=PlugIns/imageformats/libqtga.dylib

Nested=PlugIns/imageformats/libqico.dylib

Nested=Frameworks/QtDBus.framework

Nested=PlugIns/bearer/libqcorewlanbearer.dylib

Nested=Frameworks/QtWidgets.framework

Nested=PlugIns/imageformats/libqdds.dylib

Nested=PlugIns/platforms/libqcocoa.dylib

Nested=Frameworks/QtCore.framework

Nested=Frameworks/QtPrintSupport.framework

Nested=PlugIns/imageformats/libqwbmp.dylib

Nested=PlugIns/printsupport/libcocoaprintersupport.dylib

Nested=PlugIns/imageformats/libqwebp.dylib

Nested=Frameworks/QtGui.framework

Nested=PlugIns/imageformats/libqicns.dylib

Nested=Frameworks/QtNetwork.framework

Nested=PlugIns/bearer/libqgenericbearer.dylib

Nested=PlugIns/imageformats/libqjpeg.dylib

Nested=PlugIns/imageformats/libqtiff.dylib

Internal requirements count=1 size=192

It looks like your code isn’t structured according to the rules laid out in TN2206. For example, you have dynamic libraries in the

PlugIns
directory, when they below in the
Frameworks
directory. I recommend you start by fixing that.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I'm not quite sure how yo solve that problem. When I read about the dylibs that are in the plugin directory, I can only seem to find that they belong there and are actually plugins. I tried to manually move them to the framework directory, but the my application wouldn't work properly.


This site: http://doc.qt.io/qt-5/osx-deployment.html#macdeploy

Says that the image format plugin are always deplot, which leads me to believe that the imageformat directory with the dynamic libraries belongs in the plugin directory.


I also tried to follow the steps from this site: http://blog.qt.io/blog/2014/10/29/an-update-on-os-x-code-signing/

And by the end of the guide, when I run

spctl --assess --type execute foo.app

I get no reply, which indicated that GateKeep er would allow the application.

Says that the image format plugin are always deplot …

What does “deplot” mean?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I meant deployed

Honestly, I don’t know how you can resolve clear advice from the Qt folks that contradicts clear advice from Apple. At this point I recommend that you open a DTS Tech Support Incident so that we can look into it officially.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"