My XCode version is 11.1 and the iPhone OS version is 14.0.1. To run apps on iOS 14 device, it requires XCode 12.
An alternate option to support iOS 14 in XCode 11, is to add Device Support. So I have added Device Support for iOS 14 in the following way -
Goto Applications > Xcode > Right Click > Show Package Contents > Contents > Developer > Platforms > iPhoneOS.platform > DeviceSupport
Then added the device support files in this directory.
Device Support files are available here - https://github.com/filsv/iPhoneOSDeviceSupport
After adding Device support, whenever I try to run it on the iPhone device, it instantly shows a 'Build Successful' message, then XCode crashes.
Here is the build error log -
Process: Xcode [1314] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 11.1 (15405) Build Info: IDEFrameworks-15405000000000000~13 App Item ID: 497799835 App External ID: 832925179 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Xcode [1314] User ID: 501 Date/Time: 2021-03-31 20:33:14.126 +0600 OS Version: Mac OS X 10.14.6 (18G95) Report Version: 12 Bridge OS Version: 3.6 (16P6571) Anonymous UUID: 13DE45B0-BCED-AB3D-BEDF-B4704CEFE0C2 Time Awake Since Boot: 630 seconds System Integrity Protection: enabled Crashed Thread: 18 Dispatch queue: Mutex to protect _hasPerformedWorkerAction Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: com.apple.main-thread ProductBuildVersion: 11A1027 UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Invalid parameter not satisfying: aString != nil UserInfo: (null) Hints: 0: Calling block provided to DVTSyncPerformBlock() here: 0 DVTSyncPerformBlock (in DVTFoundation) 1 -[IDEExecutionRunnableTracker executionWantsHold:withError:] (in IDEFoundation) 2 -[IDERunOperationWorker _startWithRetrying:] (in IDEFoundation) 3 __44-[IDERunOperationWorker _startWithRetrying:]_block_invoke_3 (in IDEFoundation) 4 __48-[DVTDispatchLock_Recursive performLockedBlock:]_block_invoke (in DVTFoundation) 5 _dispatch_client_callout (in libdispatch.dylib) 6 _dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib) 7 DVTDispatchBarrierSync (in DVTFoundation) 8 -[DVTDispatchLock performLockedBlock:] (in DVTFoundation) 9 -[DVTDispatchLock_Recursive performLockedBlock:] (in DVTFoundation) 10 __44-[IDERunOperationWorker _startWithRetrying:]_block_invoke_2 (in IDEFoundation) 11 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation) 12 __DVTDispatchAfter_block_invoke (in DVTFoundation) 13 _dispatch_client_callout (in libdispatch.dylib) 14 _dispatch_continuation_pop (in libdispatch.dylib) 15 _dispatch_source_invoke (in libdispatch.dylib) 16 _dispatch_continuation_pop (in libdispatch.dylib) 17 _dispatch_async_redirect_invoke (in libdispatch.dylib) 18 _dispatch_root_queue_drain (in libdispatch.dylib) 19 _dispatch_worker_thread2 (in libdispatch.dylib) 20 _pthread_wqthread (in libsystem_pthread.dylib) 21 start_wqthread (in libsystem_pthread.dylib) Backtrace: 0 __exceptionPreprocess (in CoreFoundation) 1 DVTFailureHintExceptionPreprocessor (in DVTFoundation) 2 objc_exception_throw (in libobjc.A.dylib) 3 +[NSException raise:format:arguments:] (in CoreFoundation) 4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation) 5 -[NSCell _objectValue:forString:errorDescription:] (in AppKit) 6 -[NSCell setStringValue:] (in AppKit) 7 -[NSControl setStringValue:] (in AppKit) 8 -[IDEExecutionHoldAlertHelper showAlert] (in IDEKit) 9 -[IDEWorkspaceTabController showExecutionHoldAlertWithError:] (in IDEKit) 10 __55-[IDEWorkspaceDocument _setupLaunchSessionsObservation]_block_invoke_2 (in IDEKit) 11 -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] (in DVTFoundation) 12 NSKeyValueNotifyObserver (in Foundation) 13 NSKeyValueDidChange (in Foundation) 14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation) 15 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation) 16 _NSSetCharValueAndNotify (in Foundation) 17 -[IDEExecutionTracker _updateWantsHold] (in IDEFoundation) 18 __37-[IDEExecutionTracker addSubtracker:]_block_invoke (in IDEFoundation) 19 -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] (in DVTFoundation) 20 NSKeyValueNotifyObserver (in Foundation) 21 NSKeyValueDidChange (in Foundation) 22 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation) 23 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation) 24 _NSSetCharValueAndNotify (in Foundation) 25 __60-[IDEExecutionRunnableTracker executionWantsHold:withError:]_block_invoke (in IDEFoundation) 26 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation) 27 __DVTSyncPerformBlock_block_invoke.48 (in DVTFoundation) 28 DVTInvokeWithLazyFailureHint (in DVTFoundation) 29 __DVTSyncPerformBlock_block_invoke (in DVTFoundation) 30 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation) 31 __CFRunLoopDoBlocks (in CoreFoundation) 32 __CFRunLoopRun (in CoreFoundation) 33 CFRunLoopRunSpecific (in CoreFoundation) 34 RunCurrentEventLoopInMode (in HIToolbox) 35 ReceiveNextEventCommon (in HIToolbox) 36 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox) 37 _DPSNextEvent (in AppKit) 38 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit) 39 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit) 40 -[NSApplication run] (in AppKit) 41 NSApplicationMain (in AppKit) 42 main (in Xcode) 43 start (in libdyld.dylib) abort() called Application Specific Signatures: NSInternalInconsistencyException