Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All storyboard, xib file don't update the frame or constraint on Macbook Pro M1 with rosetta (Encountered an error communicating with IBAgent-iOS)

I try to add constraint or load some of the storyboards or XIB files in my project but the storyboard doesn't update and can't see anything. This is my error screen capture:

In the first picture, the label is shown in the simulator but the storyboard doesn't

This .xib file can't load any UI items

In the first picture, the label is shown in the simulator but the storyboard doesn't.

In the second picture, The .xib file can't load any UI items

This is my error log:

================================= DATE: =================================

Monday, 21 December 2020 at 14:22:27 Japan Standard Time 2020-12-21 05:22:27 +0000

================================= XCODE VERSION INFO: =================================

Version = 12.3 (12C33) Plugin Version = 17701 Beta Version = 1 OS Version = 11.1 (20C69)

================================= ERROR: =================================

Encountered an error communicating with IBAgent-iOS. (Failure reason: IBAgent-iOS (-1) failed to launch): Failed to launch IBAgent-iOS via CoreSimulator spawn (Failure reason: Failed to spawn IBAgent-iOS on iPhone 12 Pro Max (D81D1F57-170A-4089-843E-1D1E58B049C6, iOS 14.3, Booted)): Invalid device state

Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with IBAgent-iOS." UserInfo={NSLocalizedFailureReason=IBAgent-iOS (-1) failed to launch, NSUnderlyingError=0x7fea6c306aa0 {Error Domain=com.apple.CoreSimulator.SimError Code=405 "Failed to launch IBAgent-iOS via CoreSimulator spawn" UserInfo={NSLocalizedFailureReason=Failed to spawn IBAgent-iOS on iPhone 12 Pro Max (D81D1F57-170A-4089-843E-1D1E58B049C6, iOS 14.3, Booted), NSLocalizedDescription=Failed to launch IBAgent-iOS via CoreSimulator spawn, NSUnderlyingError=0x7fea689e0de0 {Error Domain=com.apple.CoreSimulator.SimError Code=405 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state}}}}, NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "IBAgent-iOS" for further information., NSLocalizedDescription=Encountered an error communicating with IBAgent-iOS.}

================================= TOOL DESCRIPTION: =================================

<IBCocoaTouchPlatformToolDescription: 0x7feaaba355a0> { | targetRuntime.identifier: IBCocoaTouchFramework-fourteenAndLater | _roleString: System content | deviceTypeDescription: <IBSimulatorDeviceTypeDescription: 0x7fea6a16c000> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-12-Pro-Max }

================================= LAUNCH CONTEXT: =================================

<IBCocoaTouchToolLaunchContext: 0x7fea6c3fbbb0> { | toolDescription.ib_verboseDescription: <IBCocoaTouchPlatformToolDescription: 0x7feaaba355a0> { | | targetRuntime.identifier: IBCocoaTouchFramework-fourteenAndLater | | _roleString: System content | | deviceTypeDescription: <IBSimulatorDeviceTypeDescription: 0x7fea6a16c000> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-12-Pro-Max | } | launchPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBAgent-iOS | frameworkSearchPaths: ( "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks" ) | toolName: IBAgent-iOS | platformName: iphonesimulator | applicationTool: 0 | processIdentifier: -1 | exitStatus: (null) | signalStatus: (null) }

================================= EXECUTION CONTEXT: =================================

<IBSimulatorToolCoreSimulatorBootedCLIExecutionContext: 0x7fea6c11b010 busyCount=0, Idle for 0.0 secs> { | device: iPhone 12 Pro Max (D81D1F57-170A-4089-843E-1D1E58B049C6, iOS 14.3, Booted) }

================================= DEVICE: =================================

iPhone 12 Pro Max (D81D1F57-170A-4089-843E-1D1E58B049C6, iOS 14.3, Booted)

================================= TOOL MANAGER: =================================

<IBCocoaTouchToolManager: 0x7fea6a150100>

================================= REASON FOR REQUESTING TOOL: =================================

