2016-12-03 21 views
0

我升级到xcode 8并做了pod安装,现在所有依赖于它自己的资产的豆荚都无法找到束路径。这样的代码在所有豆荚pathForResource返回nil为所有豆荚

self.assetBundle = [NSBundle bundleForClass:[self class]]; 
NSString *bundlePath = [self.assetBundle pathForResource:@"some_Pod_name" ofType:@"bundle"]; 

捆绑路径返回nil然后显然我的应用程序在pod中崩溃。 assetBundle返回此

po self.assetBundle 
NSBundle </Users/user1/Library/Developer/CoreSimulator/Devices/F0ACF195-A1C8-4DA6-96B5-9F9824DF/data/Containers/Bundle/Application/6F11AC53-0D13-4CD8-9DB0-77BE8C54C9/myapp.app> (loaded) 

一定有什么东西在设置,我无法弄清楚。我怎样才能解决这个问题 ?

回答

0

我明白了这一点。我需要取消选中“仅在安装时运行脚本”以获取Pod资源。