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?
Post
Replies
Boosts
Views
Activity
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.
I created a distinct icon set for visionOS, and specified its name in build settings. This is a Designed for iPad app. When I run it in the simulator, only the existing app icon shows. Is this supported for existing iPad apps, or am I missing something? There are no warnings in the asset catalog for this.
After adding a native Mac target (SwiftUI Multiplatform + AppKit) to an iOS app, I get this compiler error. Does this require moving off of XIBs entirely, or is there something else I can do to resolve this error?
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?
What is the recommended way to assign an optional Swift property a decoded primitive with `NSCoder`?
For an example like:
someOptionalDouble = aDecoder.decodeDouble(forKey: "SomeKey")
I'm not sure how to avoid a crash if the double was encoded as nil, while also avoiding Apple's console warning that decoding primitives as an object will become an error in the future.
For previous iOS versions, what would be a good approach to this?
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
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?
I can only select a tab bar button item. Then, CPU usage spikes to 100%-200% and I can no longer do anything like tapping a cell or scrolling. Any thoughts on the potential cause, fix, or a workaround? This happens with both devices and simulators.
My company has all iOS commit pushes broadcast build failures in Slack, and I'd rather not dump a bunch of these there while I work to resolve Xcode Cloud build failures unique to its temporary build environment.
I'm debugging an issue where the device unexpectedly turns to landscape and back to portrait orientation, and trying to find the root cause of it.
Why did Apple deprecate bitcode?
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.
Does Apple have Xcode Cloud sample code, or any sample code that contains tests?