본문 바로가기

iOS/WWDC

[WWDC 2019] iOS 시뮬레이터 최대한 활용하기! - Simulator (1/2)

WWDC 2019 Getting the Most Out of Simulator 를 정리한 포스트입니다.

더 자세한 내용을 원하시면 위 링크를 참조하시길 바랍니다.

 

iOS 시뮬레이터 최대한 활용하기! - Simulator (1/2)

iOS 시뮬레이터 최대한 활용하기! - xcrun simctl (2/2)

What Is Simulator?

 

Kernel:  하드웨어 리소스를 관리, 메모리를 할당, 프로세스 사이에서 중재합니다.

 

MacOS User space

launchd: PID 1 

cfprefsd, distnoted: Deamon

AppKit, Foundation: Framework

Application

 

iOS Simulator User space

Mac User space 와 분리되어 있으며 각각의 Simulator 격리된 User space 입니다.

 

 

시뮬레이터는 iOS, watchOS 또는 tvOS 사용자 공간이지만 Mac 커널에서 실행됩니다.

The iOS, watchOS, or tvOS userspace running on the macOS kernel

 

별도의 launchd, 개별 daemons, 별도의 알림 도메인, 별도의 URL sessions, 별도의 mach bootstrap이 있습니다.

Separate launchd, separate daemons, separate darwin notifications, separate URL sessions, and separate mach bootstrap

 

동일한 파일 시스템을 공유하지만 별도의 홈 디렉토리가 있습니다.

Same filesystem, separate $HOME

 

libSystem까지 모든 Syslib를 UIKit 및 기타 프레임 워크까지 포함합니다.

From libSystem up: built for iOS, watchOS, or tvOS Uses iOS, watchOS, or tvOS ABI Built

(ABI 에 대해 자세히 알고 싶다면 여기를 참조하세요!)

 

기본적으로 Mac 프로세서 용으로 제작되었습니다. (에뮬레이터가 아닙니다.)

natively for x86 (not an emulator)

 

 

Simulator Details

MacOS 커널에서 실행되기 때문에 Memory, CPU 는 Mac의 리소스를 사용합니다.

Memory and CPU limits are not simulated

 

Mac에는 다른 core counts와 다른 threading 동작이 있습니다.
Different core counts, different threading behaviors

 

응용 프로그램 샌드 박스는 적용되지 않으므로 시뮬레이터의 프로세스는 샌드 박스 외부에 쓸 수 있지만 

다시 장치에서 시도하면 작동하지 않습니다.
Application Sandbox is not enforced

 

Mac은 대소문자를 구분하지 않는 파일 시스템으로 설정되지만,

시뮬레이터는 대소문자를 구분하는 파일 시스템 액세스를 사용합니다.

Simulates case-sensitive filesystem

 

Thread Sanitizer 를 지원합니다.
Thread Sanitizer supported

 

 

Can I change which audio device Simulator uses for input and output?

Hardware > Audio Output / Audio Input

 

 

Does iCloud work in Simulator?

Debug > Trigger iCloud Sync

 

 

Can I use Shake Gestures?

Hardware > Shake Gesture

 

 

 

How do I get other simulators to show as deployment targets?

 

Can Simulator help me debug UI animations?

Debug > Slow Animations

 

Is Siri available in Simulator?

Hardware > Siri

 

 Can I copy content into my Simulator? 

Drag & Drop

앱 번들, 위치, 사진 및 비디오 및 URL을 복사할 수 있습니다.

 

 

Other Helpful Hints

전화 모드로 설정할 수 있습니다.

이 외에도 Location Drive 시뮬레이트, Wallpaper 등 많은 기능을 소개하고 있습니다.

 

 

참고: 

https://developer.apple.com/videos/play/wwdc2019/418