Post

Replies

Boosts

Views

Activity

Invalid product identifier for IAP on tvOS
I am unable to get In-App Purchases working on a tvOS app target. The IAP SKProductsRequest is successful when running the same code in my iOS target/simulator, but does not work in either a tvOS simulator or physical device. class StoreManager: NSObject, ObservableObject, SKProductsRequestDelegate, SKPaymentTransactionObserver {          //FETCH PRODUCTS     var request: SKProductsRequest!          @Published var premium = SKProduct()          func getProducts() {         print("Start requesting products ...")         let productID = "com.willswire.appname.premium"         let request = SKProductsRequest(productIdentifiers: Set([productID]))         request.delegate = self         request.start()     }          func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {         print("Did receive response")                  if let product = response.products.first {             DispatchQueue.main.async {                 self.premium = product             }         }                  for invalidIdentifier in response.invalidProductIdentifiers {             print("Invalid identifiers found: \(invalidIdentifier)")         }     }          func request(_ request: SKRequest, didFailWithError error: Error) {         print("Request did fail: \(error)")     }          //HANDLE TRANSACTIONS     @Published var transactionState: SKPaymentTransactionState?          func purchaseProduct() {         if SKPaymentQueue.canMakePayments() {             let payment = SKPayment(product: self.premium)             SKPaymentQueue.default().add(payment)         } else {             print("User can't make payment.")         }     }          func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {         for transaction in transactions {             switch transaction.transactionState {             case .purchasing:                 transactionState = .purchasing             case .purchased:                 UserDefaults.standard.setValue(true, forKey: "premium")                 queue.finishTransaction(transaction)                 transactionState = .purchased             case .restored:                 UserDefaults.standard.setValue(true, forKey: "premium")                 queue.finishTransaction(transaction)                 transactionState = .restored             case .failed, .deferred:                 print("Payment Queue Error: \(String(describing: transaction.error))")                 queue.finishTransaction(transaction)                 transactionState = .failed             default:                 queue.finishTransaction(transaction)             }         }     } }
1
0
1.5k
Feb ’22
Do Safari Extensions provide support for .svg toolbar icons?
Do Safari Extensions provide support for .svg icons in the toolbar? According to MDN, extensions should support .svg icons for "default_icon" within the "browser_action" field of the extension manifest. Testing this on Safari 15 (both macOS and iOS) I get the following error in the preferences pane: Failed to load default_icon image for the browser_action or page_action manifest entry. My manifest looks like: "browser_action": {    "default_popup": "popup.html", "default_icon": "images/toolbar-icon.svg" } and I am using a basic SVG exported from SF Symbols 2. Thanks! 😁
1
0
1.1k
Jun ’21
EXC_BAD_ACCESS (SIGSEGV) Crash
My app has been rejected several times by the review process due to a crash error on start. I cannot identify the issue and believe it to be device-specific for the review team member's equipment. Any suggestions on how to attempt debugging this issue? I have tried the instruments/Zombie Objects since it appears to be a memory issue, but cannot come up with a fix. Then again, not sure what it is I need to fix lol. I have deployed/tested this application across multiple iPad/iPhone devices without being able to replicate the crash on my end. Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 (see fully symbolicated crash log below) Crash Log - https://developer.apple.com/forums/content/attachment/ba165980-7fb5-4d53-b91c-397eeff00a50
1
0
1.7k
May ’21