Dev.2015. 6. 24. 14:34

- Developer페이지에서 App ID 및 Provisioning Profile 생성

- iTunes Connect에서 테스트 앱 설정


apple itunes connect, application, test


* Developer페이지에서 App ID 및 Provisioning Profile 생성


1. Apple Developer/ Member Center/ Certificates, Identifiers & Profiles 페이지로 이동

2. iOS Apps/ Identifiers 페이지로 이동


3. 우상단 '+'버튼 클릭하여 새로운 App ID생성. Name 및 Bundle ID 필드를 작성한다.


4. 내용 확인후 Submit.


5. 새로운 App ID가 생성되었다.


6. Provisioning Profiles/ All 선택후, 우 상단의 '+'버튼을 클릭하여 새로운 Provisioning Profile을 생성한다.


7. 개발버전으로 선택하고 Continue.


8. 롤다운 되는 항목들중, 앞에서 생성한 App ID를 선택하고 Continue.


9. 해당 인증서를 선택하고 Continue.


10. 테스트용 기기들을 선택후 Continue.


11. Profile의 이름을 작성하고 Continue.


12. Provisioning Profile이 생성되었다. Download버튼을 클릭하여 Profile을 다운 받는다.


13. 다운받은 Profile을 더블클릭하면 XCode에서 자동으로 등록된다.



* iTunes Connect에서 테스트 앱 설정


1. iTunes Connect페이지로 이동 후 나의 App을 선택한다.


2. 좌상단의 '+'를 누르고 '신규 iOS App'선택


3. 각 필드를 입력한후 '생성'버튼 클릭

 - 번들 ID는 롤다운되는 항목들중 앞에서 생성한 번들 ID를 선택 (SocialTest)

 - SKU는 사용자가 임의로 지정한다.


4. Game Center를 활성화 하고, 저장버튼을 누른다음 Game Center탭으로 이동한다. (Game Center보기 클릭)


5. 순위표를 추가한다.


6. 개별 순위표 선택


7. 각 필드정보 입력후 '언어 추가' 버튼 클릭

- 순위표 ID는 앱에서 점수를 올릴때 필요하다. (사용자 임의 지정)


8. 각 필드 입력후 'Save'.


9. 새로운 순위표(리더보드)가 생성되었다.


10. 버전탭으로 이동후 Game Center항목에서 순위표를 추가한다.


11. 저장하고 완료한다.




Posted by GNUPart
Unity2015. 6. 24. 02:18

unity, google play game service, apple gamecenter, admob


* Unity/ 테스트용 어플 제작


1. UI/ Canvas를 생성한다. (EventSystem자동생성됨)

2. Canvas의 자식으로, UI/ Button을 생성한다.

3. Empty Object (GameObject)를 생성한다.

4. MainScene.cs를 생성한후 3번에서 생성한 GameObject의 컴포넌트로 넣는다.

5. Scene를 'MainScene'이름으로 저장한다. (Ctrl+S)


5. MainScene.cs에 다음을 작성한다.

using UnityEngine;

using System.Collections;


#if !UNITY_IPHONE

using GooglePlayGames;

using GooglePlayGames.BasicApi;

using GooglePlayGames.BasicApi.SavedGame;

#endif


public class MainScene : MonoBehaviour {


#if UNITY_ANDROID

    static PlayGamesClientConfiguration _GPGConfig;

#endif


void Start () {

#if UNITY_ANDROID

        _GPGConfig = new PlayGamesClientConfiguration.Builder()

            .EnableSavedGames()

            .Build();


        PlayGamesPlatform.InitializeInstance(_GPGConfig);

        PlayGamesPlatform.DebugLogEnabled = true;

        PlayGamesPlatform.Activate();

#endif


        Social.localUser.Authenticate(

                (bool success) =>

                {

                    Debug.Log(" - Social:SingIn= " + success.ToString());

                }

            );

}

public void OnButtonClick()

    {

        long score = 123;

#if UNITY_ANDROID

        string leader_board_id = "CgkI2-i6kL8CEAIQAQ";

#elif UNITY_IPHONE

        string leader_board_id = "SOCIALTEST_HIGH_SCORE";

#endif


        Social.ReportScore(score, leader_board_id,

                (bool success) =>

                {

#if UNITY_ANDROID

                    PlayGamesPlatform.Instance.ShowLeaderboardUI(leader_board_id);

#elif UNITY_IPHONE

                    Social.ShowLeaderboardUI();

#endif

                }

            );

    }

}


 - leader_board_id는 구글 Developer Console 및 iTunes Connect에서 확인하여 붙여넣는다.


6. Button의 클릭 이벤트를 지정한다. 

 - 오브젝트 : GameObject

 - 함수: MainScene.OnButtonClick



7. Edit메뉴/ Project Setting/ Player/ iOS의 Other Settings에서 Scripting Define SymbolsNO_GPGS를 입력한다. ( iOS로 빌드시 구글 플레이 서비스를 제외하기 위함.)



8. Android로 빌드한 후 실행한다. (Ctrl+B)

< 처음 실행시 화면(좌) 및 버튼을 눌렀을때 나오는 리더보드 화면(우) >


.


Posted by GNUPart
Unity2015. 6. 24. 01:13

unity, google play game service, apple gamecenter, admob


Unity 5.x 버전 기준으로 작성.


- Android 버전은 구글 플레이 서비스 연동

- iOS 버전은 애플 게임 센터 연동

- AdMob 연동 (Android/iOS)


* 구글 플레이 / Developer Console 업로드용 apk 빌드


1. Unity / 새 프로젝트 / SocialTest 이름으로 프로젝트 생성

2. Player Setting에서

 - Other Settings / Bundle Identifier : com.testcompany.SocialTest 입력


 - Publishing Settings의 Keystore 정보 입력 (Unsigned(debug)는 안됨)


3. 빌드해서 APK파일 생성.

4. 구글 플레이 게임 서비스 정보 입력 ( 구글 플레이 게임 서비스 연동 테스트 링크  )



* 구글 플레이 게임 서비스 플러그인 설치


1. 플러그인 다운로드 ( 링크 )

 - 오른쪽의 'Download ZIP' 클릭


2. Unity / Assets/ Import Package/ Custom Package 메뉴 선택후, 위에서 다운받은 파일중

current-build/GooglePlayGamesPluginForUnity-X.YY.ZZ.unitypackage

를 임포트한다.

  


3. 임포트에 성공하면, Window메뉴에 'Google Play Games'메뉴가 생성된다. 

  Window/ Google Play Games/ Setup/ Android Setup 선택



4. 구글 Developer ConsoleSocial Test에서 Application ID를 복사하여 입력하고, Setup을 클릭한다.

 <Application ID복사>



<정상적으로 세팅이 되었다>








Posted by GNUPart