Posts

Post marked as solved
1 Replies
0 Views
Turns out that the NSSecureCoding content was the URL, but in hexadecimal. Here's how I'm converting it to String: let urlHex = dict.debugDescription .replacingOccurrences(of: "Optional(", with: "") .replacingOccurrences(of: ")", with: "") .replacingOccurrences(of: "<", with: "") .replacingOccurrences(of: ">", with: "") .replacingOccurrences(of: " ", with: "") guard let urlHexData = Data(fromHexEncodedString: urlHex) else { return } guard let url = String(data: urlHexData, encoding: .utf8) else { return } extension Data { // From http://stackoverflow.com/a/40278391 init?(fromHexEncodedString string: String) { func decodeNibble(u: UInt16) -> UInt8? { switch(u) { case 0x30 ... 0x39: return UInt8(u - 0x30) case 0x41 ... 0x46: return UInt8(u - 0x41 + 10) case 0x61 ... 0x66: return UInt8(u - 0x61 + 10) default: return nil } } self.init(capacity: string.utf16.count/2) var even = true var byte: UInt8 = 0 for c in string.utf16 { guard let val = decodeNibble(u: c) else { return nil } if even { byte = val << 4 } else { byte += val self.append(byte) } even = !even } guard even else { return nil } } }
Post marked as solved
3 Replies
0 Views
Now on iOS 15.0+ you can initialize a button with the ButtonRole .destructive: Button(role: .destructive, action: { print(""}) { Label("Delete", systemImage: "trash") }
Post not yet marked as solved
4 Replies
0 Views
I have exactly the same problem. Have you found a way to express this?
Post not yet marked as solved
28 Replies
0 Views
I have seen similar issues when sharing from the Music app. Some users reported that my action extension disappeared from the share sheet, and the only way to make it reappear is to restart the phone.
Post not yet marked as solved
1 Replies
0 Views
I think this is a Catalyst bug, as I'm also encountering this same situation: didUpdateLocations is never called. Here I'm using it inside the main app, so I don't think it has something to do with Widgets.
Post not yet marked as solved
9 Replies
0 Views
Thanks for the update @JoeKun! I'll wait for the fix to be deployed. In the meantime, please let me know if you need more details about the problem, or if I can help in any other way. Thanks!
Post marked as solved
5 Replies
0 Views
I was able to fix this by turning the App Groups capability off and on on all of my app target's on the Signing &amp; Capabilities tab on Xcode.
Post not yet marked as solved
1 Replies
0 Views
This suddenly started to happen with me too, a few days ago. Have you been able to find a solution?
Post not yet marked as solved
1 Replies
0 Views
Just a few more details: I found that disabling autoresizing mask and setting individual constraints on the collection view fixes the problem: private func configureHierarchy() { &#9;&#9;collectionView = UICollectionView(frame: view.bounds, collectionViewLayout: createLayout()) &#9;&#9;collectionView.delegate = self &#9;&#9;collectionView.translatesAutoresizingMaskIntoConstraints = false &#9;&#9;view.addSubview(collectionView) &#9;&#9;NSLayoutConstraint.activate([ &#9;&#9;&#9;&#9;collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor), &#9;&#9;&#9;&#9;collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor), &#9;&#9;&#9;&#9;collectionView.topAnchor.constraint(equalTo: view.topAnchor), &#9;&#9;&#9;&#9;collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor) &#9;&#9;]) } Not sure thought if this is how it was supposed to work, or if it's a bug with the .flexibleWidth autoresize mask. The only thing that still bothers me is that it takes a while for the collection view to assume the .sidebar appearance. When opening the app for the first time, it seems that the collection view has the .sidebarPlain appearance, and then it changes to .sidebar. But I am initializing the layout list configuration with the .sidebar, so not sure why this happens.
Post marked as solved
2 Replies
0 Views
That was it, thank you so much!
Post not yet marked as solved
5 Replies
0 Views
Same here... It works as expected on iOS 12.4.