Post

Replies

Boosts

Views

Activity

In Mac Catalyst, what would be the simplest way to hide the title bar but retain its double click functionality?
After adopting sidebar / split view controller support in Mac Catalyst, there are several UI side effects that make the default title bar stick out and look inconsistent. If I hide the title bar however, func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } #if targetEnvironment(macCatalyst) if let titlebar = windowScene.titlebar { titlebar.titleVisibility = .hidden titlebar.toolbar = nil } #endif } the ability to double click the top of the window to maximize it is lost. What would be the simplest approach to have both the hidden appearance, but keep the double click behavior?
0
0
166
2w
How do you configure a document-based SwiftUI multi-platform app to be able to import .log files?
In a new document-based UIKit app, specifying in the Info.plist an import type identifier of public.log that conforms to public.content, public.data, public.item accomplishes this. In a new document-based SwiftUI multi-platform app, doing the same crashed at the DocumentGroup initializer with the error _SwiftData_SwiftUI/Documents.swift:91: Fatal error: The document type is public.log which does not conform to com.apple.package. This initializer expects the document type to be a package.
1
0
299
Mar ’24
How do you start an `SKProductsRequest` in a watchOS app, when the existing product identifiers from the iOS app use a main bundle ID?
I have a watchOS app (not independent) that I'm trying to bring StoreKit support to purchasing subscriptions. When I make my existing StoreKit manager for iOS target watchOS, the productsRequest(_:didReceive:) delegate callback returns an empty response.products array but I don't understand why. One guess as to the cause is that when I initialize the SKProductsRequest, the products identifiers I pass ones with prepended bundle identifiers, which may different between iOS and watchOS? The existing iOS code has the format static let subscriptionKindOne = Bundle.main.bundleIdentifier!.lowercased() + ".subscriptionKindOne" static let subscriptionKindTwo = Bundle.main.bundleIdentifier!.lowercased() + ".subscriptionKindTwo" static let subscriptionKindThree = Bundle.main.bundleIdentifier!.lowercased() + ".subscriptionKindThree" Is this right? If so, what would be the correct way to start a products request on watchOS, so that the SKProductsResponse products array is populated?
0
0
434
Jul ’23
Invalid `Podfile` file: cannot load such file -- cocoapods-catalyst-support
I encountered this error 2023-01-24T22:14:41.500565325Z Installing ri documentation for cocoapods-catalyst-support-0.2.1 2023-01-24T22:14:41.500827390Z Done installing documentation for colored2, concurrent-ruby, i18n, tzinfo, zeitwerk, activesupport, nap, fuzzy_match, httpclient, algoliasearch, ffi, ethon, typhoeus, netrc, public_suffix, addressable, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-trunk, cocoapods-try, molinillo, atomos, nanaimo, rexml, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods, cocoapods-catalyst-support after 50 seconds 2023-01-24T22:14:41.500997230Z 35 gems installed 2023-01-24T22:14:42.023353910Z [in /Volumes/workspace/repository] 2023-01-24T22:14:42.023798292Z 2023-01-24T22:14:42.024448317Z [!] Invalid `Podfile` file: cannot load such file -- cocoapods-catalyst-support. 2023-01-24T22:14:42.024714192Z 2023-01-24T22:14:42.024976712Z # from /Volumes/workspace/repository/Podfile:1 2023-01-24T22:14:42.025200239Z # ------------------------------------------- 2023-01-24T22:14:42.025463448Z > require 'cocoapods-catalyst-support' 2023-01-24T22:14:42.025663811Z # 2023-01-24T22:14:42.025900158Z # ------------------------------------------- from my post-clone script, which is #!/bin/sh # ci_post_clone.sh export GEM_HOME="$HOME/.gem" gem install bundler brew install cocoapods gem install cocoapods-catalyst-support # Install dependencies managed with CocoaPods. pod install
2
0
3.5k
Jan ’23
"Portrait-only" app presenting a landscape-only modal. What is the recommended way to do this and have a seamless modal dismissal?
override var supportedInterfaceOrientations: UIInterfaceOrientationMask { return [.landscapeRight, .landscapeLeft] } My modal view controller overrides this property, as its a complex custom video player that needs to be restricted to landscape. However, when it's dismissed, there is a jarring bug in the transition where the presenting VC is portrait in the device's landscape state for a second while half of the screen is black. It returns to normal (portrait) after a second, but I would like to avoid this transition bug. What might I be missing as to the root cause, or recommended way to have a portrait app (set in project navigator) present a landscape-only view controller?
0
0
610
Dec ’22
`Undefined symbol: _OBJC_CLASS_$_DDLog` when trying to run unit tests with Simulator target
On Xcode 13.4.1, when specifically trying to run unit tests, I get an error Undefined symbol: _OBJC_CLASS_$_DDLog. After clicking on it in the Issue navigator, a longer error message says Undefined symbols for architecture arm64:   "_OBJC_CLASS_$_DDLog", referenced from:       objc-class-ref in How might I fix this? I tried running both Xcode and the Simulator in Rosetta, but I get the same error message but for x86.
1
0
5.0k
Sep ’22