更换iOS设备会导致iOS应用崩溃

本文关键字:iOS 应用 崩溃 更换 | 更新日期: 2023-09-27 18:06:49

我已经在Xamarin中构建了一个iPhone/iPod应用程序,它也可以在ipad上运行。
但现在,我的一位客户在选择iPad Air和iPad Mini上的图片时出现了一个问题。我正在寻找修复程序,但我可以看到,我必须将设备更改为Universal

但是这个改变导致了另一个运行时错误告诉我

Foundation.MonoTouchException: Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: There doesn't seem to be a valid compiled storyboard at path '/Users/udvikling/Library/Developer/CoreSimulator/Devices/E9486AE7-8E88-417C-B2BF-D38827F85CF5/data/Containers/Bundle/Application/4BC6F0AC-DA61-4894-A521-1F7FBF013297/<project>.app/LaunchScreen.storyboardc'
Native stack trace:
   0   CoreFoundation                      0x000000010a926d85 __exceptionPreprocess + 165
   1   libobjc.A.dylib                     0x000000010addbdeb objc_exception_throw + 48
   2   UIKit                               0x0000000102419d3d -[UIStoryboard name] + 0
   3   UIKit                               0x0000000101cd787b -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 58
   4   UIKit                               0x0000000101cd7bcf -[UIApplication _loadMainInterfaceFile] + 260
   5   UIKit                               0x0000000101cd63ef -[UIApplication _runWithMainScene:transitionContext:completion:] + 1392
   6   UIKit                               0x0000000101cd3714 -[UIApplication workspaceDidEndTransaction:] + 188
   7   FrontBoardServices                  0x00000001100e88c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
   8   FrontBoardServices                  0x00000001100e8741 -[FBSSerialQueue _performNext] + 178
   9   FrontBoardServices                  0x00000001100e8aca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
   10  CoreFoundation                      0x000000010a84c301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
   11  CoreFoundation                      0x000000010a84222c __CFRunLoopDoSources0 + 556
   12  CoreFoundation                      0x000000010a8416e3 __CFRunLoopRun + 867
   13  CoreFoundation                      0x000000010a8410f8 CFRunLoopRunSpecific + 488
   14  UIKit                               0x0000000101cd2f21 -[UIApplication _run] + 402
   15  UIKit                               0x0000000101cd7f09 UIApplicationMain + 171
   16  ???                                 0x000000011c4c962c 0x0 + 4769748524
   17  ???                                 0x000000011c4c929d 0x0 + 4769747613

我尝试将Main interface更改为iPhone设置的内容,但没有成功。
那我该怎么办呢?

更换iOS设备会导致iOS应用崩溃

deployment info

你的设备应该设置为universal

你的main interface应该设置为main而不是launchscreen

app icons and launchscreen images

launchscreen file应该设置为launch screen而不是main

并确保在您的项目中有两个具有各自名称的故事板。