前提・実現したいこと
xcodeを用いて簡単なappの作成をwebをみながら行っていたのですが、同じように行ったにもかかわらずこのエラーが表示されてしまいました。
発生している問題・エラーメッセージ
Thread 1: signal SIGABRT 右下window内のエラーです 2020-02-04 16:05:48.792388+0900 testapp3[6804:488971] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported' *** First throw call stack: ( 0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48 2 UIKitCore 0x00007fff4797bcfb -[UINavigationController pushViewController:transition:forceImmediate:] + 451 3 UIKitCore 0x00007fff4797b9a4 -[UINavigationController pushViewController:animated:] + 669 4 UIKitCore 0x00007fff481f561a __66-[UIStoryboardPushSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 419 5 UIKitCore 0x00007fff481f9ec4 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 276 6 UIKitCore 0x00007fff481f9d82 -[UIStoryboardSegueTemplate _perform:] + 82 7 UIKitCore 0x00007fff481fa044 -[UIStoryboardSegueTemplate perform:] + 157 8 UIKitCore 0x00007fff48093fff -[UIApplication sendAction:to:from:forEvent:] + 83 9 UIKitCore 0x00007fff47a6c00e -[UIControl sendAction:to:forEvent:] + 223 10 UIKitCore 0x00007fff47a6c358 -[UIControl _sendActionsForEvents:withEvent:] + 398 11 UIKitCore 0x00007fff47a6b2b7 -[UIControl touchesEnded:withEvent:] + 481 12 UIKitCore 0x00007fff480cebbf -[UIWindow _sendTouchesForEvent:] + 2604 13 UIKitCore 0x00007fff480d04c6 -[UIWindow sendEvent:] + 4596 14 UIKitCore 0x00007fff480ab53b -[UIApplication sendEvent:] + 356 15 UIKitCore 0x00007fff4812c71a __dispatchPreprocessedEventFromEventQueue + 6847 16 UIKitCore 0x00007fff4812f1e0 __handleEventQueueInternal + 5980 17 CoreFoundation 0x00007fff23bd4471 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 18 CoreFoundation 0x00007fff23bd439c __CFRunLoopDoSource0 + 76 19 CoreFoundation 0x00007fff23bd3b74 __CFRunLoopDoSources0 + 180 20 CoreFoundation 0x00007fff23bce87f __CFRunLoopRun + 1263 21 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438 22 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65 23 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621 24 testapp3 0x0000000106c3facb main + 75 25 libdyld.dylib 0x00007fff5227ec25 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
該当のソースコード
swift
1import UIKit 2 3@UIApplicationMain 4class AppDelegate: UIResponder, UIApplicationDelegate { =Thread 1: signal SIGABRT 5 6 7 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 8 // Override point for customization after application launch. 9 return true 10 } 11 12 // MARK: UISceneSession Lifecycle 13 14 func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 15 // Called when a new scene session is being created. 16 // Use this method to select a configuration to create the new scene with. 17 return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 18 } 19 20 func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { 21 // Called when the user discards a scene session. 22 // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 23 // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 24 } 25 26 27} 28 29
試したこと
main.storyboard上で一度接続をきり、やり直してみましたが、うまくいきませんでした。
補足情報(FW/ツールのバージョンなど)
コードはデフォルトのままで変更していません。
single view app のテンプレートを使いました。
macbook pro (mid 2012)
バージョン 10.15.3
回答2件
あなたの回答
tips
プレビュー