Preflighting tools for opening document <IBStoryboardDocument: 0x7fea69139a00>: <IBCocoaTouchTargetRuntime: 0x7fea6a1525d0>

================================= XCODE BACKTRACE: =================================

0 +[IBPlatformToolFailureHandler failureHandlerWithContext:failure:diagnosticsHandlerBlock:] (in IDEInterfaceBuilderKit) 1
+[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_injectDiagnosticsHandlerWithFailureContext:intoError:forLaunchingToolWithError:] (in IDEInterfaceBuilderKit) 2
+[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_launchNewToolWithLaunchContext:executionContext:toolProxyClass:proxyDelegate:failureContext:requestingMethod:error:forReason:] (in IDEInterfaceBuilderKit) 3
__117-[IBAbstractInterfaceBuilderPlatformToolManager asyncLaunchNewToolWithDescription:queue:completionHandler:forReason:]_block_invoke.429 (in IDEInterfaceBuilderKit) 4 _dispatch_call_block_and_release (in libdispatch.dylib) 5 _dispatch_client_callout (in libdispatch.dylib) 6 _dispatch_lane_serial_drain (in libdispatch.dylib) 7 _dispatch_lane_invoke (in libdispatch.dylib) 8 _dispatch_workloop_worker_thread (in libdispatch.dylib) 9
_pthread_wqthread (in libsystem_pthread.dylib) 10 start_wqthread (in libsystem_pthread.dylib)

================================= SDKS: =================================

Simulator - watchOS 7.2 (watchsimulator7.2): version = 7.2 platform = com.apple.platform.watchsimulator versionInfo = { BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB"; ProductBuildVersion = 18S561; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Watch OS"; ProductVersion = "7.2"; }

Simulator - watchOS 7.2 (watchsimulator7.2): version = 7.2 platform = com.apple.platform.watchsimulator versionInfo = { BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB"; ProductBuildVersion = 18S561; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Watch OS"; ProductVersion = "7.2"; }

tvOS 14.3 (appletvos14.3): version = 14.3 platform = com.apple.platform.appletvos versionInfo = { BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887"; ProductBuildVersion = 18K559; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Apple TVOS"; ProductVersion = "14.3"; }

Simulator - iOS 14.3 (iphonesimulator14.3): version = 14.3 platform = com.apple.platform.iphonesimulator versionInfo = { BuildID = "88F866D8-32D9-11EB-997E-99E30E3CEA69"; ProductBuildVersion = 18C61; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "iPhone OS"; ProductVersion = "14.3"; }

Simulator - tvOS 14.3 (appletvsimulator14.3): version = 14.3 platform = com.apple.platform.appletvsimulator versionInfo = { BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887"; ProductBuildVersion = 18K559; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Apple TVOS"; ProductVersion = "14.3"; }

watchOS 7.2 (watchos7.2): version = 7.2 platform = com.apple.platform.watchos versionInfo = { BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB"; ProductBuildVersion = 18S561; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Watch OS"; ProductVersion = "7.2"; }

Simulator - tvOS 14.3 (appletvsimulator14.3): version = 14.3 platform = com.apple.platform.appletvsimulator versionInfo = { BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887"; ProductBuildVersion = 18K559; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Apple TVOS"; ProductVersion = "14.3"; }

macOS 11.1 (macosx11.1): version = 11.1 platform = com.apple.platform.macosx versionInfo = { ProductBuildVersion = 20C63; ProductCopyright = "1983-2020 Apple Inc."; ProductName = macOS; ProductUserVisibleVersion = "11.1"; ProductVersion = "11.1"; iOSSupportVersion = "14.3"; }

iOS 14.3 (iphoneos14.3): version = 14.3 platform = com.apple.platform.iphoneos versionInfo = { BuildID = "88F866D8-32D9-11EB-997E-99E30E3CEA69"; ProductBuildVersion = 18C61; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "iPhone OS"; ProductVersion = "14.3"; }

watchOS 7.2 (watchos7.2): version = 7.2 platform = com.apple.platform.watchos versionInfo = { BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB"; ProductBuildVersion = 18S561; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Watch OS"; ProductVersion = "7.2"; }

