Post

Replies

Boosts

Views

Activity

iOS 18 changes the order of Document-based SwiftUI document reading and view loading?
It looks like iOS 18 app changed the way document-based SwiftUI apps function in a way that breaks our app. Previously, a ReferenceFileDocument would run its init(configuration:) function before any SwiftUI views would load. Now, it runs it after SwiftUI views load and their onAppear modifiers run. Because we use a reference-type data model, our views reference a different object than the one loaded from our document's content. Much of our app's functionality is broken, and file saving doesn't work (because the data model writing to disk isn't connected to the views) I filed a bug report, but this seems like a wild change that should affect more than just us. It wasn't happening earlier in the iOS betas. It feels like it only got added in the last beta, but I'm not sure. Has anyone else run into this, or have any guidance for how best to deal with this?
3
2
224
Sep ’24
Getting ERROR ITMS-90345 when trying to submit to TestFlight
I'm build an iOS 15 app in Xcode 13 and whenever I try to submit to the App Store for TestFlight testing I get the following error: ERROR ITMS-90345: "Metadata/Info.plist Mismatch. The value for bundle_identifier in the metadata.xml file does not match the value for CFBundleIdentifier in xxxxx [Payload/xxxxx.app]." (App name removed because it doesn't matter) Based on some other forum answers, I doubled checked that there are no spaces in the bundle ID, and have tried repeatedly re-typing it, and copy and pasting it from an alternate version of the project that used to submit to TestFlight fine, but nothing has worked. Honestly, I have no idea where metadata.xml lives or how to even check what value is in it, which is part of the problem. Any advice or guidance here would be greatly appreciated, because I'm not sure what else I can do at this point, other than throwing everything away and starting over in Xcode 12 and iOS 14. Thanks!
3
0
2.9k
Jun ’21
Safari Extensions Gallery not working
With Safari Version 13.0 (15608.1.24.40.4) I can't install any Safari Extensions from the Safari Extensions Gallery (https://safari-extensions.apple.com). There's supposed to be an "Install" button on an extension's page, but none is visible. The only apps currently installed on this machine are Xcode, 1Password, and Slack.I've tried changing the user agent to 10.14's but that hasn't worked.Googling this problems shows it's happened with other OS releases, but there hasn't been any confirmed resolution to it. It's super frustrating.Unfortunately the extensions I want aren't available in the Mac App Store, so this is the only way I can install them. Any ideas?
3
0
2.1k
Jun ’19
Why is applyFontTraits missing from UIKit?
On macOS, NSMutableAttributedString has the function applyFontTraits, which allows you to easily add or remove bold and italics from the attributed string (or a substring of it), but this function is missing from UIKit, and always has been. This is very strange, because it's trivial to add this back in via an extension on NSMutableAttributedString in UIKit. Is there an explanation for why this isn't included in UIKit? What's the thinking here? In case anyone needs it, this code adds this functionality back into UIKit: #if canImport(UIKit) import UIKit public struct NSFontTraitMask: OptionSet {   public let rawValue: Int   public static let boldFontMask = NSFontTraitMask(rawValue: 1 << 0)   public static let unboldFontMask = NSFontTraitMask(rawValue: 1 << 1)   public static let italicFontMask = NSFontTraitMask(rawValue: 1 << 2)   public static let unitalicFontMask = NSFontTraitMask(rawValue: 1 << 3)   public static let all: NSFontTraitMask = [.boldFontMask, .unboldFontMask, .italicFontMask, .unitalicFontMask]   public init(rawValue: Int) {     self.rawValue = rawValue   } } extension NSMutableAttributedString {   public func applyFontTraits(_ traitMask: NSFontTraitMask, range: NSRange) {     enumerateAttribute(.font, in: range, options: [.longestEffectiveRangeNotRequired]) { (attr, attrRange, stop) in       guard let font = attr as? UIFont else { return }       let descriptor = font.fontDescriptor       var symbolicTraits = descriptor.symbolicTraits       if traitMask.contains(.boldFontMask) {         symbolicTraits.insert(.traitBold)       }       if symbolicTraits.contains(.traitBold) && traitMask.contains(.unboldFontMask) {         symbolicTraits.remove(.traitBold)       }       if traitMask.contains(.italicFontMask) {         symbolicTraits.insert(.traitItalic)       }       if symbolicTraits.contains(.traitItalic) && traitMask.contains(.unitalicFontMask) {         symbolicTraits.remove(.traitItalic)       }       guard let newDescriptor = descriptor.withSymbolicTraits(symbolicTraits) else { return }       let newFont = UIFont(descriptor: newDescriptor, size: font.pointSize)       self.addAttribute(.font, value: newFont, range: attrRange)     }   } } #endif
1
0
1.3k
Nov ’20