Post

Replies

Boosts

Views

Activity

Image Playground Error: Cannot find protocol declaration for 'ImageGenerationViewControllerDelegate'
@available(macCatalyst 18.1, *) @available(iOS 18.1, *) extension CKImageSelectionManager: ImagePlaygroundViewController.Delegate { public func imagePlaygroundViewController(_ imagePlaygroundViewController: ImagePlaygroundViewController, didCreateImageAt imageURL: URL) { } func presentImagePlayground() { let imagePlaygroundVC = ImagePlaygroundViewController() // Set delegate to self to receive the callback imagePlaygroundVC.delegate = self imagePlaygroundVC.isModalInPresentation = true // Prevents dismissal with swipe if needed self.delegate?.presentImageSelectionViewController(imagePlaygroundVC) } } This generates an error in the xcode generated swift header.
0
0
218
2w
Links in AttributedString Markdown fail to load
I am using a AttributedString for markdown. When I add the attributed text, it previews correctly. However, when tapping on the URL it fails to load. Bug or not? I'll post a feedback if so. class ViewController: UIViewController { let string = """ **Thank you** and please _visit_ our [Website](https://www.website.com). ```for item in items``` ```let item one be something``` ```end``` ~~Strikethrough~~ """ @IBOutlet weak var label: UILabel! override func viewDidLoad() { super.viewDidLoad() if let attributedText = try? NSMutableAttributedString(markdown: string, options: AttributedString.MarkdownParsingOptions(interpretedSyntax: .inlineOnlyPreservingWhitespace)) { let range = NSRange(location: 0, length: attributedText.mutableString.length) attributedText.addAttribute(NSAttributedString.Key.font, value: UIFont.preferredFont(forTextStyle: .title3), range: range) label.attributedText = attributedText } } }
3
0
1.8k
Sep ’21
Catalyst app throws error in Big Sur beta 6 when trying to start from Xcode beta 6
When I try to start catalyst app in Big Sur B6, this error is immediately throw. Tested two differing apps on two differing Macs. The operation couldn’t be completed. (OSStatus error -10670.) Domain: NSOSStatusErrorDomain Code: -10670 User Info: {   "LSFunction" = "LSOpenStuffCallLocal";   "_LSLine" = 3664; }-System InformationmacOS Version 11.0 (Build 20A5364e) Xcode 12.0 (17210.1)
7
0
2.5k
Sep ’20
Receipt Validation fails on Catalyst, but works on iOS
I can easily verify the on device receipt hash using OpenSSL on iOS. However, it's failing on Catalyst.The following code chunk works perfectly on iOS and has for several years. I reported this: FB7470452- (BOOL)verifyReceiptHash{ NSUUID *uuid = [UIDevice currentDevice].identifierForVendor; unsigned char uuidBytes[16]; [uuid getUUIDBytes:uuidBytes]; NSMutableData *data = [NSMutableData data]; [data appendBytes:uuidBytes length:sizeof(uuidBytes)]; [data appendData:self.opaqueValue]; [data appendData:self.bundleIdentifierData]; NSMutableData *expectedHash = [NSMutableData dataWithLength:SHA_DIGEST_LENGTH]; //20 SHA1((const uint8_t*)data.bytes, data.length, (uint8_t*)expectedHash.mutableBytes); return [expectedHash isEqualToData:self.receiptHash];}I'm not certain [UIDevice currentDevice].identifierForVendor is returning the correct UUID. Even when using a chunk of code to get the correct UUID (matches up in with system information), the verify still fails.Is there something special about Catalyst?
1
0
1.1k
Nov ’19