gpt4 book ai didi

ios - ihasapp 获取 ios 上已安装应用程序的列表并给出错误

转载 作者:行者123 更新时间:2023-11-29 04:05:00 26 4
gpt4 key购买 nike

我在github上找到了ihasapp框架:https://github.com/danielamitay/iHasApp

我将这两个文件包含到项目中..但是它给出了错误:

2013-03-14 11:21:35.848 apps[4338:2203] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSConcreteData initWithContentsOfFile:options:error:]: nil file argument'

这是我在 View Controller 中使用的代码:

#import "helloworldViewController.h"
#import "iHasApp.h"

@interface helloworldViewController ()

@end

@implementation helloworldViewController

- (void)viewDidLoad
{
[super viewDidLoad];
iHasApp *detectionObject = [iHasApp new];
[detectionObject detectAppDictionariesWithIncremental:^(NSArray *appDictionaries) {
NSLog(@"Incremental appDictionaries.count: %i", appDictionaries.count);
} withSuccess:^(NSArray *appDictionaries) {
NSLog(@"Successful appDictionaries.count: %i", appDictionaries.count);
} withFailure:^(NSError *error) {
NSLog(@"Failure: %@", error.localizedDescription);
}];

// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end

我对 ios 开发真的很陌生,所以错误可能非常小/愚蠢。但任何帮助都会很棒!

最佳答案

作者在这里:

iHasApp 正在内部询问资源项的文件路径,该文件路径返回 nil。然后,它使用 nil 参数发出 NSData 请求。

修复已推送至 GitHub。

关于ios - ihasapp 获取 ios 上已安装应用程序的列表并给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15403094/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com