unity ios login

 

 

unity ios login

 

// quick login
	public void QuickLogin()
	{
		Debug.Log ("--------------- quick login -------------");
        Facade.Instance.SendNotification(LoginNotes.SHOW_CONNECT_GAMECENTER);
		Social.localUser.Authenticate (_HandleAuthenticated);
	}


	private void _HandleAuthenticated(bool success)
	{
		_userInfo = ""; 
		Debug.Log ("--------- login static ----------------: " + success);
		if (success)
		{
			Debug.Log("-------------- login success --------");
			//@"TestType", @"type",
			//[AppGameCenterForZszb instance].mId, @"id",
			//[AppGameCenterForZszb instance].mUserName, @"userName",
			//@"TestPassword", @"password",
			//@"123", @"token", nil];
            Debug.Log("authenticated :" + Social.localUser.authenticated 
                    + "\n          id :" + Social.localUser.id 
                    + "\n   user name :" + Social.localUser.userName 
                    + "\n    underage :" + Social.localUser.underage
                    + "\n       state :" + Social.localUser.state);
			_userInfo = _CreateUserInfo("type", Social.localUser.id, Social.localUser.userName, "pw", "123");
			//SendMessage(gameObject.name, "OnMessage", MSG_LOGIN_SUCCESS);
			SendMessage("OnMessage", MSG_LOGIN_SUCCESS);
		} 
		else 
		{
			SendMessage("OnMessage", MSG_LOGIN_FAIL);
            Hint.Show(OTManager.Get("hint_login_GameCenter_fail"));
		}
        Facade.Instance.SendNotification(LoginNotes.HIDE_CONNECT_GAMECENTER);
	}

 

xcode 打ios 64位 c99 Missing 64-bit support  :

原因是mm文件,c混编的方法无法找到,需要引入相关的头文件

 如以下代码:

 

#if defined(__cplusplus)
extern "C" {
#endif
    extern void       UnitySendMessage(const char* obj, const char* method, const char* msg);
    extern NSString*  AppStoreCreateNSString (const char* string);
    extern NSString*  CreateNSString (const char* string);
#if defined(__cplusplus)
}
#endif

 

 打包64位没任何错误,直接build failed 

先不要archive,先clean ,然后build,就能出现错误,解决完即可

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值