System Function iOS 11

I'll preface this question by stating that I'm not really an iOS developer, I only use Xcode to sideload 1 app on my phone.


Anyway, I recently went to iOS 11 on my iPhone 6s and I tried to build the app (GBA4iOS), but Xcode gave me this error: "Call to unavailable function 'system': not available on iOS". I briefly researched the error and it sounds like Apple has stopped using whatever that "system" function is for iOS. Is there a way that I can enable that function for iOS or is there a workaround I could use? Thanks in advance.

Accepted Answer

Effectively, obsoleted sinc oct 17


Look here :

h ttp s://stackoverflow.com/questions/45420717/call-to-unavailable-function-system-not-available-on-ios


Seem you should use nftw instead, but I've not checked.

Exact definition of call here :

h ttp :// pubs .opengroup.org/onlinepubs/009695399/functions/nftw.html


#include <ftw.h>
int nftw(const char *path, int (*fn)(const char *,
const struct stat *, int, struct FTW *), int fd_limit, int flags);


Hope that helps

Thank you so much! It worked. I had to take out what "system" was used for. The original code was:


int err = system(execPath);


if(err)

{logWarn("error from fixMobilePermission helper: %d", err);}


The way it worked was if I added your snippet of code and commented out the code above. From my limited coding knowledge it looks like the stuff I commented out is just an error checker with a message if the error checker is true, so it wouldn't be necessary for the app to function properly, so eliminating it shouldn't cause me any problems in using the app.


The app built and ran a ROM so I'm counting it as a win. I was hoping to make sure this part I commented out won't cause me issues later. I don't think it will, but since I don't know C++ I'm not sure.


Thank You!!

OK, update. I tried to download a new ROM and that did not work. It downloaded the file, but normally the file would download as a zip file and then convert to whatever type of game the ROM was, GBA or GBC, but now the file just stayed as a zip file so it looks like any new ROM won't work. Any idea why this might be the case?

System Function iOS 11
 
 
Q