diff options
author | Sam Bingner <sam@bingner.com> | 2019-10-23 23:06:19 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-10-23 23:06:19 -1000 |
commit | b9347204fd9f2f5894146e65efe1b23402f519ad (patch) | |
tree | 5f1d3d78026420fca97947b61dc5a60523aef363 | |
parent | 48f5e985307d082328da79c4b11610331ade2c03 (diff) |
Workaround for what appears to be an iOS bugv1.1.15
-rw-r--r-- | sbreload.m | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -64,6 +64,7 @@ #define FLAG_PLATFORMIZE (1 << 1) #include <dlfcn.h> #include <objc/runtime.h> +#include <xpc/xpc.h> @interface FBSSystemService +(id)sharedService; @@ -158,16 +159,26 @@ CF2launch_data(CFTypeRef cfr) case kCFNumberLongType: case kCFNumberLongLongType: CFNumberGetValue(cfr, kCFNumberLongLongType, &n); - r = launch_data_alloc(LAUNCH_DATA_INTEGER); - launch_data_set_integer(r, n); + if (kCFCoreFoundationVersionNumber >= 1443.00) { + r = (launch_data_t)xpc_int64_create(n); + } else { + // This hangs forever if I call it on new iOS??? + r = launch_data_alloc(LAUNCH_DATA_INTEGER); + launch_data_set_integer(r, n); + } break; case kCFNumberFloat32Type: case kCFNumberFloat64Type: case kCFNumberFloatType: case kCFNumberDoubleType: CFNumberGetValue(cfr, kCFNumberDoubleType, &d); - r = launch_data_alloc(LAUNCH_DATA_REAL); - launch_data_set_real(r, d); + if (kCFCoreFoundationVersionNumber >= 1443.00) { + r = (launch_data_t)xpc_double_create(d); + } else { + // Not sure if this hangs, but added to be safe + r = launch_data_alloc(LAUNCH_DATA_REAL); + launch_data_set_real(r, d); + } break; default: r = NULL; |