블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-20 00:00
아래는 info.plist에서 사용되는 키 값에 대한 설명, 자료형, 사용 가능한 버전 기준, 필수여부, 지역화 가능 여부를 표로 정리한 것이다.
  애플이 제공하는 레퍼런스 문서에 이보다 자세하게 나와 있지만, 빠르게 원하는 것만 보기 위해 만들었다.


분류

자료형

버전

필수

지역

설명

Core Foundation 

Bundle creator OS Type code

(CFBundleSignature)

String

 

O 

 

네 글자로 이뤄진 번들 식별 코드

Bundle display name

(CFBundleDisplayName)

String

 

O 

O 

번들의 보여지는 이름

Bundle identifier

(CFBundleIdentifier) 

String

 

O 

 

번들을 구분하기 위한 유일한 식별키

Bundle name

(CFBundleName) 

String

 

O

O 

열여섯 글자 미만으로 이뤄진 번들 이름 또는 어플리케이션 이름

Bundle OS Type code

(CFBundlePackageType) 

String

 

O 

 

번들 종류를 나타내는 코드

Bundle version

(CFBundleVersion)

String

 

O 

 

번들의 빌드 버전

Bundle versions string, short

(CFBundleShortVersionString)

String

  

O 

번들의 릴리즈 버전

Document types

(CFBundleDocumentTypes)

Array

(Dictionary)

   

앱에서 지원하는 문서 형식 목록

Executable file

(CFBundleExecutable)

String

 

O 

 

번들의 실행 파일 이름

Icon file

(CFBundleIconFile) 

String

   

번들 아이콘(iOS 3.2 미만)

Icon files

(CFBundleIconFiles)

Array

(String)

3.2 

  

번들 아이콘(iOS 3.2 이상)

Icon files (iOS 5) or none

(CFBundleIcons)

Dictionary

5.0 

  

번들 아이콘(iOS 5.0 이상)

InfoDictionary version

(CFBundleInfoDictionaryVersion)

String

 

O 

 

Info.plist 형식의 버전

Localization native development region

(CFBundleDevelopmentRegion)

String

 

O 

 

번들의 주 언어 또는 주 지역

Localizations

(CFBundleLocalizations)

Array

(String)

   

지원하는 언어 또는 국가 목록

Localized resources can be mixed

(CFBundleAllowMixedLocalizations)

Boolean

   

다른 프레임워크 또는 프로젝트에서 추가한 지역화 리소스를 사용할지

URL types

(CFBundleURLTypes)

Array

(Dictionary)

   

번들이 지원하는 URL-scheme 목록

Launch Services

Application requires iPhone environment

(LSRequiresIPhoneOS)

Boolean

 

O

 

iOS에서만 실행할 번들인지

MapKit

Maps routing app supported modes

(MKDirectionsApplicationSupportedModes)

Array

(String)

6.0

   

Cocoa

Main nib file base name

(NSMainNibFile)

String

 

O

 

앱의 메인 nib/xib 파일 이름

(UIMainStoryboardFile과 같이 쓸 수 없다)

Main nib file base name (iPad)

(NSMainNibFile~ipad)

String

    

Main nib file base name (iPhone)

(NSMainNibFile~iphone)

String

    

Privacy - Bluetooth Peripheral Usage Description

(NSBluetoothPeripheralUsageDescription)

String

6.0 

 

O 

블루투스가 필요한 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Calendars Usage Description

(NSCalendarsUsageDescription)

String

6.0 

 

O 

캘린더에 접근해야 하는 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Camera Usage Description

(NSCameraUsageDescription)

String

7.0 

 

O 

카메라가 필요한 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Contacts Usage Description

(NSContactsUsageDescription)

String

6.0 

 

O 

연락처에 접근해야 하는 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Location Usage Description

(NSLocationUsageDescription)

String

6.0 

 

O 

위치 정보에 접근해야 하는 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Microphone Usage Description

(NSMicrophoneUsageDescription)

String

7.0 

 

O 

마이크가 필요한 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Motion Usage Description

(NSMotionUsageDescription)

String

7.0 

 

O 

모션센서6가 필요한 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Photo Library Usage Description

(NSPhotoLibraryUsageDescription)

String

6.0 

 

O 

앨범에 접근해야 하는 이유

(권한 요청 대화 상자에 표시된다)

Privacy - Reminders Usage Description

(NSRemindersUsageDescription)

String

6.0 

 

O 

미리 알림에 접근해야 하는 이유

