Unable to Simulate Messages and Sticker Packs

I'm on a fresh install of MacOS (14.5) with a fresh install of the latest XCode (15.4) and when I create a new Messages app or Sticker Pack, it compiles but fails to deploy on the simulator. (This is the default project configuration provided by Xcode with no changes.) I have tried reinstalling Xcode and the simulators but nothing fixes it. I've tried also changing the device to simulate but it still doesn't work. Regular applications however do deploy on the simulator and work as normal. But Messages and Sticker Packs do not show up on the simulator in the messages app and give the following errors:

objc[3958]: Class CKDetailsTUConversationCell is implemented in both /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/ChatKit.framework/ChatKit (0x1ecbe7280) and /Library/Developer/CoreSimulator/Volumes/iOS_21F79/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.5.simruntime/Contents/Resources/RuntimeRoot/Applications/MobileSMS.app/MobileSMS (0x102cd2920). One of the two will be used. Which one is undefined.
mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory]
mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory]
setAllowableTypes_block_invoke:1242: *** CGImageSourceSetAllowableTypes - ignoring unknown: 'public.avci'
Received Connection Invalid
mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory]
Synchronous remote object got an error attempting to post setup, reason: Couldn’t communicate with a helper application.
[com.apple.MobileSMS:A23DA686-547E-4980-B6EF-F33F6A7A637E] Error when getting current app configuration for action identifier ConversationListFocusFilterAction, error='Error Domain=DNDErrorDomain Code=1007 "No current action is available. Supply the caller with the default." UserInfo={NSLocalizedDescription=No current action is available. Supply the caller with the default.}'
Calling -viewWillAppear: directly on a view controller is not supported, and may result in out-of-order callbacks and other inconsistent behavior. Use the -beginAppearanceTransition:animated: and -endAppearanceTransition APIs on UIViewController to manually drive appearance callbacks instead. Make a symbolic breakpoint at UIViewControllerAlertForAppearanceCallbackMisuse to catch this in the debugger. View controller: <CKSearchViewController: 0x10406d800>
Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site.
Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site.
Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site.
Invalid absolute dimension, must be > 0.0. NOTE: This will be a hard-assert soon, please update your call site.
XPC error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.coreduetd.knowledge was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.coreduetd.knowledge was invalidated: failed at lookup with error 3 - No such process.}
Synchronous remote object got an error attempting to post setup, reason: Couldn’t communicate with a helper application.
Duet query failed: Couldn’t communicate with a helper application.
UIColor created with component values far outside the expected range. Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.
failed to create XPC connection
Unknown invokeXPCSynchronousCallWithBlock error: Error Domain=TransparencyErrorXPC Code=-108 "failed to create XPC connection" UserInfo={NSLocalizedDescription=failed to create XPC connection}
Error registering for delegate callbacks. Error: Error Domain=SKStatusSubscriptionErrorDomain Code=-4000 "System iCloud account does not exist or is not statuskit capable" UserInfo={NSDebugDescription=System iCloud account does not exist or is not statuskit capable}
Error retrieving subscription for handle. Error: Error Domain=SKStatusSubscriptionErrorDomain Code=-4000 "System iCloud account does not exist or is not statuskit capable" UserInfo={NSDebugDescription=System iCloud account does not exist or is not statuskit capable} handle: <SKHandle: 0x600000024150; handleString = "+18885551212">
Error fetching subscription service for handle: "+18885551212" Error: Error Domain=SKStatusSubscriptionErrorDomain Code=-4000 "System iCloud account does not exist or is not statuskit capable" UserInfo={NSDebugDescription=System iCloud account does not exist or is not statuskit capable}
Checked bag access permission -- allowed? YES {hasMachAccess: YES, hasEntitlements: YES}
API MISUSE: Resuming an NSURLSessionTask with nil URL.
Task <525FCF57-436C-4CEE-9A83-DC62606B01E5>.<1> finished with error [-1002] Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSUnderlyingError=0x600000c86460 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 "(null)"}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <525FCF57-436C-4CEE-9A83-DC62606B01E5>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <525FCF57-436C-4CEE-9A83-DC62606B01E5>.<1>"
), NSLocalizedDescription=unsupported URL}
unhandled process MobileSMS
Requested keyboard snapshot but UIKeyboard.usesInputSystemUI returned NO.
Failed to get pid info for pid 0: Operation not permitted
Failed to get pid info for pid 0: Operation not permitted
mkdir: path=/var/mobile/tmp/com.apple.messages/ mode= -rwx------: [2: No such file or directory]
Answered by nawfalak in 794076022

I solved it and I'm saying the solution just so it actually shows up on search results.

  1. In the Simulator, go under Device -> Erase all Content and Settings. This resets the Simulator's OS.
  2. Without building anything to simulate yet, open the Messages app and some random menu will pop up, click OK then quit Messages.
  3. In Xcode go to Product -> Scheme -> New Scheme and don't change anything and hit OK.
  4. Hit the play button and it'll just work.

I tested this on the iOS 15 - iOS 17 simulators and it works despite iOS 15 and 16 giving slightly different errors from iOS 17.

Credit: https://forums.developer.apple.com/forums/thread/757781

This solution didn't work for me without resetting iOS on the simulator.

Accepted Answer

I solved it and I'm saying the solution just so it actually shows up on search results.

  1. In the Simulator, go under Device -> Erase all Content and Settings. This resets the Simulator's OS.
  2. Without building anything to simulate yet, open the Messages app and some random menu will pop up, click OK then quit Messages.
  3. In Xcode go to Product -> Scheme -> New Scheme and don't change anything and hit OK.
  4. Hit the play button and it'll just work.

I tested this on the iOS 15 - iOS 17 simulators and it works despite iOS 15 and 16 giving slightly different errors from iOS 17.

Credit: https://forums.developer.apple.com/forums/thread/757781

This solution didn't work for me without resetting iOS on the simulator.

Unable to Simulate Messages and Sticker Packs
 
 
Q