|
KidDynamite posted:What makes you say that? They started shipping in Xcode 13.3 beta 1 I think.
|
# ¿ Feb 1, 2022 18:15 |
|
|
# ¿ May 15, 2024 15:52 |
|
Pulcinella posted:Is there an easy way to determine the the origin of a CALayer is top left (e.g. UIKit) or bottom left (e.g. AppKit)? I’m doing some custom CAShapeLayers and custom corner clipping and I just realized that For a CACornerMask, .minXMinY is top left on iOS and bottom left on macOS (unless it’s a catalyst app). I’d like to avoid compiler statements and not have to: Aside from flipping the layer on Mac (which is probably what I'd do (and I don't know a better way than setting that property, you could maybe define your own factory method on each layer type and set the property as appropriate?)), you could move the #if into an extension property on CACornerMask. e.g. Swift code:
|
# ¿ Feb 7, 2022 04:49 |
|
luchadornado posted:Posting here since I couldn't figure a better place: I want to make a TUI (probably prototyping with Python's Rich library or similar). Making an iOS app is out of the question for the short time frame I've given myself. Pythonista is a Python environment that's been around forever and still seems updated. Blink, maybe, for ssh? I don’t have enough experience with either to give a proper recommendation.
|
# ¿ Mar 21, 2022 20:29 |
|
Or delete the typealias and see if it can be inferred?
|
# ¿ Mar 30, 2022 15:57 |
|
No idea but have some uninformed flailing: is the header ever included or imported in a non-c++ context (don't forget about bridging headers)? Does renaming it to .hpp change anything?
|
# ¿ Apr 29, 2022 18:28 |
|
uncle blog posted:About to get a new Mac from work. Going to be a Pro with M1-something. How important are the gpu cores when running live previews in SwiftUI? My current one is rear end slow. And what other specs should I aim for on a machine made to develop both iOS and web, and often running some Docker containers/local dev env, and maybe the occasional game? I haven't done any research or anything, but my answers are: gpu cores won't make any noticeable difference; more memory is maybe better otherwise no noticeable difference.
|
# ¿ May 11, 2022 14:55 |
|
Can you make a proper initializer for MyView that takes a Coordinator, then initialize the view model from there? (Though I'm not sure if the AppData instance is available at that point.)
|
# ¿ Jun 3, 2022 14:22 |
|
KidDynamite posted:am i burnt out or was wwdc kind of meh this year? I'm feeling more sad about "looking forward to using this in a few years when I bump a min sdk requirement" than usual, which is maybe a sign that I'm more excited about what I've seen so far.
|
# ¿ Jun 10, 2022 19:12 |
|
rip Three20 framework
|
# ¿ Jun 11, 2022 00:57 |
|
KidDynamite posted:hey I have 3k I can spend and get reimbursement from work. What swift resources would y’all spend this money on? Bonus points if it will help land a new job. Donny Wals has a couple books. I've not read them but their blog is great, so maybe worth a look.
|
# ¿ Jul 19, 2022 15:43 |
|
uncle blog posted:If I revoke my Development and Distribution certificates, apps already on the App Store will be unaffected? Correct.
|
# ¿ Aug 16, 2022 13:58 |
|
Shortest answer is define your own init and call the designated super.init, which is probably init(configuration:delegate:delegateQueue:). Maybe better answer is make a protocol Session, declare the methods of URLSession that you use, then conform URLSession to it. Make your MockSession conform to the protocol instead of subclassing. Then have your ApiClient take an instance of the protocol instead of a URLSession.
|
# ¿ Aug 23, 2022 15:53 |
|
Small White Dragon posted:I've been out of the iOS game for a while, and I have a Xamarin app that runs fine on iOS. A launch storyboard is required. I don't know if you can supplement it with launch images and if so for what resolutions. You can hide the iPad status bar. When it's visible, there are buttons in it (back button in top left (after following a link to another app) and multitasking button in the middle), but I don't know what happens to touches in the foreground app. If you've been out long enough that you're not sure what the safe area is, that might be useful reading to help arrange views up there. https://useyourloaf.com/blog/safe-area-layout-guide/ looks like a decent summary.
|
# ¿ Sep 28, 2022 07:53 |
|
SaTaMaS posted:How do you make a deep copy of a Set in Swift? I'm trying to transfer a Set containing a Core Data relationship from one thread to another, and I'm getting a Core Data error which I'm pretty sure is because of the bridged NSSet reference hiding in the Set type. You don't need a deep copy, you need a shallow copy Probably the best way overall would be to take a set of managed object IDs from the source thread and reify them back into managed objects on the destination thread: Swift code:
Swift code:
|
# ¿ Oct 8, 2022 17:11 |
|
101 posted:Welp, I got an offer I couldn't refuse from a company whose app is built entirely in SwiftUI. Guess I'm gonna have to get to grips with it. Congrats! Also lol
|
# ¿ Oct 24, 2022 21:55 |
|
Small White Dragon posted:Is Xcode 14.1 not out yet? I wasn't sure if upgrading to iOS 16.1/iPad OS 16.1 would cause issues with Xcode 14.0. I saw the 14.1 release candidate was out end of last week (by which I mean it was available in whatever feed the Xcodes app polls, idk about App Store). Heads up though it has a Swift Concurrency bug that wrecks the AsyncSequence backport, if you have any iOS devices <15 you'll wanna keep Xcode 14.0.1 around still.
|
# ¿ Oct 25, 2022 02:51 |
|
Plorkyeran posted:There's a second Xcode 14.1 RC out so I guess there was a problem with the first. https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes mentions some concurrency issues. Nothing about AsyncStream though, wonder if that's fixed too. I'll try it out!
|
# ¿ Oct 25, 2022 20:43 |
|
pokeyman posted:https://developer.apple.com/documentation/xcode-release-notes/xcode-14_1-release-notes mentions some concurrency issues. Nothing about AsyncStream though, wonder if that's fixed too. I'll try it out! This was indeed fixed. 14.1RC2 is a winner!
|
# ¿ Oct 26, 2022 18:41 |
|
I agree with your coworker, even if it looks like it works now I wouldn't assume it holds up. Unfortunately I don't know of another way. I'm not sure what exactly is preventing you from adding the UIHostingController as a child. Could you change your method to return a UIViewController and wrap other returned views in one? Or return an enum with distinct view and view controller cases?
|
# ¿ Nov 1, 2022 17:19 |
|
uncle blog posted:Thanks for the clarifications/tips. Ended up redoing the view in UIKit. Was a small and easy view, but I was a bit excited to contribute my first piece of SwiftUI. There is some new api in iOS 16 (I think) that makes it easy to vend SwiftUI views as collection/table view cells, which is way nicer than trying to wedge a view controller in every cell. So maybe you'll have more opportunities soon!
|
# ¿ Nov 2, 2022 18:47 |
|
If you get really stuck, could put the header in its own section?
|
# ¿ Nov 3, 2022 04:57 |
|
I've seen that console message but didn't associate it with prolonged launch times. I'll try to keep an eye out!
|
# ¿ Nov 11, 2022 01:37 |
|
I don't have an answer, though I suspect part of the puzzle is conformance to Collection.
|
# ¿ Nov 30, 2022 03:48 |
|
carry on then posted:I'm an idiot novice with Swift development and my little side project has already run into yak shaving hell. I'm writing a small command-line utility in Swift with Xcode and I want to use the ArgumentParser package. Is it possible to get Xcode to statically link a Swift package into a command-line tool project? The way it sets everything up is dynamic linking but that means if I want to run the tool outside Xcode it won't work without me putting the framework in one of the system locations. I'm not planning on distributing this anywhere but I wanted to at least build a single executable so I could send it around if I wanted. I don't know a direct way. I wonder if you could define a static library target that depends on ArgumentParser, then have your executable depend on that intermediary library? May need to stick an Swift code:
|
# ¿ Dec 3, 2022 23:40 |
|
Cup Runneth Over posted:If I want an upcycled Mac to compile for OSX on do I just buy the cheapest one I can find or is there a cutoff year for being able to compile something modern Macs can run? I won't be programming on it, just need Apple silicon for compilation. Any Apple Silicon Mac will work, the oldest is only a couple years old.
|
# ¿ Dec 30, 2022 02:39 |
|
Small White Dragon posted:EDIT: Also, I assumed that "UISupportsTrueScreenSizeOnMac" flag means iOS app windows can be resized but I guess not? I believe you also need to opt out of (or not opt in to, I forget which) requiring full screen. It's the same Info.plist key that makes your app usable in Split View on an iPad.
|
# ¿ Jan 16, 2023 07:58 |
|
Are there any other errors? It's possible it's a constraint issue but I wonder if that console spew is overshadowing something else. I wouldn't expect a JSON blob to be shareable as an image, but I would expect the activity view controller to appear nonetheless even if it doesn't offer many actions. I think if you set the Info.plist keys for "allows iTunes document sharing" and "opens files in place" then your app's Documents directory will appear in the Files app. You could save images that way?
|
# ¿ Mar 8, 2023 02:04 |
|
JSONEncoder.encode() returns a Data, which you're putting into your dictionary. Try encoding the whole dictionary:Swift code:
|
# ¿ Apr 4, 2023 20:40 |
|
getImage (conceptually) returns an immutable copy of the struct. So you can't call a mutating method directly on it, and if you took a mutable copy (i.e. assigned the return value to a var) it wouldn't help you because it's a copy. I would use the updateState method you added to ImagesViewModel. Though I wonder if you'll have the same problem in its implementation? You may need to switch to using firstIndex(where:) instead, so the mutation can write back.
|
# ¿ May 5, 2023 17:20 |
|
Small White Dragon posted:Where do you find crash reports on App Store Connect these days? I know they used to be there... For beta releases, in the TestFlight section of your app. For App Store releases, in Xcode in the Organizer window.
|
# ¿ May 14, 2023 07:22 |
|
Yeah I'm a good 15 pages behind the Awful.app thread, gotta catch up. Ditching Imgur is on my list, and I appreciate the GitHub issue!
|
# ¿ May 16, 2023 20:55 |
|
That sequence number is approaching 2^32 but I have no idea how suspicious to be of that. Is anything in https://developer.apple.com/documentation/network/debugging_https_problems_with_cfnetwork_diagnostic_logging helpful?
|
# ¿ Jun 9, 2023 00:24 |
|
I have no suggestions from experience, but when I poke around the Swift stdlib or stdlib-adjacents like swift-collections I see a lot of annotations and private storage types and such that must be partly for performance optimization. Could give you something to look up at least? Speaking of swift-collections, https://github.com/apple/swift-collections-benchmark might be of use.
|
# ¿ Jul 17, 2023 23:28 |
|
In the first example, @Query is a DynamicProperty that tells SwiftUI about changes to the list of groups, including changes to any of its elements, and that triggers a render. The views in the tree at this point change when the count changes, so there's a diff and you see the new view. In the second, I think what happens is the GroupTile has a plain old group property that makes the view tree look identical. So the Query picks up the change as before, but the render pass creates an identical GroupTile so it looks like there's no diff from the previous tree. I think you want an @ObservedObject in front of GroupTile's group.
|
# ¿ Sep 17, 2023 21:21 |
|
I don't think ViewBuilder makes a difference here, it's generating the whole tree vs. having a separate custom view. Like if you drop the @ViewBuilder and return a View the old fashioned way, I would expect no difference in behaviour. (Maybe that's obvious but one less variable in the confusion?) I'm fairly sure Core Data objects emit KVO notifications when a relationship's count changes, so I wonder if a) I'm wrong about that b) NSManagedObject's ObservableObject implementation is completely separate from KVO or c) SwiftData works differently. What happens if your GroupTile stores properties derived from the Group? Like a let name: String and let deviceCount: Int.
|
# ¿ Sep 18, 2023 17:08 |
|
Does the newer (but still years old) Core Data external changes notification get posted by SwiftData? NSPersistentStoreRemoteChange I think. Also I don't think there's any need to make your MyFancyModelActor method async in that example. It's already asynchronous with respect to other actors.
|
# ¿ Oct 18, 2023 16:47 |
|
I think you just saved future-me a few hours of frustration so thank you for writing that out. Wish I had any other ideas
|
# ¿ Oct 19, 2023 01:16 |
|
Small White Dragon posted:Seems like every time I hook up my iOS device to test, the "trust this computer?" prompt re-appears. Is there no a longer way to tell it to always trust this same computer? My ipad asked me twice today and I was pretty sure I had trusted it before. And after the second time I failed to notice it wasn’t charging, so it just blinked out after a few hours. Not sure what’s up but you’re not alone.
|
# ¿ Dec 15, 2023 07:16 |
|
I have no useful experience but from reading the docs I know FetchRequest has initializers that take an Animation or a Transition, do those do anything helpful?
|
# ¿ Dec 22, 2023 23:29 |
|
|
# ¿ May 15, 2024 15:52 |
|
Where on earth did pkl come from?
|
# ¿ Feb 5, 2024 19:51 |