(권한 요청 대화 상자에 표시된다)

none

(NSUbiquitousDisplaySet)

String

   

앱의 저장소를 관리하기 위해 iTunes-Connect의 앱 등록 과정에서 입력한 식별자

Exported Type UTIs

(UTExportedTypeDeclarations)

Array

(Dictionary)

5.0 

  

앱에서 내보낼 수 있는 UTI 형식 목록

Imported Type UTIs

(UTImportedTypeDeclarations)

Array

(Dictionary)

   

앱에서 가져올 수 있는 UTI 형식 목록

none

(GKGameCenterBadgingDisabled) 

Boolean

7.0 

  

게임센터의 벳지에 앱에서 발생되는 이벤트가 표시되지 않도록 할지

none

(GKShowChallengeBanners) 

Boolean

7.0 

  

앱 내에서 게임센터의 '도전 과제' 배너를 표시할지

UIKit

Application does not run in background

(UIApplicationExitsOnSuspend)

Boolean

4.0 

  

앱을 종료할 때 백그라운드로 보내지 않고 완전히 종료시킬지

Application presents content in Newsstand

(UINewsstandApp)

Boolean

5.0 

  

앱이 뉴스가판대에 콘텐츠를 제공하는지

Application supports iTunes file sharing

(UIFileSharingEnabled)

Boolean

3.2 

  

아이튠즈가 앱과 파일 공유를 하도록 허용할지

Application uses Wi-Fi

(UIRequiresPersistentWiFi)

Boolean

 

O

 

앱이 Wi-Fi 연결을 필요로 하는지

Fonts provided by application

(UIAppFonts)

Array

(String)

3.2 

  

앱 전용 서체 목록

Icon already includes gloss effects

(UIPrerenderedIcon)

Boolean

   

이미 번들 아이콘에 광택 효과가 있는지

Initial interface orientation

(UIInterfaceOrientation)

String

3.2 

O

 

앱이 구동될 때 사용할 인터페이스의 방향

Launch image

(UILaunchImageFile)

String

3.2 

  

앱이 구동될 때 나타날 인트로 이미지

Launch image (iPad)

(UILaunchImageFile~ipad)

String

3.2 

   

Launch image (iPhone)

(UILaunchImageFile~iphone)

String

3.2 

   

none

(UILaunchImages)

Array

(Dictionary)

7.0 

   

Main storyboard file base name

(UIMainStoryboardFile)

String

5.0 

O

 

앱의 메인 storyboard 파일 이름

(NSMainNibFile과 같이 쓸 수 없다)

Main storyboard file base name (iPad)

(UIMainStoryboardFile~ipad)

String

5.0 

   

Main storyboard file base name (iPhone)

(UIMainStoryboardFile~iphone)

String

5.0 

   

Renders with edge antialiasing

(UIViewEdgeAntialiasing)

Boolean

3.0 

  

픽셀 경계에 정렬되지 않은 레이어를 그릴 때 안티 앨리어싱을 적용할지

Renders with group opacity

(UIViewGroupOpacity)

Boolean

3.0 

  

서브 레이어가 슈퍼 레이어의 블투명도를 상속받아 사용할지

Required background modes

(UIBackgroundModes)

Array

(String)

4.0 

  

백그라운드에서 앱이 제공하는 서비스 목록 또는 멀티테스킹의 형태

Required device capabilities

(UIRequiredDeviceCapabilities)

Array

(String)

3.0 

O

 

앱 실행에 필요한 요구조건들

Targeted device family

(UIDeviceFamily) 

Number 

or

Array

(Number)

3.2 

  

앱 실행이 가능한 제품군 하나 또는 목록

Status bar is initially hidden

(UIStatusBarHidden)

Boolean

   

상태 바를 숨길지

Status bar style

(UIStatusBarStyle)

String

 

O

 

상태 바 스타일

Status bar tinting parameters

(UIStatusBarTintParameters)

Dictionary

7.0 

  

상태 바 색

Supported external accessory protocols

(UISupportedExternalAccessoryProtocols)

Array

(String)

3.0 

  

앱이 지원하는 외부 액세사리와 통신하는데 사용되는 프로토콜 목록

Supported interface orientations

(UISupportedInterfaceOrientations)

Array

(String)

3.2 

  

앱이 지원하는 인터페이스 방향

Supported interface orientations (iPad)

(UISupportedInterfaceOrientations~ipad)

Array

(String)

3.2 

   

Supported interface orientations (iPhone)

