Your Site Title

Xcode 问题

1. 找不到Assistant Editor模式

1. 在storyboard中使用 ctrl + alt + command + enter 
2. 使用`Add Editor on Right`

2. Xcode11 SceneDelegate

iOS 13前 App Delegate 管理 App Lifecycle 和 UI Lifecycle iOS 13后 App Delegate 管理 App Lifesycle 和 Scene Lifecycle, 而 Scene Lifecycle 管理 UI Lifecycle.

application didFinishLaunchingWithOptions 无效, 转交给 scene willConnectToSession

去掉SceneDelegate

1. 删除SceneDelegate 文件
2. Info.plist 中删除UIApplicationScaneManifest(Application Scene Manifest)
3. AppDelegate.m中 注释 Scene Lifecycle
4. application didFinishLaunchingWithOptions 中添加启动Window

@property (strong, nonatomic) UIWindow *window;
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[ViewController alloc] init];;
[self.window makeKeyAndVisible];

3. Found an unexpected Mach-O header code: 0x72613c21

添加Alipay人脸识别, 程序运行正常, 但是上传app store报错. 主要是Build Phases
=> Copy Bundle Resources 配置错误

  1. 有重置的bundle
  2. 包含framworks相关的文件

4. 添加DEBUG宏定义

PreProcessor Macros

DEBUG=1
$(inherited)

5. 上传APP 报Error Analyzing App Version

  1. I was able to fix this by adding a key to Info.plist: Bundle version string (short), set to $(MARKETING_VERSION).
  2. 打包时Xcode用户选择错误, 也会导致这个问题, 需要删除冲突用户.
  3. 苹果服务器问题(特点是没有错误提示, Error(null))

6. Xcode 12 升级后报错

Failed to find or create execution context for description <IBCocoaTouchPlatformToolDescription: 0x7fa8bad9a6f0>

xcode升级后报错, flutter中仔细区分是警告和报错信息, 这会操成误导

下载指定版本的Xcode

  1. 解决1

    因为模拟器打开了, 所以造成连接异常

    Restarting the CoreSimulatorService solved the issue on my machine.

    sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

  2. 解决2

    重新安装XCode

    Uninstall Xcode Restart computer Install Xcode

7. xcode commandline tool 重装

	sudo rm -rf /Library/Developer/CommandLineTools

	xcode-select --install