heroiclabs / nakama-swift Goto Github PK
View Code? Open in Web Editor NEWSwift client for Nakama server.
Home Page: https://heroiclabs.com/docs/swift-ios-client-guide/
License: Apache License 2.0
Swift client for Nakama server.
Home Page: https://heroiclabs.com/docs/swift-ios-client-guide/
License: Apache License 2.0
Hi, I'm trying to use matchmaker for a 1v1 match (2 users), but I could not find matches.
I'm using Nakama server v3.9.0.
Authentication and socket connection works well, also join/leave matches seems fine, but when I call "addMatchmaker" method the "onMatchmakerMatched" event is never called.
My code:
private func connect() {
self.socket.onMatchmakerMatched = { [weak self] obj in
print("found something", obj.token). // <-- never called
}
self.socket.connect(session: self.session)
}
public func startMatchmaking(_ completion: @escaping (String?) -> Void) {
_ = self.socket.addMatchmaker(
minCount: 2,
maxCount: 2
).always { res in
// get ticket
}
}
Please leave a comment (or reaction) if you'd like us to update this client to Nakama 2.
Just a placeholder issue for swift 5 support.
I have tried tackling it with changes to move to API version 2.0 on the master branch but seems like all the test are still using the old API. The build is successful locally but not sure how to go about checking it.
When I finished pod install, the build will fail because of a swift compiler error listed as below.
By the way, I have fixed issues in PromiseKit due to swift version
My swift toolchain:
Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.2.0
My Xcode version:
10.1
When I call the SelfFetchMessage
to fetch user data I get the following error:
Fatal error: Unexpectedly found nil while unwrapping an Optional value
I think the following line is at fault:
self.socket!.write(data: payload!)
line 392 in Client.swift
The variable socket
is nil, so causes a fatal error when force unwrapped.
Hi, any iOS example project ?
Hi,
I am trying to use this library in an iOS project but have been getting issues regarding the libnghttp2 library not being compiled/available for the simulator. Has anybody got any recommendations on how can I get it working or if this is even supported on the simulator?
Cheers
Hello,
Is there any plans to update swift SDK?
We are considering using Nakama, however the lack of Nakama 2 support in Swift is stopping use from adopting it since most of our work is through iOS.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.