Question

No console output

  • 6 January 2024
  • 0 replies
  • 11 views

Badge +1

Hi all,

Hi all,

Today, I installed an SDK in my brand new project. After receiving the app API, I configured the instance of Purchases:

Purchases.logLevel = .verbose
Purchases.configure(withAPIKey: "my app api here")

During my first few runs, I noticed that the console outputted a lot of information, which was good. However, after I added the following code, the console stopped outputting anything:

// Using Swift Concurrency
do {
let offerings = try await Purchases.shared.offerings()
// Display current offering with offerings.current
} catch let error {
// handle error
}
// Using Completion Blocks
Purchases.shared.getOfferings { (offerings, error) in
if let offerings {
// Display current offering with offerings.current
}
}

I added print functions in all brackets as a test to see if they would output anything, but they did not. Additionally, all the output that I had seen at the beginning was absent as well. I removed the second block of code (the one with concurrency) to see if I could bring things back to normal, but it still did not output anything.

Here is a list of things I did to try to get any outputs from the SDK:

  1. Uninstalled and reinstalled the SDK, but it didn’t work.
  2. Removed the second block of code (with concurrency), but it didn’t work.
  3. Checked to ensure the API was correct, and it was.
  4. I did not change the value of logLevel. It remained at .verbose the entire time.

0 replies

Be the first to reply!

Reply