Value of optional type 'NSURL?' not unwrapped; did you mean to use '!' or '?'?

后端 未结 1 1401
心在旅途
心在旅途 2021-01-26 23:01

I started a Swift project with Xcode 6 Beta 6. The project was also using Core Data. After upgrading to Xcode 6 GM, I am getting the following error when compiling:



        
相关标签:
1条回答
  • 2021-01-26 23:54

    ok I just unwrapped the optional using '!' and the code is compiling now.

    return NSManagedObjectModel(contentsOfURL: modelURL!)

    0 讨论(0)
提交回复
热议问题