[BUG] iOS SDK classes are missing prefixes

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

silnar
Posts: 8
Joined: 27 May 2015, 11:33

[BUG] iOS SDK classes are missing prefixes

Postby silnar » 28 May 2015, 07:55

Hi,

Most SmartFox classes in iOS SDK doesn't have any prefix.

Why ?

It is so essential in obj-c libraries...
I've just encountered another SDK with Data class and can't use it.

Can you add prefixes to all your SDK classes?
User avatar
Lapo
Site Admin
Posts: 19823
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [BUG] iOS SDK classes are missing prefixes

Postby Lapo » 28 May 2015, 13:37

Yes,
the iOS API need several improvements in terms of best practices, naming conventions included.
We have plans for a rewrite using Swift, but I don't have an ETA at the moment.

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
silnar
Posts: 8
Joined: 27 May 2015, 11:33

Re: [BUG] iOS SDK classes are missing prefixes

Postby silnar » 02 Jun 2015, 07:32

Yes, I understand, but at the same time SmartFox is a blocker that prevents other libraries from being used.
In my opinion it is a bug that needs to be fixed.

I have a 3rd party lib that also defines Data class and I don't see any way to overcome this problem manually.
Xcode compiler treat it as a duplicated symbol.
The only thing that I can do in this situation is to remove this lib from project, but I would like to avoid that as much as possible.
Or maybe you can advice better solution ?

Renaming SmartFox classes shouldn't be so difficult.
It comes down to adding SFS or ISFS prefix to all SmartFox classes and XCode refactoring, though not ideal, could help a lot with this.
User avatar
Lapo
Site Admin
Posts: 19823
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: [BUG] iOS SDK classes are missing prefixes

Postby Lapo » 03 Jun 2015, 10:01

Yes, but we'd break a lot of previous code when releasing the update.
For this reason we'll put together all the "compatibility breaking" changes into a single update, the release of which is not yet scheduled.

For your specific issue I would suggest to get the sources of either frameworks (SmartFox or the other you're using) and apply the necessary changes locally.
I'd recommend to choose between the smaller in terms of project size, if you can determine which one it is.

SmartFox API sources consist of approximately 290 files, or 145 classes. If you want it, drop us an email to support@... with a reference to this discussion

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 3 guests