2015-09-19 1 views
4

Возможно, кто-то может помочь, я пытаюсь переместить приложение, чтобы облегчить новую цель для Apple TV. Я создаю новую раскадровку и привязываю все так же, как и в приложении iOS. Когда я пытаюсь запустить приложение, я получаю следующее исключение, после того, как AppDelegate выполняется (прежде чем он идет в viewDidLoad исходного контроллера.Приложение Moving Swift iOS для поддержки Apple TV как новой цели

Любые идеи?

2015-09-19 12:24:44.629 App TV[46733:3797033] *** Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CATransformLayer: 0x7fc1e0d51fc0> is a part of cycle in its layer tree' 
    *** First throw call stack: 
    (
    0 CoreFoundation      0x000000010e850105 __exceptionPreprocess + 165 
    1 libobjc.A.dylib      0x000000010f271deb objc_exception_throw + 48 
    2 CoreFoundation      0x000000010e85003d +[NSException raise:format:] + 205 
    3 QuartzCore       0x0000000111d2f74a _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 102 
    4 QuartzCore       0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177 
    5 QuartzCore       0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177 
    6 QuartzCore       0x0000000111d2f795 _ZN2CA5Layer30ensure_transaction_recursivelyEPNS_11TransactionE + 177 
    7 QuartzCore       0x0000000111d37439 _ZN2CA5Layer15insert_sublayerEPNS_11TransactionEP7CALayerm + 389 
    8 QuartzCore       0x0000000111d3782a -[CALayer addSublayer:] + 193 
    9 UIKit        0x000000010d2ce424 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1512 
    10 UIKit        0x000000010d5b1b56 -[UIButton initWithCoder:] + 1424 
    11 UIKit        0x000000010d79dd62 UINibDecoderDecodeObjectForValue + 705 
    12 UIKit        0x000000010d79da98 -[UINibDecoder decodeObjectForKey:] + 278 
    13 UIKit        0x000000010d5d1315 -[UIRuntimeConnection initWithCoder:] + 134 
    14 UIKit        0x000000010d5d1a77 -[UIRuntimeEventConnection initWithCoder:] + 60 
    15 UIKit        0x000000010d79dd62 UINibDecoderDecodeObjectForValue + 705 
    16 UIKit        0x000000010d79df23 UINibDecoderDecodeObjectForValue + 1154 
    17 UIKit        0x000000010d79da98 -[UINibDecoder decodeObjectForKey:] + 278 
    18 UIKit        0x000000010d5d0555 -[UINib instantiateWithOwner:options:] + 1255 
    19 UIKit        0x000000010d3ad7f2 -[UIViewController _loadViewFromNibNamed:bundle:] + 381 
    20 UIKit        0x000000010d3ae11e -[UIViewController loadView] + 178 
    21 UIKit        0x000000010d3ae47d -[UIViewController loadViewIfRequired] + 139 
    22 UIKit        0x000000010d3aec7e -[UIViewController view] + 27 
    23 UIKit        0x000000010d289484 -[UIWindow addRootViewControllerViewIfPossible] + 61 
    24 UIKit        0x000000010d289b81 -[UIWindow _setHidden:forced:] + 302 
    25 UIKit        0x000000010d29b558 -[UIWindow makeKeyAndVisible] + 43 
    26 UIKit        0x000000010d216063 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131 
    27 UIKit        0x000000010d21c5a8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1755 
    28 UIKit        0x000000010d219783 -[UIApplication workspaceDidEndTransaction:] + 188 
    29 FrontBoardServices     0x000000011097b7ac -[FBSSerialQueue _performNext] + 192 
    30 FrontBoardServices     0x000000011097bb1a -[FBSSerialQueue _performNextFromRunLoopSource] + 45 
    31 CoreFoundation      0x000000010e77c1b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 
    32 CoreFoundation      0x000000010e7720dc __CFRunLoopDoSources0 + 556 
    33 CoreFoundation      0x000000010e771593 __CFRunLoopRun + 867 
    34 CoreFoundation      0x000000010e770fa8 CFRunLoopRunSpecific + 488 
    35 UIKit        0x000000010d2190d5 -[UIApplication _run] + 402 
    36 UIKit        0x000000010d21de09 UIApplicationMain + 171 
    37 App TV     0x000000010d0b8fdd main + 109 
    38 libdyld.dylib      0x00000001149699e9 start + 1 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 

ответ

10

Забавно, что, по-видимому, новый Apple TV (4th Gen/tvOS v9.0) не может обрабатывать «Word Wrap» на кнопке, после настройки на «Truncate Middle» он запускается нормально. Может быть, проблема в бета-версии.

+0

Спасибо! Я просто провел последний день, пытаясь понять это. Это все еще и проблема с GM 9.0 – rmp

+0

«Truncate Tail» также вызвало ошибку, при этом решение было переключено на «Truncate Middle». – StilesCrisis

0

Вы можете получать уведомления где происходит исключение путем активации исключений Breakpoints, то вы сможете увидеть, что происходит.

вы можете сделать это, перейдя на Breakpoint штурманом на Xcode, а затем на кнопку плюс в нижнем левом углу.

2

На Xcode 7.2 У меня была такая же ошибка, вызванная установкой Line Break на кнопку «Wrap Wrap». Переход на «Усечение среднего» остановил крушение.

Смежные вопросы