小编Rao*_*aon的帖子

Appstore FailureNo架构在二进制文件中.Lipo未能检测到捆绑可执行文件中的任何体系结构."在SoftwareAssets/SoftwareAsset

嗨,我只是尝试将我的应用程序上传到应用程序商店,但它失败并出现错误.

**

No architectures in the binary. Lipo failed to detect any
architectures in the bundle executable.
Run Code Online (Sandbox Code Playgroud)

**

在此输入图像描述

iphone xcode app-store ios

16
推荐指数
2
解决办法
8419
查看次数

获取所有本机类的列表

我想获得我已加载到iOS项目中的所有本机类(NSString,NSNumber,int,float,NSSet,NSDictionary).

即,如果我创建了一个名为"TestClass"的自定义类,我不希望它列出...

我已经有了一个代码,但它返回了所有类的名称,我可以修改代码将列表限制为仅限于本机类吗?

#import <objc/runtime.h>
#import <dlfcn.h>
#import <mach-o/ldsyms.h>


unsigned int count;
const char **classes;
Dl_info info;

dladdr(&_mh_execute_header, &info);
classes = objc_copyClassNamesForImage(info.dli_fname, &count);

for (int i = 0; i < count; i++) {
  NSLog(@"Class name: %s", classes[i]);
  Class class = NSClassFromString ([NSString stringWithCString:classes[i] encoding:NSUTF8StringEncoding]);
  // Do something with class

}
Run Code Online (Sandbox Code Playgroud)

objective-c nsobject ios dladdr

6
推荐指数
2
解决办法
3482
查看次数

标签 统计

ios ×2

app-store ×1

dladdr ×1

iphone ×1

nsobject ×1

objective-c ×1

xcode ×1