Questions tagged [macos]

macOS (formerly known as OS X or Mac OS X) is the desktop operating system from Apple, found on Macintosh computers. Use this tag only if your question relates to using macOS APIs or macOS-specific behavior, not because you happen to run your code on macOS. Questions relating to using or troubleshooting macOS are off-topic and belong in the Ask Different community instead.

macOS (formerly known as OS X until 2016 and Mac OS X until 2012) is the desktop operating system from Apple Inc., found on Macintosh computers.

Use this tag for questions about writing and debugging programs on macOS. Questions relating to using or troubleshooting macOS are off-topic (use apple.stackexchange.com instead).

macOS() consists of a Mach/BSD-based kernel, operating system interfaces primarily based on FreeBSD (), and additional frameworks (written in C (), C++ (), Objective-C () and Swift () providing user interface and application-level services.

It was the successor to Mac OS 9. macOS is based upon the NeXTSTEP and OpenStep operating systems developed in the 1980s and 1990s by NeXT Inc., which Apple purchased in 1996.

Versions

  • Current macOS Big Sur
  • macOS Catalina 10.15.1
  • macOS Mojave 10.14.1
  • macOS High Sierra (10.13)
  • macOS Sierra (10.12)
  • OS X El Capitan (10.11)
  • OS X Yosemite (10.10)
  • OS X Mavericks (10.9)
  • OS X Mountain Lion (10.8)
  • OS X Lion (10.7)
  • OS X Snow Leopard (10.6)
  • OS X Leopard (10.5)
  • OS X Tiger (10.4)
  • OS X Panther (10.3)
  • OS X Jaguar (10.2)
  • OS X Cheetah (10.1)
  • OS X Puma (10.0)

More information:

116456 questions
40
votes
3 answers

Colon (:) appears as forward slash (/) when creating file name

I am using date and time to label a new file that I'm creating, but when I view the file, the colon is a forward slash. I am developing on a Mac using 10.7+ Here is the code I'm using: File.open("#{time.hour} : 00,…
BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
40
votes
2 answers

How can I verify that I am running on a given GCD queue without using dispatch_get_current_queue()?

Recently, I had the need for a function that I could use to guarantee synchronous execution of a given block on a particular serial dispatch queue. There was the possibility that this shared function could be called from something already running on…
Brad Larson
  • 170,088
  • 45
  • 397
  • 571
40
votes
6 answers

Sublime Text 2: how to position cursor at begin/end of buffer?

I feel silly having to ask what seems like a basic question. I've Googled plenty, and I've examined the Default(OSX).sublime-keymap file, but I can't figure out: How can I make the cursor jump to the beginning/end of the current buffer in Sublime2…
George Armhold
  • 30,824
  • 50
  • 153
  • 232
40
votes
6 answers

Paramiko "Unknown Server"

I'm trying to get started with the Paramiko library, but the library is throwing an exception as soon as I try to connect with the following simple program: import paramiko ssh = paramiko.SSHClient() ssh.connect('127.0.0.1', username='boatzart',…
rcv
  • 6,078
  • 9
  • 43
  • 63
40
votes
5 answers

Regex to batch rename files in OS X Terminal

I'm after a way to batch rename files with a regex i.e. s/123/onetwothree/g I recall i can use awk and sed with a regex but couldnt figure out how to pipe them together for the desired output.
user370507
  • 477
  • 2
  • 12
  • 20
40
votes
8 answers

Mac OS X equivalent of Linux flock(1) command

Is there a flock command on Mac OS X that manages file lock? http://linux.die.net/man/1/flock
png
  • 5,990
  • 2
  • 25
  • 16
39
votes
1 answer

Xcode: Dragging a Project to a Workspace shows tiny .xcodeproj file in Project Navigator. What's wrong?

Setup: Xcode 4.3.1 (or 5.x) OS X 10.7.3 I have reproduced this issue on two separate late-model Macs with this setup. Steps: Create a new Mac "Cocoa Application" Xcode Project. File > New > Project… Name it "MyApp". Create a new Workspace: File >…
Todd Ditchendorf
  • 11,217
  • 14
  • 69
  • 123
39
votes
10 answers

Tilde not recognized in Mac terminal

I have this weird situation on my Mac running OSX Lion where the ~ (tilda) does not go to my user directory. Instead when I type "cd ˜", I get: -bash: cd: ˜: No such file or directory Any advice on how to fix this?
rasheqrahman
  • 511
  • 1
  • 4
  • 5
39
votes
10 answers

make matplotlib plotting window pop up as the active one

I'm working with python and matplotlib on mac os x. When I'm working on many different windows and I have to run a script which produces a plot, the plot window always open behind the active window and is very frustration having to switch between…
Luca Fiaschi
  • 3,145
  • 7
  • 31
  • 44
39
votes
3 answers

How to increase limits on sockets on osx for load testing?

I'm creating a load tester that uses libev to create lots of open tcp connections to an app i'm working on. Currently it bombs out at 256 connections, due to the nofiles limit: ulimit -n 256 I can increase this to 1024 by doing the below: ulimit -n…
Chris
  • 39,719
  • 45
  • 189
  • 235
39
votes
5 answers

How to run a script as root on Mac OS X?

What should I type on the Mac OS X terminal to run a script as root?
Mac
  • 2,693
  • 7
  • 36
  • 44
39
votes
11 answers

How to create a Mac OS X app with Python?

I want to create a GUI application which should work on Windows and Mac. For this I've chosen Python. The problem is on Mac OS X. There are 2 tools to generate an ".app" for Mac: py2app and pyinstaller. py2app is pretty good, but it adds the source…
Cristian Ciocău
  • 1,024
  • 2
  • 10
  • 14
39
votes
6 answers

Add a relative path to $PATH on fish startup

I want to add ./bin directory (which is relative to current shell directory) to $PATH on fish startup. Note that fish is a shell. echo $PATH set PATH ./bin $PATH echo $PATH If I place these lines inside ~/.config/fish/config.fish the shell will…
Simon Perepelitsa
  • 20,350
  • 8
  • 55
  • 74
39
votes
3 answers

What does NSURLConnection's error code "-1009" mean?

When I send a request and get an error with the error code -1009, what does that mean? I'm not sure how to handle it. - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{ NSLog(@"connection didFailWithError"); …
jxx
  • 405
  • 1
  • 4
  • 6
39
votes
5 answers

Terminal slow to start first time due to xcodebuild

The first time I run Terminal or start SmartGit either one is slow to start, taking up to ~30 seconds. When I look at the status bar for Terminal I see that it is stuck running some xcodebuild command. Not sure what exactly the command is. Does…
Dhananjay Suresh
  • 1,030
  • 1
  • 14
  • 28
1 2 3
99
100