맥앱스토어가 더이상 샌드박스를 적용하지 않는 앱의 경우에는 허용하지 않겠다는 발표아래 샌드박싱을 하는 방법을 퍼와 포스팅합니다.
에서 퍼왔으며 생각보다 간단하니 천천히 따라하시면 될 듯 합니다.
(맥 Developer 인증서가 없이 자체 인증서 생성으로 테스팅이 가능합니다. Sandbox가 적용되어 있는 iOS앱처럼 (숨겨져있는) 라이브러리에 앱 폴더가 정상적으로 만들어지네요)
* 애플뉴스 : 맥앱에 sandbox가 켜져있어야 맥앱스토어에서 사용이 가능하다(https://developer.apple.com/news/index.php?id=11022011a)
App Sandbox Quick Start
In this Quick Start you get an OS X app up and running in a sandbox. You verify that the app is indeed sandboxed and then learn how to troubleshoot and resolve a typical App Sandbox error. The apps you use are Xcode, Keychain Access, Activity Monitor, and Console.
Create the Xcode Project
The app you create in this Quick Start uses a WebKit web view and consequently uses a network connection. Under App Sandbox, network connections don’t work unless you specifically allow them—making this a good example app for learning about sandboxing.
Enable App Sandbox
You enable App Sandbox by selecting a checkbox in the Xcode target editor.
In Xcode, click the project file in the project navigator and click the
AppSandboxQuickStart target, if they’re not already selected. View the Summary tab of the target editor.
At this point in the Quick Start, you have enabled App Sandbox but have not yet provided a code signing identity for the Xcode project. Consequently, if you attempt to build the project now, the build fails. You take care of this in the next two sections.
Create a Code Signing Certificate for Testing
To build a sandboxed app in Xcode, you must have a code signing certificate and its associated private key in your keychain, and then use that certificate’s code signing identity in the project. The entitlements you specify, including the entitlement that enables App Sandbox, become part of the app’s code signature when you build the project.
In this section, you create a code signing certificate. This simplified process lets you stay focused on the steps for enabling a sandbox.
Specify the Code Signing Identity
Now, configure the Xcode project to use the code signing identity from the certificate you created in the previous task.
Now, build the app. The
codesign tool may display an alert asking for permission to use the new certificate. If you do see this alert, click Always Allow.
Confirm That the App Is Sandboxed
Build and run the Quick Start app. The window opens, but if the app is successfully sandboxed, no web content appears. This is because you have not yet conferred permission to access a network connection.
Apart from blocked behavior, there are two specific signs that an OS X app is successfully sandboxed.
|iOS Universal 프로그래밍. 모델 구별하기 (3)||2012.07.02|
|MAC App용 이미지 파일 변경앱 'img2icns' (0)||2012.06.29|
|MAC App sandboxing 하기 (0)||2012.06.29|
|iOS앱을 MAC App으로 Porting하기 (0)||2012.06.29|
|child already added. It can't be added again COCOS2D CCNode에러 (0)||2012.06.29|
|XCode iOS MAC 구별하는 전처리문 (0)||2012.06.26|