[os-x] Continuous Integration xcode

http://papaanton.com/setting-up-xcode-6-and-apple-server-4-0-for-continues-integration-with-cocoapods/

https://byunsooblog.wordpress.com/2014/01/14/error-linker-command-failed-with-exit-code-1/

build script for upload

http://hack.swic.name/automated-xcode-6-bot-testflight-uploads/

[ios] delegate must live longer than owner

http://stackoverflow.com/questions/5091693/check-if-delegate-still-exists-before-calling-respondstoselector

To avoid delegate crash delegate must live longer than owner

Or owner’s delegate property must be weak reference

Sample Code :

https://github.com/sungkipyung/CodeSample/blob/master/DelegateCrashTryCatchExample/DelegateCrashTryCatchExample/ViewController.m


#import "ViewController.h"
#import "SimpleObject.h"

@interface ViewController ()

@property (nonatomic, strong) SimpleObject *obj;
@property (nonatomic, assign) iddelegate;
@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.obj = [[SimpleObject alloc] init];
self.delegate = self.obj;
NSLog(@"self.delegate address : %ud", self.delegate);
}

//overcome crash
- (void)setObj:(SimpleObject *)obj
{
_obj = obj;
self.delegate = obj;
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)actionDelegateCall:(id)sender {
@try {
NSLog(@"self.delegate address : %ud", self.delegate);
[self.delegate helloWorld]; // what the hell !!!
// delegate must live longer than me!
}
@catch (NSException *exception) {
NSLog(@"%@", exception);
}
@finally {
NSLog(@"Overcome Exception");
}

}
- (IBAction)actionDeallocObj:(id)sender {
NSLog(@"self.delegate address : %ud", self.obj);
NSLog(@"self.delegate address : %ud", self.delegate);

self.obj = nil;
NSLog(@"self.delegate address : %ud", self.obj);
NSLog(@"self.delegate address : %ud", self.delegate);
}

@end

[생각의 정리- 딴생각] 중간점검

내가 부족한 것을 중간 점검 해보자.

0. 테스트 자동화 (os-x 서버에 테스트 기기 붙여서 테스트 자동화 & 유닛 테스트 & 튜닝을 위한 성능 테스트 자동화, Memory Leak 탐지 자동화, 코드 퀄리티 관리, 정적분석(xcode 있나?), Daily Build(Nightly Build), 문서 자동화
욕심은 겁나 많다….

난 일중독이 아니라 이런 공부가 좋은듯 ㅋㅋ (Manage myself , Self Inspiration, Self…음 물은 Self 다)

1. Swift (생산성 향상에 도움이 될 것 같다. 이제 공부할 때다)

2. Object Life Cycle Management Framework for Obj-C and Swift
Spring과 같은 강력한 뭔가 없다. 클라이언트 코드에서는 객체간의 life cycle관리가 꽤 어려운데
Bean container와 같은 녀석이 있으면 참 편할 것 같다는 ㅎㅎ

3. OS X 앱 프로그래밍 (앞으로 윈도우보다 점유율이 더 올라갈 것이다.)

4. AirDisplay 이거보다 싸고 좋은거 내가 만들어 1달러에 팔꺼다.

5. iWatch SDK 나오면 좀 봐야겠다.

6. 웹섹션? 서버 프로그래밍은 3년 넘게 개발 해왔지만 모르는게 많다? 는 아니고
서버 개발이 서버 설정부터 시작해서 튜닝, 네트워크 등등…한 사람이 하기에…
할일이 너무 많아… 다 잘할려면 늙어 죽을꺼야…
굳이 도메인으로만 따지자면 동영상 인코딩, 스트리밍 네트워크 구축 (인증까지 포함해서)
검색이야 Lucene이 이제 다 잡아먹는듯

7. …..아 그럼 연애는 언제하고 결혼은 언제하지… 이게 최우선이다 OTL

최근 생활 패턴은…. 보자…

월 ~ 금 :

프로그래밍 : 총 45시간

정규업무 10:00 – 19:00 (평균 6시간)
퇴근 후 프로그래밍 공부 21:00 – 24:00 (평균 3시간)

독서 : 총 5시간 (출퇴근길 이용)

운동 : 총 2시간…헐…

연애 : 0시간 (없음 ㅠ)

주말 :

프로그래밍 : 총 10시간

19:00 ~ 24:00 평균 5시간

독서 : 0시간

운동 : 1시간?

연애 : 0시간

결혼식 등등 행사 참석 생기면 : 3-4 시간

[ios] share

UIActivityViewController.h

// share button example
NSString *texttoshare = @"text to share";
UIImage *imagetoshare = [UIImage imageNamed:@"search.jpg"];
NSArray *activityItems = @[texttoshare, imagetoshare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes = @[];
[self presentViewController:activityVC animated:TRUE completion:nil];