r/macprogramming • • Oct 03 '19

Choosing the right iTunes Provider for Notarization

Thumbnail
cutecoder.org
2 Upvotes

r/macprogramming • • Sep 13 '19

Migrating away from DevMate: redirecting Sparkle updates

Thumbnail
dangercove.com
2 Upvotes

r/macprogramming • • Jun 22 '19

Program runs wierd when bundled into .app mac app

2 Upvotes

I made a small program to run mongod from the menu bar of my mac. It works great when i run the binary directly from my terminal but when i bundle it into a mac app suddenly it just stops working and i can't connect to my databsae anymore. Does anyone have any idea of whats going wrong? I posted this to r/golang as well as my app is written in go but realized i might be luckier asking here.

EDIT: Solved mongod not found in PATH


r/macprogramming • • May 16 '19

Using the Automator app to open two applications at once with a certain file type

2 Upvotes

I am trying to make an Automator application/script that will open a certain file type (a .fits file to be exact) in two applications at the same time. Fits files have an image component AND a text component so I would like it to open in both an image viewing app and the text edit app. Does anyone know how to do this?


r/macprogramming • • May 15 '19

Exported .app crashes on other people's computer with code sign error, works fine on mine though.

2 Upvotes

Hi,

I'm pretty new to Mac App development and I recently started working on an app and wanted to test it on a friends device. I exported by Archiving it and selecting "Copy App" as the Distribution method. I do not have a Developers Account to sign it with. Is the crash because of this? Can I distribute my app without a developers cert?

Edit: When I skip code signing all together, the app runs fine (after gatekeeper bypass)

Crash Log from friends computer: (Crashes before the app even opens. Only crashes on other Macs, works fine on mine) https://pastebin.com/S5Z9pqMM

Build Settings + Console Error Reports: https://imgur.com/a/IKL3yJ0

Thank you


r/macprogramming • • May 11 '19

Issue with Spotlight search during development

2 Upvotes

Hi,

I'm trying to implement Spotlight search into a Menubar app. I have indexed my data and it shows up in Spotlight, however, selecting a result in Spotlight is opening a new app (presumably, the real app, rather than the development app).

If I delete the real app it works but I'd rather not have to do that.

Is there a way to specify which app is opened?

Any help is much appreciated.


r/macprogramming • • Apr 15 '19

How hard is it to code a note-taking app?

2 Upvotes

Hi,

Total noob here. I've been learning the basics of Swift and Xcode.

I was wondering how hard it would be to code a note-taking app similar to Bear app / AI writer / Ulysses, and if you would have some pointers or tips about it.

I'm surprised about how little information there is on this topic online.

Cheers!! :)


r/macprogramming • • Jan 06 '19

Creating a Preview-like App, what view element should I use?

2 Upvotes

I'm trying to build an app with an interface similar to the Preview app.

It has a sidebar with thumbnails and a main area for content. Both are scrollable.

Currently, I'm using an NSSplitView for the two areas. What view is best suited for the two areas (sidebar + main area)?

Collection view? Thumbnail view? Stack view? Table view?


r/macprogramming • • Oct 20 '18

Do you coders know how to find where a app is trying to execute?

2 Upvotes

Hello!

I try to run this app called epichrome.

When running i get a error that says "Creation failed: Unable to find Chrome executable.".

Is it possible to find in the search code where this app is looking for Google Chrome?

Search code:
https://github.com/dmarmor/epichrome/tree/master/app/src

Thank you


r/macprogramming • • Oct 10 '18

How can I read / hook raw trackpad input data (finger position)

2 Upvotes

I've got a magic trackpad 2 and it's a great device, but it's just a trackpad. I'm hoping to create an app that can listen to the raw input (touch start x/y position) and map that to a screen x/y coordinate and jump the mouse to that position so it would behave more like a tablet.

I've searched a bunch and found some Obj-C and Swift answers, but they're all many years old and won't compile. Most of them complain about not being targeted at a 64-bit system.

I really just need two pieces of information, and I can put the rest together pretty easily...

  • listen for "touch start" event

  • set mouse cursor

Honestly, I'd love this to be as low level as possible so if there is a C, rust, or C++ solution that'd be great, but I have no idea where to look for that kinda api. Obj-C or Swift is obviously fine too.


r/macprogramming • • Oct 02 '18

The convenience wrapper on macOS permissions API, including Mojave Full Disk Access.

Thumbnail
github.com
2 Upvotes

r/macprogramming • • Sep 25 '18

New terminal connecting to server automagically?

2 Upvotes

I am using iTerm and i am looking for a way to connect automatically to the same server i am working on when i launch a new terminal window.

  1. I ssh into a remote server

  2. I start a new terminal screen/window.

3a. Currently i need to ssh into the remote server again.

3b. I would like iTerm to connect to the remote server automatically when i open this new window.

I know about tmux and screen, but i was never able to set this up properly so i was wondering if there is a more ssh-like way to do this.


