Live data from Hacker News

Is it possible to write plain C iOS app in 2025?

news.ycombinator.com

71–74 of 74 posts

Re: Is it possible to write plain C iOS app in 2025?

#71
post #27

Earlier quoted context omitted.

It‘s a superset of ANSI-C. One needs to be carful to mention this. I‘m not aware that this had changed and also added some small grieve back in the days for me. But I sadly can‘t remember anymore what didn‘t work for me.

I'd be curious if you can remember what differences there were. It's compatible with all C99 and C11 syntax I've tried

I think it was specifically in .m files. Obj-c is using ANSI-C (c89) which lacks certain features and keywords. Mixing with c99 files is of course possible. Maybe that was also an issue in older versions of clang.

Re: Is it possible to write plain C iOS app in 2025?

#72
I made RGFW, which calls Objective-C MacOS's API functions in Pure C.

BUT I would also like to mention a project a friend and I made called Silicon. Silicon is a single-header C wrapper around the Pure-C calls, which makes it far more convenient to use.

https://github.com/eimamei/silicon

I no longer use it in RGFW because I wanted to remove the extra dependency.

Re: Is it possible to write plain C iOS app in 2025?

#73
post #71

Earlier quoted context omitted.

I'd be curious if you can remember what differences there were. It's compatible with all C99 and C11 syntax I've tried

I think it was specifically in .m files. Obj-c is using ANSI-C (c89) which lacks certain features and keywords. Mixing with c99 files is of course possible. Maybe that was also an issue in older versions of clang.

I haven't run into such issues intermingling C11 features in a .m file. Possibly you just needed to set the right compiler flags, or it was a bug in older versions of clang.

Re: Is it possible to write plain C iOS app in 2025?

#74
post #71

Earlier quoted context omitted.

I think it was specifically in .m files. Obj-c is using ANSI-C (c89) which lacks certain features and keywords. Mixing with c99 files is of course possible. Maybe that was also an issue in older versions of clang.

I haven't run into such issues intermingling C11 features in a .m file. Possibly you just needed to set the right compiler flags, or it was a bug in older versions of clang.

Could be. My obj-c days are long over though. The time I worked with was between 2009 and 2015.
Post reply on HN