Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS X app crash with Code Signature Invalid error

Tags:

I write an app for OS X and when I archive the app and export it as an application and try to open then it crashes with Code Signature Invalid error.

I have created Mac App Distribution, Mac Installer Distribution, Developer ID Application, Developer ID Installer certificates and distribution provisiong profile. The app is sandboxed and I tested it on Mavericks.

Exception Type:  EXC_CRASH (Code Signature Invalid) Exception Codes: 0x0000000000000000, 0x0000000000000000  VM Regions Near 0x7fff71ce90a8 (cr2):     __LINKEDIT             00007fff67043000-00007fff67057000 [   80K] r--/rwx SM=COW  /usr/lib/dyld --> Submap                 00007fff70000000-00007fff80000000 [256.0M] r--/rwx SM=PRV   process-only VM submap unused shlib __DATA    00007fff708d3000-00007fff730dc000 [ 40.0M] rw-/rw- SM=COW  system shared lib __DATA not used by this process  Thread 0 Crashed: 0   dyld                            0x00007fff66fd1028 _dyld_start + 0  Thread 0 crashed with X86 Thread State (64-bit):   rax: 0x000000000000000d  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000   rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x00007fff5eda9d30   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000   r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000   rip: 0x00007fff66fd1028  rfl: 0x0000000000000201  cr2: 0x00007fff71ce90a8  Logical CPU:     0 Error Code:      0x020000f4 Trap Number:     133   Binary Images: 0x7fff66fd0000 -     0x7fff67003817  dyld (???) <D1DFCF3F-0B0C-332A-BCC0-87A851B570FF> /usr/lib/dyld  External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 47204 thread_create: 0 thread_set_state: 1299 

There is something wrong with the distribution provisioning profile. When I set none or mac team provisioning profile for release then it works. I use iCloud and In-App Purchase.

The problem started when I enabled iCloud or In-App Purchase. If I disable them, then everything works. If I enable one of them, then my provisioning profile is set to none and it works, but when I change it to my distribution profile then stop working.

Can someone tell me what is wrong?

like image 539
Bartosz Bialecki Avatar asked Jan 08 '14 11:01

Bartosz Bialecki


People also ask

How do I fix an invalid digital signature on my Mac?

1) This issue might be caused due to the software being installed is very old and your Mac ( Apple ) is not able to verify the validity of the certificate . 2) It may be corrupted, then you need to download a new copy of that installer from the Internet or get a new copy from somewhere.

What is code signature on Mac?

Code signing your app assures users that it's from a known source and hasn't been modified since it was last signed. Before your app can integrate app services, be installed on a device, or be submitted to the App Store, it must be signed with a certificate issued by Apple.


1 Answers

You may not have a problem at all. Read: Technical Q&A QA1884 Testing Distribution Builds of Mac Apps

According to that, you are NOT supposed to be able to create installer packages on your own. You are to make a package and check it via the terminal but it WILL NOT RUN.

By the way there is an error in said tech report. You may have to include the full-path to the app, so the command:

sudo installer -store -pkg Sample.pkg -target / 

Should be instead something like:

sudo installer -store -pkg /user/yourname/desktop/Sample.pkg -target / 

Above example assumes your installer.pkg is on the desktop.

If you get all passes then you are good.

Drove me crazy, too, because the last App I uploaded (in June) just installed pkg without a problem and the App it installed worked.

like image 194
David Curran Avatar answered Sep 19 '22 17:09

David Curran