2016-03-24 9 views
0

Xcodeを7.3にアップデートしました。更新する前に、私はエラーやクラッシュでコードを実行することができました。更新後、iPhone上で以下のコードを実行するとアサーションエラーが発生します(シミュレータの面白いエラーはありません)。Xcodeを7.3にアップデートした後のアサーションエラー

let storyboard = UIStoryboard(name: storyboard, bundle: nil) 
self.window?.rootViewController = storyboard.instantiateInitialViewController() as UIViewController! 

エラー

2016-03-24 16:15:25.891 Zilingo[434:92251] *** Assertion failure in -[UIStoryboard instantiateViewControllerWithIdentifier:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.60.7/UIStoryboard.m:171 
error: Execution was interrupted, reason: breakpoint 5.1. 
The process has been returned to the state before expression evaluation. 

私は更新のいくつかのステップ足りませんか?

+0

エラーを投稿できますか? – Jelly

+1

ストーリーボードの名前が正しいことを確認してください。ストーリーボード変数は、使用している文字列と同じ名前になっています。 – Jelly

+0

私は2つの変数を変えました。それでも問題はまだあります。興味深いのは、シミュレータではなくiPhoneで実行したときのエラーだけです。 – 2ank3th

答えて

1
Try to this format:- 

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 

    // get your storyboard 
    let storyboard = UIStoryboard(name: "Main", bundle: nil) 

    // instantiate your desired ViewController 
    let rootController = storyboard.instantiateViewControllerWithIdentifier("MyViewController") as! UIViewController 

    // Because self.window is an optional you should check it's value first and assign your rootViewController 
    if let window = self.window { 
     window.rootViewController = rootController 
    } 

    return true 
} 
+0

これはうまくいきませんでした! – 2ank3th

+0

まだ同じエラーがありますか? –

関連する問題