但是当我尝试在我的iPhone 6中运行它时,我遇到了两个问题:
>供应配置文件的问题.我知道,对于扩展,我需要一个新的AppID(名为app.myapp.com.extension,主AppID是app.myapp.com)和新的配置文件.我使用新的AppID创建了2个新的配置步骤(一个用于开发,另一个用于分发),但是当我尝试在设备上运行它时出现此错误:
error: Embedded binary is not signed with the same certificate as the
parent app. Verify the embedded binary target’s code sign settings
match the parent app’s. Embedded Binary Signing Certificate: – (Ad Hoc
Code Signed) Parent App Signing Certificate: iPhone Developer: Mauro
Vime (——————)
我重新创建了开发配置文件,以检查是否用于开发,而不是用于Ad Hoc,但我仍然遇到同样的问题.
>所以我尝试从应用程序中导出ipa并运行它.应用程序运行完美,但扩展程序只显示黑色视图,而不是包含照片的视图.然后我检查了手机的崩溃日志,看到了这个:
Incident Identifier: 9E578D78-FAB7-419E-AB35-7BA7B0821AFA
CrashReporter Key: ae6bdea47a4e64b09a8fb7fa8599b5e23ceb5311 Hardware
Model: iPhone7,2 Process: extension [2598] Path:
/private/var/mobile/Containers/Bundle/Application/———-/————/PlugIns/extension.appex/extension
Identifier: app.myapp.com.extension Version: 1
(1.0) Code Type: ARM-64 (Native) Parent Process:
launchd [1] Date/Time: 2014-10-14 01:29:21.482 +0200 Launch
Time: 2014-10-14 01:29:16.170 +0200 OS Version: iOS
8.1 (12B407) Report Version: 105 Exception Type: EXC_CRASH (SIGABRT) Exception Subtype: LAUNCH_HANG Exception Message: The
extension took too much time to initialize Highlighted Thread: 0
Backtrace not available Unknown thread crashed with ARM Thread State
(64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000
x8: 0x0000000000000000 x9: 0x0000000000000000 x10: 0x0000000000000000 x11: 0x0000000000000000 x12: 0x0000000000000000
x13: 0x0000000000000000 x14: 0x0000000000000000 x15:
0x0000000000000000 x16: 0x0000000000000000 x17: 0x0000000000000000
x18: 0x0000000000000000 x19: 0x0000000000000000 x20:
0x0000000000000000 x21: 0x0000000000000000 x22: 0x0000000000000000
x23: 0x0000000000000000 x24: 0x0000000000000000 x25:
0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
x28: 0x0000000000000000 fp: 0x0000000000000000 lr:
0x0000000000000000
sp: 0x000000016fdb3b68 pc: 0x00000001200f9000 cpsr: 0x00000000 Binary Images: 0x1200f8000 – 0x12011ffff dyld arm64
/usr/lib/dyld
这里说应用程序在8.1设备中运行,但我也尝试在8.0.2 iOS中出现同样的问题.看到消息:“扩展花了太多时间来初始化”,我刚刚清除了viewDidLoad和viewWillAppear函数,因此它们不执行任何代码,但问题仍然存在.
有没有人遇到过这个问题并有解决方案?