(UISupportedInterfaceOrientations~iphone)

Array

(String)

3.2 

   

View controller-based

status bar appearance

(UIViewControllerBasedStatusBarAppearance)

Boolean

7.0 

  

상태 바가 그려지는 방식을 컨트롤러의 설정에 따라 다르게 할지



+ Bundle OS Type code(CFBundlePackageType)에 사용되는 값들.  


APPL : 어플리케이션

FMWK : 프레임워크 또는 라이브러리

BNDL : 로드 가능한 번들(다른 문자가 들어가도 된다)



Document types(CFBundleDocumentTypes)의 요소 구성.     


 

자료형

 지역화

설명

 none

 (CFBundleTypeIconFiles)

 Array

 

 해당 문서 형식에 사용될 아이콘 이미지 파일 이름 목록

 (아이콘 사이즈 규격은 여기를 참조)

 Document Type Name

 (CFBundleTypeName)

 String

O 

 문서 형식의 이름

 Document Content Type UTIs

 (LSItemContentTypes)

Array 

 

 문서 형식에 대한 UTI



Icon files (iOS 5) or none(CFBundleIcons)의 요소 구성.   


 키

자료형

버전

 필수

설명

 CFBundleIconFiles

Array or String 

5.0 

 O

 아이콘 파일 이름 또는 목록

 UIPrerenderedIcon

Boolean 

5.0 

 

 아이콘 파일에 광택 효과가 들어가 있는지



+ Localization native development region(CFBundleDevelopmentRegion)에 사용되는 값들.    

Canada : en_CA                         France : fr_FR                    Japan : ja_JP                    United Kingdom : en_GB

Canada (French) : fr_CA            Germany : de_DE               Korea : ko_KR                  United States : en_US

China : zh_CH                            Italy : it_IT                           Taiwan : zh_TW



+ Localizations(CFBundleLocalizations)에 사용되는 값들.   

en, fr, de, ko, ja, nl, it, es, pt, da, fi, nb, sv, zh-Hans, zh-Hant, ru, pl, tr, uk, ar, hr, cs, el, he, ro, sk, th, id, ms, ca, hu, vi



+ URL Types(CFBundleURLTypes)의 요소 구성.    


자료형

 필수

 지역화

설명

 Document Role

 (CFBundleTypeRole)

 String

O

 

 URL에 대하여 앱의 수행할 일

Editor : 읽기, 쓰기, 저장

Viewer : 읽기, 출력

Shell : 다른 앱 위에 특정 일을 수행

None : 신호만 받음

 Document Icon File Name

 (CFBundleURLIconFile)

String 

 

 

 URL을 수행함에 있어 사용될 아이콘 이미지 파일 이름

 URL Identifier

 (CFBundleURLName)

 String

 

O 

 URL을 식별할 수 있는 이름

 (보통 번들 식별키를 접두로 쓰고 뒤에 이름을 붙인다)

 URL Schemes

 (CFBundleURLSchemes)

Array 

 

 

 URL 값



Maps routing app supported modes(MKDirectionsApplicationSupportedModes)에 사용되는 값들.    


Airplane, Bike, Bus, Car, Ferry, Pedestrian, StreetCar, Subway, Taxi, Train, Other



Exported/Imported Type UTIs(UTExportedTypeDeclarations, UTImportedTypeDeclarations)의 요소 구성.    


 키

자료형

버전

필수

지역화

설명

 Conforms to UTIs

 (UTTypeConformsTo)

 Array


O

 

 이 형식이 속하는 범주를 나타내는 UTI 목록

 (자세한 내용은 여기를 참조)

 Description

 (UTTypeDescription)

String

 

 

 내보내기 형식에 대한 설명

 Identifier

 (UTTypeIdentifier)

String

 

 

 

 내보내기 형식에 대한 UTI

 none

 (UTTypeSize64IconFile)

 String

 

 

 

 이 형식에 대한 아이콘(작은 것)

 none

 (UTType320IconFile)

String

 

 

 

 이 형식에 대한 아이콘(큰 것)

 Equivalent Types

 (UTTypeTagSpecification)

 Dictionary

 

O

 

 이 형식에 매핑되는 MIMEType, OSType codes8, pastboard types과 확장자 정보



Required background modes(UIBackgroundModes)에 사용되는 값들.    

버전

설명 

 Audio and AirPlay

 (audio)

4.0

 - 앱은 백그라운드 재생(오디오 한정)을 지원한다.

 - 백그라운드로 빠져나간 상태에서도 재생을 유지한다.

  (동지재생에 대한 부분은 별도의 코드로 해결해야함)

 Location updates

 (location)

