GithubHelp home page GithubHelp logo

microsoft / xbox-live-samples Goto Github PK

View Code? Open in Web Editor NEW
143.0 33.0 72.0 24.48 MB

This repo contains the samples that demonstrate the API usage patterns for Microsoft Xbox Live Service. These code samples target the Universal Windows Platform (UWP) and Xbox One XDK. To get access to the Xbox Live service, you can join the Xbox Live Creators Program at https://aka.ms/xblcp, or apply to the ID@Xbox program at http://www.xbox.com/en-us/Developers/id

License: MIT License

Batchfile 0.03% C++ 44.25% CSS 5.16% HTML 0.01% JavaScript 44.95% C 3.69% C# 0.68% CMake 0.11% Java 0.26% Objective-C 0.19% Objective-C++ 0.67%

xbox-live-samples's Issues

Building Leaderboards UWP project in VS2019 throws a daunting amount of Errors, Warnings and Messages.

I'm normally a C# developer, but I want to get Leaderboards working in my UWP app, so thought I'd look at your samples.

I've just cloned the repo and tried to rebuild the Leaderboards_2017 UWP sample using Visual Studio 2019. It asked me to retarget the project, because it wouldn't build. I retargetted to Latest (in my case), as per this screenshot.

image

But when I rebuild the solution, the DirectXTK project builds, but the Leaderboards_2017 project doesn't and looks like this.

image

What should I start looking at to get this working? Once I get it working I'll be more than happy to create a C# version and submit a PR for that, so that others don't have to go through the same pain as me.

UWP build problems with Visual Studio 2017 (platform tools v141)

The xbox-live-samples build and run fine when using Visual Studio 2015 (platform tools v140) but fail during the linker step when building with Visual Studio 2017 (platform tools v141).

