You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the newest Xcode this error shows up when compiling for iOS in platform/CCFileUtils.cpp, line 1429:
Call to unavailable function 'system': not available on iOS
mars3142, MotorcycleRepairShop, xionglinxi95, anlide, AgoraBeck and 8 more
I downloaded v3.17 from here: http://cocos2d-x.org/download
And got that same "'system': not available on iOS" when I tried building a game that was using version v3.10 before.
Activity
mars3142 commentedon Jun 7, 2017
It's in FileUtils::removeDirectory(const std::string& path) and the deprecation text for system is -> Use posix_spawn APIs instead.
minggo commentedon Jun 8, 2017
Xcode 9 is in beta version.
minggo commentedon Jun 8, 2017
@mars3142 could you please describe it in detail?
mars3142 commentedon Jun 8, 2017
Right, but the system call is deprecated for iPhone since long time ago.
mars3142 commentedon Jun 8, 2017
@minggo I only jumped into the definition of system in Xcode 9 (Beta with iOS 11), which is in stdlib.h
In Xcode 8 (iOS 10.12) showed nearly the same:
__swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable") __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0,__MAC_NA,__IPHONE_2_0,__IPHONE_8_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED int system(const char *) __DARWIN_ALIAS_C(system);
This is what I see and that way I thought posix_spawn will be the solution.
minggo commentedon Jun 8, 2017
Ok, but i think we should use nftw as mentioned in the ticket.
minggo commentedon Jun 12, 2017
fixed in #17921
erebar commentedon Jul 4, 2018
I don't know why you say FIXED when it's NOT. I just downloaded v17 and the thing is still there.
minggo commentedon Jul 5, 2018
Why did you say it is not fixed? How did you test?
erebar commentedon Jul 5, 2018
I downloaded v3.17 from here: http://cocos2d-x.org/download
And got that same "'system': not available on iOS" when I tried building a game that was using version v3.10 before.
2 remaining items