4.0

 - 앱은 사용자 위치정보 기반으로 서비스를 제공한다.

 - OS에 의해 주기적으로 위치 정보를 업데이트 받는다.

 - 업데이트 받을때 마다 앱을 깨운다.

 Voice over IP

 (voip)

4.0

 - 앱 Voice-over-iP 서비스를 제공한다.

 - 시스템 부팅 및 설치 후 또는 실행 후로 부터 OS가 네트워크를 감시하여 앱에 연관된 통화가 걸려오면 앱을 깨운다.

 - 백그라운드 재생이 가능하다.

 Background fetch

 (fetch)

7.0

 - 앱은 백그라운드 다운로드를 사용한다.

 - 앱의 콘텐츠를 업데이트할 때 OS에서 일정 시간을 할애하여 백그라운드 작업을 통해 콘텐츠를 다운 받을 수 있도록 한다.

 - 이 백그라운드 다운로드는 OS 차원에서 관리한다.

 Remote notification

 (remote notification)

7.0

 - 앱은 향상된 푸쉬 서비스를 지원한다.

 - 기존 푸쉬는 메시지를 받아오는 시점이 사용자가 화면을 슬라이드해서 메시지를 보기로 선택한 후 이지만, 이것은 푸쉬를 받으면 곧바로 메시지를 다운받고 기존 푸쉬처럼 사용자에게 알려준다.

 Newsstand downloads

 (newsstand content)

5.0

 - 앱은 뉴스 가판대를 서비스한다.

 - 원하는 시점에 새 콘텐츠를 받을 수 있도록 백그라운드 다운로드를 지원한다.

 - 다운로드 처리는 뉴스 가판대 프레임워크를 사용한다.

 External accessory communication

 (external accessory)

5.0 

 - 앱 iOS 기반의 기기를 대상으로 통신을하는 블루투스 액세사리 또는 iOS 디바이스 커넥터를 이용한 서비스를 제공한다.

 - 정기적으로 기기와 통신한다.

 - 이 모드를 사용할 경우 추가적으로 UISupportedExternalAccessoryProtocols 값 입력을 요한다. 자세한 내용은 여기를 참조.

 Uses Bluetooth LE accessories

 (bluetooth central)

5.0

 - 앱은 블루투스 액세사리 연동(중앙장치 모드)을 지원한다.

 - CoreBluetooth 프레임워크를 사용하여 정기적으로 통신한다.

 Acts as a Bluetooth LE accessory

 (bluetooth peripheral)

6.0 

 - 앱은 블루투스 액세사리 연동(주변장치 모드)을 지원한다.

 - CoreBluetooth 프레임워크를 사용하여 정기적으로 통신한다.

 - 블루투스 사용에 대한 경고 창을 띄운다.



Required device capabilities(UIRequiredDeviceCapabilities)에 사용되는 값들.   


 값

버전

설명

 telephony

3.0

 전화 기본 앱이 있어야 한다. (전화가 가능한 기기여야 한다)

 wifi

3.0

 네트워크에 액세스할 수 있어야 한다. (Wi-Fi 연결이 가능한 기기여야 한다)

 sms

3.0

 메시지 기본 앱이 있어야 한다. (iMessage 또는 SMS, MMS를 보낼 수 있는 기기여야 한다)

 still-camera

3.0

 카메라가 탑재된 기기여야 한다.

 auto-focus-camera

3.0

 자동 초점 기능을 지원하는 카메라가 탑재된 기기여야 한다.

 front-facing-camera

3.0

 전면부 카메라가 탑재된 기기여야 한다.

 camera-flash

3.0

 카메라 플래쉬가 탑재된 기기여야 한다.

 video-camera

3.0

 비디오 촬영이 가능한 카메라가 탑재된 기기여야 한다.

 accelerometer

3.0

 가속도계가 탑재된 기기여야 한다.

 gyroscope

3.0

 자이로스코프가 탑재된 기기여야 한다.

 location-services

3.0

 CoreLocation 프레임워크를 사용할 수 있는 기기여야 한다.

 (높은 수준의 정확도를 요하지 않는 위치 서비스에 해당됨)

 gps

3.0

 GPS 또는 AGPS가 탑재된 기기여야 한다.

 (이 값은 'location-services'와 같이 사용해야 한다)

 magnetometer

3.0

 자력계가 탑재된 기기여야 한다.

 gamekit

