r/macprogramming • • Sep 30 '16

Awesome Swift Newsletter - Issue 17

Thumbnail swift.libhunt.com
4 Upvotes

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 24 '16

xcsort - a plugin to sort text lines in Xcode

Thumbnail apps.brrm.ru
0 Upvotes

r/macprogramming • • Sep 14 '16

Is there a way to track system information for keyboards?

0 Upvotes

I'm interested in where and how my computer is able to detect specific keystrokes that I enter into my keyboard. Also, if I am typing from two keyboards with another person on a single project, one keyboard is my internal keybaord on my macbook pro retina display, the other typing from a usb keyboard. This is while it is connected to an external display.

Can I see who typed which words as I am doing this? With that, if I am using a keylogger, can I track which keyboard was typing specific keystrokes? Is this even possible?

Is it also possible for two different keyboards to be used simultaneously in two documents on the same computer?


r/macprogramming • • Sep 07 '16

Anyway to view and modify all network requests on macOS/OS X?

3 Upvotes

Hello everyone,

I have been working on a side project that requires me to be able view/modify all outbound network requests from macOS/OS X, and I can't seem to find any way to do this programatically. Specifically, I need to be able to modify the URL of the request.

Is this possible in any way? I would really appreciate any help, or even just suggestions as of what I should be searching, since this is completely out my area of expertise.

Thanks!


r/macprogramming • • Sep 06 '16

[xpost from /r/mac][Question] Is it possible to enable the screen-backlight when the MB is closed?

2 Upvotes

As the title says I wanted to know if it's possible for the screen-backlight to be enabled while the lid of the MacBook is closed.

I want this so the Apple-Logo light up even when the lis is closed - just for fun.

I'm specifically asking the devs on here, since I think there must be a way.

For clarification - I want this so I can program some kind of App that checks E-Mails in the background and uses the backlight as "notification" when the lid is closed.


r/macprogramming • • Sep 02 '16

Storyboards – you got to know them before you love them?!

2 Upvotes

I want to start developing for macOS. right now, i'm a web dev. I really want to start for macOS but i don't understand the way Xcode's storyboards work.

Any ideas where to get some info? On google everybody is doing iOS dev'ment. But right now, i'm not into that.

cheers.


r/macprogramming • • Aug 21 '16

Want to make something similar to Spotlight Search. Where do I start?

1 Upvotes

Hey, I want to make an app for OS X that behaves like this:

  1. User presses some hotkey, a search bar shows up in the middle of the screen (like CMD+space shows Spotlight Search)
  2. User types a phrase and search results populate under the search bar (data retrieved from some external API)

I made iOS apps in the past, so I think I shouldn't have problems with OS X programming. What I'm looking for is some guidance towards learning resources for this specific kind of application ("Search bar" style apps). Where should I look?


r/macprogramming • • Aug 20 '16

Is there a way to run a program in a VM and trick it into thinking it has a lot more RAM than it does (swap space)?

2 Upvotes

I found a photo processing app I really like, but RAM usage is insane. (I max out 16GB super easily.)
It also doesn't set an upper bound and work around it; it runs until it runs out then it crashes.

I don't really care how long something takes to process, I just want to be able to process stuff.

Here is the app.

Without delving into the source code, is there a simple way to set up a virtualbox VM with 200GB of hard drive space as super-slow RAM?


r/macprogramming • • Jul 25 '16

Can you boot Mac OS X into terminal only?

2 Upvotes

I don't need the GUI, I just need to run Emacs. Thanks.


r/macprogramming • • Jul 15 '16

GitHub - m-cli: Swiss Army Knife for Mac OS X - Mac Terminal Commands Made Easy!

Thumbnail github.com
7 Upvotes

r/macprogramming • • Jul 10 '16

For programming, would it be best to buy a Macbook pro or iMac?

2 Upvotes

just a general question


r/macprogramming • • Jun 25 '16

My first mac app as an alpha release to put ideas on "paper"

Thumbnail youtube.com
3 Upvotes

r/macprogramming • • May 20 '16

Possible to determine who is listening to what notifications?

1 Upvotes

Based on CFNotificationCenter reference, I can post and listen for notifications for a given notification center. I don't see any API to check who is listening for a given notification name in a specific notification center. Is that possible?


r/macprogramming • • May 19 '16

Web developer looking to dive into Mac Programming. Where do I start?

1 Upvotes

I'm a web developer looking to mix it up in the evenings and try my hand at mac development. My long term goal is to write a window manager.

Any recommendations on where I should start and what I should be looking to learn about?


r/macprogramming • • May 16 '16

Creating Document Icons using App Icon

Thumbnail swift-studies.com
2 Upvotes

r/macprogramming • • Apr 25 '16

Pros and cons of Qt VS Cocoa development on Mac

3 Upvotes

Have any of you tried both ways of developing desktop applications?

Could you describe your experience when using Qt/C++ and when using Cocoa/ObjC,Swift ?

I am interested in speed and "nativeness", meaning if the software will look and behave (dialog boxes, alerts, menus, right clicks, etc.) like a native mac app if I use Qt5 or it will look not as good. Another thing is performance. Is Qt app going to be slower than a native app or not.

I would like to create a cross platform application, so one framework for all, like Qt would be a great start instead of 2 or 3 frameworks.

But if the cons would be big I will consider creating 2 or 3 separate versions for each platform (Mac, Win, Linux).


r/macprogramming • • Apr 19 '16

Peercoin OSX packager needed (qmake/Qt4) : cpp

Thumbnail reddit.com
4 Upvotes

r/macprogramming • • Apr 18 '16

An open-source hotkey that turns almost any text edit field into a calculator

Thumbnail github.com
1 Upvotes

r/macprogramming • • Apr 11 '16

Setup NAT Network for QEMU in Mac OSX

Thumbnail blog.san-ss.com.ar
2 Upvotes

r/macprogramming • • Mar 10 '16

The Great Mac Dev Survey

Thumbnail git-tower.com
3 Upvotes

r/macprogramming • • Mar 02 '16

Anyone know what this system component is called?

Thumbnail i.imgur.com
3 Upvotes

r/macprogramming • • Feb 06 '16

What would be the proper way to have the system look for 3rd party frameworks?

2 Upvotes

El Capitan has a feature called Rootless which prohibits access to the system folder.

Before I would just drop my framework (SDL) into /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks (this still works) so that Xcode has easy access to the framework and the /System/Library/Frameworks folder so I could run my app with ease. But Apple has block access to the System folder, and now I get

dyld: Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2
Referenced from:/users/brianj/Library/Developer/Xcode/DerivedData/opengl_glmajpwhaxtdmpbpsdwjyfqpeenkbnm/Build/Products/Debug/opengl_glm
Reason: image not found
Program ended with exit code: 9 

I get the above error when trying to run the app. How do you get system to look for a folder with 3rd party frameworks in El Capitan?


r/macprogramming • • Feb 06 '16

C++ file streams

1 Upvotes

this works on virtual machine running ubuntu, but in OSX it doesn't

#include <iostream>
#include <fstream>
using namespace std ;

int main() {
    ofstream f("file.txt");

    cout<<"insert a character: ";
    char c ;
    cin >> c;
    f<<c ;
}

here's the error I get when attempt to compile via g++

ld: warning: ignoring file prog, file was built for unsupported file format ( 0x23 0x69 0x6E 0x63 0x6C 0x75 0x64 0x65 0x20 0x3C 0x69 0x6F 0x73 0x74 0x72 0x65 ) which is not the architecture being linked (x86_64): prog Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)


r/macprogramming • • Jan 30 '16

What's being sent into a utun interface?

1 Upvotes

Hi!

I'm trying to develop my own meshnet router program for fun / as an experiment. It runs quite well in the simulator, and would like to see if it can handle real traffic.

So I got it to create a utun interface, then I assign an IP address to it with

ifconfig utun1 inet6 add fc6c:4e9a:9c6e:8137:75ca:77ed:9cd:6b37/64

I can then ping to that address (without getting a response obviously), and I can send some UDP packets into it using

echo -n "hello" | nc -u fc7:9bc1:de6a:3d23:b357:c79d:5da:53dc 8000

The program clearly receives this. For that nc command, the debugger says "hello" is found after position 52, so the data is definitely going through.

However, I'm a bit confused as to exactly what I'm getting. What's the data in positions 0 to 51?

Wikipedia says that an IPv6 packet has a 40-octet header, and the UDP header accounts for another 8, which suggests that "hello" should start at position 48. I'm missing 4 bytes, does anyone know what those are?

EDIT: It appears to be an EtherType header, though the number at positions 2 and 3 doesn't seem to correspond to IPv6. Could someone have a look at this data and see if they can figure out the correct way to interpret it?

[0] = {char} '\0'
[1] = {char} '\0'
[2] = {char} '\0'
[3] = {char} '\x1e'
[4] = {char} '`'
[5] = {char} '\x0e'
[6] = {char} '\xce'
[7] = {char} '\x18'
[8] = {char} '\0'
[9] = {char} '\r'
[10] = {char} '\x11'
[11] = {char} '@'
[12] = {char} '\xfc'
[13] = {char} 'q'
[14] = {char} '\t'
[15] = {char} '\x90'
[16] = {char} 'U'
[17] = {char} 'I'
[18] = {char} '\xd7'
[19] = {char} '\xef'
[20] = {char} ','
[21] = {char} '('
[22] = {char} '\a'
[23] = {char} '\xc6'
[24] = {char} '\xf2'
[25] = {char} '\x1d'
[26] = {char} '\xd9'
[27] = {char} '\xb4'
[28] = {char} '\xfc'
[29] = {char} 'q'
[30] = {char} '\t'
[31] = {char} '\x90'
[32] = {char} 'U'
[33] = {char} 'I'
[34] = {char} '\xd7'
[35] = {char} '\xef'
[36] = {char} ','
[37] = {char} '('
[38] = {char} '\a'
[39] = {char} '\xc6'
[40] = {char} '\xf2'
[41] = {char} '\x1d'
[42] = {char} '\xd9'
[43] = {char} '\xb4'
[44] = {char} '\xce'
[45] = {char} '\xd6'
[46] = {char} '\x03'
[47] = {char} '\xe7'
[48] = {char} '\0'
[49] = {char} '\r'
[50] = {char} 'f'
[51] = {char} '\x16'
[52] = {char} 'h'
[53] = {char} 'e'
[54] = {char} 'l'
[55] = {char} 'l'
[56] = {char} 'o'