Solar2D XCode: Objective C to Swift planned?

Hi,

We are currently working on a larger project in Solar2D.

As we are implementing the latest native plugins, we are unfortunately running into limitations with the native implementation in XCode, as many modern plugins now rely solely on Swift. For example, the latest Firebase Storage Plugin, or plugins for reading Ntp-Time-WebServer data, and so on.

A combination of Solar2D plugins and current native iOS implementations (such as Firebase) is not possible under XCode due to source duplications.

Is a native transition from Objective C to Swift planned?

This would significantly facilitate the implementation of native plugins and since it is crucial for Solar2D to be future-proof.

Thanks,
Kai

Firebase still supports objc?


Pretty much all popular sdk may be made be with swift but are still supported objc. And I heavily doubt that will change in the near future

You can make plugins with swift but out of the box you still need some objc++ to talk lua.

See the example I made here

Hey Scott,
Firebase yes but not all features like:

  • the newest FirebaseStorage update has no Header files, mean import the packages is not possible in Objective C.

image

Is import Native files in Objective C with @import possible?

We able to import the files this way:

#import <FirebaseCore/FirebaseCore.h>
#import <FirebaseAuth/FirebaseAuth.h>
#import <FirebaseFirestore/FIRFirestore.h>
#import <FirebaseFirestore/FirebaseFirestore.h>

Do you know a way how to import the Package Dependencies in the current Solar2D Native Code without Header files?

Here is the newest FirebaseStorage there are no Headers:

Yes you are right, in FireBaseCore are Objective C Files:

How are you getting the Firebase SDK? Seems to work fine with frameworks

See framework section under https://firebase.google.com/download/ios#frameworks

1 Like

Ok thanks, we not saw that are the Frameworks downloadable direct from Google.
We will try it!

We download the Firebase SDK it via Pods (we got some other problems there) and now from the Package Dependenies via X-Code:
image