4.1

 Game Center 기본 앱이 있어야 한다.

 microphone

3.0

 내장 마이크 탑재된 또는 외장 마이크를 연결한 기기여야 한다.

 opengles-1

3.0

 OpenGL ES 1.1을 지원할 수 있는 기기여야 한다.

 opengles-2

3.0

 OpenGL ES 2.0을 지원할 수 있는 기기여야 한다.

 opengles-3

7.0

 OpenGL ES 3.0을 지원할 수 있는 기기여야 한다.

 armv6

3.1

 ARMv6 명령어 셋을 지원하는 기기여야 한다.

 armv7

3.1

 ARMv7 명령어 셋을 지원하는 기기여야 한다.

 peer-peer

3.1

 블루투스를 통해 Peer-to-Peer 통신이 가능한 기기여야 한다.

 bluetooth-le

5.0

 저에너지형 블루투스 장치가 탑재된 기기여야 한다.



Targeted device family(UIDeviceFamily)에 사용되는 값들.    

1 : 아이폰, 아이팟 터치 제품군            2 : 아이패드 제품군            3 : 애플TV 제품군



Status bar style(UIStatusBarStyle)에 사용되는 값들.     

Gray style (default)            Transparent black style(alpha of 0.5)            Opaque black style



Supported interface orientations(UISupportedInterfaceOrientations)에 사용되는 값들.    


Portrait (bottom home button)

Portrait (top home button)

Landscape (left home button)

Landscape (right home button)



출처: http://padgom.tistory.com/entry/iOS-infoplist-Key-목록과-사용 [Padgom]




출처: http://rudalstb.tistory.com/54 [모바일 게임 일기]

반응형
Posted by blueasa
, |

Unity에서 Xcode 출력 후 필요한 설정을 자동화하는 방법입니다. 
이번에는 잘 사용할 것 같은 것을 샘플 형식으로 정리했습니다.

■ 이용하는 기능 
Unity5에서 표준 이용할 수있게되었다 XcodeAPI을 이용 
Unity - Scripting API : PBXProject

■ 자동화 항목 
빌드 설정 편집 
프레임 워크의 추가 
컴파일 플래그의 설정 
· Info.plist 추가

■ 전 준비 
PostProcessBuildAttribute를 이용하여 빌드 후 메소드를 호출

using System.IO;
 using UnityEngine;
 using UnityEditor;
 using UnityEditor.iOS.Xcode;
 using UnityEditor.Callbacks;
 using System.Collections;

public  class XcodeSettingsPostProcesser
{
    [PostProcessBuildAttribute ( 0 )]
     public  static  void OnPostprocessBuild (BuildTarget buildTarget, string pathToBuiltProject)
    {
        // iOS 이외 플랫폼은 처리를하지 
        if (buildTarget! = BuildTarget.iOS) return ;

        // PBXProject 초기화 
        var projectPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj" ;
        PBXProject pbxProject = new PBXProject ();
        pbxProject.ReadFromFile (projectPath);
        string targetGuid = pbxProject.TargetGuidByName ( "Unity-iPhone" );
        
        // 여기에 자동화 처리 기술

        // 설정을 반영
        File.WriteAllText (projectPath, pbxProject.WriteToString ());
    }
}

■ 빌드 설정 편집

// 빌드 설정 추가 
pbxProject.AddBuildProperty (targetGuid, "OTHER_LDFLAGS" , "-all_load" );

// 빌드 설정 추가 
pbxProject.SetBuildProperty (targetGuid, "ENABLE_BITCODE" , "NO" );

// 빌드 설정 편집, 제 3 인수는 추가 설정 제 4 인수는 삭제 설정 
pbxProject.UpdateBuildProperty (targetGuid, "OTHER_LDFLAGS" , new  string [] { "-ObjC" }, new  string [] { "- weak_framework " });

■ 프레임 워크 추가

// 필수 프레임 워크의 추가 
pbxProject.AddFrameworkToProject (targetGuid, "Security.framework" , false );

// 옵션 프레임 워크의 추가 
pbxProject.AddFrameworkToProject (targetGuid, "SafariServices.framework" , true );

■ 컴파일 플래그 설정

// Keyboard.mm에 -fno-objc-arc를 설정 
var guid = pbxProject.FindFileGuidByProjectPath ( "Classes / UI / Keyboard.mm" );
var flags = pbxProject.GetCompileFlagsForFile (targetGuid, guid);
flags.Add ( "-fno-objc-arc" );
pbxProject.SetCompileFlagsForFile (targetGuid, guid, flags);

