IAP & app crash

I followed a YouTube video to make IAP in my app. My IAP is to enable the user to buy the game currencies. I ran my app. I opened the store page. When I clicked "Buy" button, app crashes. That button is used to show the page of purchase successful or failed. I haven't turn on the "In app purchase" in Xcode capabilities. And I

got this messages in iTunes Connect in app purchase section of product:"Your first In-App Purchase must be submitted with a new app version. Select it from the app’s In-App Purchases section and click Submit. Once your binary has been uploaded and your first In-App Purchase has been submitted for review, additional In-App Purchases can be submitted using the table below." And the status of the IAP product is "ready to submit". Please help me. Thanks

Replies

_product.productID = @"Product ID in iTunes Connect";
   
    [[SKPaymentQueue defaultQueue] addTransactionObserver:_product];
    [_product getProductID:self];

I wrote this code in an IBAction of the button which will make the app crashes when I click it. When I deleted this code, app works fine. So I think problem is in this code.

I've fixed the crash. But I got "Products not found:product identifier" in the log when I open the page. Please help. Thanks.