Xcode : 'XYChartXYChartDataSourceItem.h'文件未找到 ( Unity Project Exported in iOS)

问题描述 投票:0回答:1

我在unity中创建了一个项目,并在iOS中导出它。我在Unity-iPhone导出的应用程序上做了一些工作,如:---------。

1) 添加按钮并设置动作。(这段代码我写在UnityViewControllerBase.mm类中的方法--(void)viewDidAppear:(BOOL)animated { }) 。

2)并打开故事板文件

- (void)viewDidAppear:(BOOL)animated{
        [super viewDidAppear: animated];
        AppController_SendUnityViewControllerNotification(kUnityViewDidAppear);
        UIButton *but= [UIButton buttonWithType:UIButtonTypeRoundedRect];
        [but addTarget:self 
              action:@selector(buttonClicked:)forControlEvents:UIControlEventTouchUpInside];
        [but setFrame:CGRectMake(52, 252, 215, 40)];
        [but setTitle:@"SHOW" forState:UIControlStateNormal];
        [but setExclusiveTouch:YES];
        [self.view addSubview:but]; 
   }

-(void) buttonClicked: (UIButton *) sender {
        UIStoryboard *myStory = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        HomeViewController *homeVC = [myStory instantiateViewControllerWithIdentifier:@"HomeViewController"];
        UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:homeVC];
       [self presentViewController:navController animated:YES completion:nil];
   }

这段代码运行成功。

现在,我使用了一个用Objective C编写的图表库XYChart.在使用这个库在Unity-iPhone导出的应用程序之前。我在xcode中用Objective C语言创建了一个小的演示项目,并只是拖放XYChart库的类在我的xcode项目上。)

enter image description here

在这之后,我把XYChart库的所有类拖放到我的Unity-iPhone导出的应用程序上,但我得到了错误的XYChartXYChartDataSourceItem.h'文件没有找到。

enter image description here

谁能告诉我,如何解决这个错误在Unity-iPhone导出的应用程序。感谢提前:-)

ios objective-c xcode unity3d
1个回答
2
投票

最后,经过几个小时的磨合,我解决了这个问题。

我将分享,我如何解决它。

添加每个框架缺失的类的引用

核心图形移动核心服务石英核心

在使用XYChart Library时需要这个框架。

© www.soinside.com 2019 - 2024. All rights reserved.