diff --git a/src/main/java/org/libimobiledevice/ios/driver/binding/raw/ImobiledeviceSdkLibrary.java b/src/main/java/org/libimobiledevice/ios/driver/binding/raw/ImobiledeviceSdkLibrary.java index 5e87d9b..1d89a82 100644 --- a/src/main/java/org/libimobiledevice/ios/driver/binding/raw/ImobiledeviceSdkLibrary.java +++ b/src/main/java/org/libimobiledevice/ios/driver/binding/raw/ImobiledeviceSdkLibrary.java @@ -21,7 +21,8 @@ * For help, please visit NativeLibs4Java , Rococoa, or JNA. */ public class ImobiledeviceSdkLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "imobiledevice-sdk"; + private static final boolean initialized = JNAInit.init(); + public static final String JNA_LIBRARY_NAME = "imobiledevice-sdk"; public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(ImobiledeviceSdkLibrary.JNA_LIBRARY_NAME); static { Native.register(ImobiledeviceSdkLibrary.class, ImobiledeviceSdkLibrary.JNA_NATIVE_LIB); diff --git a/src/main/java/org/libimobiledevice/ios/driver/binding/raw/JNAInit.java b/src/main/java/org/libimobiledevice/ios/driver/binding/raw/JNAInit.java index 47f8426..2b61688 100644 --- a/src/main/java/org/libimobiledevice/ios/driver/binding/raw/JNAInit.java +++ b/src/main/java/org/libimobiledevice/ios/driver/binding/raw/JNAInit.java @@ -79,7 +79,6 @@ public static synchronized boolean init() { copy("darwin/idevicedebug", dst); dst.setExecutable(true); - ImobiledeviceSdkLibrary.sdk_idevice_event_unsubscribe(); initialize = true; return true; }