Shmoopi/iOS-System-Services

Compile the error in xcode9

Closed this issue · 10 comments

Hello,there is a error when i update to xcode9, below:

SSJailbreakCheck.m:268:13: error: 'system' is unavailable: not available on iOS
if (system(0)) {
^

Showing Recent Issues
/Pods/SystemServices/System Services/Utilities/SSJailbreakCheck.m:268:13: 'system' is unavailable: not available on iOS

platform :ios, ‘7.0’

Hello,

Have you tried using the latest version? system has been removed in version 2.0.0+.

Thanks!

@Shmoopi
I can't compile as well. The error I get is:
SSNetworkInfo.m:19:10: 'net/route.h' file not found
I use the latest version. Commit 3ebee2d31f65675fc0aa726aa5b4f5b6c5f2be9a

@Shmoopi
I believe this:

#if !TARGET_IPHONE_SIMULATOR
#include <net/route.h>
#else
#include "route.h"
#endif

should be this

#if TARGET_IPHONE_SIMULATOR
#include <net/route.h>
#else
#include "route.h"
#endif

@Shmoopi
Can you please update Pod file base on @Moriquendi comments

@yalamandarao

I have found that the simulator does not find net/route.h and will fail to compile. It may need to be only #include "route.h"

Can someone test this?

@Shmoopi Yup, I can confirm.
#include "route.h" is enough for both Simulator and the device.

@Moriquendi Thanks! I'll update shortly.

If anyone encounters issues with route.h, replacing the provided route.h file with /usr/include/net/route.h may help.

2.0.1 address this issue. Please let me know if there are any further issues related to this.

ba21ee7

@Shmoopi Thank you so much