I have this problem ONLY when debugging Photo Extensions and ONLY since upgrading to Ventura.
Of course I tried all suggestions here:
Developer Mode enabled ➔ Of Course as I can debug everything except Photo Extension
Debug Executable is off, Command Line Tools are set correctly etc. as the only variable was the upgrade from Monterey to Ventura.
I have tried everything I could find on the topic, so I am very grateful for any suggestions!!
All the best
Christoph
Post
Replies
Boosts
Views
Activity
Actually looks like this was a pure debugger problem, in the TestFlight version everything works :)
Ups looks like exactly this exists as MainActor.run :)
Just quickly here is the code how I finally used it. It is based @joosttk approach, but using preference to be changed at any time. Also I added a stroke so it is obvious why the ScrollView should shrink, too.
struct HeightPreferenceKey: PreferenceKey {
typealias Value = CGFloat
static var defaultValue: CGFloat = 40
static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
value = nextValue()
}
}
struct FittedScrollView: View {
static func newString() -> String { String(repeating: "Hello World! ", count: Int.random(in: 1..<35)) }
@State private var contentString = Self.newString()
@State private var contentHeight: CGFloat = 40
var body: some View {
VStack {
ScrollView {
Text(contentString)
.padding(20)
.overlay(
GeometryReader { geo in
Color.clear.preference(key: HeightPreferenceKey.self, value: geo.size.height)
})
}
.frame(maxWidth: 300, maxHeight: contentHeight, alignment: .center)
.padding(20)
.background(RoundedRectangle(cornerRadius: 20).stroke(Color(white: 0.4), lineWidth: 3))
.background(RoundedRectangle(cornerRadius: 20).fill(Color(white: 0.8)))
Button("Next Text", action: { contentString = Self.newString() })
}
.frame(height: 300)
.onPreferenceChange(HeightPreferenceKey.self) {
contentHeight = $0
}
}
}
Hi,
thank you for the responses.
@Calude31 The scenario why I want to shrink it is, that it is an info box. So around the scrollview is a frame, which is super ugly with empty space inside. The idea basically is that in 90% it is no scrollview and only for the few time where the info does not fit on that screen area it would be scrollable. Something quite natural to do with autolayout seems impossible with SwiftUI.
@joosttk Yes, this was the only thing I could think of, however the content is dynamic, too, so instead of onAppear I was consider doing with a preferenceKey and onPreferenceChange. Does not see as a clean way, but I guess it'll have to do :)
Thank you!
All the best
Christoph
Hi,
I have exactly the same question. I am porting a document Mac app to iOS and included fonts on Mac are in the list of downloadable on iOS, however I have no idea how to either trigger the download CTFontManagerRequestFonts just does the generic message nor could I explain to the customer how to install them manually (which at least for Mac new how).
So what does "Downloadable - https://developer.apple.com/fonts/system-fonts/#downloadable" mean?
All the best
Christoph
Hi Arthur,
thank you so much for your response. This does not sound fun, but it's an option. I am a bit disappointed that this technology does not grow faster. To me it's the first time AR could become useful and to be honest Apple should find a way so it works anywhere, the minimum should have been that it works in any City that has been captured in 3D.
Apple should find a new approach here, if they really want to push AR. Even the simplest AR that already is possible on other platforms like AR Navigation is not possible with ARKit yet – I personally think AR out in the real world like pointing with your camera at a church with a Wikipedia app was the first AR experience we had and since then we are supposed to play on a square table instead of continuing with real things – sorry I know RealityKit is amazing, but I am a bit frustrated not being able to implement my app ideas for people here.
All the best
Christoph
Solution: It is autolinked when I use PhotosUI, which is necessary because my app is a Photos Project Extension – it took the reviewer a while to accept, but after contacting other people in Apple it was going through. However the update was delayed for a week and was rejected multiple times for this bogus reason.