‘Editor’ 카테고리의 보관물
iOSDev, CoreData, Warning, Receiver ‘NSManagedObjectContext’ is a forward class and corresponding @interface may not exist
Receiver ‘NSManagedObjectContext’ is a forward class and corresponding @interface may not exist
해결 :
Supporting Files / ProjectName-Prefix.pch 에 #import <CoreData/CoreData.h> 추가
예)
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#endif
Xcode 4.2, TODO, FIXME, ???, !!! 등등 개발 예약어 활용
출처 : http://stackoverflow.com/questions/5891193/xcode-using-fixme-todo
Xcode 개발에서 TODO, FIXME 같은 예약어를 잘 사용하는 것도
버그를 줄이고 실수를 반복하지 않으면서 개발 할 수 있는 한가지 방법일 것 같다.
개인이 개발할때도 유용하지만 여러명이서 협업을 할때 꼭 필요하지 않을까? 생각한다.
Xcode 3.x 대에서는 FIXME가 메소드 안에서도 작동을 했지만,
Xcode 4.x 대로 올라가면서 메소드 안에서는 버그(?)로 바로가기(점프?) 목록에 표시되지 않는다.
여기서 설명은 3가지로 하겠다.
- 기본적인 예약어 쓰임.
- Xcode 4.2 버전에서 예약어 사용을 위한 스크립트.
- #warning, #error 사용.
1. 기본적인 예약어 쓰임.
다음은 프로그램 하면서 쓸 수 있는 예약어 이다.
(이게 전부 인지는 모르겠지만 이정도면 충분하지 않을까?)
[주의] 예약어를 맞게 잘 쓰자!
주석 예약어 : “//TODO:”, “//FIXME:”, “//???:” …
주의깊게 보셔야 할것은 띄어쓰기가 없고 뒤에 콜론이 있는 것입니다.
이것을 보고 메소드 점프 메뉴에 표시되게 됩니다.
형식을 맞춰서 사용하세요.
//MARK: "#pragma mark" 와 비슷
//TODO: 언젠간 하고 말꺼얌!
//FIXME: 이거 고쳐주삼!
//???: 이게 뭘까?
위 스샷을 보면 알겠지만, 메소드 밖에 있는 FIXME는 잘 보여지지만
메소드 안에 있는 FIXME는 보이지 않음을 볼 수 있다.
2. Xcode 4.2 버전에서 예약어 사용을 위한 스크립트.
스크립트 :
KEYWORDS="TODO|FIXME|\?\?\?:|\!\!\!:"
find ${SRCROOT} \( -name "*.h" -or -name "*.m" \) -print0 | \
xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | \
perl -p -e "s/($KEYWORDS)/ warning: \$1/"
2.1 설정 #1
2.2 설정 #2
2.3 컴파일 후 결과
3. #warning, #error 사용.
#warning TODO: 언젠간 하고 말꺼얌!
#error FIXME: 이거 고쳐주삼!
컴파일 시 워닝이 보이거나 컴파일 에러를 일으킴.
추가, #progma mark 도 쓰자.
TextWrangler Command-Line Tools
Download Information :
http://www.barebones.com/store/macappstore.html
Are there any differences between the Mac App Store versions of your software and the versions available directly from your web site?
Yojimbo is functionally identical whether you purchase from our online store, or from the Mac App Store.
In BBEdit and TextWrangler, authenticated saves (the ability to save changes to files that you do not own) and the command-line tools are not available in the Mac App Store versions, in order to comply with Apple’s submission guidelines.
Authenticated saves: BBEdit 10.1.1 adds a scripting attachment point which makes this possible. A script and instructions for installing it are available on this page.
Command-line tools: Any customer who has purchased BBEdit or TextWrangler from the Mac App Store may use the following packages to install the command-line tools on their system. (These packages are only for use with the Mac App Store versions of BBEdit or TextWrangler, and are not suitable for use otherwise.)
BBEdit command-line tools installer: download
TextWrangler command-line tools installer: download
Installation files :
/usr/local/bin/edit
/usr/local/bin/twdiff
/usr/local/bin/twfind
/usr/local/share/man/man1/edit
/usr/local/share/man/man1/twdiff
/usr/local/share/man/man1/twfind.1
iOSdev, PNG 최적화 스크립트.( pngcrush + advpngidat )
1. 참고 링크
2. pngcrush, advpngidat 사용법
- pngcrush (extreme)
$ pngcrush -fix -iphone -brute hello_world.png ./Resources/hello_world.png
- advpngidat
$ advpngidat -z4f Resources/hello_world.png
3. 스크립트
Xcode-OptimizePNG 를 참고해서 만든 PNG를 Extreme 최적화 시키는 스크립트입니다.
- 최적화 스크립트 : optpng.sh
※ 참고 : 첨부파일 확장자 제한으로 확장자 odt를 붙임. - 사용법 :
~/bin $ ./optpng.sh
Usage :
./optpng.sh [*.png|filename.png]
Xcode, .h, .m 분할(split) 해서 같이 보기.
사실 이 섹션의 제목은 ”Find and Display Related Content” 이다.
관련된 것을 찾아서 보여주는 것인데…
.h 와 .m이 서로 많이 쓰이고 전달이 쉬울 것 같아서 이렇게 제목을 붙였다.
1. The Assistant button

누르면 분할 화면으로 .h 에 매칭되는 .m 파일이 열린다. (혹은 반대로…)

2. 레이아웃 변경. 가로분할, 세로분할 설정을 할 수 있음.
Menu 에서
View > Assistant Layout

- 끝 -
Linux, Emacs 내장입력기 사용하기. (외장입력기 끄기)
$HOME/.Xresources (없으면 만들고) 에 “Emacs.useXIM: off” 를 추가 해준다.
$ cat $HOME/.Xresources
...
Emacs.useXIM: off
참고,
예전에 이글루스에 쓴글, 다른 방법…
개미나라 : Emacs, 자체 입력기(input method) 사용하기.
- 끝 -








