https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html


  • Localization and Keyboard settings (including 3rd party keyboards) are not correctly honored by Safari, Maps, and developer apps in the iOS 8.1 Simulator. [NSLocale currentLocale] returns en_US and only the English and Emoji keyboards are available. (18418630, 18512161)


[NSLocale currentLocale] 이 메소드를 런타임 Swizzling하면 해결.


NSLocale 카테고리 파일을 만들어서

appnema-Prefix.pch에 아래와 같이 추가


#import "NSLocale+ios8_1.h"


----------------------------------

//

//  NSLocale+ios8_1.h

//

//  Created by Uzysjung on 2014. 11. 11..

//  Copyright (c) 2014 SKPlanet. All rights reserved.

//


#import <Foundation/Foundation.h>

#if TARGET_IPHONE_SIMULATOR

@interface NSLocale (iOS8_1)

@end

#endif



----------------------------------


//

//  NSLocale+ios8_1.m

//

//  Created by Uzysjung on 2014. 11. 11..

//  Copyright (c) 2014 SKPlanet. All rights reserved.

//


#if TARGET_IPHONE_SIMULATOR

#import "NSLocale+ios8.1.h"

#import <objc/runtime.h>


@implementation NSLocale (iOS8_1)


+ (void)load

{

    Method originalMethod = class_getClassMethod(self, @selector(currentLocale));

    Method swizzledMethod = class_getClassMethod(self, @selector(swizzle_currentLocale));

    method_exchangeImplementations(originalMethod, swizzledMethod);

}


+ (NSLocale*)swizzle_currentLocale

{

    return [NSLocale localeWithLocaleIdentifier:@"ko_KR"];

}


@end


#endif



저작자 표시 비영리 변경 금지
신고
1 2 3 4 5 6 7 ... 25


티스토리 툴바