Posts

Post not yet marked as solved
0 Replies
263 Views
Hi, I'm trying to get this example working on MacOS now that SFSpeechRecognizer is available for the platform. A few questions ... Do I need to make an authorization request of the user if I intend to use "on device recognition"? When I ask for authorization to use speech recognition the dialog that pops up contains text that's not in my speech recognition usage description indicating that recordings will be sent to Apple's servers. But that is not accurate if I am using on device recognition (as far as I can tell). Is there a way to suppress that language if I am not using online speech recognition? Is there an updated example of the article I linked to that describes how to accomplish the same thing with MacOS instead of IOS? My compiler is complaining that AVAudioSession() is not available in MacOS and I'm not sure how to set things up for passing audio from the microphone to the speech recognizer. Thanks :-D Brian Duffy
Posted
by brduffy.
Last updated
.
Post not yet marked as solved
8 Replies
984 Views
My IAP submission has had a status of "processing" for 4 days now. Should I be concerned? I can't delete the IAP and start again. Also, I'm confused about whether I can successfully submit IAP's without submitting the app itself. I want to test downloading hosted content before submitting the app. ThanksBrian Duffy
Posted
by brduffy.
Last updated
.
Post not yet marked as solved
0 Replies
331 Views
Hi,I have been testing an IAP in my app. The payment succeeds but when I test the count property on transaction.downloads it is 0. I have uploaded my content for the product and the product shows the content package date and time of upload in the details on App Store Connect. I didn't have any trouble uploading the product according to these instructions ... https://codingexpedition.wordpress.com/2017/11/10/how-to-upload-ios-in-app-purchase-content-using-xcode-9-1/My IAP's status are "Waiting for Upload" (I don't know if that makes any difference). I don't want to submit the app or the IAP's for review before testing the download of hosted content. Any ideas?ThanksBrian Duffy/// Extends StoreObserver to conform to SKPaymentTransactionObserver.extension StoreObserver: SKPaymentTransactionObserver { /// Called when there are transactions in the payment queue. func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { for transaction in transactions { switch transaction.transactionState { case .purchasing: break // Do not block your UI. Allow the user to continue using your app. case .deferred: print(Messages.deferred) // The purchase was successful. case .purchased: handlePurchased(transaction) print("success") if transaction.downloads.count > 0 { print("downloadable") // Can't see the hosted content here for some reason !!!!!!!!!!!!!!! } // The transaction failed. case .failed: handleFailed(transaction) print("failure") // There are restored products. case .restored: handleRestored(transaction) @unknown default: fatalError("\(Messages.unknownDefault)") } } } /// Logs all transactions that have been removed from the payment queue. func paymentQueue(_ queue: SKPaymentQueue, removedTransactions transactions: [SKPaymentTransaction]) { for transaction in transactions { print ("\(transaction.payment.productIdentifier) \(Messages.removed)") } } /// Called when an error occur while restoring purchases. Notify the user about the error. func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) { if let error = error as? SKError, error.code != .paymentCancelled { DispatchQueue.main.async { self.delegate?.storeObserverDidReceiveMessage(error.localizedDescription) } } } /// Called when all restorable transactions have been processed by the payment queue. func paymentQueueRestoreCompletedTransactionsFinished(_ queue: SKPaymentQueue) { print(Messages.restorable) if !hasRestorablePurchases { DispatchQueue.main.async { self.delegate?.storeObserverDidReceiveMessage(Messages.noRestorablePurchases) } } }}
Posted
by brduffy.
Last updated
.
Post marked as solved
2 Replies
1.1k Views
HI,My project bypasses storyboards, I like to keep everything in code that I write myself. Can SwiftUI be used this way? Also, how powerful is SwiftUI? Is it just for writing simple user interfaces or can it be used to write highly customized ones that rival a programatic approach?ThanksBrian Duffy
Posted
by brduffy.
Last updated
.
Post marked as solved
3 Replies
4.8k Views
Hi,Apples IOS file system recommendations suggest putting user generated files into the Documents directory. My app allows users to create files so I want to do this, but I noticed that the Files app included with IOS gives users access to those files from outside of the user interface of my app. That's a problem for me because some of my user files depend on other user files and I need to know if they have been removed. Are the files in the Documents folder automatically made available to the Files app or can I can control whether or not they are available?ThanksBrian
Posted
by brduffy.
Last updated
.
Post marked as solved
2 Replies
2k Views
Hi,I'm having trouble figuring out how to use this function to get the available disk space on my iphone. I just don't know how to populate the "fromBookmarkData:" parameter. I can't find an example of it in use anywhere. Here is what I have so far ...if itemsArray[indexPath.row].fileSize > URL.resourceValues(forKeys: [URLResourceKey.volumeAvailableCapacityForImportantUsageKey] ,fromBookmarkData: <#Data#>) { // alert user not enough space for file return }Thanks
Posted
by brduffy.
Last updated
.