微信SDK没适配,暂时可以这样解决 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [AppDelegate hookOldOpenUrl:AppDelegate.class]; } - (BOOL)g_openURL:(NSURL*)url { [UIApplication.sharedApplication openURL:url options:nil completionHandler:nil]; return YES; } + (void)hookOldOpenUrl:(Class)targetCls { Class cls = [UIApplication class]; if (cls) { Method originalMethod =class_getInstanceMethod(cls, @selector(openURL:)); Method swizzledMethod =class_getInstanceMethod(targetCls, @selector(g_openURL:)); if (!originalMethod || !swizzledMethod) { return; } IMP originalIMP = method_getImplementation(originalMethod); IMP swizzledIMP = method_getImplementation(swizzledMethod); const char *originalType = method_getTypeEncoding(originalMethod); const char *swizzledType = method_getTypeEncoding(swizzledMethod); class_replaceMethod(cls,@selector(openURL:),swizzledIMP,swizzledType); class_replaceMethod(cls,@selector(g_openURL:),originalIMP,originalType); }}
iOS 18 WXApi sendReq 无法唤起微信[图片] iOS 18 WXApi sendReq 无法唤起微信 Xcode版本:Xcode 16 手机版本:iPhone12真机 系统: iOS18 报错信息:BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).
10-08微信SDK没适配,暂时可以这样解决 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [AppDelegate hookOldOpenUrl:AppDelegate.class]; } - (BOOL)g_openURL:(NSURL*)url { [UIApplication.sharedApplication openURL:url options:nil completionHandler:nil]; return YES; } + (void)hookOldOpenUrl:(Class)targetCls { Class cls = [UIApplication class]; if (cls) { Method originalMethod =class_getInstanceMethod(cls, @selector(openURL:)); Method swizzledMethod =class_getInstanceMethod(targetCls, @selector(g_openURL:)); if (!originalMethod || !swizzledMethod) { return; } IMP originalIMP = method_getImplementation(originalMethod); IMP swizzledIMP = method_getImplementation(swizzledMethod); const char *originalType = method_getTypeEncoding(originalMethod); const char *swizzledType = method_getTypeEncoding(swizzledMethod); class_replaceMethod(cls,@selector(openURL:),swizzledIMP,swizzledType); class_replaceMethod(cls,@selector(g_openURL:),originalIMP,originalType); } }
iOS 18 WXApi sendReq 无法唤起微信[图片] iOS 18 WXApi sendReq 无法唤起微信 Xcode版本:Xcode 16 手机版本:iPhone12真机 系统: iOS18 报错信息:BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).
10-08微信SDK没适配,暂时可以hook下解决 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [AppDelegate hookOldOpenUrl:AppDelegate.class]; } - (BOOL)g_openURL:(NSURL*)url { [UIApplication.sharedApplication openURL:url options:nil completionHandler:nil]; return YES; } + (void)hookOldOpenUrl:(Class)targetCls { Class cls = [UIApplication class]; if (cls) { Method originalMethod =class_getInstanceMethod(cls, @selector(openURL:)); Method swizzledMethod =class_getInstanceMethod(targetCls, @selector(g_openURL:)); if (!originalMethod || !swizzledMethod) { return; } IMP originalIMP = method_getImplementation(originalMethod); IMP swizzledIMP = method_getImplementation(swizzledMethod); const char *originalType = method_getTypeEncoding(originalMethod); const char *swizzledType = method_getTypeEncoding(swizzledMethod); class_replaceMethod(cls,@selector(openURL:),swizzledIMP,swizzledType); class_replaceMethod(cls,@selector(g_openURL:),originalIMP,originalType); } }
iOS 18 WXApi sendReq 无法唤起微信[图片] iOS 18 WXApi sendReq 无法唤起微信 Xcode版本:Xcode 16 手机版本:iPhone12真机 系统: iOS18 报错信息:BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).
10-08微信SDK没适配,暂时可以hook下解决 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [AppDelegate hookOldOpenUrl:AppDelegate.class]; } - (BOOL)g_openURL:(NSURL*)url { [UIApplication.sharedApplication openURL:url options:nil completionHandler:nil]; return YES; } + (void)hookOldOpenUrl:(Class)targetCls { Class cls = [UIApplication class]; if (cls) { Method originalMethod =class_getInstanceMethod(cls, @selector(openURL:)); Method swizzledMethod =class_getInstanceMethod(targetCls, @selector(g_openURL:)); if (!originalMethod || !swizzledMethod) { return; } IMP originalIMP = method_getImplementation(originalMethod); IMP swizzledIMP = method_getImplementation(swizzledMethod); const char *originalType = method_getTypeEncoding(originalMethod); const char *swizzledType = method_getTypeEncoding(swizzledMethod); class_replaceMethod(cls,@selector(openURL:),swizzledIMP,swizzledType); class_replaceMethod(cls,@selector(g_openURL:),originalIMP,originalType); } }
iOS 18 WXApi sendReq 无法唤起微信[图片] iOS 18 WXApi sendReq 无法唤起微信 Xcode版本:Xcode 16 手机版本:iPhone12真机 系统: iOS18 报错信息:BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).
10-08