Posts

Post not yet marked as solved
1 Replies
2.6k Views
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!
Posted
by nima.
Last updated
.
Post not yet marked as solved
3 Replies
2.0k Views
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?
Posted
by nima.
Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
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
Posted
by nima.
Last updated
.