summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbreload.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/sbreload.m b/sbreload.m
index a0bf1f8..14e4557 100644
--- a/sbreload.m
+++ b/sbreload.m
@@ -64,7 +64,13 @@
#define FLAG_PLATFORMIZE (1 << 1)
#include <dlfcn.h>
#include <objc/runtime.h>
+
+#ifndef __IPHONE_10_0
+#define __IPHONE_10_0 100000
+#endif
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0
#include <xpc/xpc.h>
+#endif
@interface FBSSystemService
+(id)sharedService;
@@ -165,9 +171,13 @@ CF2launch_data(CFTypeRef cfr)
case kCFNumberLongType:
case kCFNumberLongLongType:
CFNumberGetValue(cfr, kCFNumberLongLongType, &n);
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0
if (kCFCoreFoundationVersionNumber >= 1443.00) {
r = (launch_data_t)xpc_int64_create(n);
} else {
+#else
+ {
+#endif
// This hangs forever if I call it on new iOS???
r = launch_data_alloc(LAUNCH_DATA_INTEGER);
launch_data_set_integer(r, n);
@@ -178,9 +188,13 @@ CF2launch_data(CFTypeRef cfr)
case kCFNumberFloatType:
case kCFNumberDoubleType:
CFNumberGetValue(cfr, kCFNumberDoubleType, &d);
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0
if (kCFCoreFoundationVersionNumber >= 1443.00) {
r = (launch_data_t)xpc_double_create(d);
} else {
+#else
+ {
+#endif
// Not sure if this hangs, but added to be safe
r = launch_data_alloc(LAUNCH_DATA_REAL);
launch_data_set_real(r, d);