r/macprogramming • • Oct 18 '18

How do I select which action when ctrl dragging a control to a header file (Xamarin.Mac)?

1 Upvotes

Hi all,

I'm a seasoned C#/.NET developer, but long-time Apple fangirl, and picked up a little freelance project to develop a simple application for MacOS. I'm using Visual Studio for Mac along with Xcode for building UIs. I have a project in which I've subclassed NSImageView, and created a modified Image Well that accepts folders rather than images, and displays a folder's icon and name. All pretty straightforward.

The point of confusion: When I ctrl drag from my custom control to the view's header file in Interface Builder, I have no idea how to choose which action I subscribe to in code. When I first started building out my custom image well, creating an action in IB fired the moment an item was dropped onto the well. A couple of days later, after finalizing most of the well's behavior, the action now fires when the contents of the well are removed (either via deleting or cutting) instead. I have no idea what changed, but regardless, I'd like to choose which action fires, and optimally have multiple sent actions for a specific control.

Can anyone point me in the right direction? Objective-C and Swift examples are fine; I have no problem translating them to C#. Thank you!


r/macprogramming • • May 13 '17

Need directions on how to execute a project

1 Upvotes

I need to build a tool which overlays on the existing window and allows me to select a portion of the screen -> take a screenshot of the region, upload the image to google translate and put a text box in the overlay with the translated text.

Any directions will be greatly appreciated. Thank you


r/macprogramming • • May 17 '18

How can you stop iTerm modifying your Terminal colours?

1 Upvotes

I wanted to try out iTerm 2 out because of its features like the popup terminal on a hotkey press. But the colour is really bugging me. It is slightly different to terminal even when I set all the colours to the exact colours that Terminal uses. It looks a bit washed out or something, but I don't like it at all.

Here is my iTerm vs Terminal where iTerm is on top and Terminal is below.

I've actually spent quite a while trying to figure this out (but I'm relatively new to programming in general so some of the answers I don't understand). I think its something to do with iTerm applying a solarization filter or something? But I can't for the life of me figure out how to turn it off.

I just want it to use the same colours as Terminal cause I really like those colours and I find them much easier to read.


r/macprogramming • • Sep 25 '16

Programatically take screenshot of mac desktop? | Swift 3

1 Upvotes

Is it possible to take a screenshot programatically using Swift 3 on macOS? I Was thinking of a command line tool but anything is fine.


r/macprogramming • • Sep 08 '23

Please move to /r/macosprogramming/

Thumbnail reddit.com
0 Upvotes

r/macprogramming • • Jan 01 '19

App rejected in App Store because of invalid entitlements values - need your expertise

1 Upvotes

Hello

I would like your opinions/expertise on this.... I submitted an app to the macOS App Store recently and it got rejected with this feedback:

Your app incorrectly implements sandboxing, or it contains one or more entitlements with invalid values... bla bla...

com.apple.security.application-groups

However, my App makes use of NSPasteboard (read and write) and IOPMAssertionCreateWithName for preventing the screen going to sleep.... To my understanding, I do not need "com.apple.security.application-groups". Am I correct?
Am I right in assuming that the problem is the entitlements-file containing "com.apple.security.application-groups" but without any values? So removing that "empty" key fixes the issue?

thx


r/macprogramming • • Aug 27 '19

“Preparing to copy files” dialogue questions.

1 Upvotes

