Re: Recommendations for cross platform library/framework
Re: Recommendations for cross platform library/framework
- Subject: Re: Recommendations for cross platform library/framework
- From: Jeff Evans via Cocoa-dev <email@hidden>
- Date: Tue, 27 Aug 2019 12:26:01 -0700
If it’s any help: Microsoft Visual Studio now offers C++/winrt, a pure C++
environment that works great. Doesn’t seem to be well-known yet but it’s
efficient for Windows Store apps. So all our C++ code goes straight into the
Win version.
No need for C# or C++/CX, etc.
On the Mac I use C++ too except for the UI elements in Objective-C (I don’t see
a reason to adopt yet another platform-specific language that would require
extensive rewriting, so I’m ignoring Swift).
Jeff
On Aug 27, 2019, at 12:03 PM, Pier Bover via Cocoa-dev
<email@hidden> wrote:
Writing that logic in C seems very intimidating to be honest, but thanks
for the suggestion.
A priori I think it would be less painful to maintain two codebases in
Swift and C#.
On Tue, Aug 27, 2019 at 1:44 PM Robert Tillyard <email@hidden>
wrote:
> I had a UNIX project that was already in C that I ported to OS X that
> sounds similar.
>
> It mainly consisted of a small amount of UI and some networking logic. As
> the networking was already in C I just copied the .c and .h file into my
> project and compiled it as part of the project. If the UNIX side gets
> updated I just copy the file back to OS X. I guess it depends on how
> complicated your network logic is.
>
> The Windows guys also did the same with the Windows version.
>
>
> If you have to write a C bridge to Go you might find doing it all in C
> works.
>
> Regards, Rob.
>
>> On 27 Aug 2019, at 00:41, Pier Bover via Cocoa-dev <
> email@hidden> wrote:
>>
>> Hi all
>>
>> In a couple of months I'll be starting a macOS Swift 5 project and if
>> possible I'd like to separate as the business networking logic so that it
>> can be reused in a Windows app in the future.
>>
>> Ideally I'd want to statically link the library but I've also considered
>> using dynamic libraries, or even include binaries in my app and execute
>> them via Process().
>>
>> I've considered a multitude of corssplatform options (JVM, QT, Xamarin,
>> etc) but quite frankly I'd rather maintain one codebase per platform than
>> use one of those which could introduce more problems than they solve.
>>
>> I'd prefer avoiding C++ if possible. My first choice would have been
> using
>> Go which can compile to .so shared objects but Xcode cannot use those
>> without some bridge written in C. I've read Rust can compile to a dylib
> for
>> Xcode.
>>
>> Has anyone any recommendations or tips to share?
>>
>> Thanks in advance.
>>
>> Pier
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden