Is the realtime SDK for Objective C deprecated?

Options
I've been trying to take a look at the 4.x Objective C version of the realtime SDK but it's nowhere to be found. I can only find the C++ version for iOS/Cocos2D-x. Wrapping that library with all the reimplemented data types is a major pain. For the 3.x version the Objective C bindings did work with some major hacking and I could connect as well as send data with something based on the load balancing demo. The code was utter horror to use and I had hoped that the 4.x version would clean stuff up and make it more developer friendly.

So, does anyone know the fate of the Objective C bindings? My game's been in development for 3+ years now, that's why I'm stuck with Objective C and Cocos2D 2.x. I can not rewrite it in C++/Swift/Cocos2d 3.x or whatever. Right now I'm looking at alternatives to Photon Realtime as the Objective C bindings do seem to be deprecated and not actively supported anymore.

Comments

  • chakie
    Options
    I do have something that works with the obsolete 3.x bindings, but it's all so fragile and breaks easily. The API doesn't even compile cleanly and the demo code I built my stuff upon was awfully designed. So preferably I'd just want to migrate my cruft to a modern and cleaner version of Photon, but if that's not possible I'll just drop it and looks elsewhere or kill the multiplayer feature entirely.
  • Kaiserludi
    Options
    Hi chakie.

    "The code was utter horror to use"
    Could you be more specific, please?

    "Objective C bindings do seem to be deprecated and not actively supported anymore."
    They are far from that. We offer an objC Client APi in the latest versions of the iOS and OS X Client SDKs.
    The Photon 4 objC Client API might not be available yet, but if you have a closer look at the download section, you will see that this is also the case for the Photon 4 Server SDK. The Photon 4 objC Clients aren't late - other Clients have just been rather early. The alternative would have been to hold all the new Clients back, until the Server and every single Client SDK are ready for release.

    The new Photon 4 objC Client API will be released in the next couple of days.
  • chakie
    Options
    The code was hard to use due to the lack of examples and API docs. There was only one example in the whole SDK and it was definitely not the cleanest code (some form of UIKit based ping-pong demo) I've seen. The docs also did not describe the role of the load balancing code, which seems to be the way the API should be used? I may be wrong though. The tutorial code that I found was only for C#, which is understandable as Unity is so big nowadays, but it was not at all applicable to the EG classes that the Objective C bindings contained.

    I was under the impression that the Objective C SDK would be released last week at the latest, that's why I was starting to look into updating or removing Photon. As the download page did have an "iOS SDK" one of course assumes that's the thing to use. It only contains the C++ version though. The versions are a bit of a mess, to be honest. A small mention of the status of each SDK would be nice and tell users what's going on. Like "Latest is X, X+1 is in progress and expected by September". Not knowing what's going on makes me scared to bet on something.
  • zaki
    Options
    Hi Chakie,

    "Wrapping that library with all the reimplemented data types is a major pain"

    I totally can feel your pain. Thus, recently I try to switch to Objective C (3.xx). It feels more painful haha (spend half day to get the demo works on a newly created project).. I really hope that the Photon 4 for Objective C will be UP REAL soon. I read somewhere in this forum, couple weeks (or maybe 1-2 months) ago, they said Objective C for Photon 4 will be available soon.. But, to this date, we still WAITING.

    Please let us have the stable Objective C version asap.
  • chakie
    Options
    I heard that it should have been up 1-2 weeks ago already. I'm now at that point in my development where I need to get the multiplayer stuff to work and can't really wait forever for something that may or may not come and may or may not be better. OTOH, if the bindings are improved it also means a lot of porting work to get from my 3.x code base to the new and shiny 4.x stuff.

    I've also been looking at PubNub and their docs are quite nice:
    http://www.pubnub.com/docs/ios-objective-c/api-reference-sdk-v4

    Looks easy to get going, but they seem to be a bit more expensive.
  • Kaiserludi
    Options
    Hi chakie, hi zaki.

    We are having one last known critical issue with the objC API for Photon Chat that prevents an official release. Aside from that everything is ready.

    Please feel free to use this prerelease-version, that we have built today, in the mean time:
    https://dl.dropboxusercontent.com/u/4296291/Photon-iOS-Sdk_v4-0-4-0-Prerelease.zip.
  • chakie
    Options
    Awesome! What kind of critical bug are you still fixing, in case we stumble upon it?
  • chakie
    Options
    Well, I'm very sorry, but the code is still a big mess. I see no real changes in it compared to the 3.x version apart from that my kludgefest of a game doesn't compile anymore. The only relevant example is still the Load Balancing demo, but it's ugly code without any relevant comments other that what Xcode inserts into AppDelegate when you create the project. is the idea that people should learn best practices from code like that? The example seems to mix and match with the Obj-C and cpp API:s without any real separation. A major version bump would indicate some major outward facing API improvements, but I see none.

    I'm a bit annoyed as I waited one month for this without being able to work on my game and it's no better than the old code. Well, the old code compiled and the new one doesn't.

    Trying to learn an API from this is a bit hard:


  • Kaiserludi
    Options
    Hi chakie.

    The bug that I am talking about is that in the Chat library an assert gets triggered when that should not be the case which basically render the whole Chat objC library in this prerelease unuseless. This will be fixed for the final release. This bug is not affecting any of the other libraries at all.

    I am sorry that you are still not happy with the Photon objC Client.

    For API improvements please have a look at the release history files.

    The most important changes compared to 3.x are:
    - introduction of the Chat library
    - pure objC API without the need for any C++ in your code
    - swift compatibility
    - support in LoadBalancing for asynchronous turn based games
    - traffic stats
    - name server support
    - a lot of smaller improvements

    API documentation is on our todo list.

    Of course your existing code that was using the latest v3 SDK isn't working out of the box with the new v4 SDK. That was inevitable when removing all C++ from the objC APIs.
  • zaki
    Options
    Hello,

    I just tried the v4 prerelease version (to be more specific, I am testing the "demo_loadBalancing_objc" project).

    It seems pretty much the same as v3.xx demo. It still using "non-arc" mode, and if you start new project, you will still need to trial-and-error the xcode project "build settings" etc to make it works (quite cumbersome). No offense, but I am quite disappointed in this prerelease version. I tried the Unity SDK version, the Unity is damn good, very easy to integrate and use. However, this Native, Obj-C version... sigh...

    - Is it possible to make the ObjC sdk as easy as the Unity SDK haha

    - Will there be any updates for ObjC demo soon? (eta?)

    @chakie, have you tried pubnub? is it good?

    cheers,
    Zaki
  • chakie
    Options
    @zaki I added the initial support for it in a branch of my game. Getting it installed took a few minutes, but I used the CocoaPods route but as it was the first time I used those, installing CocoaPods took most of the time. Based on the docs so far it should be a lot simpler. Can't say anything about bugs or latency yet though, will have to make a real working client first.

    It is quite clear that Objective C is not a priority anymore for Photon, and it's also quite understandable. Probably not too many new games will be done in that anymore, all the cool kids do C++, JS or C#. I had hoped for more, but will have to settle for less or go somewhere else.
  • zaki
    Options
    @chakie I really like the pubnub obj-c docs, very clear, easy to look up and learn:
    https://www.pubnub.com/docs/ios-objective-c/pubnub-objective-c-sdk-v4

    I hope photon obj-c's doc will be like this too. But dont think anytime soon haha..

    * I <3 cocoapods!!