I had create framework that using chilkat library and it work fine, then I want to add iSMP.framework to my framework project, I just put .framework into project but it show error like this
is there any way to solve this problem ?
It looks as if the get_secret method might be calling a method from an external library/framework and that framework is not compiled for arm64. So you'd have to either get a copy of that framework compiled for arm64 or change the active architectures for your project to compile the app using the architectures supported by that library.
Related
When I compile framework with Xcode 8 and after that import in new project it successfully build and I am able to test it. But when I compile framework with Xcode 9 and after that add builded framework in new project I got:
Undefined symbols for architecture arm64:
"___llvm_profile_runtime", referenced from:
___llvm_profile_runtime_user in xxxxxxxxx(DMCService.o)
___llvm_profile_runtime_user in xxxxxxxx(APXUserInterfacePresentor.o)
___llvm_profile_runtime_user in xxxxxxxxx(APXDevice.o)
___llvm_profile_runtime_user in xxxxxxxxx(APXInboxService.o)
___llvm_profile_runtime_user in xxxxxxxxx(AppoxeeManager.o)
___llvm_profile_runtime_user in xxxxxxxxx(APXApplicationSession.o)
___llvm_profile_runtime_user in xxxxxxxxx(APXInbox.o)
...
(maybe you meant: ___llvm_profile_runtime_user)
ld: symbol(s) not found for architecture arm64
I check builded framework with -lipo -info architecture and it has arm64.
This is happening only if I build framework for real device, if I build it for simulator it works fine. So I can not figure out why it is not working?
Thanks in advance for help.
Likely your framework build configuration has the setting "Enable Code Coverage Support" (the underlying setting name is CLANG_ENABLE_CODE_COVERAGE) set to YES, while in the application you include the framework, the same setting is set to NO.
For why this causes the Undefined symbols error: enabling the setting causes calls to instrumentation functions to be injected into in the framework code. But when building the app, the library where these functions are defined is not linked. So the linker (ld) fails.
Try again, building the framework with Enable Code Coverage Support set to NO.
Also, to avoid these kind of configuration mis-match errors, you might want to build the app and framework at the same time instead of pre-building the framework separately. You can do this by including the framework project as a subproject of the app project, or creating a Xcode workspace that includes both the app project and the framework project.
I have a react-native library in my project.
The library is objective-c with added swift components requiring and importing vision.
The project and target are set for all architectures (including arm64), also they build for all architectures and not just the current one.
Vision is properly link in build rules of the app target (since there is no linking in static library) but i have a linker error during compilation :
library not found for -lswiftVision for architecture arm64
Cannot seem to find the root cause of this, never had any issue in a swift project so i have no clue.
Managing to advance a bit,
'#import Vision;'
In the main.h file of the library seems to fix the library not found, but i have another one instead :
'library not found for -lswiftSwiftOnoneSupport for architecture arm64'
It seems something fishy is going on during the linking of the project.
For anyone interested the solution was to create an empty swift file in the parent objective-c projet, xcode seems to fail to import swift frameworks properly without this.
I was asked a question, what will happen when a framework is accidentally deleted from your device may be iphone or mac?
Whether your application crash or it will work without any error?
Please provide me answer with explainations.
You may get linking error. If framework folder is inside the application means its runtime linking.
OS X embeds an "install name" inside each dynamic library. This
install name is the path to where the library can be found when dyld
needs to load it. When you build an application that links against a
dynamic library, this install name is copied into the application
binary. When the application runs, the copied install name is then
used to locate 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
so if you will delete Frameworks folder you will get 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
If a framework is deleted, only software linking to that framework would be affected.
If it is a system framework, expect your system to start failing.
If it is a 3rd party framework, it should be limited in scope of impact.
If it is in your app bundle, and your app is code-signed, the removal of the bundled framework should prevent your app from launching.
It depends on if the application needs access to the framework you have removed.
If you application requires the framework then it will not compile.
If you dont need it, it will just compile like normal.
This question will be easy for Xcode pros but for a MonoTouch developer it seems to be impossible to resolve. :-)
I'm using Xcode 4.5 and I want to target iOS 5.1 and above and iOS Simulator 5.1 and above.
I have a a library project here and it is coming with a prebuilt binary named "DemoLib" (no extension and it is 11MB in size). The library is a fat lib for Simulator and iOS 5.1+.
I can use that library without any problem.
However if I try to build the library myself, I end up with a "DemoLib.a" file (notice the extension and the size of 30MB). How can I get the same build result? What is a .a file compared to the file without extension?
I tried to build the project "for running", and "for archiving" in Xcode. Both results in the same 30MB .a file.
I was expecting some dropdown in Xcode where one could select "DEBUG" or "RELEASE" build and the latter one would create the smaller lib.
Of course I could never tell without seeing the framework's project file. Having said that, there is an excellent guide to creating and compiling iOS frameworks here: https://github.com/jverkoey/iOS-Framework
Using the above guide, you should be able to recreate your framework's project from scratch, add the files you have to it, and properly compile it.
Hope this helps! :)
Did it come with a Makefile? Create a new target, set the build settings of the target to what's in the Makefile, then set your project to depend on that new target.
A file with the .a is a static library, which means it depends on nothing external and all the code it needs is compiled inside it. I think no extension generally implies dynamic library, which means it'll depend on some dependencies being present on your system to link against. Maybe that's why the .a is so much bigger. I think Xcode will build static by default because iOS does not allow the use of dynamic libraries.
The dropdown for what to build is in your scheme. Command+shift+< to view your scheme. Within the scheme you can edit which environment each method of building will use.
When I am trying to build my application, I get this error message:
ld: Linked dylibs built for retain/release but object files built for GC-only for architecture i386
I use libssh2 library, for i386 architecture, I have no idea what the problem is!
Sorry if is a stupid question!
It's saying that some of the linked classes use retain/release patterns, but your app is being built for garbage collection only (OS X's automated retain/releases that are more efficient and easier for you). So remove your retain/releases, or turn off garbage collection for the app. Keep in mind that a third party library may be part of the problem. Let me know if you need more details!
Please check your xcode name like "xcode 5.1, Xcode 4.6" then change to "Xcode" and try to building, I have worked this
Actually the framework path is related with Xcode name. So please try this