用 xcode 打 adhoc 包,打包一切正常,安装后 启动就崩溃,发现 crash_log 如下:
Date/Time: 2017-02-06 11:46:47.2815 +0800
Launch Time: 2017-02-06 11:46:47.0538 +0800
OS Version: iPhone OS 10.2 (14C92)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: @rpath/AFNetworking.framework/AFNetworking | Referenced from: /var/containers/Bundle/Application/544FCF37-60D4-45B7-AD3B-4C021FB4DE7A/***appname***.app/***appname*** | Reason: no suitable image found. Did find: | /private/var/containers/Bundle/Application/544FCF37-60D4-45B7-AD3B-4C021FB4DE7A/***appname***.app/Frameworks/AFNetworking.framework/AFNetworking: code signing blocked mmap() of '/private/var/containers/Bundle/Application/544FCF37-60D4-45B7-AD3B-4C021FB4DE7A/***appname***.app/Frameworks/AFNetworking.framework/AFNetworking' | /private/var/containers/Bundle/Application/544FCF37-60D4-45B7-AD3B-4C021FB4DE7A/***appname***.app/Frameworks/AFNetworking.framework/AFNetworking: code signing blocked mmap() of '/private/var/containers/Bundle/Application/544FCF37-60D4-45B7-AD3B-4C021FB4DE7A/***appname***.app/Frameworks/AFNetworking.framework/AFNetworking' | /private/var/containers/Bundle/Application/544FCF37-60D4-45B7-AD3B-4C021FB4DE7A/***appname***.app/Frameworks/AFNetworking.framework/AFNetworking: code signing blocked mmap() of '/pri
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 Crashed:
0 dyld 0x0000000100421cbc __abort_with_payload + 8
1 dyld 0x0000000100421668 abort_with_payload_wrapper_internal + 100
2 dyld 0x0000000100421694 fcntl + 0
3 dyld 0x0000000100400514 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 0
4 dyld 0x00000001004029a8 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 4072
5 dyld 0x00000001003fd044 _dyld_start + 68
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016fd8a1b0 x3: 0x000000000000009b
x4: 0x000000016fd89db0 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x00000000000006e0
x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x20676e696e676973 x11: 0x2064656b636f6c62
x12: 0x676e696e67697320 x13: 0x64656b636f6c6220 x14: 0x20292870616d6d20 x15: 0x6972702f2720666f
x16: 0x0000000000000209 x17: 0x0000000000044000 x18: 0x0000000000000000 x19: 0x0000000000000000
x20: 0x000000016fd89db0 x21: 0x000000000000009b x22: 0x000000016fd8a1b0 x23: 0x0000000000000001
x24: 0x0000000000000006 x25: 0x000000010042dab8 x26: 0x000000010042fbb8 x27: 0xa6fcb55677e8005d
x28: 0x000000010042d000 fp: 0x000000016fd89d80 lr: 0x0000000100421668
sp: 0x000000016fd89d40 pc: 0x0000000100421cbc cpsr: 0x00000000
Binary Images:
0x100074000 - 0x1002dffff ***appname*** arm64 <f16364da003e393aa3fd5f507c8fb084> /var/containers/Bundle/Application/544FCF37-60D4-45B7-AD3B-4C021FB4DE7A/***appname***/***appname***
0x1003fc000 - 0x10042bfff dyld arm64 <f54ed85a94253887886a8028e20ed8ba> /usr/lib/dyld
EOF
找了半天不知道为什么,最后发现 是证书问题,证书 默认导入到 系统证书
下面去了,而且 为了 不提示 输入用户名 密码,把 信任条件 改为了 始终信任
。
解决方案为:把证书 移动到 钥匙串-> 登录
下面,并 信任条件改为 系统默认
。