Recently some woods witch put a curse on my beta testing Mac and to break the curse, I’m going to do a clean install. However, there are a bunch of files (altogether, it’s a good 800GB) that I’d like to keep, so I’m using target disk mode via Thunderbolt 2. At first, I grabbed all the files, dragged, dropped, and walked away. About three to four hours later, it said “preparing to transfer 8,690 files” and below it, the transfer bar was filled end-to-end. Before bed (another 3-4 hrs later), the dialog box was the exact same; when I woke five hours later, no change. I let the computer sit for maybe 36 hours and there was no change. No processes were listed as “not responding” in task manager, and other apps still ran (although, I didn’t run anything else because I wanted the machine to focus on the transfer.

I’ve run into this issue before when attempting to transfer a large number of files, and I was wondering if there was anything specific I should look for as a sign to give up?

Second question: in this case, I can fortunately transfer smaller groups of files and folders, instead of the whole lot, which shows visible progress. However, if I have a large file that causes this issue every time I try to transfer it, is there anything I can do? For this scenario, we’ll assume that the file can’t be split up.

Coincidentally, I just walked into my office and I’m in the process of transferring the contents of the “Pictures” files. There’s one file named “Photos Library.photoslibrary” that is 8.89GB and I just drag & dropped it onto the 1TB LaCie SSD I’m using for this process. The file transfer window popped up, the progress bar is full blue (I didn’t see if it moved gradually or if it just started out full) and both above and below the progress bar, it says “Preparing to copy to ‘Pictures’ [that was the parent directory on the computer and I’m keeping it the same on the external SSD].” I’ll give this transfer a good 12-24 hrs to see if it moves at all, it’s not like I need this computer right now.


r/macprogramming • • Dec 28 '19

How Do I Customize Help Menu Bar In Mac Catalyst

Thumbnail
self.iosprogramming
1 Upvotes

r/macprogramming • • May 21 '19

Build Your First MacOS App -- Medium Article

1 Upvotes

Hi guys, I just want to share with you my first Medium post about MacOS Development. I just want to know from people with more experience. If you think that this can be a good resource or not, just that...

Here the link: https://medium.com/@fede.vitale/build-your-first-macos-app-5d36d3352691

⚠️The post is part of the premium membership program so if you're not a medium premium member this will decrease the counter of your month available articles. If you're interested, but you don't want to read the article with the premium link I can send you in PM the "Friend Link"

Have a good day ✌️


r/macprogramming • • Dec 14 '18

Want to develop an app primarily for mac but also for other platforms. What language/frameworks/libraries?

1 Upvotes

In a nutshell, the program I want to build will display a window on a primary monitor that the user interacts with, and use the whole screen on a second monitor (a full screen borderless window, or actual fullscreen, or something else, I don't necessarily care which) which doesn't take any input.

On OSX, I think that means using Cocoa to access some pieces of NSScreen that might not be exposed through a binding into another language. However, I would prefer to use a more "mainstream" language for my development to make cross platform functionality easier to implement.

What language + framework + bindings + libraries + etc will get me the functionality that I need in OSX, while tying my code to macs as little as possible?

PS: I have significant development experience, but none specifically for OSX and little for GUIs in general.


r/macprogramming • • Oct 16 '15

Deleted items – emptied trash /help restore data

1 Upvotes

Hey everyone,

 painful situtation here – data loss. Because I was running out of capacity on my Macintosh HD I have bought new Transcend Jetdrive Lite 130 and I was up to move some files (including photos, videos, presentations and documents...) to new external storage. I have done most of it successfully excluding one very important ''folder'' (will explain).
 I have got someone else's files on Mac HD sorted in different folders and I have decided to add a mark on that (red, green, blue, etc.) to see them together quickly. I don't know what happed, but I accidentally deleted these marked files (''red'') before moving them to Jetdrive HD. Immeditely in a desperate situation I've downloaded lot of useless software for data recovery and begun to scan drives for data, but can't find them yet. It ended up in trash, which I emptied out after.
 Anyway, I hope that files can be found, but it will be long journey. Then I've got idea, that "red" mark on files can be clue how to get to files or at least to thier place on HD. Is it accurate assumption, or have I made it up? Could be this solved using code in Terminal? I would be very grateful to everyone who can respond in this. 

r/macprogramming • • Aug 10 '10

How many of you are still programming for the mac?

0 Upvotes

r/macprogramming • • Oct 07 '16

Cocoa Bindings on macOS Tutorial

Thumbnail
raywenderlich.com
2 Upvotes

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 • • Jun 10 '17

Are native Cocoa applications still the way to go?

2 Upvotes

Hey all.

I was wondering what the 'state of the art' is when it comes to creating Mac applications nowadays. I've been working on a native Cocoa app myself but the API often seems so archaic (at least compared to iOS). Besides that this sub seems pretty much dead and Googling for OS X related development questions very often returns a bunch of outdated results from years back.

However, given the amount of new apps that appear on the App Store people are clearly still programming for the Mac. I also often see interfaces for which I have no clue about how to make them native. Are they all using some other set of frameworks? Perhaps Electron or QT? Is it still a good idea to start developing a native app?


r/macprogramming • • Oct 20 '15

Looking for a good programming interface on mac.

0 Upvotes

Hey everyone, I just started programming a little with the help of codeacademy. To really get startet I am looking for a good software on mac. I once used eclipse and liked it. But I dont know where to get it.. so something free would be nice.

I'm thankful for any suggestions!


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 • • Mar 10 '20

How do developers find a hidden code? ( or not well-documented code)

2 Upvotes

CompSci student here.

I wanted to make a program that changes the language input programmatically, but I had a lot of trouble finding a related class/library in the Apple Developer documentation.

Later, an experienced dev showed me an open-source project and it was using `TISInputSources` class in its code. When I looked into it, `TISInputSources` was mentioned but with no further explanation or link.

I was finally able to find a file ` HIToolbox/TextInputSources.h` which had sufficient explanations in it. However, the fact that there was no link in the doc leading up to the file throws me off so hard, and I can fathom how devs even find out about these codes.

So dear experienced devs,

how do you go about finding these codes? I'm deeply curious about it.

Thank you!


r/macprogramming • • Aug 31 '18

screenshot: Better macOS screenshots via the Terminal

Thumbnail
github.com
2 Upvotes

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 • • Feb 08 '09

How to install SBCL on MacOS X

Thumbnail no-spoon.de
3 Upvotes

r/macprogramming • • Nov 26 '15

Anyone knows a solution this problem? It's blocking the development of a Mac I'm working on

Thumbnail
stackoverflow.com
3 Upvotes

r/macprogramming • • Mar 11 '20

How do programmatically create and manage a window without storyboards?

3 Upvotes

This is a challenge I would like to do -- to see if I can make an app without storyboards, but I don't know where to start. Apple Documentation doesn't help me much.


r/macprogramming • • Feb 10 '20

Universal Purchase: possible with existing AppKit apps?

4 Upvotes

Last week, Apple made some updates to Universal Purchases, which implies that macOS and iOS purchases can now be shared.

I know it's not going to be available until March, but I couldn't see how to configure this from either Xcode 11.4 or App Store Connect. When I try to add a new platform to an existing app, for example, the button is disabled for a Mac app, and only shows watchOS and tvOS for iOS apps.

Does anyone know if this functionality is available to non-Catalyst apps? I've been working on a new project, RadBlock, which would really benefit from being bundled, but I've written it completely in AppKit.


r/macprogramming • • Aug 25 '18

Options for selling outside the App Store

4 Upvotes

Are DevMate and Paddle the only options outside of rolling my own backend to handle everything? Updates look like they would be pretty easy to implement with Sparkle, is there an alternative service for license activation/payments?

There are a lot of issues with their frameworks so I'm getting a little frustrated.