I have not tried all solutions, but for example, using VS 2017, if you open Samples\ID@XboxSDK\Achievements\UWP\Cpp\Achievements.sln, re-target for platform tools v141, and then build for Local or Remote debugging, you will encounter the following errors (sorry, it's a bit long):

1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: __cdecl xbox::services::leaderboard::leaderboard_query::leaderboard_query(void)" (??0leaderboard_query@leaderboard@services@xbox@@QEAA@XZ) referenced in function "public: __cdecl xbox::services::xbox_live_result<class xbox::services::leaderboard::leaderboard_query>::xbox_live_result<class xbox::services::leaderboard::leaderboard_query>(class std::error_code,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0?$xbox_live_result@Vleaderboard_query@leaderboard@services@xbox@@@services@xbox@@QEAA@Verror_code@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl xbox::services::leaderboard::leaderboard_query::skip_result_to_me(void)const " (?skip_result_to_me@leaderboard_query@leaderboard@services@xbox@@QEBA_NXZ) referenced in function "public: class xbox::services::xbox_live_result<void> __cdecl xbox::services::stats::manager::stats_manager_impl::get_leaderboard(class std::shared_ptr<class xbox::services::system::xbox_live_user> const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?get_leaderboard@stats_manager_impl@manager@stats@services@xbox@@QEAA?AV?$xbox_live_result@X@45@AEBV?$shared_ptr@Vxbox_live_user@system@services@xbox@@@std@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@8@Vleaderboard_query@leaderboard@45@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: unsigned int __cdecl xbox::services::leaderboard::leaderboard_query::skip_result_to_rank(void)const " (?skip_result_to_rank@leaderboard_query@leaderboard@services@xbox@@QEBAIXZ) referenced in function "public: class xbox::services::xbox_live_result<void> __cdecl xbox::services::stats::manager::stats_manager_impl::get_leaderboard(class std::shared_ptr<class xbox::services::system::xbox_live_user> const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?get_leaderboard@stats_manager_impl@manager@stats@services@xbox@@QEAA?AV?$xbox_live_result@X@45@AEBV?$shared_ptr@Vxbox_live_user@system@services@xbox@@@std@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@8@Vleaderboard_query@leaderboard@45@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: unsigned int __cdecl xbox::services::leaderboard::leaderboard_query::max_items(void)const " (?max_items@leaderboard_query@leaderboard@services@xbox@@QEBAIXZ) referenced in function "public: class xbox::services::xbox_live_result<void> __cdecl xbox::services::stats::manager::stats_manager_impl::get_leaderboard(class std::shared_ptr<class xbox::services::system::xbox_live_user> const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?get_leaderboard@stats_manager_impl@manager@stats@services@xbox@@QEAA?AV?$xbox_live_result@X@45@AEBV?$shared_ptr@Vxbox_live_user@system@services@xbox@@@std@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@8@Vleaderboard_query@leaderboard@45@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: enum xbox::services::leaderboard::sort_order __cdecl xbox::services::leaderboard::leaderboard_query::order(void)const " (?order@leaderboard_query@leaderboard@services@xbox@@QEBA?AW4sort_order@234@XZ) referenced in function "public: class xbox::services::xbox_live_result<void> __cdecl xbox::services::stats::manager::stats_manager_impl::get_social_leaderboard(class std::shared_ptr<class xbox::services::system::xbox_live_user> const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?get_social_leaderboard@stats_manager_impl@manager@stats@services@xbox@@QEAA?AV?$xbox_live_result@X@45@AEBV?$shared_ptr@Vxbox_live_user@system@services@xbox@@@std@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@8@1Vleaderboard_query@leaderboard@45@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const & __cdecl xbox::services::leaderboard::leaderboard_query::_Continuation_token(void)const " (?_Continuation_token@leaderboard_query@leaderboard@services@xbox@@QEBAAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@XZ) referenced in function "public: class xbox::services::xbox_live_result<void> __cdecl xbox::services::stats::manager::stats_manager_impl::get_leaderboard(class std::shared_ptr<class xbox::services::system::xbox_live_user> const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?get_leaderboard@stats_manager_impl@manager@stats@services@xbox@@QEAA?AV?$xbox_live_result@X@45@AEBV?$shared_ptr@Vxbox_live_user@system@services@xbox@@@std@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@8@Vleaderboard_query@leaderboard@45@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: void __cdecl xbox::services::leaderboard::leaderboard_query::_Set_continuation_token(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?_Set_continuation_token@leaderboard_query@leaderboard@services@xbox@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) referenced in function "class xbox::services::xbox_live_result<class xbox::services::leaderboard::leaderboard_result> __cdecl xbox::services::leaderboard::serializers::deserialize_result(class web::json::value const &,class std::shared_ptr<class xbox::services::user_context>,class std::shared_ptr<class xbox::services::xbox_live_context_settings>,class std::shared_ptr<class xbox::services::xbox_live_app_config>,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?deserialize_result@serializers@leaderboard@services@xbox@@YA?AV?$xbox_live_result@Vleaderboard_result@leaderboard@services@xbox@@@34@AEBVvalue@json@web@@V?$shared_ptr@Vuser_context@services@xbox@@@std@@V?$shared_ptr@Vxbox_live_context_settings@services@xbox@@@std@@V?$shared_ptr@Vxbox_live_app_config@services@xbox@@@std@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@Vleaderboard_query@234@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: void __cdecl xbox::services::leaderboard::leaderboard_query::_Set_stat_name(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?_Set_stat_name@leaderboard_query@leaderboard@services@xbox@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) referenced in function "private: class Concurrency::task<class xbox::services::xbox_live_result<class xbox::services::leaderboard::leaderboard_result> > __cdecl xbox::services::leaderboard::leaderboard_service::get_leaderboard_for_social_group_internal(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,unsigned int,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,unsigned int,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?get_leaderboard_for_social_group_internal@leaderboard_service@leaderboard@services@xbox@@AEAA?AV?$task@V?$xbox_live_result@Vleaderboard_result@leaderboard@services@xbox@@@services@xbox@@@Concurrency@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@000I00I00Vleaderboard_query@234@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: void __cdecl xbox::services::leaderboard::leaderboard_query::_Set_social_group(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (?_Set_social_group@leaderboard_query@leaderboard@services@xbox@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) referenced in function "private: class Concurrency::task<class xbox::services::xbox_live_result<class xbox::services::leaderboard::leaderboard_result> > __cdecl xbox::services::leaderboard::leaderboard_service::get_leaderboard_for_social_group_internal(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,unsigned int,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,unsigned int,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &,class xbox::services::leaderboard::leaderboard_query)" (?get_leaderboard_for_social_group_internal@leaderboard_service@leaderboard@services@xbox@@AEAA?AV?$task@V?$xbox_live_result@Vleaderboard_result@leaderboard@services@xbox@@@services@xbox@@@Concurrency@@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@000I00I00Vleaderboard_query@234@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: __cdecl xbox::services::stats::manager::leaderboard_result_event_args::leaderboard_result_event_args(class xbox::services::xbox_live_result<class xbox::services::leaderboard::leaderboard_result> const &)" (??0leaderboard_result_event_args@manager@stats@services@xbox@@QEAA@AEBV?$xbox_live_result@Vleaderboard_result@leaderboard@services@xbox@@@34@@Z) referenced in function "public: __cdecl std::_Ref_count_obj<class xbox::services::stats::manager::leaderboard_result_event_args>::_Ref_count_obj<class xbox::services::stats::manager::leaderboard_result_event_args><class xbox::services::xbox_live_result<class xbox::services::leaderboard::leaderboard_result> const &>(class xbox::services::xbox_live_result<class xbox::services::leaderboard::leaderboard_result> const &)" (??$?0AEBV?$xbox_live_result@Vleaderboard_result@leaderboard@services@xbox@@@services@xbox@@@?$_Ref_count_obj@Vleaderboard_result_event_args@manager@stats@services@xbox@@@std@@QEAA@AEBV?$xbox_live_result@Vleaderboard_result@leaderboard@services@xbox@@@services@xbox@@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: __cdecl xbox::services::tournaments::tournament_service::tournament_service(void)" (??0tournament_service@tournaments@services@xbox@@QEAA@XZ) referenced in function "public: __cdecl xbox::services::xbox_live_context_impl::xbox_live_context_impl(class std::shared_ptr<class xbox::services::system::xbox_live_user>)" (??0xbox_live_context_impl@services@xbox@@QEAA@V?$shared_ptr@Vxbox_live_user@system@services@xbox@@@std@@@Z) 1>Microsoft.Xbox.Services.141.UWP.Ship.Cpp.lib(build.obj) : error LNK2019: unresolved external symbol "public: __cdecl xbox::services::tournaments::tournament_service::tournament_service(class std::shared_ptr<class xbox::services::user_context>,class std::shared_ptr<class xbox::services::xbox_live_context_settings>,class std::shared_ptr<class xbox::services::xbox_live_app_config>,class std::shared_ptr<class xbox::services::real_time_activity::real_time_activity_service>)" (??0tournament_service@tournaments@services@xbox@@QEAA@V?$shared_ptr@Vuser_context@services@xbox@@@std@@V?$shared_ptr@Vxbox_live_context_settings@services@xbox@@@5@V?$shared_ptr@Vxbox_live_app_config@services@xbox@@@5@V?$shared_ptr@Vreal_time_activity_service@real_time_activity@services@xbox@@@5@@Z) referenced in function "public: void __cdecl xbox::services::xbox_live_context_impl::init(void)" (?init@xbox_live_context_impl@services@xbox@@QEAAXXZ)

Completely broken

What happened to Xbox Live on UWP? is it getting dropped?
I've downloaded this repo.
Opened in VS 2022, complains:
C:\xbox-live-samples-main\Kits\DirectXTK\DirectXTK_Windows10.vcxproj : error : The project file could not be loaded. Could not find file 'C:\xbox-live-samples-main\Kits\DirectXTK\DirectXTK_Windows10.vcxproj'. C:\xbox-live-samples-main\Kits\DirectXTK\DirectXTK_Windows10.vcxproj

Extracted https://github.com/microsoft/DirectXTK
into C:\xbox-live-samples-main\Kits\DirectXTK

Didn't help, same problem.

I had Xbox Live working on UWP, tested couple years ago, that was using - Microsoft.Xbox.Live.SDK.Cpp.UWP.2018.6.20181010.2 from the NuGet
Now I tried to run it again, getting bunch of errors:
The app shows "we couldn't sign you in" 0x87DD0005 - completely UNHELPFUL
VS output shows:

onecore\com\combase\dcomrem\resolver.cxx(2299)\combase.dll!00007FFD92421BED: (caller: 00007FFD92424ACE) ReturnHr(1) tid(4e4) 80040154 Class not registered
onecore\com\combase\dcomrem\resolver.cxx(2507)\combase.dll!00007FFD92424AF6: (caller: 00007FFD92421585) ReturnHr(2) tid(4e4) 80040154 Class not registered
Exception thrown at 0x00007FFD91D24F69 (KernelBase.dll) in Into The Dark.exe: 0x406D1388 (parameters: 0x0000000000001000, 0x0000000000000000, 0x0000000000005D1C).
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\Windows.ApplicationModel.dll'. 
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\rometadata.dll'. 
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\WinMetadata\Windows.System.winmd'. Module was built without symbols.
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\Windows.Security.Authentication.Web.Core.dll'. 
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\OneCoreCommonProxyStub.dll'. 
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\vaultcli.dll'. 
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\XblAuthTokenBrokerExt.dll'. 
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\XblAuthManagerProxy.dll'. 
onecoreuap\xbox\xblauth\tokenbrokerext\dll\xblauth.cpp(824)\XblAuthTokenBrokerExt.dll!00007FFD71ACC318: (caller: 00007FFD71ACAE19) LogHr(1) tid(d90) 87DD0005 onecoreuap\xbox\xblauth\tokenbrokerext\dll\xblauth.cpp(518)\XblAuthTokenBrokerExt.dll!00007FFD71ACB4BF: (caller: 00007FFD71ACA693) ReturnHr(1) tid(d90) 80070490 Element not found.
04/21/22 13:26:21 [22408] error  - Get token from IDP failed with ResponseStatus:3
'Into The Dark.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryClient.dll'. 
onecoreuap\xbox\xblauth\tokenbrokerext\dll\xblauth.cpp(824)\XblAuthTokenBrokerExt.dll!00007FFD71ACC318: (caller: 00007FFD71ACAE19) LogHr(2) tid(d90) 87DD0005 onecoreuap\xbox\xblauth\tokenbrokerext\dll\xblauth.cpp(518)\XblAuthTokenBrokerExt.dll!00007FFD71ACB4BF: (caller: 00007FFD71ACA693) ReturnHr(2) tid(d90) 80070490 Element not found.
onecore\com\combase\dcomrem\preventrundownbias.cpp(1310)\combase.dll!00007FFD9244D3AC: (caller: 00007FFD9244D1D9) LogHr(1) tid(3e90) 80070005 Access is denied.

completely UNHELPFUL

So I figured I'll run official samples and see if they work. But your projects are broken.
So what happened, Xbox Live is not supported anymore on UWP?
I have a game I want to sell on Xbox. Should I just get rid of Xbox Live?

Support...

I'm with the ID@xbox program and am having to use UWP because of last year's new policy regarding Unity Pro Licencing.

I've got user sign-in working and I've managed to hack up a working achievements system but connected storage saving doesn't work. The samples here, as mentioned by others, Are simply broken.

You mention that you're not focusing on UWP but what about developers using the Creator's Program that want to use UWP? Would it not be at all possible to have someone from the Microsoft team look into these samples and release working versions for both ID@xbox and Creators?, because there are lots of developers out there who simply can't release their titles now.

Can't join a game with lobby members using Multiplayer\Xbox\ example

We are using XDKS.1 Sandbox and using developer accounts with gold membership. Then, one account start the example then invite a friend, and the friend can receive the invite and correctly join the same lobby session. It's correctly displayed that two users are in the same lobby session. However, when the lobby host press button A to join the game, it only shows the host joins the game on the UI on host console, and nothing happens on another console. So do you guys have any ideas what is happening? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.