TODAY : / TOTAL :

[iOS9] 프로젝트 iOS9으로 업데이트시 체크해야 될 사항

  • Share this:
반응형

금일 개발 간에 겪은 이슈에 대한 정리.


# 작업 환경의 변경

    * iMac Mavericks -> iMac El Capitan

    * XCode6 -> XCode7 




AppTransportSecurity (ATS) 설정 변경하기




금번 iOS9 업데이트 되면서 보안관련 정책사항에 변화가 생겼습니다.

기본 설정으로 모든 앱은 외부 url을 통한 접근이 제한되도록 변경되었습니다.

네트워크 관련 기능을 사용하는 앱반드시 설정해줘야 되는 부분입니다.


* 오류 내용

 Transport security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.



* 적용 방법1

    - 프로젝트 내 info.plist 파일 우클릭 후 Open As > Source Code 선택





    - 아래의 키 값을 추가 해줍니다.

<key>NSAppTransportSecurity</key> 

<dict>

        <key>NSAllowsArbitraryLoads</key> 

        <true/>

</dict> 





    - 코드 추가 후, 다시 info.plist 를 우클릭 하신 다음, Open As > Property List에 다음과 같이 나오면 정상적으로 설정된 상태입니다.



  



* 적용 방법2 ( 특정 도메인만 접근 허옹하기 )

    - 아래 코드를 똑같은 방식으로 적용합니다. ( DOMAIN_ADDRESS 란에 도메인 주소를 적습니다. )


 <key>NSAppTransportSecurity</key>

 <dict> 

    <key>NSExceptionDomains</key> 

    <dict> 

        <key>DOMAIN_ADDRESS</key>

    </dict> 

</dict> 







 

Bitcode 설정 변경



Bitcode 를 포함한 앱을 등록하게 되면, 앱 설치 시 사용자의 디바이스에 맞게 앱을 최적화하여 재빌드하는 단계를 거치게 된다.

iOS9 초창기라 아직 Bitcode 를 미지원하는 플러그인들이 많아서 개발시에 해당 기능을 끄는 작업이 필요하다.



* 오류 내용

 You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. Note: This will be an error in the future.


 You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)




* 적용 방법

   - 프로젝트 Build Setting > Build Option > Enable Bitcode 값을 No 로 변경해준다.



    # Build Option 이 보이지 않는 경우


   - 프로젝트 실행 파일( PROJECT_NAME.xcodeproj ) 을 우클릭 한 뒤에 [ 패키지 내용 보기] 클릭.


   

  


 - project.pbxproj 파일 실행 후  "  ASSETCATALOG_COMPILER_APPICON_NAME  " 으로 검색

   검색되어 나오는 위치마다         ENABLE_BITCODE = NO;      코드 추가.

    ( * 검색되어 나오는 Debug , Release 두군데 모두 적용 할 것!! )




- 저장 후 XCode 프로젝트를 재실행하면, 이전의 스샷처럼 Build Setting 란에 Build Option > Enable Bitcode 가 생겨난 것을 볼 수 있다.













멀티 태스킹 (Multitasking) 대응




iOS9 부터 화면 레이아웃을 분할한 멀티테스킹 기능( Split Multitasking )이 추가되었습니다.

( iPad Air 2 이상 모델에서만 적용됩니다. )


한 화면에서 동시에 여러 앱의 작업을 진행할수 있도록 할수 있는데,  Landscape 형식의 화면만 사용하는 게임에서는 사용할 수 없습니다. 즉 Device Orientation 을 하나라도 체크 해제 해야되는 항목이 있다면, 사용에 제한이 따릅니다. ( 리젝 사유 )



* iTunesConnect 업로드 실패 사유


ERROR ITMS-90474: "Bundle Invalid. iPad Multitasking support requires there orientations: 'UIInterfaceOrientationPortrait,UIIinterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle.


&


ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch story board in bundle 'com.companyname.appname.'"



( 대부분 둘이 같이 에러를 뱉어 냅니다. )




* 적용 방법 ( 해결 방안 )




* XCode 프로젝트 내 General > Deployment Info > Requires full screen 체크!!






참고 자료 및 출처



- iOS9 변경된 점 http://www.shako.net/blog/whats-new-in-ios-9/    


- ATS 관련 정보 (애플 홈페이지) https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/index.html#//apple_ref/doc/uid/TP40016240-CH1-SW3


- ATS 관련 내용 요약 :  https://community.akamai.com/groups/korea-user-group/blog/2015/09/02/%EC%95%A0%ED%94%8C-ios9-ats-application-transport-security-%EC%99%80-%EC%95%84%EC%B9%B4%EB%A7%88%EC%9D%B4-secure-delivery


- 보안 프로토콜 사용시 ATS 관련 설정 http://stackoverflow.com/a/32512424


- ATS 관련 StackOverflow 답변 내용 http://stackoverflow.com/a/30748166


- Bitcode관련 Stackoverflow 답변 내용 http://stackoverflow.com/a/30856364


- iOS9 멀티테스킹( Multitasking ) : https://support.apple.com/en-us/HT202070



반응형

SEARCH

태그로 찾아보기