iOS 14.3 (iphoneos14.3): version = 14.3 platform = com.apple.platform.iphoneos versionInfo = { BuildID = "88F866D8-32D9-11EB-997E-99E30E3CEA69"; ProductBuildVersion = 18C61; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "iPhone OS"; ProductVersion = "14.3"; }

macOS 11.1 (macosx11.1): version = 11.1 platform = com.apple.platform.macosx versionInfo = { ProductBuildVersion = 20C63; ProductCopyright = "1983-2020 Apple Inc."; ProductName = macOS; ProductUserVisibleVersion = "11.1"; ProductVersion = "11.1"; iOSSupportVersion = "14.3"; }

tvOS 14.3 (appletvos14.3): version = 14.3 platform = com.apple.platform.appletvos versionInfo = { BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887"; ProductBuildVersion = 18K559; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "Apple TVOS"; ProductVersion = "14.3"; }

Simulator - iOS 14.3 (iphonesimulator14.3): version = 14.3 platform = com.apple.platform.iphonesimulator versionInfo = { BuildID = "88F866D8-32D9-11EB-997E-99E30E3CEA69"; ProductBuildVersion = 18C61; ProductCopyright = "1983-2020 Apple Inc."; ProductName = "iPhone OS"; ProductVersion = "14.3"; }

DriverKit 20.2 (driverkit.macosx20.2): version = 20.2 platform = com.apple.platform.macosx versionInfo = { }

Please help me.

like image 593
Trí Chồn Avatar asked Dec 21 '20 06:12

Trí Chồn


People also ask

How do I run XIB files in Xcode?

If you're trying to resolve any connection issues and have noticed that you need to edit a XIB file but have selected the Use Storyboards option when creating your project, simply right-click the Main. storyboard > click Open As > then click Source Code . This way you don't have to recreate the project from scratch.

What does XIB mean in Xcode?

"xib" stands for Xml Interface Builder.

What's the difference between XIB and storyboard?

A storyboard is like a canvas where you put all your . xib files. You no longer have any . xibs, you just have View Controllers directly on your canvas.

Should I use nib files or code for my storyboard?

If you need to put screens in separate interface files, you should use nib files, not storyboards. Don’t use code for navigation instead of segues. Segues are an integral part of storyboards.

Does it make sense to use storyboards in Xcode?

It makes no sense. *cough* Especially since Apple does not seem to put much effort in Xcode, to begin with. *cough* There, I said it. What’s the point of having something like storyboards if using them is equal to not using them? So I don’t buy it when developers avoid storyboards.

Do you write UI code or use storyboards?

Writing UI code is tedious, and the less I write, the happier I am. I can do most things in a storyboard and use code only when necessary. Some developers make it sound like writing more code is always right, which is not true at all. Storyboards don’t let you change the type of special view controllers. True. But you don’t have to use them.

Is it possible to switch between code and a storyboard?

When you read the documentation or search for a solution on Stack Overflow, it’s also a “context switch.” I never had any problem going back and forth between code and storyboards. Heck, you can even display them side by side in Xcode. Storyboards are hard to refactor, brittle and discourage changes.


3 Answers

I fixed this by not using Rosetta.

enter image description here

like image 196
Trí Chồn Avatar answered Oct 22 '22 13:10

Trí Chồn


Not using Rosetta. It worked for me. But the Cocoapods need to use Rosetta on Macbook Pro M1. This drives me crazy. Hope this will be fixed in next Xcode release.

like image 22
SleepyCatZz Avatar answered Oct 22 '22 14:10

SleepyCatZz


To solve the problem on Apple Silicon:

  1. With Rosetta enabled, just add arm64 in the excluded architectures on any iOS Simulator SDK in Build Setting section and build the project.

  2. Then close Xcode, disable Rosetta and re-open Xcode. enter image description here

like image 34
Alfonso Tesone Avatar answered Oct 22 '22 12:10

Alfonso Tesone