InAppPurchase2 crashes at store()

Hi,

I am using ionic v4 and testing it on iphone. I do not have a mac so I am building it on phonegap and deploying to iphone for testing.

I am trying to integrate inapppurchase functionality: hence using inapppurchase2 library.

However, the app crashes at the order() call. I can see the ready method is called after the store is registered. However, the app crashes without giving any error.

Could you please provide my some pointers as to why this might be happening?

The crash with SIGABRT makes it difficult to debug instead of a graceful error message.


    let productID: string = "com.XXX.XXXXX";

    try {                        
        this.iapStore.register({
            id: productID,
            alias: "X",
            type: this.iapStore.NON_RENEWING_SUBSCRIPTION
        });
        
        this.iapStore.when(productID).initiated((p) => {                
            ToastMessage.display("INITIATED");
        });
        
        this.iapStore.when(productID).cancelled((p) => {                
            ToastMessage.display("CANCELLED");
        });
       
        this.iapStore.when(productID).approved((p) => {               
            ToastMessage.display("APPROVED");
        });

        this.iapStore.ready((e) => {
            ToastMessage.display("READY");
            this.iapStore.order(productID);    
        });           
        
        this.iapStore.error((e) => {                
            ToastMessage.display("ERRORINAPP:" + e.code + ": " + e.message);
        });

        this.iapStore.refresh();    

Thanks,

Doug