Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBDTabBarController.m:183:21: No visible @interface for 'UITabBar' declares the selector 'scrollEdgeAppearance' #208

Open
weijintao92 opened this issue Nov 9, 2021 · 19 comments

Comments

@weijintao92
Copy link

从以前的0.28升级到 2.5版本后,ios端照着文档修改后,出现这个问题。请一下是我哪里出现问题了吗?

@listenzz
Copy link
Owner

listenzz commented Nov 9, 2021

ios 版本是?

@weijintao92
Copy link
Author

#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <NavigationHybrid/NavigationHybrid.h>

#import "AliPlayerViewController.h"
#import "Test01ViewController.h"
#import <React/RCTLinkingManager.h>

#import "SVProgressHUD.h"

//#import <UMCommon/UMCommon.h>
//#import <UMCommonLog/UMCommonLogHeaders.h>

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

static void InitializeFlipper(UIApplication *application) {
FlipperClient *client = [FlipperClient sharedClient];
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
[client addPlugin:[FlipperKitReactPlugin new]];
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
[client start];
}
#endif

@implementation AppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    #ifdef FB_SONARKIT_ENABLED
    InitializeFlipper(application);
    #endif

    [SVProgressHUD setMinimumDismissTimeInterval: 1.2];
    [SVProgressHUD setDefaultStyle: SVProgressHUDStyleDark];

// [UMConfigure initWithAppkey:@"60beef22799cce47f93ad9a3" channel:@"App Store"];
// //开发者需要显式的调用此函数,日志系统才能工作
// [UMCommonLogManager setUpUMCommonLogManager];

NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
[[HBDReactBridgeManager sharedInstance] installWithBundleURL:jsCodeLocation launchOptions:launchOptions];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.windowLevel = UIWindowLevelStatusBar + 1;
UIViewController *rootViewController = [UIViewController new];
rootViewController.view.backgroundColor = UIColor.whiteColor;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
//

// self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:[Test01ViewController new]];
// self.window.rootViewController = nvc;
// [self.window makeKeyAndVisible];

return YES;
}

//- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
//{
// RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
// RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
// moduleName:@"AlphaZone"
// initialProperties:nil];
// rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
//
// self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// UIViewController *rootViewController = [UIViewController new];
// rootViewController.view = rootView;
// self.window.rootViewController = rootViewController;
// [self.window makeKeyAndVisible];
// return YES;
//}

  • (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    {
    #if DEBUG
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
    #else
    return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    #endif
    }

  • (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    return [WXApi handleOpenURL:url delegate:self];
    }

// ios 9.0+

  • (BOOL)application:(UIApplication *)application openURL:(NSURL )url
    options:(NSDictionary<NSString
    , id> *)options
    {
    // Triggers a callback event.
    // 触发回调事件
    [RCTLinkingManager application:application openURL:url options:options];
    return [WXApi handleOpenURL:url delegate:self];
    }

  • (BOOL)application:(UIApplication *)application
    continueUserActivity:(NSUserActivity *)userActivity
    restorationHandler:(void(^)(NSArray<id> * __nullable
    restorableObjects))restorationHandler {
    // 触发回调方法
    [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
    return [WXApi handleOpenUniversalLink:userActivity delegate:self];
    }

@EnD

@weijintao92
Copy link
Author

ios 版本是?

image

@weijintao92
Copy link
Author

这是我0.28版本的配置文件。

@weijintao92
Copy link
Author

你可以帮我修改下吗?从来没接触过ios,总感觉是不是哪里的配置写错了。

@listenzz
Copy link
Owner

listenzz commented Nov 9, 2021

ios 版本是指测试机(iphone)的系统版本

@weijintao92
Copy link
Author

ios 版本是指测试机(iphone)的系统版本

看起来是12
image

@listenzz
Copy link
Owner

listenzz commented Nov 9, 2021

ios 版本是指测试机(iphone)的系统版本

看起来是12 image

好的,我看一下是不是库的问题

@weijintao92
Copy link
Author

ios 版本是指测试机(iphone)的系统版本

看起来是12 image

好的,我看一下是不是库的问题

好的

@listenzz
Copy link
Owner

listenzz commented Nov 9, 2021

#import <NavigationHybrid/NavigationHybrid.h> 改成 #import <HybridNavigation/HybridNavigation.h>

[[HBDReactBridgeManager sharedInstance] installWithBundleURL:jsCodeLocation launchOptions:launchOptions]; 改成 [[HBDReactBridgeManager get] installWithBundleURL:jsCodeLocation launchOptions:launchOptions];

@weijintao92
Copy link
Author

image

@weijintao92
Copy link
Author

还是同样的错误呢

@listenzz
Copy link
Owner

listenzz commented Nov 9, 2021

你的 Xcode 升级到最新版本了吗

@weijintao92
Copy link
Author

你的 Xcode 升级到最新版本了吗

没有,可能是我的问题,我再看下吧!幸苦了。

@weijintao92
Copy link
Author

你的 Xcode 升级到最新版本了吗
我的xcode 版本
image

我今天用一个全新的react native(0.66.3) 项目来集成了hybrid-navigation。在ios端出现了以下错误:
image

image

测试项目giee地址:https://gitee.com/weijintao/rn_-test.git

@listenzz
Copy link
Owner

可以确定,是你 Xcode 版本的问题

iShot2021-11-12 12 23 04

启动后,会出现下面的错误提示,关闭即可,这是 RN 项目模版自身的问题

iShot2021-11-12 12 18 27

@weijintao92
Copy link
Author

可以确定,是你 Xcode 版本的问题

iShot2021-11-12 12 23 04

启动后,会出现下面的错误提示,关闭即可,这是 RN 项目模版自身的问题

iShot2021-11-12 12 18 27

非常感谢,话说你用的什么vpn? pod install 这么快

@listenzz
Copy link
Owner

非常感谢,话说你用的什么vpn? pod install 这么快

shadowsocks

@weijintao92
Copy link
Author

感觉升级到xcode 13.1 好麻烦。还需要为 macOS 11.3 或更高版本。

@weijintao92 weijintao92 reopened this Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants