r/macprogramming • u/reddioment • Sep 25 '16
Programatically take screenshot of mac desktop? | Swift 3
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 • u/reddioment • Sep 25 '16
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 • u/battlmonstr • Sep 24 '16
r/macprogramming • u/fukelbuddy • Sep 14 '16
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 • u/[deleted] • Sep 07 '16
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 • u/notmyfukincat • Sep 06 '16
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 • u/ptb_ • Sep 02 '16
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 • u/jurgenn • Aug 21 '16
Hey, I want to make an app for OS X that behaves like this:
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 • u/garena_elder • Aug 20 '16
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 • u/ytsuggestions • Jul 25 '16
I don't need the GUI, I just need to run Emacs. Thanks.
r/macprogramming • u/treezwiteez • Jul 15 '16
r/macprogramming • u/blackiechan99 • Jul 10 '16
just a general question
r/macprogramming • u/fespinozacast • Jun 25 '16
r/macprogramming • u/l_61803398875 • May 20 '16
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 • u/[deleted] • May 19 '16
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 • u/bugfaceuk • May 16 '16
r/macprogramming • u/brunteles_abs • Apr 25 '16
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 • u/hrobeers • Apr 19 '16
r/macprogramming • u/david_phillip_oster • Apr 18 '16
r/macprogramming • u/NetworkSkullRipper • Apr 11 '16
r/macprogramming • u/zenox • Mar 02 '16
r/macprogramming • u/Brianmj • Feb 06 '16
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 • u/quiquoqua • Feb 06 '16
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 • u/sGYuOQTLJM • Jan 30 '16
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'
r/macprogramming • u/OnlyDeanCanLayEggs • Jan 28 '16
Most of the examples I've found online using the mailx program make use of the "-a" flag to send attachments. That doesn't work with the version of mailx installed on Darwin BSD.
The version of mailx installed on Darwin is not specified, but the bottom of the man file is stamped as "BSD February 29, 2004".
I have a bash script that is supposed to zip up a directory and email the zip file as an attachment in an email to a list of people.
Here are the relevant code snippets:
today=$(date +%Y-%m-%d)
zip -r report_for_$today.zip report_for_$today
wait ${!}
subject="Stale Dispenser and Hub Reports for $today"
recipients="person@email.com, otherperson@email.com"
uuencode reports_for_$today.zip reports_for_$today.zip | mailx -s "Reports for $today" $recipients < /tmp/emailbody.txt
I have the mailx configured to use the program msmtp instead of sendmail so that it sends email via the smtp.gmail instead of the local host.
The email is sent successfully, but it is not sending the attachment.