Xcode升级遗留问题

时间:2021-06-22 12:38:33

1.no such file or directory: '/usersd/chairman/desktop/MySecondTabApp/MySecondTabbApp/"MySecondTabbApp/MySecondTabbApp-Prefix.pch”'

解决方法:

  1. Make new file: ⌘cmd+N iOS/Mac > Other > PCH File >
  2. YourProject-Prefix.pch. Project > Build Settings > Search:
  3. "Prefix Header". Under "Apple LLVM 6.0" you will get the Prefix
  4. Header key. Type in: "YourProjectName/YourProject-Prefix.pch”  // or “YourProject-Prefix.pch"
  5. Clean project: ⌘cmd+⇧shift+K Build project: ⌘cmd+B
2.Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3491.2.5/UIApplication.m:3173

将Xcode6.2升级至 Xcode7.0后,原正常代码也出现了报错。
错误原因在于 AppDelegate 中 didFinishLaunchingWithOptions 未定义 rootViewController,Xcode7规定必须要有rootViewController。

用了[window addSubview:viewController.view]?
换成[window setRootViewController:viewController];即可