2016-12-03 60 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資源。