Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

macos - Mac OS X app crash with Code Signature Invalid error

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 this tech report. You may have to include the path to the app, the command:

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

Should something like:

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

this 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...