■ Info.plist 추가

// Plist 설정을위한 초기화 

var plistPath = Path.Combine (pathToBuiltProject, "Info.plist" );

var plist = new PlistDocument ();

plist.ReadFromFile (plistPath);



// 문자열의 설정 

plist.root.SetString ( "hogehogeId" , "dummyid" );



// URL 스키마 추가 var array = plist.root.CreateArray ( "CFBundleURLTypes");

var urlDict = array.AddDict ();

urlDict.SetString ( "CFBundleURLName" , "hogehogeName" );

var urlInnerArray = urlDict.CreateArray ( "CFBundleURLSchemes" );

urlInnerArray.AddString ( "hogehogeValue" );



// 설정을 반영

plist.WriteToFile (plistPath);

■ 정리 
Unity5되어 설정이 상당히 쉬워졌습니다

■ 코드 전체

using System.IO ;
using UnityEngine ;
using UnityEditor ;
using UnityEditor.iOS.Xcode ;
using UnityEditor.Callbacks ;
using System.Collections ;
public class XcodeSettingsPostProcesser
{
[PostProcessBuildAttribute ( 0 )
public static void OnPostprocessBuild ( BuildTarget buildTarget , string pathToBuiltProject )
{
// Stop processing if targe is NOT iOS
if (buildTarget! = BuildTarget.iOS)
return ;
// Initialize PbxProject
var projectPath = pathToBuiltProject + " /Unity-iPhone.xcodeproj/project.pbxproj " ;
PBXProject pbxProject = new PBXProject ();
pbxProject.ReadFromFile (projectPath);
string targetGuid = pbxProject.TargetGuidByName ( " Unity-iPhone " );
// Sample of adding build property
pbxProject.AddBuildProperty (targetGuid, " OTHER_LDFLAGS " , " -all_load " );
// Sample of setting build property
pbxProject.SetBuildProperty (targetGuid, " ENABLE_BITCODE " , " NO " );
// Sample of update build property
pbxProject.UpdateBuildProperty (targetGuid, " OTHER_LDFLAGS " , new string [] { " -ObjC " }, new string [] { " -weak_framework " });
// Sample of adding REQUIRED framwrok
pbxProject.AddFrameworkToProject (targetGuid, " Security.framework " , false );
// Sample of adding OPTIONAL framework
pbxProject.AddFrameworkToProject (targetGuid, " SafariServices.framework " , true );
// Sample of setting compile flags
var guid = pbxProject.FindFileGuidByProjectPath ( " Classes / UI / Keyboard.mm " );
var flags = pbxProject.GetCompileFlagsForFile (targetGuid, guid);
flags.Add ( " -fno-objc-arc " );
pbxProject.SetCompileFlagsForFile (targetGuid, guid, flags);
// Apply settings
File.WriteAllText (projectPath, pbxProject.WriteToString ());
// Samlpe of editing Info.plist
var plistPath = Path.Combine (pathToBuiltProject, " Info.plist " );
var plist = new PlistDocument ();
plist.ReadFromFile (plistPath);
// Add string setting
plist.root.SetString ( " hogehogeId " , " dummyid " );
// Add URL Scheme
var array = plist.root.CreateArray ( " CFBundleURLTypes " );
var urlDict = array.AddDict ();
urlDict.SetString ( " CFBundleURLName " , " hogehogeName " );
var urlInnerArray = urlDict.CreateArray ( " CFBundleURLSchemes " );
urlInnerArray.AddString ( " hogehogeValue " );

// Localizations [added blueasa / 2018-03-28] // need Language Code(ref:https://ko.wikipedia.org/wiki/ISO_639) var arrayLocalizations = plist.root.CreateArray("CFBundleLocalizations"); arrayLocalizations.AddString("en"); // 영어 arrayLocalizations.AddString("ko"); // 한국어

//arrayLocalizations.AddString("zh"); // 중국어

arrayLocalizations.AddString("zh_CN"); // 중국어(간체) : 중국 arrayLocalizations.AddString("zh_TW"); // 중국어(번체) : 대만 arrayLocalizations.AddString("ja"); // 일본어 arrayLocalizations.AddString("de"); // 독일어

// Apply editing settings to Info.plist
plist.WriteToFile (plistPath);
}
}

gist.github.com



[출처] http://smartgames.hatenablog.com/entry/2016/06/19/164052

반응형
Posted by blueasa
, |