Error after applying custom framework - objective-c

First of all, I have built a custom universal framework successfully.
Inside the framework, I have references to other 3rd party library and framework. I believe when I link this custom framework to other project, I need to set up the reference for those 3rd party resources.
Now the problem is, when I link this "MyCustomFramework" to my project, it's having
:
undefined symbols for architecture armv7:
"_environ", referenced from:
_GenerateEntropicChaos in MyCustomFramework
I learned the error usually caused by library search path issue. Since this error is point to the Framework, so is it the current project path is wrong or the project that build this framework is wrong? It seems like all the 3rd party also having this undefined symbols issue.

Maybe it's reate to simulator or real machine, so try following:
first choose target to simulator and build your framework.
second choose target to real machin , build another framework
then link these two framework seprately to you project. and see what will happen.

Related

Changes in local framework are not updated in my project

I'm actually using an internal framework in one of my projects. Now I need to modify some of the code of that framework, however, it looks like the changes are no recognised at all by the project that is using that framework.
After committing some changes in the framework, build it and re-import it in the project and debug them, I can see that lines that I added are not executed at all.
I know this because when I add a breakpoint in the framework in one of the new lines, these are never executed as if they didn't exist.
I've tried to remove the framework from my project and add it again by following the steps of these Stackoverflow answer
I expected that my changes in my framework are recognized/syncronised in the project as they use to do.
Maybe I'm doing something wrong, so it would be really helpful your ideas.
I found that it's necessary to follow the next steps strictly delete to don't have the same problem as I was.
Launch the framework project.
Assign the build type to a generic iOS device. Be sure all the classes are assigned to the Target.
Press the play (build) button.
The framework will appear on your desktop.
In the project that is going to use that framework, be sure to remove all the references related to the previous framework version, then delete it from the folder too.
Add the new framework version to its folder in the project.
Assign the references:
Drag the framework that has just been moved to the project, to the framework folder in Xcode.
Drag the framework, that has just been moved to the project, to Linked Frameworks and Libraries.
This worked for me, so maybe this is helpful for someone.

How to publish a web application project with third party DLL (zkemkeeper.dll) that causes an error?

I have .net core web application project which using a third party DLL (zkemkeeper.dll a C++ DLL). Adding this library to my VS project is fine.
I can add it as a reference and everything works fine when I tried to run it. However, VS didn't recognize the library of this DLL as you can see on the below image.
So due to this issue I can't publish the project? Any tricks on this?
Just do the following steps,
1. Register zkemkeeper.dll in server (where your side is hosted)
2. Also register above dll on the computer where you are developing it.
Note: best way to register dll of zkemkeeper
download sdk of 32/64 bit from http://www.zkteco.eu/index.php/downloads/software-downloads
run Auto-install_sdk file as a administrator or system.
it will automatically register required dll into your system
Thanks
Just sharing, I've already fixed the issue by using the DLL generated in my bin folder (Interop.zkemkeeper.dll). Now my only problem is this one.

MVC 4 Add Controller Error Unable to retrieve metadata for my Model

I recently added a MVC4 Web Application to my solution and gave it a reference to my Common class library. The Common class library contains the models and context (EF Code First).
When attempting to use Visual Studio's scaffolding feature to "Add Controller" to the MVC4 Application, I get the following error:
Unable to retrieve metadata for 'Common.Models.MyContext'. Unable to
load one or more of the requested types. Retrieve the LoaderExceptions
property for more information.
I have found a lot of similar questions on stack overflow, but none of them address this specific error message for this specific scenario.
In my investigations, I found that if I remove all the added packages and third party dll's from the Common library, I am able to use the "Add Controller" function without error. This tells me that one of my packages or third party dll's is not where it needs to be (as indicated by the error message).
So my questions are these:
How do I find out which dll is causing the problem? Is there a Visual Studio scaffolding log file somewhere?
Say that I find the offending dll... Where would the dll need to live to fix the scaffolding error?
Make sure your web application project has ALL the required references from other projects. Just because your Common project has a dependency on a DLL doesn't mean that reference will be copied to your web project. You will have to add the dependant DLLs manually as references with Copy Local set to "true"
If you are using separates projects, check if EF has the same version number!

Frameworks for static libraries xcode

I have just added a linked library to my project using the question here Process for linking static ObjC libraries in XCode and the document linked to in the answer.
I happen to know the library uses CoreData objects, like NSManagedObject, although in the library's xcode project the CoreData framework isn't added and it builds with no errors. However when I build my app it comes up with several errors such as:
Undefined symbols:
"_OBJC_CLASS_$_NSManagedObject", referenced from:
_OBJC_CLASS_$_AClass in library.a(AClass.o)
So seeing as all the errors mentioned CoreData objects, I added the CoreData framework to my app and it built successfully.
So now I tried remove CoreData framework from my app and added it the libraries project and them built both and it failed.
So why does it work when I have coredata added in my project but not in the libraries project, and only the library uses it?
(and why does the library build without needing the coredata framework on its own?)
The library is static. It is not a stand-alone piece of code, it must be linked.
Your application is linked, which means the linker resolves all the external dependencies and fills in the library functions' addresses in the final executable.
If you want to use a library that has a Core Data dependency in your application, you must link against Core Data.framework.
Adding a linking stage to a static library has no effect, since there is no linker involved in creating a static library, only a compiler (and an archiver).
Now, the problem can sometimes be avoided by using the new #import syntax in your libraries header file. The compiler will then automatically link against the used framework, even if you use a static library.

Copying dynamic library (.dylib) into a framework (.framework)

I have two XCode projects: a framework and a client application.
My application depends on my framework and everything works fine with that — the framework is being recompiled everytime the app is, the projects build paths are set correctly, it's completely okay.
Now the framework started using 3rd party dylib file, and it's linked against the dylib.
I've even added a build phase to copy that library into the framework's resources dir.
When i'm trying to run the application, everything compiles correctly, then i get this:
dyld: Library not loaded: /usr/local/lib/libplplot.9.dylib
Referenced from: /Users/railsmaniac/Projects/Study/Calculus of >approximations/Builds/Debug/XNMaths.framework/Versions/A/XNMaths
Reason: image not found
How can i fix it?
Adding the library into client application's resources doesn't fix the problem.
I can just place the library into the required location, but i prefer to keep it IN the framework.
Is it possible?
It looks like your application is expecting the library to be found at a specific path on the system. If you are on OS 10.5+ you can use the new #rpath functionality to allow your application to link dynamically to your library.
See this post for further details. It also shows the "old" way of doing this.