Post

Replies

Boosts

Views

Activity

Reply to How to track down "precondition failure: attribute failed to set an initial value: ???" errors?
It seems there are numerous possible causes for this error (which is indicated by various error codes under precondition failure... I was able to eliminate one cause: NavigationView should be inside the GeometryReader, not outside. So if possible, wrap the GeometryReader around the top level view wherever this is possible. Of course, this is no fix for crashed under WatchOS because NavigationView is not available.
Aug ’20
Reply to Xcode 12 Framework: 'Double-quoted include in framework header, expected angle-bracketed instead'
I encountered the same issue but the compiler throws errors, not just warnings, so the build fails. I use Firebase which is at least partially written in objective-c. The errors occur in the nanopb-umbrella.h header file in the pod nanopb which is apparently a dependency of GoogleDataTransport which is in itself a dependency of Firebase. When I replace the import header angle brackets with quotes, the compiler complains that the quotes should be replaced with angled brackets. No idea how to resolve this issue. I created a test project in Xcode 12 (the other one I began with Xcode 11 and I would like to continue supporting iOS 13 for a while..) and added all Firebase pods. The project builds without any problem. When I check the nanopb-umbrella.h file... I find quotes instead of angled brackets! I tried to replace angled brackets with double quotes manually, but then the build fails again and the errors say 'expected angled brackets instead'. Very contradictory indeed.... Any hints in the right direction would be welcome.
Aug ’20
Reply to Xcode 12 Framework: 'Double-quoted include in framework header, expected angle-bracketed instead'
This finally helped to solve the issue: rm -rf ~/Library/Developer/Xcode/DerivedData/ rm -rf ~/Library/Caches/CocoaPods/ pod deintegrate pod update https://stackoverflow.com/questions/58540898/update-my-pod-causes-error-in-googledatatransport-umbrella-header Although my app builds now in Xcode 12 beta 5, there are a lot of runtime errors suddenly that did not occur under Xcode 11.6... ok, this is a bit off-topic here.
Aug ’20
Reply to Snapshot of a SwiftUI View
I'd recommend combining these two approaches, worked like magic for me. type the following in youtube search(Apple doesn't let me post the youtube link here): "Hack screen capture to take photo of web info easily on your app | SwiftUI" Use the background modifier shown in the video, it's a great idea. Use the View and UIView extensions from this source: https://gist.github.com/SatoTakeshiX/39e111aa93f896e58c74fdc13d19ba0a
Sep ’20
Reply to Can't build to simulator on Apple Silicon
Same issue. My project which has Firebase dependencies runs fine on a physical device. To make it run in the simulator, I have to run Xcode with Rosetta 2. What I don't quite grasp (maybe someone can enlighten me): the Simulator should run on the arm64 architecture on an M1 mac, right? So why do I have to exclude arm64 in my project for the iOS Simulator if I run it on an M1 mac? It makes sense if Xcode (and probably the simulator) run in Rosetta 2 and also if Xcode is running on an Intel Mac - because then the instructions for x86 are executed.
Dec ’20