본문 바로가기

프로그래밍/MAC OS

(12)
macOS 파인더 빠른동작 메뉴에 "vscode 로 열기" 추가하기 윈도우에서는 vscode 가 설치되면 explorer 컨텍스트 메뉴에 자동으로 vscode 로 열기가 추가되어서 편리했던 것 같다. macOS 에서는 이 메뉴가 없어서 매우 불편했다. 그래서 설정하려고 찾아보니, finder 의 "빠른동작"으로 vscode 로 열기를 추가하는 방법이 있었다. https://thehotcode.com/macos-open-with-vscode-finder/ Add "Open with Visual Studio Code" in Finder Quick actions in MacOS If you already have a Windows computer, a nice feature when Visual Studio Code is installed is that… thehotcode...
macOS Xcode 에서 한글입력 특이사항 간단하게 이름과 나이를 입력받아 출력해 주는 C 프로그램이다. 간단히 실행한 내용은 다음과 같다. 이름을 입력하세요. : 홍길녀 나이를 입력하세요. : 18 나의 이름은 홍길녀 이고, 나이는 18 입니다. 이름의 바이트 길이는 24. 이름[00:03] = e1 84 92 = ᄒ 이름[03:06] = e1 85 a9 = ᅩ 이름[06:09] = e1 86 bc = ᆼ 이름[09:12] = e1 84 80 = ᄀ 이름[12:15] = e1 85 b5 = ᅵ 이름[15:18] = e1 86 af = ᆯ 이름[18:21] = e1 84 82 = ᄂ 이름[21:24] = e1 85 a7 = ᅧ 리눅스 등에서 일반적으로 utf-8 의 한글은 한음절이 3바이트로 인코딩되는데, 위 결과를 보면, 자모 하나 당..
spctl rejected (the code is valid but does not seem to be an app) 앱 공증(notarization)에 성공했으나, spctl 커맨드로 확인해 보면, code is valid but does not seem to be an app 이라는 에러가 발생하는 경우에 대한 타래 ( https://developer.apple.com/forums/thread/658054 )의 번역. I've successfully notarized my app. Apple sends me an email saying so. But a minute later, I try running the app but it has a white circle/slash over the icon. It will not run. So I check the notarization with: $ spctl --asses..
communcation over XPC is asynchronous https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html Designing an Interface The NSXPCConnection API takes advantage of Objective-C protocols to define the programmatic interface between the calling application and the service. Any instance method that you want to call from the opposite side of a connection must be explicitl..
Cocoa 와 CocoaTouch 의 차이점 Cocoa 는 기본 라이브러리인 Foundation (모든 애플 디바이스 공통)과 데이터베이스 라이브러리인 CoreData와 유저인터페이스 라이브러리인 AppKit 을 포괄하는 상위그룹으로, Mac 프로그래밍을 위한 응용프로그램 환경이다. CocoaTouch 는 나중에 iOS 를 위해 나온 것이고, AppKit 의 자리에 UIKit 을 사용한다. AppKit 의 이름에는 NS 로 시작하는 것이 많고, 이것은 NeXTSTEP 에서 나온 것이다. UIKit 은 애플에서 새롭게 만든 것이라 UI 라는 프리픽스가 붙어있다. 두 프레임워크 간에는 UI와 NS 프리픽스만 다른 유사한 UI엘리멘트들이 있다. ref : MacOS by Tutorial by Sarah Reichelt Raywenderlich
mojave 에서 gatekeeper 비활성화하여, notarization 안 된 프로그램 실행하기 Mojave 에서 테스트했다. notarization 이 안 된 프로그램을 실행하기 위해서 macos 의 gatekeeper 를 죽이는 명령어 sudo spctl --master-disable 실행 후에, system preference - security & privacy - general 탭의 allow apps downloaded from 부분을 보면 다음과 같이 없어졌던 anywhere 옵션이 다시 생긴 것을 볼 수 있다. 이를 다시 원래대로 되돌리려며, master-enable 인자로 같은 명령을 실행하면 된다. sudo spctl --master-enable
OS X Specific Directories /Applications : 애플리케이션의 디폴트 베이스 디렉토리 /Developer : XCode 가 설치되었을 경우, 개발툴의 기본 설치경로 /Library : 데이터파일, 헬프파일, 다큐멘테이션 등 /Network : /System : 시스템파일 디렉토리. 하위에 Library 디렉토리가 있고, 그 아래 대부분의 주요 시스템 컴포넌트, 프레임워크 ( /System/Library/Frameworks ), 커널모듈 ( /System/Library/Extensions ), 폰트 등등이 들어있다. /Users : 사용자 홈 디렉토리의 베이스. /Volumes : 이동식 미디어, 네트워크 파일시스템등의 마운트포인트. /Cores : 코어덤프 저장 디렉토리. mac os x internals - jonatha..
[macOS|brew] /usr/local/Cellar 디렉토리는 무엇인가? /usr/local/Cellar 는 Homebrew 가 패키지들이 설치되는 디렉토리. brew 는 양조(술만들기) Cellar 는 술을 저장하는 지하실 테스트머신의 Cellar 디렉토리에서 ls 를 해본 결과. drwxr-xr-x 3 user admin 96B Feb 11 17:38 autoconf drwxr-xr-x 3 user admin 96B Feb 11 17:38 automake drwxr-xr-x 3 user admin 96B Feb 7 17:23 ca-certificates drwxr-xr-x 3 user admin 96B Feb 7 18:07 cmake drwxr-xr-x 3 user admin 96B Feb 7 18:19 gdbm drwxr-xr-x 3 user admin 96B Feb 1..