한국어

스마트폰앱

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


//
//	IASKSettingsReader.m
//	http://www.inappsettingskit.com
//
//	Copyright (c) 2009:
//	Luc Vandal, Edovia Inc., http://www.edovia.com
//	Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com
//	All rights reserved.
// 
//	It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, 
//	as the original authors of this code. You can give credit in a blog post, a tweet or on 
//	a info page of your app. Also, the original authors appreciate letting them know if you use this code.
//
//	This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php
//

#import "IASKSettingsReader.h"
#import "IASKSpecifier.h"

@interface IASKSettingsReader (private)
- (void)_reinterpretBundle:(NSDictionary*)settingsBundle;
- (BOOL)_sectionHasHeading:(NSInteger)section;
- (NSString *)platformSuffix;
- (NSString *)locateSettingsFile:(NSString *)file;

@end

@implementation IASKSettingsReader

@synthesize path=_path,
localizationTable=_localizationTable,
bundlePath=_bundlePath,
settingsBundle=_settingsBundle, 
dataSource=_dataSource,
hiddenKeys = _hiddenKeys;

- (id)init {
	return [self initWithFile:@"Root"];
}

- (id)initWithFile:(NSString*)file {
	if ((self=[super init])) {


		self.path = [self locateSettingsFile: file]; ///셋팅파일 plist  path
		[self setSettingsBundle:[NSDictionary dictionaryWithContentsOfFile:self.path]];//setSettingsBundle 에 내용 저장
self.bundlePath = [self.path stringByDeletingLastPathComponent]; _bundle = [NSBundle bundleWithPath:[self bundlePath]]; // Look for localization file self.localizationTable = [self.settingsBundle objectForKey:@"StringsTable"]; if (!self.localizationTable) { // Look for localization file using filename self.localizationTable = [[[[self.path stringByDeletingPathExtension] // removes '.plist' stringByDeletingPathExtension] // removes potential '.inApp' lastPathComponent] // strip absolute path stringByReplacingOccurrencesOfString:[self platformSuffix] withString:@""]; // removes potential '~device' (~ipad, ~iphone) if([_bundle pathForResource:self.localizationTable ofType:@"strings"] == nil){ // Could not find the specified localization: use default self.localizationTable = @"Root"; } } if (_settingsBundle) { [self _reinterpretBundle:_settingsBundle]; } } return self; } - (void)dealloc { _path = nil; _localizationTable = nil; _bundlePath = nil; _settingsBundle = nil; _dataSource = nil; _bundle = nil; _hiddenKeys = nil; } - (void)setHiddenKeys:(NSSet *)anHiddenKeys { if (_hiddenKeys != anHiddenKeys) { _hiddenKeys = anHiddenKeys; if (_settingsBundle) { [self _reinterpretBundle:_settingsBundle]; } } } - (void)_reinterpretBundle:(NSDictionary*)settingsBundle { NSArray *preferenceSpecifiers = [settingsBundle objectForKey:kIASKPreferenceSpecifiers]; NSInteger sectionCount = -1; NSMutableArray *dataSource = [[NSMutableArray alloc] init]; for (NSDictionary *specifier in preferenceSpecifiers) { if ([self.hiddenKeys containsObject:[specifier objectForKey:kIASKKey]]) { continue; } if ([(NSString*)[specifier objectForKey:kIASKType] isEqualToString:kIASKPSGroupSpecifier]) { NSMutableArray *newArray = [[NSMutableArray alloc] init]; [newArray addObject:specifier]; [dataSource addObject:newArray]; sectionCount++; } else { if (sectionCount == -1) { NSMutableArray *newArray = [[NSMutableArray alloc] init]; [dataSource addObject:newArray]; sectionCount++; } IASKSpecifier *newSpecifier = [[IASKSpecifier alloc] initWithSpecifier:specifier]; [(NSMutableArray*)[dataSource objectAtIndex:sectionCount] addObject:newSpecifier]; } } [self setDataSource:dataSource]; } - (BOOL)_sectionHasHeading:(NSInteger)section { return [[[[self dataSource] objectAtIndex:section] objectAtIndex:0] isKindOfClass:[NSDictionary class]]; } - (NSInteger)numberOfSections { return [[self dataSource] count]; } - (NSInteger)numberOfRowsForSection:(NSInteger)section { int headingCorrection = [self _sectionHasHeading:section] ? 1 : 0; return [(NSArray*)[[self dataSource] objectAtIndex:section] count] - headingCorrection; } - (IASKSpecifier*)specifierForIndexPath:(NSIndexPath*)indexPath { int headingCorrection = [self _sectionHasHeading:indexPath.section] ? 1 : 0; IASKSpecifier *specifier = [[[self dataSource] objectAtIndex:indexPath.section] objectAtIndex:(indexPath.row+headingCorrection)]; specifier.settingsReader = self; return specifier; } - (NSIndexPath*)indexPathForKey:(NSString *)key { for (NSUInteger sectionIndex = 0; sectionIndex < self.dataSource.count; sectionIndex++) { NSArray *section = [self.dataSource objectAtIndex:sectionIndex]; for (NSUInteger rowIndex = 0; rowIndex < section.count; rowIndex++) { IASKSpecifier *specifier = (IASKSpecifier*)[section objectAtIndex:rowIndex]; if ([specifier isKindOfClass:[IASKSpecifier class]] && [specifier.key isEqualToString:key]) { NSUInteger correctedRowIndex = rowIndex - [self _sectionHasHeading:sectionIndex]; return [NSIndexPath indexPathForRow:correctedRowIndex inSection:sectionIndex]; } } } return nil; } - (IASKSpecifier*)specifierForKey:(NSString*)key { for (NSArray *specifiers in _dataSource) { for (id sp in specifiers) { if ([sp isKindOfClass:[IASKSpecifier class]]) { if ([[sp key] isEqualToString:key]) { return sp; } } } } return nil; } - (NSString*)titleForSection:(NSInteger)section { if ([self _sectionHasHeading:section]) { NSDictionary *dict = [[[self dataSource] objectAtIndex:section] objectAtIndex:kIASKSectionHeaderIndex]; return [self titleForStringId:[dict objectForKey:kIASKTitle]]; } return nil; } - (NSString*)keyForSection:(NSInteger)section { if ([self _sectionHasHeading:section]) { return [[[[self dataSource] objectAtIndex:section] objectAtIndex:kIASKSectionHeaderIndex] objectForKey:kIASKKey]; } return nil; } - (NSString*)footerTextForSection:(NSInteger)section { if ([self _sectionHasHeading:section]) { NSDictionary *dict = [[[self dataSource] objectAtIndex:section] objectAtIndex:kIASKSectionHeaderIndex]; return [self titleForStringId:[dict objectForKey:kIASKFooterText]]; } return nil; } - (NSString*)titleForStringId:(NSString*)stringId { return [_bundle localizedStringForKey:stringId value:stringId table:self.localizationTable]; } - (NSString*)pathForImageNamed:(NSString*)image { return [[self bundlePath] stringByAppendingPathComponent:image]; } - (NSString *)platformSuffix { BOOL isPad = NO; #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200) isPad = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad; #endif return isPad ? @"~ipad" : @"~iphone"; } - (NSString *)file:(NSString *)file withBundle:(NSString *)bundle suffix:(NSString *)suffix extension:(NSString *)extension { NSString *appBundle = [[NSBundle mainBundle] bundlePath]; bundle = [appBundle stringByAppendingPathComponent:bundle]; file = [file stringByAppendingFormat:@"%@%@", suffix, extension]; return [bundle stringByAppendingPathComponent:file]; } - (NSString *)locateSettingsFile: (NSString *)file { // The file is searched in the following order: // // InAppSettings.bundle/FILE~DEVICE.inApp.plist // InAppSettings.bundle/FILE.inApp.plist // InAppSettings.bundle/FILE~DEVICE.plist // InAppSettings.bundle/FILE.plist // Settings.bundle/FILE~DEVICE.inApp.plist // Settings.bundle/FILE.inApp.plist // Settings.bundle/FILE~DEVICE.plist // Settings.bundle/FILE.plist // // where DEVICE is either "iphone" or "ipad" depending on the current // interface idiom. // // Settings.app uses the ~DEVICE suffixes since iOS 4.0. There are some // differences from this implementation: // - For an iPhone-only app running on iPad, Settings.app will not use the // ~iphone suffix. There is no point in using these suffixes outside // of universal apps anyway. // - This implementation uses the device suffixes on iOS 3.x as well. // - also check current locale (short only) NSArray *bundles = [NSArray arrayWithObjects:kIASKBundleFolderAlt, kIASKBundleFolder, nil]; NSArray *extensions = [NSArray arrayWithObjects:@".inApp.plist", @".plist", nil]; NSArray *suffixes = [NSArray arrayWithObjects:[self platformSuffix], @"", nil]; NSArray *languages = [NSArray arrayWithObjects:[[[NSLocale preferredLanguages] objectAtIndex:0] stringByAppendingString:KIASKBundleLocaleFolderExtension], @"", nil]; NSString *path = nil; NSFileManager *fileManager = [NSFileManager defaultManager]; for (NSString *bundle in bundles) { for (NSString *extension in extensions) { for (NSString *suffix in suffixes) { for (NSString *language in languages) { path = [self file:file withBundle:[bundle stringByAppendingPathComponent:language] suffix:suffix extension:extension]; if ([fileManager fileExistsAtPath:path]) { goto exitFromNestedLoop; } } } } } exitFromNestedLoop: return path; } @end
조회 수 :
211
등록일 :
2022.06.20
07:04:52 (*.128.149.105)
엮인글 :
http://www.webs.co.kr/index.php?document_srl=3348795&act=trackback&key=2e1
게시글 주소 :
http://www.webs.co.kr/index.php?document_srl=3348795
List of Articles
번호 제목 글쓴이 날짜 조회 수
35 linphone-iphone CallKit reportIncomingCall code analyze admin 2022-07-16 158
34 linphone-iphone SettingsView settingsStore removeAccount admin 2022-06-22 203
33 Linphone-iphone AssistantView code analysis admin 2022-06-22 211
» linphone-iphone IASKSettingsReader .plist-> locateSettingsFile -> setSettingsBundle save admin 2022-06-20 211
31 linphone-iphone IASKSettingsReader IASKSpecifier code analysis admin 2022-06-19 214
30 Linphone-iphone SettingsView code analysis admin 2022-06-18 248
29 linphone-iphone call number call button code analysis admin 2022-06-18 247
28 linphone-iphone/Settings/InAppSettings.bundle/ plist file list code analysis admin 2022-06-16 254
27 linphone-iphone sourcecode SideMenuTableView code analysis admin 2022-06-16 246
26 linphone-iphone sourcecode SideMenuView code analysis admin 2022-06-14 288
25 linphone-iphone popup_password_request popup code analysis admin 2022-06-12 275
24 linphone-iphone account code analysis admin 2022-06-11 286
23 Pjsip 설명 정리 동작 함수 admin 2019-09-09 2771
22 Basic registration test sourec code admin 2019-05-06 3209
21 mDNS 덕분에 SIP 네트워크 배포가 쉬워졌습니다. admin 2018-09-01 5128
20 스마트폰 070 장점 국내전화 국제전화 로밍요금 해결 꼭 사용해보세요 admin 2018-01-07 7408
19 카카오톡PC에서 사용하는 오픈소스 라이브러리 admin 2017-12-01 8460
18 해외 로잉 무료 스마트폰 휴대폰 070 인터넷폰 인터넷전화 국내 해외 가입 상사 주재원 교민 유학생 여행 등 file admin 2015-02-28 27144
17 070가입 않고 국내 유선 무선 집전화 휴대폰 전화 해외 국내에서 전화 수신 받는 방법 admin 2015-02-28 482924
16 using a g729 codec in SipDroid Add G729 to Sipdroid admin 2014-12-28 16756
15 Compiling linphone 3.7.0 on Debian Wheezy admin 2014-10-21 19749
14 opus-codec Opus Interactive Audio Codec admin 2014-10-10 16281
13 HD-Voice의 정체 admin 2014-10-09 18262
12 Acrobits 아이폰 용 sip 프로그램 Softphone 070인터넷전화 수신 잘되는 client 무료 file admin 2014-06-02 27669
11 스마트폰 무제한 무료통화 앱 WIFI 2G 3G 4G LTE VOIP mVOIP SIP 요금절약 admin 2014-05-31 49394
10 스마트폰 070 인터넷전화 무료통화 앱 WIFI 5G 4G LTE SIP 요금절약 file admin 2014-02-11 74975
9 mVoIP 보다 VoLTE가 좋은 점 admin 2013-11-21 19829
8 Sipdroid wiki and english manuall file admin 2013-11-09 43636
7 TCP Connection Test Program file admin 2013-09-28 50181
6 Third party open source sip stacks library for Android over B4A 오픈소스 라이브러리 admin 2013-09-23 20031