What happens if the structure is removed from the application?

I was asked what will happen when the framework is accidentally deleted from your device, maybe iphone or mac?

Will your application error or will it work without any errors?

Please provide me an answer with clarifications.

+7
source share
3 answers

You may get a binding error. If the framework is inside the application, this means its binding to runtime.

OS X embeds a "setup name" within each dynamic library. This installation name is the path to where the library can be found when dyld needs to load it. When you create an application that references a dynamic library, this installation name is copied to the application binary. When the application starts, the copied installation name is then used to find the library or framework.

$ otool -D /Applications/Google\ Drive.app/Contents/Frameworks/Python.framework/Versions/2.6/Python /Applications/Google Drive.app/Contents/Frameworks/Python.framework/Versions/2.6/Python: @executable_path/../Frameworks/Python.framework/Versions/2.6/Python 

therefore, if you delete the Frameworks folder, you will get a Dyld Error.

 Dyld Error Message: Library not loaded: @loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle Referenced from: /Applications/Transmission.app/Contents/MacOS/Transmission Reason: image not found 

enter image description here

enter image description here

+4
source

If a structure is deleted, it will only affect the software associated with this structure. If this is a system environment, expect your system to crash. If it is a third-party structure, it should be limited in degree of impact. If this is an application and your application is codenamed, removing the combined structure should prevent the application from starting.

+1
source

It depends on whether the application requires access to the remote structure. If the application requires a framework, it will not compile. If you don’t need it, it will just compile as usual.

0
source

All Articles