Craft can not be used in an exported Xcode project

@Simeon @John @jfperusse I export a craft project as Xcode project, which compiles normally, but gets an error when running in the simulator, as if the craft module was not imported correctly, and I wonder if anyone else is experiencing similar problems, how to deal with it? Thank you.

Can you try with the recently released 3.5.3 update?

@Simeon Thank you for the response. Now I export the project with the latest version (3.5.3 337). It doesn’t work. It’s the same error. I am not familiar with Xcode, which uses the default configuration

Below is the log,

2022-04-11 10:58:37.866142+0800 MyAmuseVoxel[4534:77947] Project bundle path /Users/g/Library/Developer/CoreSimulator/Devices/0C9A9130-D828-4468-AFC7-F67474021DB5/data/Containers/Bundle/Application/72168643-6B8F-49D2-BD2B-EEEC037593D2/MyAmuseVoxel.app/MyAmuseVoxel.codea
2022-04-11 10:58:38.295257+0800 MyAmuseVoxel[4534:77947] ignoring set paused as it has already been set.
2022-04-11 10:58:38.296215+0800 MyAmuseVoxel[4534:77947] [UIFocus] Deferring focus update to item <UITextView: 0x7f7bb681ac00>. No additional info available.
2022-04-11 10:58:38.296516+0800 MyAmuseVoxel[4534:77947] [UIFocus] Failed to update focus with context <UIFocusUpdateContext: 0x600000bfc280: previouslyFocusedItem=(null), nextFocusedItem=(null), focusHeading=None>. No additional info available.
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 4534, TID: 78132, Thread name: (none), Queue name: com.twolivesleft.codea.threadedgcdqueue, QoS: 33
Backtrace:
4   RuntimeKit                          0x0000000103cf1ccd -[RenderTarget presentFramebuffer:] + 86
5   RuntimeKit                          0x0000000103cf2b14 -[ThreadedGCDDriver drawFrame:withDelta:] + 144
6   RuntimeKit                          0x0000000103cf2cfe __37-[ThreadedGCDDriver triggerDrawFrame]_block_invoke + 152
7   Foundation                          0x00007fff207ed931 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
8   Foundation                          0x00007fff207ed829 -[NSBlockOperation main] + 98
9   Foundation                          0x00007fff207f084b __NSOPERATION_IS_INVOKING_MAIN__ + 17
10  Foundation                          0x00007fff207eca8f -[NSOperation start] + 785
11  Foundation                          0x00007fff207f119d __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 17
12  Foundation                          0x00007fff207f0ce4 __NSOQSchedule_f + 182
13  libdispatch.dylib                   0x0000000103bb8baa _dispatch_block_async_invoke2 + 83
14  libdispatch.dylib                   0x0000000103ba9a5b _dispatch_client_callout + 8
15  libdispatch.dylib                   0x0000000103bb03bd _dispatch_lane_serial_drain + 855
16  libdispatch.dylib                   0x0000000103bb10ed _dispatch_lane_invoke + 436
17  libdispatch.dylib                   0x0000000103bbd601 _dispatch_workloop_worker_thread + 907
18  libsystem_pthread.dylib             0x00007fff6fb05074 _pthread_wqthread + 326
19  libsystem_pthread.dylib             0x00007fff6fb03ffb start_wqthread + 15
2022-04-11 10:58:38.521900+0800 MyAmuseVoxel[4534:78132] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 4534, TID: 78132, Thread name: (none), Queue name: com.twolivesleft.codea.threadedgcdqueue, QoS: 33
Backtrace:
4   RuntimeKit                          0x0000000103cf1ccd -[RenderTarget presentFramebuffer:] + 86
5   RuntimeKit                          0x0000000103cf2b14 -[ThreadedGCDDriver drawFrame:withDelta:] + 144
6   RuntimeKit                          0x0000000103cf2cfe __37-[ThreadedGCDDriver triggerDrawFrame]_block_invoke + 152
7   Foundation                          0x00007fff207ed931 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
8   Foundation                          0x00007fff207ed829 -[NSBlockOperation main] + 98
9   Foundation                          0x00007fff207f084b __NSOPERATION_IS_INVOKING_MAIN__ + 17
10  Foundation                          0x00007fff207eca8f -[NSOperation start] + 785
11  Foundation                          0x00007fff207f119d __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 17
12  Foundation                          0x00007fff207f0ce4 __NSOQSchedule_f + 182
13  libdispatch.dylib                   0x0000000103bb8baa _dispatch_block_async_invoke2 + 83
14  libdispatch.dylib                   0x0000000103ba9a5b _dispatch_client_callout + 8
15  libdispatch.dylib                   0x0000000103bb03bd _dispatch_lane_serial_drain + 855
16  libdispatch.dylib                   0x0000000103bb10ed _dispatch_lane_invoke + 436
17  libdispatch.dylib                   0x0000000103bbd601 _dispatch_workloop_worker_thread + 907
18  libsystem_pthread.dylib             0x00007fff6fb05074 _pthread_wqthread + 326
19  libsystem_pthread.dylib             0x00007fff6fb03ffb start_wqthread + 15
2022-04-11 10:58:38.691167+0800 MyAmuseVoxel[4534:77947] ignoring set paused as it has already been set.
2022-04-11 10:58:42.288350+0800 MyAmuseVoxel[4534:78134] XPC connection interrupted
2022-04-11 10:58:42.292979+0800 MyAmuseVoxel[4534:78132] [connection] Connection interrupted: will attempt to reconnect
2022-04-11 10:58:42.296131+0800 MyAmuseVoxel[4534:78135] [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
2022-04-11 10:58:42.305249+0800 MyAmuseVoxel[4534:78139] [Common] BKSetAccelerometerClientEventsEnabled failed: (ipc/send) invalid destination port
2022-04-11 10:58:42.318841+0800 MyAmuseVoxel[4534:77947] [Common] Error sending deferring rules: 0x10000003
2022-04-11 10:58:42.321980+0800 MyAmuseVoxel[4534:78137] [connection] Connection invalidated!
2022-04-11 10:58:42.322547+0800 MyAmuseVoxel[4534:78134] [connection] XPC message send failed
2022-04-11 10:58:42.327206+0800 MyAmuseVoxel[4534:78134] [connection] Handshake failed with error: <Error Domain=NSCocoaErrorDomain Code=4101 "Couldn’t communicate with a helper application.">
2022-04-11 10:58:42.331203+0800 MyAmuseVoxel[4534:78134] [connection] Handshake aborted as the connection has been invalidated
2022-04-11 10:58:42.334957+0800 MyAmuseVoxel[4534:77947] ignoring set paused as it has already been set.
2022-04-11 10:58:42.355341+0800 MyAmuseVoxel[4534:77947] [assertion] Error acquiring assertion: <Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." UserInfo={NSLocalizedFailureReason=The connection does not exist}>
2022-04-11 10:58:42.357201+0800 MyAmuseVoxel[4534:77947] [assertion] Error acquiring assertion: <Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." UserInfo={NSLocalizedFailureReason=The connection does not exist}>
2022-04-11 10:58:42.358591+0800 MyAmuseVoxel[4534:77947] Can't end BackgroundTask: no background task exists with identifier 2 (0x2), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
2022-04-11 10:58:42.360777+0800 MyAmuseVoxel[4534:77947] [assertion] Error acquiring assertion: <Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." UserInfo={NSLocalizedFailureReason=The connection does not exist}>
2022-04-11 10:58:42.361927+0800 MyAmuseVoxel[4534:77947] Can't end BackgroundTask: no background task exists with identifier 3 (0x3), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
2022-04-11 10:58:42.363560+0800 MyAmuseVoxel[4534:77947] [assertion] Error acquiring assertion: <Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application." UserInfo={NSLocalizedFailureReason=The connection does not exist}>
2022-04-11 10:58:42.400404+0800 MyAmuseVoxel[4534:77947] Can't end BackgroundTask: no background task exists with identifier 4 (0x4), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
Message from debugger: Terminated due to signal 9

I built the frog project to my iPad, the same error.

Main:21: Failed to load shader: 
stack traceback:
	[C]: in field 'scene'
	Main:21: in function 'setup'

Main:135: attempt to index a nil value (global 'scene')
stack traceback:
	Main:135: in function 'update'
	Main:150: in function 'draw'

https://youtu.be/4juZJagF6Ms

I will try reproduce. Thank you for the report!

@Simeon Thanks a lot! Looking for a solution. If you need any log files, pls tell me, I will prepare for it.

My version info:

Xcode version?13.3?13E113?
macOS Monterey version?12.2.1

@Simeon How about this problom? Can you tell me if I’m the only one with this problem, or does anyone else have a problem running craft in Xcode Thank you.