Unable to install App on phone

I am currently working on an Xcode application to which I was given the provisioning profiles to. I installed a dev and dist profile on Xcode and also was give a certificate to run the app on my phone. Now, when I try to run the application on my phone it gives me this error. Unable to install "Carebit"

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402620395

--

A valid provisioning profile for this executable was not found.

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402620395

User Info: {

    DVTRadarComponentKey = 487925;

    MobileDeviceErrorCode = "(0xE8008015)";

    "com.apple.dtdevicekit.stacktrace" = (

0   DTDeviceKitBase                     0x000000011d95de98 DTDKCreateNSErrorFromAMDErrorCode + 272

1   DTDeviceKitBase                     0x000000011d999898 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 160

2   DVTFoundation                       0x0000000103213644 DVTInvokeWithStrongOwnership + 76

3   DTDeviceKitBase                     0x000000011d9995e4 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1316

4   IDEiOSSupportCore                   0x000000011d813d40 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.294 + 2928

5   DVTFoundation                       0x000000010333c814 __DVT_CALLING_CLIENT_BLOCK__ + 16

6   DVTFoundation                       0x000000010333e238 __DVTDispatchAsync_block_invoke + 680

7   libdispatch.dylib                   0x000000019f8fa128 _dispatch_call_block_and_release + 32

8   libdispatch.dylib                   0x000000019f8fbec0 _dispatch_client_callout + 20

9   libdispatch.dylib                   0x000000019f9036a8 _dispatch_lane_serial_drain + 620

10  libdispatch.dylib                   0x000000019f9042a4 _dispatch_lane_invoke + 404

11  libdispatch.dylib                   0x000000019f90eb74 _dispatch_workloop_worker_thread + 764

12  libsystem_pthread.dylib             0x000000019faa789c _pthread_wqthread + 276

13  libsystem_pthread.dylib             0x000000019faa65d4 start_wqthread + 8

);

}

--

System Information

macOS Version 11.4 (Build 20F71)

Xcode 12.5 (18205) (Build 12E262)

Timestamp: 2021-06-17T12:39:40-04:00

Similarly, if I try to run the app on a simulator on my M1 Macbook air instead of my phone it gives me this error.

Unable to install App on phone
 
 
Q