Question

App hangs when starting from xcode

  • 4 January 2023
  • 5 replies
  • 317 views

Badge +4

My app is properly configured in the appstore, but it probably even doesnt matter because it just not start with the flutter purchases package from RevenueCat. XCode hangs after the debug log “DELEGATE SET” from purchases and I can only stop the process. Screenshot attached.

However if I start it from VSCode it runs but nothing is returned from the API like getProducts returns empty list. I can however see entitlements from the getCustomerInfo().

I’m trying to run on Simulator (iPhone 11).

My env is the newest flutter SDK, newest flutter package. I integrated the RC package in Android with no problems at all. iOS seems to be a no go without your assistance.

Hangs on that line as in the picture. Playing again cause restart and the same scenario. 

 


5 replies

Badge +4

I managed to continue the execution and finally got errors in the log. However I can’t paste the log here. The forum reports “Somethings gone wrong”

 

 

Badge +4

So I’ll post only the records regarding the RC package

Badge +4

I have no offerings configured in my dashboard because I don’t need that. I’m just using products on Android.

Badge +4

It seems these are the main issues:

 

2023-01-04 10:18:47.898492+0100 Runner[42584:1383152] [Default] [StoreKit] Failed to get products through appstored in simulator, will try using appstoreagent on host mac:

2023-01-04 10:18:47.901262+0100 Runner[42584:1383150] [Default] Failed in XPC product request [... productslist here ...]: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.storekitservice.sim2host was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.storekitservice.sim2host was invalidated: failed at lookup with error 3 - No such process.}

2023-01-04 10:18:47.904088+0100 Runner[42584:1383152] [Purchases] - DEBUG: ℹ️ Store products request failed! Error: This operation could not be completed. (Error RevenueCat.ProductsFetcherSK2.Error 0.)

2023-01-04 10:18:47.904598+0100 Runner[42584:1383152] [Purchases] - ERROR: 🍎‼️ There was a problem with the App Store.
 

Badge +4

OK, found the probable reason:

When targeting the sandbox environment, the Product.products(for:) method is only supported in simulators when you are running Xcode 13 on macOS 12 Beta 4 or newer.

 

I had to add StoreKit configuration to the Runner scheme in order to be able to get products in the simulator. 

Reply