/r/macosprogramming
Subreddit for macOS developers!
/r/macosprogramming
My hard drive storage on my M1 Air was full, and I received an error message from macOS saying that there was no more space available.
So, I selected some files on my desktop that I didn't need. Apparently, I was too quick in selecting and accidentally included other important folders… I put the files in the trash and opened it.
Then I clicked on "Empty Trash," and while it was emptying, I realized that those important files were accidentally in the trash and were being deleted.
A disaster. These are my music projects, and many months of hard work.
I tried Disk Drill and Stellar Recovery, but not in SIP disabled mode.
Is there any other way to recover these files? I haven't shut down my Mac.
What's the current recommendation for macOS (and iOS) crash reporting services nowadays? We used to pay HockeyApp for this, then it got bought by Microsoft, and now its scheduled for shutdown soon. Where should we move?
Does anyone know if there are any libraries that provide access to the email app data!
I’m excited to share a project I’ve been working on called osxiec (osx isolated environment creator). While it’s not a full container solution, osxiec provides a way to isolate processes from the main system on macOS.
Here are some key features:
Unlike existing solutions like "darwin containers," osxiec doesn’t require System Integrity Protection (SIP) to be disabled. It's designed to be an easy-to-use tool for testing code, isolating applications, and integrating with your development workflows on macOS.
I’d love to get feedback from the community. Any suggestions or concerns are welcome!
Hello, we are working on building a software to record audio and screens but have run into an issue. Everytime we record the screen, audio stops getting recorded. In contrast, it works perfectly in Windows. Does anyone have any suggestion on what could be the issue here?
It must be a dumb question to most people here - sorry about it! I've been using macOS since 3 years ago very lightly and now I'm trying to use mac more actively thinking maybe it could become my main working machine replacing Windows.
Just yesterday I started coding Swift on Xcode to create something useful for myself as I usually do it with AutoHotKey on Windows. And it seems I need to enroll in the Apple Development Program. Is it correct even if it's only for myself and not for distributing? Then all the macOS programs that you can download on the Internet were made with Apple Development Program accounts? Even cracks?
At least there is a debug app from the Swift project in like ~/Library/Developer/Xcode/DerivedData/GlobalHotkeys3-bdyffbtmfedmnmbhtthegawzlhbw/Build/Products/Debug/GlobalHotkeys3.app
So I'm using it for now. Any tips please!
We've noticed on an M1 Max laptop, the app (which should use as many cores as possible) is being confined solely to the two efficiency cores, no matter how much load we throw at it. What could be causing this? The computer is plugged in and set to "high power" mode in the system settings, energy pane.
Other than marking DispatchQueue priority as .userInitiated or similar, is there anything else (like a system entitlement?) to ensure that the whole CPU is maximized?
Thanks.
I developed a macos application with Flutter and created a deployable file with a developer ID certificate and Xcode. I compressed it into a dmg and passed it through internal tests. When I did this, I got something like the title. Even after shutting down and running it again, I never get the black screen again.
Interestingly, uninstalling and reinstalling the app also doesn't cause the black screen. So I wanted to see if there was an issue with authenticating the apple account, so I brought my personal macbook, which uses the same apple account as my work macbook, and experimented with it, and again, after the first install, I only got the black screen.
It doesn't seem to be a code signing or notarisation issue. Because if I get the black screen in the first place and shut it down, there is no problem after that.
I don't have a clue how to reproduce this as the only way to do so is the first installation on the first device, so if anyone has experienced something similar, or knows anything about this issue, please help.
I wrote an article about my long journey in the packaging, code signing, and notarization process of an Unreal Engine macOS application.
I found several problems in the recently introduced modernized Xcode workflow, and a bug in the implementation of CEF as a macOS framework.
All the detailed information is in the article - that's quite long so I added a TL;DR section for the ones only looking for the solution.
I hope the article can help other developers and save them all the weeks I had to spend on this.
https://pgaleone.eu/unrealengine/macos/2024/07/06/codesigning-notarization-issues/
I'm trying to put together a minimal example of a program that can use the CoreLocation api on macOS.
I know that I need to add usage description keys the Info.plist, so I'm compiling in a plist file.
Here is the code I'm using now, complete with a Makefile.
When I execute the program, I just get the error message:
CLLocationManager error: The operation couldn’t be completed. (kCLErrorDomain error 1.)
What am I missing? Is the codesign
step neccesary? Do I need to notarize it (and how do I notarize a single executable)?
I have an app (currently not released on App Store) which runs on both iOS and macOS. The app has widgets for both iOS and macOS which uses user preference (set in app) into account while showing data. Before upgrading to macOS 15 (until Sonoma) widgets were working fine and app was launching correctly, but after upgrading to macOS 15 Sequoia, every time I launch the app it give popup saying '“Kontest” would like to access data from other apps. Keeping app data separate makes it easier to manage your privacy and security.' and also widgets do not get user preferences and throw the same type of error on Console application when using logging. My App group for both iOS and macOS is 'group.com.xxxxxx.yyyyy'. I am calling it as 'UserDefaults(suiteName: Constants.userDefaultsGroupID)!.bool(forKey: "shouldFetchAllEventsFromCalendar")'. Can anyone tell, what am I doing wrong here?
Hey there,
recently I tried to perform system language change for a user by using a shell (bash) script combined with osascript.
Now I can change my systemlanguage from a menu (osascript generated).
Now my problem comes in:
I can programmically change the language and region of macos by using the terminal. But I have not found a way to do this also for the "Login Window".
So my system is completly in english but my loginwindow stays in german.
Until I do this manually in the system settings -> General -> Language & Region -> Cogwheel -> Apply to Login Window.
So is there a way to also set this using commandline or osascript.
Thanks you in advance!
I am transitioning from a career in Architecture and Windows programming (mostly PowerShell) to Canine Behavior and MacOS/iOS programming, and I have a question about Apple IDs as it relates to an Apple Developer Account.
I have an Apple ID based on an old company name. I was forced to change the name of my company because, well, Autodesk kinda sucks. Anyway, prior to creating a Dev account, I wonder if it makes sense to create a new Apple ID? Can I use the old, now "personal" Apple ID for iCloud and app purchases and books and such, and the new Apple ID can be used only within Xcode? Or is Xcode aware of the Apple ID in use by the underlying OS and they need to be the same?
Whenever I open Terminal, previous instances of the Terminal windows open along with the new window.
When transforming a .app to .pkg, the installer replaced the first instance of my app it found (.app) with the updated version and it only instal the app in /Applications if no other versions are present in the system.
I just want my installer to install the app in /Applications, not look for other versions already installed
I don't understand why I get this weird behavior...
here is what I use to convert my .app to .pkg:
xcrun productbuild --sign "Developer ID Installer" --component ./MyApp.app /Applications/ ./MyApp.pkg
Complete newbie here. I want to create my own note taking app. Something like a cross between evernote and notion. A place to dump thoughts and tasks and references.
I'm very fussy so no existing app really ticks all of the boxes for me whether it be because of price or privacy concerns.
I've done a bit of very basic coding in the past - COBOL (don't laugh), C++ and er, well, that's it :-) But I like learning.
How realistic is it to build my own app to run on my own mac? Perhaps sync it between all of my macs? Perhaps even have an ios version so I can have it on my phone? I'm ok with learning new skills and I'm not looking to create something commercially viable. It's just for my own needs.
Am I dreaming? If not, what would be the best language / platform to learn? Swift? OR something else?
Thanks in advance for any helps, tips, comments.
Posting this here out of curiousity - i have very little programming experience. Would it be possible to create a sandboxed environment shortcut? As in something to safely open unknown files or mount external volumes in said environment?
I can think of two important uses that can help a lot of people:
It would function as a window that would open through a right click menu shortcut, kind of like winebottler, where only a certain part of a macos environment is needed.
Thank you, let me know if im retarded
Hello. I want to make an app that will manipulate other apps, but for that I need to know the structure of the app's accessibility tree. How can I inspect this? I am a blind developer, I tried operating xCode's accessibility inspector but I cannot work it out withou a mouse.
hey, so i want to build an open-source alternative of cold turkey to specifically block apps on macos.
anyone have any idea how can i do it? would love to see any working example or github repo, any hints would be enough as well.
thanks ;)
edit: just recognized i made a grammar mistake in title, but i guess i can't edit it (maybe i can, idk, i'm new on reddit)
Error message problem on my (iterm2) terminal on the macbook.
Last login:***************** on ttys001
iconv: iconv_open(, -t): Invalid argument
Error converting string from to UTF-8
Does anyone know how to fix this?
Hello, I have an app idea, but first, there is a topic I want to learn about.
While my application is open, I want to be notified when the macOS user takes a screenshot. I couldn't find a source about this; do you have any idea how I can do this?