今天写了个函数,里面有[[NSBundle mainBundle] pathForResource:@"cer" ofType:@"pkpass"]
居然返回为空
原来是我的bundle里没有这个cer.pkpass
我们可以这样
在TARGETS里的Copy Bundle Resources 中添加我们的cer.pkpass
解决Objective-C中NSBundle加载cer.pkpass文件为空的问题
本文详细介绍了在Objective-C项目中遇到NSBundle加载cer.pkpass文件为空的问题,并提供了有效的解决方案:在TARGETS里的Copy Bundle Resources中添加cer.pkpass文件,确保资源被正确复制到应用中。
今天写了个函数,里面有[[NSBundle mainBundle] pathForResource:@"cer" ofType:@"pkpass"]
居然返回为空
原来是我的bundle里没有这个cer.pkpass
我们可以这样
在TARGETS里的Copy Bundle Resources 中添加我们的cer.pkpass
1765
3万+