There's something that's been bothering me for a long time that I want to fix before the WWDC madness starts.
I can't see changes to my translation files with 'git diff' because it considers them binary files.
I'm seeing some solutions where they modify the gitattributes file and others where they convert files to UTF-8. Both approaches are from posts that are several years old.
Debugging an issue that only is possible on actual production builds (in-app purchase related). I'm really sorry about spamming #AppStore review so much. #xcode#indiedev
I only recently discovered that in Xcode 14 we can test real remote push notifications on an iOS simulator. Before, simulators couldn't provide a token, limiting us to testing on a device or using .apns payload files and simctl push command.
Now we can send notifications from a server to our app running on a simulator, and even test other features like Notification Service Extensions.
Have you ever noticed that when you build an iOS app for Mac Catalyst, $PLATFORM_NAME is set to macosx?
When Catalyst was being hashed out, there was quite a bit of discussion around whether we were building against the iOS SDK on the Mac, or against a Mac SDK that happened to know about iOS. As you can guess in retrospect, the latter worldview prevailed: the Catalyst SDK is a “variant” of the Mac SDK. This made our builder tools folks quite happy, because the Catalyst SDK could be built alongside the Mac one, and Catalyst apps and daemons bundled with macOS could be built together with the rest of macOS.
Xcode, however, seems to continue to insist in its UI that Catalyst apps are actually iOS apps that happen to support the Mac.
Which worldview you choose to believe is up to you! I know which one I prefer.
I’ve written down most of what I’ve learned about xcframeworks into this blog post. I hope it can be a one-stop shop to answer all your practical questions, including:
Wishlist for #WWDC (this one, or next one, whatever):
Full standard library for Linux or at least a good build error / info on what's missing during development (on macOS, ideally with SourceKit, so it works with Nova/VSCode because #Xcode doesn't like server projects).
PS: The work-around for the error from the screenshot is to use [UInt8].random(count: xx) instead.
The best niche feature in #Xcode is the ability to split the text cursor along multiple lines. Hold the option key and drag down across multiple lines of code to create multiple cursors. Then you can navigate, delete, and type across all of them. And it's semantically-driven, so if you press say option-right, it will navigate those cursors right one word, even if those words are different lengths. Incredible for fast renames/refactors. No notes, it works as I expect every single time.
New #Xcode project, empty SwiftUI View, adding one view. Bang. 💥 #SwiftUI previews literally never worked for me. Even with the simplest of all projects. No 3rd party dependencies or non-system frameworks/modules imported. I don't get what I'M doing wrong. Latest stable Xcode, latest stable #macOS, MacBook Pro M1 Max, 32GiB RAM 🤷
Is it just me or is it just…difficult to build an iOS app with static frameworks instead of embedded dynamic frameworks? My primary gripe comes from resources that need to be manually copied to the main app’s bundle.
Is there a way to automate this? How would I write a script that does basically: “for every (xc)framework that I linked, copy its resources into my main app bundle”?
And before you ask about why not just embed dynamic frameworks: because load times. There’s no need for libraries to be dynamic if they’re only used by the one app, right? Even SwiftPM agrees since it defaults to generating static libs (well, .o files, but you know what I mean).
Is there a way to exclude building the .testTargets in a #SwiftPM package when you build it with xcodebuild? Building with -configuration Release usually fails because testability is disabled, and the test targets fail to build.
I’m always suspicious when I write code for hours without running it and then I finally finish and it… works?
No one will know these under-the-hood changes were made, but I’m really proud of them. They give me the power to go forth and make things people WILL see and use, and that’s always exciting.
Uhh, what happened to the #Xcode#instruments Energy profiler tool in Xcode 13? Is it gone?
There seems to be chatter about using the telemetry tool to get information about your app’s energy usage, but that’s for released apps. How do I measure the energy profile of an app I’m currently working on?
I'm struggling with a decision about my SwiftUI app. I want to add a ShareLink to share the forecast.
Running from Xcode to my device, when the sheet appears I get a lot of UIKit constraint errors in the debugger.
The problem is when I dismiss the sheet and navigate to a 2nd view the app locks up when I try to then nav to a 3rd view pretty often. BUT if I run a TF build this lockup doesn't happen.
Is there no way to stop #Xcode from scrolling the console log to the newest message?
I need to get something from the start of the log to continue diagnosing an issue, and the only way I've found is to quickly select all and copy before it can re-scroll again and then search for the output in BBEdit.