#Xcode

Hello #Xcode #Vim Mode users: I made a proof of concept spoon for #Hammerspoon which can remap keys (for example, making j/k act like gj/gk) depending on the mode you're in: https://github.com/SilverEzhik/XcodeVimTricks
If you have some bindings that you really miss, check it out!
UPDATE: I found it: https://developer.apple.com/design/human-interface-guidelines/activity-views
——
iOS devs, please help: I want to add an action to every other app’s share menu. I see see what seems like other apps doing the same in my share menu (e.g. “Copy to Goodreader” or "Print to HP Printer”). I'd like for a user to be able to share a photo using my action. But I can't figure out what to search for in the Apple docs to get me the relevant dev documentation. #iOS #Apple #Xcode #Swift #SwiftUI
I managed to get #Xcode #CoreData and #SwiftData labs this year. All extremely helpful, thanks to some awesome Apple engineers. If you’re not requesting labs, you’re missing out. #WWDC #WWDC23
I have an app Xcode project set up with a second library Xcode project as a subproject.
The app target has a static library target from the framework project set as a “Target Dependency” in “Build Phases”, and links the resulting library in “Link Binary With Libraries”. This works great!
I want the iOS Deployment Target to “flow” from the app target ‘into’ the library target, so they’re both the same without having to edit the library target itself. Is this possible?
This is a nasty Hammerspoon script, but by god I've bodged it.
A bunch of event taps and screenshots, but it WORKS. I can remap #Vim mode settings in #Xcode.
I can do things like turn j/k to gj/gk, make y/p use the system clipboard and so on. Plus since I'm detecting the mode used, I can have different mappings per mode. I even made a little mapping that makes :w<Return> save and :%s open search and replace.
Okay, the good news is that I have a somewhat reliable way to determine the current #XCode Vim mode. The bad news is that it's *nasty* - I'm taking a screenshot and comparing the color of a pixel in the debug bar. It does work though!
As a developer who lives in #Xcode each day, I hope that #VisionPro supports multiple #Mac displays and at resolutions above 4K. There was no mention of this in the #WWDC keynote.
Does anyone know if the memory leak in XCBBuildService has been fixed in Xcode 15, or if it *is* a Ventura-specific memory leak as I suspect? If so, is it fixed in Sonoma?
Just noticed my Mac running incredibly slowly - XCBBuildService is using >12GB of memory, and Xcode 3.5GB.
I have just two mid-sized projects open.

#Xcode 15 beta seems really quite stable.
I’ve been using it for a day with the work project (500kloc, Swift+UIKit) with iOS 17 simulator. So far only minor issues with occasionally not being able to launch the app in the simulator, which is easily fixed by restarting the simulator.
Still early but looking like a solid release so far.
I found an interesting #VoiceOver bug in #Xcode 15. I hope they will not fix it as its soooooo useful.
1. Open Xcode and any project.
2. Focus the text editor
3. Interact with it as much as you can and eventually you will land on your widgets in the desktop.
4. The most interesting, if you interact one time up, you land in your textbox, exactly where you left off.
Why I think this is a bug? Because it doesn’t happen consistently and it happens only in Xcode. #apple, please, don’t fix this.
Seit ich den erweiterten Datenschutz für meinen iCloud-Account aktiviert habe funktioniert die #CloudKit-Integration im #xCode-Simulator nicht mehr. Am Anfang dachte ich, das liegt vielleicht daran, dass iOS 16.4 noch nicht für den Simulator verfügbar ist - inzwischen ist das aber der Fall und das Problem besteht weiterhin. Ist der Simulator nicht mit #ADP bzw. #EDS kompatibel? #iOSDev

Of course that’s just beginning of the great Iceberg that is Swift UI’s changeling for 2023. However there are some other neat stuff, for example #Xcode making its previews fully accessible for #blind #VoiceOver users! If you want me to write more about all of this and more, let me know. BTW,, Paul Hutson from HackingWithSwift is my idol. Without him I wouldn’t be able to write and understand even 5% of what I write and understand now.
💡 Apple Vision Pro for Unity Developers
Create Immersive Unity Apps
https://developer.apple.com/videos/play/wwdc2023/10088
#Apple #WWDC #WWDC23 #WWDC2023 #AppleVisionPro #VisionPro #visionOS #iPadOS #iOS #Xcode #VisionProSimulator #Simulator #RealityComposerPro #AR #VR #MR #XR #Headset #Immersion #Immersive #Spatial #SpatialComputing #Hybrid #WorkFromHome #Gaming #GameDev #Unity
I've uninstalled #Xcode 15 Beta 1 & reinstalled multiple times. Using Safari, Venture 13.5. Have approved the security after copying iOS 17.0.simruntime to the folder at: /<MacName>/<MacHD>/Library/Developer/CoreSimulator/Profiles/Runtimes Restarted Mac & Xcode. Still getting errors shown below with basic TextField work. Anyone else seeing this? Anyone else solved the issue? Thanks!

@akmarinov Indeed, this works just fine with #Xcode 14 on #macOS #Sonoma as well. Only thing to bear in mind is to allow Terminal full disk access to modify the Info.plist file.
🖐 Info is trickling out ☝
Finally, some really brief occlusion examples of hands / fingers over #UI elements. In this scene, two small light-blue circle UI elements are shown occluded by an #AppleVisionPro wearer's fingertips.
Meet #ARKit for #Spatial Computing
https://developer.apple.com/videos/play/wwdc2023/10082/
#Apple #WWDC #WWDC23 #WWDC2023 #VisionPro #visionOS #iPadOS #iOS #Xcode #VisionProSimulator #Simulator #RealityComposerPro #AR #VR #MR #XR #Headset #Immersion #Immersive #Hybrid #WorkFromHome #Gaming #GameDev



Less code to render previews by leverage Swift macros, and preview is also available for UIKit and AppKit. #WWDC23 #Xcode #iOSDev #swiftlang


OK. I successfully scrubbed my AIr of all XCode fragments, leftovers, and droppings. I’ve reinstalled a single beta copy. Hopefully, this will resolve my debug server issue. But I don’t believe in hope, so it won’t.
Murphy is my friend.
#Xcode 15 tidbit:
There’s a new “String Catalog” file replacing the legacy Strings(dict) files! 😍
It comes with a visual editor showing all languages in one place, progress tracking, migrator, automatic code extraction & more!
Can’t wait to support it in @RemafoX_App!
#WWDC23

#Xcode 15 tidbit:
Images & Colors in Asset Catalogs can now be safely referenced with auto-completion support in your #Swift code! 😍
Basically, Apple sherlocked SwiftGen and made a related update I was planning for @RemafoX_App unnecessary. 👍

Somehow I have NO IDEA how to install the iOS runtime from the DMG that downloaded in Apples new #xcode download format. I copied it to the place, it finds it, and then can't verify the developer… BUT: I am just downloading it from Xcode itself. WHILE I’m in an ICE train. With tethering via my iPhone. And it actually works! Already 4.3 GIGABYTE! With constant 100MBit/s! THIS is the future. 🤯
In Xcode 15 we can access colors and images stored in asset catalog via autogenerated static properties, for example Color(.myGreen) or even Color.myGreen 🤩 No more string literals 🎉 #WWDC23
And this works for older deployment targets too, not just iOS 17!
There is more information about this new feature in my post: https://nilcoalescing.com/blog/Xcode15Assets
Interesting... Apple offers a Vision Pro 3D simulator for Xcode with different room and lighting environments, so you don't really need a physical Vision Pro AR Headset to develop apps for it.
#Apple #WWDC #WWDC23 #WWDC2023 #AppleVisionPro #VisionPro #visionOS #iPadOS #iOS #Xcode #VisionProSimulator #Simulator #RealityComposerPro #AR #Headset #Immersion #Immersive #Spatial #Hybrid #WorkFromHome #Gaming #GameDev


In case this is useful to someone, I have a repo with #SwiftUI generated interfaces that I've been updating semi-regularly since #Xcode 11, so I can see the diffs between different versions (there are separate branches for macOS and watchOS): https://github.com/mackuba/swiftui-headers #Swift #iOSDev #MacDev

“You can’t open the application #Xcode because it is being updated.” I’ll try again next weekend when it’s done. 😭
Just realized I'm missing the latest update to #Xcode. There's the morning gone.

It's more than a little weird that Xcode's "Welcome to Xcode!" startup screen doesn't have a New Playground option.
If you click "Create a new Xcode project" there's no playground option there either. #Xcode
#Xcode pro tip for #SwiftUI previews!📱
While I was extracting an In-App Purchases library from my @RemafoX_App for my upcoming @Twootit_App, I created this:
A preview-only helper that mimics a loading delay so I can see the loading state—no changes to Debug or Production! 🧹💯

... und wieder ein Software-Problem durch rummöhren und eigentlich nichts verändern gelöst. #XCode #Capacitor
PSA: as of iOS 16.4 a `WKWebView` is no longer inspectable by default, meaning you won't be able to debug it using Safari dev tools. You now have to explicitly enable it: https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/
#swift #xcode #iosdev
The #VoiceOver rotors for source code in #Xcode are awesome, and a huge time saver.
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.
What's the best way to approach this?
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.
I summarized what setup is needed for this to work in my new post: https://nilcoalescing.com/blog/TestingRemotePushOniOSSimulator
I added a little note to explain *why* xcframeworks are needed in the first place. Thanks to @brennansv for the suggestion.
#xcode #ios #macos #apple #Objectivity #swift #framework #xcframework #development
https://www.humancode.us/2023/05/19/all-about-xcframeworks.html
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:
- What is an xcframework?
- What’s in an xcframework?
- How do I make an xcframework?
- How do I consume an xcframework?
Enjoy and please share!
#xcode #ios #macos #apple #objectiveC #swift #framework #xcframework #development
https://www.humancode.us/2023/05/19/all-about-xcframeworks.html
Tried to fight a weird new build issue in #Xcode for a while. Eventually tried with 14.2 instead of 14.3, and… the issue disappeared.
#VisualStudio has this kind of stuff as well, but in that environment, I’m more experienced with figuring out workarounds.
Why are IDEs like this 🙃
(Because software development is still extremely brittle and in its infancy, and IDEs have crazy-complex software stacks)
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.
#swift #iosdev #ServerSideSwift #vapor
So since I’ve been using my 256GB-sized MBA since last year, and I have a disk-size problem with #Xcode; can I strip out the Intel parts and make the size of Xcode half?
My research seems to point to use lipo: https://eclecticlight.co/2020/07/30/instant-weight-loss-how-to-strip-universal-apps/
But I’m not sure if it will work out with Xcode. Has anyone have any experience on this?
Day 181. There are a ton of things to love about #SwiftUI. But one of my favorites it's got to be the possibility of previewing Variants in #Xcode: the possibility of seeing your UI in dark/light modes, all #DynamicType sizes, and orientations, side-by-side.
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.
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?
What!
The!
Weren't we all complaining that the #Xcode console would be nicer if it detached for #debugging?
What about using Terminal?
I did not notice this setting, ever!
PSA: Apps built with Xcode 14.3 crash on iOS 15.0, 15.1 & 15.1.1 😭
https://forums.swift.org/t/structured-concurrency-bug-in-xcode-14-3/64614
Creating an XCFramework
#macOS #Programming #Xcode
https://rhonabwy.com/2023/02/10/creating-an-xcframework/
@khalidabuhakmeh Not spicy in my book.
A shame that we could, at least for the foreseeable future, break free of the horrendous #XCode developer experience though.
Xcode multi-cursor editing (Control-Shift-Click).
#Xcode #Programming #macOS #TipsAndTricks
https://useyourloaf.com/blog/xcode-multi-cursor-editing/
Did you know that you can partly use #Swift 6 in #Xcode 14.3?
Why you should? For more safety, to prevent a "big" migration later, and of course to use some cool new features today!
I just migrated @RemafoX_App to "Swift 6 mode" & documented it:
https://www.fline.dev/preparing-for-swift-6/?ref=iosdev.space
JFC, #Xcode, what is wrong with you 🤬
Can't wait to try @kishikawakatsumi’s “Power Assert” library with #SwiftLang macros. Looks amazing!
https://forums.swift.org/t/introducing-swift-power-assert/64197
I posted about this to Apple’s dev forum...
Is there an established process in which to use Xcode Cloud for setting up automated unit testing of Swift packages?
It looks like you can only use Xcode Cloud for apps. I’m fine with creating a “dummy” app for this purpose, if need be, but all of my tests are part of the package itself and I don’t know how to set up a workflow that triggers them.
The docs are maddeningly vague about this use case. Is it not supported?