Profile Photo
Hi All. Writing a swift iOS app (target iOS 13.1) and wanted to know if AVAudioPlayer or something else would fit these requirements:   - Stream from URL (with auto-reconnect if network hiccups) - Stop and Start button (obviously) - Ability to choose the stop/start button images - Volume slider - Ability to use the switch object to switch… (Show more)
in AVFoundation (Audio)
Profile Photo
Hello,   Given the following example:   let privateKeyA = P521.KeyAgreement.PrivateKey() //Stored locally on device let publicKeyA = privateKeyA.publicKey let publicKeyAString = publicKeyA.rawRepresentation.base64EncodedString() //Stored on the server   My question is how do I later convert the publicKeyAString back into a proper publicKey of… (Show more)
in Security
Profile Photo
What is the work around for Scanner.'scanUpTo(_:into:)' being deprecated in iOS 13.0?
in SwiftUI
Profile Photo
Hello,   I am trying to use an AVAudioPlayer to play a song from iTunes, but I'm having a lot of difficulty.   Whenever I try to do something to my AVAudioPlayer even after giving it a URL, such as pausing it or trying to play at a certain time, my app crashes with EXC_BAD_ACCESS. I've looked online and it seems ike this is because I haven't put… (Show more)
in Swift
Profile Photo
I am playing around with Pinch Gesture for fun to try to learn, however, I do not see my "PINCH" print statement displayed in the console.   Question Why does my print("PINCH") statement not show up in the Console when the code is run? (Note: After the program is running in the simulator, I press the <Option> key and see the two "pinch"… (Show more)
in Swift
Profile Photo
Hi   Since I upgraded to ios13 i have a problem running this piece of code   let text = cell.statusTitleLabel.attributedText as! NSMutableAttributedString… (Show more)
in Text and Fonts
Profile Photo
In Xcode 11 I've created a binary xcframework written Swift. One of the public types that it defines is an enum, and it needs to be usable from Swift and Objecitve-C. So I added the @objc modifier like so:   @objc public enum MyEnum: Int {… (Show more)
in Swift
Profile Photo
Swift app is launching an instance of itself.  When it does that it sets the output using FileHandle(forWritingTo:  & ends up writing to the top of the target file, not appending to the end.   The output is landing in the right file, but at the top.  Any idea why & how this can be fixed ?   do{            let opURL = URL(string:… (Show more)
in Files and Storage
Profile Photo
We used to call [NSJSONSerialization dataWithJSONObject:data options:0 error:&error] directly. If data isn't json convertiable, the call will pass the invalid-json-format-error into the error pointer. That's how we catch the error. But since we update xcode's version to 11 yesterday, we notice some of our test cases failed because for handling… (Show more)
in Cocoa
Profile Photo
Hi, After ios 13 release I retested my app and I am getting an error which was not on previous versions of ios:   Main Thread Checker: UI API called on a background thread: -[UIPageViewController setViewControllers:direction:animated:completion:] and Main Thread Checker: UI API called on a background thread: -[UIPageViewController… (Show more)
in Concurrency
Profile Photo
I'm working on swift code that should create an instance of URLComponents. At one point the instance was successfully created. Now URLComponents always returns nil. I have tried two forms of URLComponents to create the instance.   var urlComps: URLComponents = URLComponents() var urlComps: URLComponents = URLComponents(string: path) where path… (Show more)
in Networking
Load more items