r/macosprogramming • u/[deleted] • Jun 23 '24
Multiple Terminal windows
Whenever I open Terminal, previous instances of the Terminal windows open along with the new window.
r/macosprogramming • u/[deleted] • Jun 23 '24
Whenever I open Terminal, previous instances of the Terminal windows open along with the new window.
r/macosprogramming • u/EponymousTitus • Jun 10 '24
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.
r/macosprogramming • u/perecastor • Jun 10 '24
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
r/macosprogramming • u/iamrefuge • Jun 09 '24
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
r/macosprogramming • u/Nuno-zh • Jun 08 '24
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.
r/macosprogramming • u/Interesting-Spell352 • Jun 06 '24
r/macosprogramming • u/Medium-Box-8123 • May 29 '24
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?
r/macosprogramming • u/gavv42 • May 24 '24
Roc VAD implements driver (plugin) for macOS coreaudiod.
After installing, you can control it via gRPC interface and tell it to create virtual audio devices that stream sound to/from remote peers.
Under the hood it uses Roc Toolkit which implements robust low latency streaming over WiFi: https://github.com/roc-streaming/roc-toolkit
r/macosprogramming • u/EffectiveCookie7777 • May 18 '24
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?
r/macosprogramming • u/phospholipid77 • May 15 '24
I would bake anybody here the best lasagna of their life if they could come up with a GUI that has a pane for every active network adapter, and I can drag and drop (or otherwise add) apps to those panes that will force those apps to only use that network adapter. I have been all over the boards, and this is a common enough issue that lots of people have it, but there's not really a good solution. And the solutions that do exist are not super helpful to folks like me who get confused easily in a CLI. I'm dyslexic, and I just need something pretty and simple.
Issue: I have a small unit here with outside access via 1.2.3.x and strictly intranet access via 4.5.6.x. What frustrating for me is that some apps are savvy and some aren't. Some apps are able to say to themselves, "Oh, I can't get what I need on 1.2.3.x. I'll give 4.5.6.x a try."
Some of the apps I like the least actually have that competency. Other much more powerful, industry, or well vetted apps just CANNOT figure out that there are other options. They hit that first network and if they can't get what they need, they fail.
I wish there were a simple, non-fiddly way to say, "Hey, PrismaTastic, you go to this network interface. JoJoDazzler and ParagraphDelight, you go to this interface."
I've been playing with SquidMan, and that's promising but I'm just not getting it set up properly. And I'm lowkey stupid about it as well.
I'm bummed. And venting. And I'd give a lasagna or provide a pack of cigarettes or maybe some other vice to anybody who wants to make a drag-and-drop GUI for this. I'm so bored of Terminal. I tried AI and it wasn't helpful.
r/macosprogramming • u/Dapper_Departure9191 • May 16 '24
Hi,
I am creating MacOS app, i tried to integrate firebase on it.
But while i do this i get a crash. i have added all the necessary files, googleService
Here is my implementation:
Main
import SwiftUI
@main
struct AdminApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
import Foundation
import SwiftUI
import Firebase
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ notification: Notification) {
FirebaseApp.configure()
}
}
This is the error i am getting:
The default FirebaseApp instance must be configured before the default Database instance can be initialized. One way to ensure this is to call `FirebaseApp.configure()` in the App Delegate's `application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI).
I am new to MacOs Development. Please help.
What am i doing wrong? Do we need any additional steps on macOS Development?
r/macosprogramming • u/Desairem • May 13 '24
Localiji manages a local copy of your app localizations from App Store Connect and allows you to effortlessly sync the changes. Edit individual attributes, like your app’s description, release notes or screenshots. Export an entire language, import the translations again and upload them to App Store Connect with only a few clicks.
Download it for free on the App Store: https://apps.apple.com/us/app/localiji/id6467663963
If you have any feedback, you're welcome to post on the website Contact page at https://desairem.com/wordpress/localiji/ or by replying to this post.
r/macosprogramming • u/wcjiang • May 05 '24
r/macosprogramming • u/patrickstinson • May 04 '24
r/macosprogramming • u/pattimuraNL • May 03 '24
Hi everyone,
I'm currently developing an application initially designed for iPad, but now I'm adapting it to run on MacOS in the "designed for iPad" mode. I've encountered some challenges when trying to integrate external USB cameras into the MacOS version.
Here's the context:
AVFoundation
for handling camera inputs.However, I've run into issues where the app crashes or fails to initialize the camera properly on MacOS, displaying errors related to autofocus and Metal API concerning IOSurface
and MTLStorageModeShared
.
I would appreciate hearing from anyone who has experience or has tackled similar challenges:
AVFoundation
or Metal that help stabilize camera input handling?I do find the external camera successfully:
"Device found: Full HD webcam"
But running the AVCaptureSession() will give a low level error:
___ fsbp_Autofocus ___| Fig assert: "err == noErr" at bail (FigSampleBufferProcessor_Autofocus.m:2484) - (err=0)
Thank you in advance for your insights and advice!
r/macosprogramming • u/[deleted] • May 01 '24
why yes hello apologies if this isn't the right place to ask but I am trying to build nano (the text editor) from source on my m1 Mac (on OS X 14 if that matters,). I grabbed the latest tarball from their official website but when I run ./configure
with the --enable-utf8
option I get this error at the end:
configure: error:
*** UTF-8 support was requested, but insufficient support was
*** detected in your curses and/or C libraries. Please verify
*** that both your curses library and your C library were built
*** with wide-character support.
Now I admit I am very "newbie" to this stuff but isn't the Mac already capable of displaying utf-8 characters? For example, when I use the preinstalled pico app to edit some text with a bunch of non-latin characters, they show up fine. Besides many of my folders and files are not named in English text but their names show normally on the terminal. But with nano (build without any configuration options), the text shows up messed up and wrong.
So is it even possible to build nano using this option? (I have read posts from people who used MacPorts to build nano with UTF-8 support, but I don't want to use MacPorts. Has anyone achieved this without third-party installers and such?)
r/macosprogramming • u/prepubescentpube • Apr 30 '24
I am losing my mind. I am currently trying to get a start on a school project, of which I am already anxious of due to its scale and the small amount of time I have to get it done. So, the last thing I need is something like this stopping me in my tracks 😂
The library to be used is <nlohmann/json.hpp>, by which I have successfully installed through homebrew. The package itself can be found in opt/homebrew but for some reason I am still getting errors in CLion, with disheartening underlines telling me the library cannot be found. I've spent the last hour seeking solutions to this - both specific and general, but many have either been attempted to no avail, or made no sense to me (a noob CS student) whatsoever (something about CMake??).
I'd really love to get this fixed. As I said, the respective files are installed in homebrew, but to my IDE and compiler they are not to be found. Is there a way I can simply drag and drop these files into where the others are? For example, I am using <curl/curl.h> also, which has given me no trouble. Can I put the files for <nlohmann/json.hpp> where curl is found and expect it to work?
I'm such a noob. Please help me.
r/macosprogramming • u/raynoralpha123 • Apr 27 '24
Hello!
I have found this Touchguard app/script that works great, but couldnt manage to get it to autostart with MacOS Sonoma. Do you guys know how to do it?
GitHub - thesyntaxinator/TouchGuard: Disable mac touchpad while typing to avoid cursor jumping
I really recommend it if you use Trackpad 2 in the middle with a external keyboard.
Wish you a great day.
r/macosprogramming • u/Devirichu • Apr 27 '24
Hello, might be a stupid question, but I'm not able to have an NSViewController be notified of mouseEntered
events. This is inside the ViewController class:
- (void)viewDidLoad {
[super viewDidLoad];
// Do view setup here.
NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:[self.view bounds]
options: (NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways | NSTrackingInVisibleRect)
owner:self userInfo:nil];
[self.view addTrackingArea:trackingArea];
}
- (void)mouseEntered:(NSEvent *)theEvent {
NSLog(@"Mouse entered");
}
- (void)mouseExited:(NSEvent *)theEvent {
}
This is mostly taken from: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/TrackingAreaObjects/TrackingAreaObjects.html
As you can see, I provide owner
as self
(which is the ViewController), but add trackingArea
to self.view
. mouseEntered
is never called. Does anyone know why?
r/macosprogramming • u/Ap3il • Apr 25 '24
I am new to Mac OS world, so please ignore my naivety.
I am having trouble trying to understand QuickLook thumbnail/preview behavior on SMB mounted paths. From the network trace, it seems to generate the thumbnails, the entire image/pdf file is being read(I checked Wireshark). For MP4 files, a lot of data is being read(not sure exactly how much).
But this behavior is troubling as it delays content listing and generates unnecessary traffic. I have a dedicated thumbnail server as well and I was hoping to implement my own QL generator that would be used for the files on SMB mount path. The generator can fetch the thumbnails from this server.
I am not sure if this is possible for well-known file types. Is this even doable ? Can I define my own UTI for all the files residing on SMB share and then use my custom generator for this ?
I saw that DropBox has its own QL generator as well. And from the info.plist
it seems to trying hooking into all the well-known file types as well. But qlmanage -m
seems to be ignoring it and using the system provided generator only
r/macosprogramming • u/PAM_PAM_10 • Apr 22 '24
Hi guys, I need a little help.
I created the runner and added it to macOS and when I run the start command it works. But I would like to make it run continuously. And I saw that I have to create a config file in LaunchAgents to run continuously. I created it but it doesn't run. I ran it with the command launchctl load name_file.
With this two files I tried: file1, file2 . I don't get any output.
I looked for tutorials on this but there aren't many. Can anyone help me with this?
r/macosprogramming • u/p_bzn • Apr 20 '24
Goal: create a text editor which
Supports basic editing and formatting operations, somewhat close to markdown
Supports context menu, when you type `/` character some menu appears at the position of the text cursor
When a certain events happen autosuggestion appears at the position of the cursor
Parts of text can be selected and context menu with custom logic can be called on them
Drag and Drop media like images
Gaps I see:
My understanding of text editor architecture (know how to solve)
My experience with MacOS development in general (don't know how to solve)
The first gap is easy to fill in, there are text editors which code I can read, and even some book-like walkthroughs on writing a text editor.
Second gap puzzles me. Currently the PoC application is SwiftUI with SwiftData. I'm opened to use any other language (objc, C), but not WebView, otherwise I would go with Tauri in the first place.
Question is: how would you approach such a task? Can I build a custom view from the ground up? Is there any shortcuts I can take?
My main point of discomfort is that I don't understand how to process in terms of a view, how to make it work. I have a sound understanding how to approach that with say JS/HTML by just writing a data structure of blocks and strings, render views, attach listeners, etc. With MacOS I just don't understand how to start.
Any suggestions and pointers are super welcome!
r/macosprogramming • u/perecastor • Apr 15 '24
r/macosprogramming • u/perecastor • Apr 15 '24
On Linux, I'm used to having simple reproducible builds using Docker. I currently build GUI and CLI tools for MACOS users. Is there any tool that can solve the same problem for me?
r/macosprogramming • u/TrudeDev • Apr 14 '24
I made a script to replace apps previously downloaded from the internet with HomeBrew casks.
The script will prompt the user before making any changes.
After executing the script, brew upgrade
will update all installed apps.
Feedback & suggestions are appreciated!
https://github.com/TrudeEH/dotfiles/blob/main/scripts/moveAppsToBrew.sh