Unable to run react native IOS application on device due to codesign errors

I have a react native application (that I deploy with expo). I am trying to run on ios.

  1. I had a app under a different account under the build identifier com.bcc.quickpass. There, the build was working fine. I transferred the app along with the build identifier to my current account.
  2. I then tried to run the app under my current account account using automated signing. The app builds but the following comes up:

Here is the XCode Log:

Could not launch “QuickPass”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: The operation couldn’t be completed. Unable to launch com.bcc.quickpass because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.
User Info: {
    DVTErrorCreationDateKey = "2022-12-06 06:01:22 +0000";
    DVTRadarComponentKey = 855031;
    IDERunOperationFailingWorker = DBGLLDBLauncher;
    RawUnderlyingErrorMessage = "The operation couldn\U2019t be completed. Unable to launch com.bcc.quickpass because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.";
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone10,1";
    "device_osBuild" = "14.6 (18F72)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 32442;
    "operation_errorCode" = 3;
    "operation_errorDomain" = IDEDebugSessionErrorDomain;
    "operation_errorWorker" = DBGLLDBLauncher;
    "operation_name" = IDEiPhoneRunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 5;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_runnable_swiftVersion" = "5.5.2";
    "param_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos15.2";
    "sdk_osVersion" = "15.2";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 11.4 (Build 20F71)
Xcode 13.2.1 (19586) (Build 13C100)
Timestamp: 2022-12-06T12:01:22+06:00

I also tried to build the app using expo. But codesign error occurs.

SQTCs-Mac-mini:ekyc-native-app sqtc$ expo run:ios --device 68f18c4f36c2943dff92345ae21bc58887477c55
...
...
CodeSign /Users/sqtc/Library/Developer/Xcode/DerivedData/QuickPass-faybjdvqxbotkeajwmmcoupclnpg/Build/Products/Debug-iphoneos/QuickPass.app (in target 'QuickPass' from project 'QuickPass')
    cd /Users/sqtc/Desktop/ekyc-native-app/ios
    export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    
    Signing Identity:     "Apple Development: Samidhya Sarker (66DM5N2A46)"
    Provisioning Profile: "iOS Team Provisioning Profile: com.bcc.quickpass"
                          (50d1bff7-a77b-4ecb-88d2-a0b7620625c6)
    
    /usr/bin/codesign --force --sign BF6FCB75B17E29CD93717001359BB14881C0ED50 --entitlements /Users/sqtc/Library/Developer/Xcode/DerivedData/QuickPass-faybjdvqxbotkeajwmmcoupclnpg/Build/Intermediates.noindex/QuickPass.build/Debug-iphoneos/QuickPass.build/QuickPass.app.xcent --timestamp\=none --generate-entitlement-der /Users/sqtc/Library/Developer/Xcode/DerivedData/QuickPass-faybjdvqxbotkeajwmmcoupclnpg/Build/Products/Debug-iphoneos/QuickPass.app
/Users/sqtc/Library/Developer/Xcode/DerivedData/QuickPass-faybjdvqxbotkeajwmmcoupclnpg/Build/Products/Debug-iphoneos/QuickPass.app: errSecInternalComponent
Command CodeSign failed with a nonzero exit code



** BUILD FAILED **


The following build commands failed:
        CodeSign /Users/sqtc/Library/Developer/Xcode/DerivedData/QuickPass-faybjdvqxbotkeajwmmcoupclnpg/Build/Products/Debug-iphoneos/QuickPass.app (in target 'QuickPass' from project 'QuickPass')
(1 failure)
Build logs written to /Users/sqtc/Desktop/ekyc-native-app/.expo/xcodebuild.log

I then tried to create new signing profiles. Created new CSRs in my device and uploaded them to developer.apple.com and created new development certificates. But the same error occurs.

My device informations:

  • Development machine: macOS Big Sur (11.4)
  • XCode: 13.2.1 (13C100)
  • Device: iOS 14.1

It says that, the app is currently unavailable.

Unable to run react native IOS application on device due to codesign errors
 
 
Q