简体   繁体   English

如何从iOS框架中剥离或重命名符号?

[英]How do i strip or rename symbols from iOS frameworks?

I need to fix a bug in an underlying iOS framework that is linked to route-me and when i include the new code I'm getting 我需要修复与route-me链接的底层iOS框架中的错误,并在添加新代码时获得该错误

ld: duplicate symbol _OBJC_METACLASS_$_RMProjection in frameworks/blah.framework/blah(RMProjection.o) and 

Is there a way to stip the symbol from the blah.framework and use my compiled code instead? 有没有办法从blah.framework中指定符号并改用我的编译代码? I'm aware of: strip -s <symbol file> -u <library> but can't get it to work 我知道: strip -s <symbol file> -u <library>但无法正常工作

Also tried doing a find and replace 还尝试进行查找和替换

perl -n -p -e 's/RMProjection/XRMProjection/g' < frameworks/blah.framework/blah.bak > frameworks/blah.framework/blah

in the linked binary, which results in this error: 在链接的二进制文件中,导致此错误:

ld: in frameworks/blah.framework/blah, file is universal but does not contain a(n) i386 slice for architecture i386

Thanks 谢谢

在终端中使用lipo命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM