I'm trying to convert iOS application with support for iPhones and iPads to a mac Catalyst enabled application. I was able to build it successfully, but I'm unable to run it.
It crashes every time with the following error retrieved from Console.
OS Version:						Mac OS X 10.15.7 (19H2)
Report Version:				12
Bridge OS Version:		 4.6 (17P6610)
Anonymous UUID:				3228F646-0337-CCB2-D4B3-41A73C8D5C68
Sleep/Wake UUID:			 F1A5472C-EBEC-4CBC-8FEA-8EE8257398D2
Time Awake Since Boot: 78000 seconds
Time Since Wake:			 1400 seconds
System Integrity Protection: enabled
Crashed Thread:				0
Exception Type:				EXC_CRASH (Code Signature Invalid)
Exception Codes:			 0x0000000000000000, 0x0000000000000000
Exception Note:				EXC_CORPSE_NOTIFY
kernel messages:
VM Regions Near 0 (cr2):->
		__TEXT								 0000000100000000-0000000100038000 [	224K] r-x/r-x SM=COW	
Thread 0 Crashed:
0	 ???													 0x0000000100079000 _dyld_start + 0
Thread 0 crashed with X86 Thread State (64-bit):
	rax: 0x0000000000000000	rbx: 0x0000000000000000	rcx: 0x0000000000000000	rdx: 0x0000000000000000
	rdi: 0x0000000000000000	rsi: 0x0000000000000000	rbp: 0x0000000000000000	rsp: 0x00007ffeefbff368
	 r8: 0x0000000000000000	 r9: 0x0000000000000000	r10: 0x0000000000000000	r11: 0x0000000000000000
	r12: 0x0000000000000000	r13: 0x0000000000000000	r14: 0x0000000000000000	r15: 0x0000000000000000
	rip: 0x0000000100079000	rfl: 0x0000000000000200	cr2: 0x0000000000000000
	
Logical CPU:		 0
Error Code:			0x00000000
Trap Number:		 0
Binary Images:
			 0x100000000 -				0x100037fff +??? (0) <F1126CDD-A67C-3FAA-8727-863815CDC5D7> (null)
			 0x100078000 -				0x100109f47 +??? (750.6) <1D318D60-C9B0-3511-BE9C-82AFD2EF930D> (null)
External Modification Summary:
	Calls made by other processes targeting this process:
		task_for_pid: 0
		thread_create: 0
		thread_set_state: 0
	Calls made by this process:
		task_for_pid: 0
		thread_create: 0
		thread_set_state: 0
	Calls made by all processes on this machine:
		task_for_pid: 174379
		thread_create: 0
		thread_set_state: 195
VM Region Summary:
ReadOnly portion of Libraries: Total=1196K resident=0K(0%) swapped_out_or_unallocated=1196K(100%)
Writable regions: Total=8404K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8404K(100%)
																VIRTUAL	 REGION
REGION TYPE												SIZE		COUNT (non-coalesced)
===========										 =======	=======
STACK GUARD											 56.0M				1
Stack														 8192K				1
__DATA														 248K				3
__DATA_CONST												52K				2
__LINKEDIT												 416K				3
__TEXT														 808K				2
shared memory												8K				2
===========										 =======	=======
TOTAL														 65.5M			 14
I've verified that the provisioning profile is valid and App ID contains Catalyst. The app embeds packet tunnel extension which has its own target. Signing for both targets is managed manually.
Can someone help me shed light on the cause of this crash? I asked other experienced mac devs in my company but they don't understand it either.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Entitlements
Xcode
Mac Catalyst
Code Signing