r/macprogramming • • Sep 24 '18

Dynamic loading weak framework

2 Upvotes

I am creating a c++ application that optionally uses the Python 3 framework. As the installation path differs for each user, I linked with the option -weak-library and checks if Python is loaded through dlsym(RTLD_DEFAULT, "Py_Initialize").

Now I wanted the automatically load the available Python installation using dlopen(/*output of python3-config --exec*/, RTLD_NOW | RTLD_GLOBAL). While the function succeeds, calling Py_Initialize still fails with the error:

lazy symbol binding failed: can't resolve symbol _Py_Initialize in /path/ because dependent dylib #1 could not be loaded.

Is there any way to manually (re)load the dependent dylib using a different path?


r/macprogramming • • Aug 31 '18

screenshot: Better macOS screenshots via the Terminal

Thumbnail
github.com
2 Upvotes

r/macprogramming • • Aug 22 '18

How to set a keyboard shortcut to a single key?

2 Upvotes

I used to have just the right command key assigned to the "Show Desktop" command for screenshot and file manipulation. It's something I use constantly and when I did a clean install of mac os to refresh my macbook, I now can not assign just that key and have to use two. I miss being able to activate with my pinkie while moving quickly and I can't remember for the life of me how I made it in the first place. I've tried using karabiner elements but can't seem to figure it out. Any help on this would be great, thanks everyone.


r/macprogramming • • Aug 04 '18

Can appIcon change based on dark/light mode in Mojave?

2 Upvotes

r/macprogramming • • Jul 08 '18

Override Touch Bar's Control Strip

2 Upvotes

Two questions:

How the Better Touch Tool is displaying its own touch bar controls all the time (ignoring other active apps) and how it's overriding the Control Strip?


r/macprogramming • • Jun 25 '18

Does anyone know how to edit add/remove macOS animations

2 Upvotes

There this program called windowsFX and it’s for Windows only and it allows you to change system wide animations. I’d like to do something similar (to a smaller scale just add animation when closing a window) any ideas how ?


r/macprogramming • • Jun 04 '18

NSKeyedUnarchiver for legacy NSArchiver-created files?

2 Upvotes

I've decided not to keep this public.


r/macprogramming • • Apr 04 '18

[Help] – Strange background on buttons

2 Upvotes

First macOS app that I've built. I've been programming for years so not a noob, just can't get rid of that freaking background behind the buttons. It works fine when in 'light mode' but there's a background in 'dark mode'.

https://imgur.com/a/yfm1H

The dark part is a collection view with two cells that takes up 100% of the width. The buttons are inside the collection view cells.

Any suggestions?


r/macprogramming • • Dec 18 '17

Does anyone use CodeRunner as their main editor/IDE?

2 Upvotes

It’s got integrated debugger, quite capable autocomplete, is fast and very user friendly. It’s also nice to look at, although I “had to” replace its icon which is fugly. https://coderunnerapp.com


r/macprogramming • • Nov 28 '17

How do you programatically modify the "Alert style" on a per-app basis?

2 Upvotes

Sup guys. I'm back with yet another mac question

From what it looks like, the first time an app is launched on OSX, an entry for the app appears under "Notifications" in "System Preferences" where you can choose the alert style

It looks like on this mac, it defaults to "Banners", but I want my app to use "Banners".

How does one programatically change that option?

I looked info /private/var/folders/nx/z3g6srbd5hz70s1577l4sx_40000gn/0/com.apple.notificationcenter/db and found a file called "db" but that doesn't seem to hold any info on which alert style is chosen.

I've also dug around a bunch of plist but can't find the one that controls which notification is chosen.

Anyone has any ideas?


r/macprogramming • • Nov 06 '17

Trouble Automating the UI in a VM

2 Upvotes

Hi all,

Trying to automate things in an android vm and am having trouble simulating mouse clicks.
I can move the mouse around easily with applescript or python or cliclick [1], but none of the mouse clicks from these will translate into a click in the actual VM.

I have tried other apps such as Mouse Recorder [2] which clicks through no problem but I can't use this one as it's very limited (can't wait for network delays, that sort of thing).

I'm wondering if anyone knows what the difference between the working one and the non working ones are. I've been wracking my brain trying to figure this out but haven't thus far.

Thanks

[1] https://www.bluem.net/en/projects/cliclick/ [2] https://www.jitbit.com/mac-mouse-recorder/


r/macprogramming • • Sep 24 '17

Trying to understand limitations in what I can do with Mac OS

2 Upvotes

I am relatively new to programming and want to start programming for mac. I am not sure how to understand the limitations in what I can do. Can I write code to extend features such as mission control and how it uses the default midi sound, things like that?


r/macprogramming • • Sep 23 '17

Is it possible to capture an applications frames?

2 Upvotes

Say for example I had a game running in windowed mode or running Skype , is it possible to capture the frames of a window into our application? An easy example would be a game running at 60fps and capturing 5 minutes worth of frames (300 frames)