Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
883 views
in Technique[技术] by (71.8m points)

code signing - How to correctly sign a C++ dylib to be loaded via dlopen in iOS

We are integrating our language tools into mobile platforms.

As such, there are language specific libraries which are loaded upon user request - english, french, spanish or greek at present.

These libraries are too big to be linked statically.

At present, we are able to load these libraries via dlopen and dlsym calls in linux.

I have seen that we can use these calls starting with iOS v8.

As Apple Developer Support has said "... there’s no blanket prohibition against using dlopen and friends."

After having compiled our libraries (using CMake and a relevant iOS toolchain), they have been signed with the same certificate and identifier as the application, using

codesign --deep --force --sign "78037F819B5AA1522177B06DA8E7C5343DDBC0CF" --identifier=fr.teamname.libtext_fr ./libtext_fr.dylib

However, when the application (running on an iPad with iOS v14) tries to load the file, an error is raised and we get the following reason :

code signature invalid (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0205D0F0, codeBlobSize=0x000453E0

Note that we are using a free Apple Id at present and have not as yet joined the developer program.

I have done a lot of searching, but as yet have not found what is missing.

What is the right direction to take now ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...