How to make Xcode find .h file in signdoc framework - ios7

I have signdociosfoundations.framework, I tried to import a header inside it: SDSignatureHandler.h. But it said: "signdociosfoundations/SDSignatureHandler.h not found". I tried to remove it from my project and add it again in Link Binaries to Library not it does not work to me. Moreover, I pressed Command + click to Jump to definition, it also take me to this file. Anybody help me please! Thank in advance.

Related

Adding own Objective-C framework to Swift project

I am trying to build my own framework in Objective-C named "NEFramework". There is a class named "Helper" inside that framework. It was inherited from the NSObject. There is a function name "print" inside that class to print out the text.
And then I have created a new Swift project and imported that framework in it.I've tried to create BridgingHeader file to access that framework from my Swift project. Then I added this code in my BridgingHeader file.
#import <NEFramework/Helper.h>
After adding that line of code, I got this error in that BridgingHeader file.
'NEFramework/Helper.h' file not found
Please refer to the following image for more clarification.
Can anyone help me on this and I am stuck in this place. Thanks.
Update
I've tried to add #import <NEFramework/Helper.h> in the "NEFramework.h" file. That was ok and can build the project with no error. Please refer to the following image for that.
But after adding #import <NEFramework/NEFramework.h> and #import <NEFramework/Helper.h> in my BridgingHeader file. I got the error again.
After struggling the whole the, I found the reason why I cannot build my header file in "NEFramework.h" file.
I need to go to the Build Phases of my framework and find Headers. And then I moved some header files under the "Project" tab that I need to use in my swift project to under "Public" tab.
Please refer to the image for more clarification. Just sharing for other people like me to build a custom framework. Thanks everyone who answered my questions.

Xcode cannot find ProductModuleName-Swift.h

I'm attempting to import my "-Swift.h" file into one of my Objective-C .h files but xcode keeps telling me that the file doesn't exist
#import "Aesculus-Swift.h"
If I command click on the file name it will take me to the generated header file so I know it exists. Why is xcode not able to find it?
This seems like just another issue with Xcode and it's complex tool chain of static analysers and compilers.
Openradar lists radar://21362856 - Swift to Objective-C bridging is unreliable. I am sure there are more but I stopped looking after finding one for this example.
The author imarcelv notes in the description:
I asked a Swift engineer at WWDC in a lab and even he didn't know how to fix this issue.
Steps to Reproduce:
Add a ramdom Swift class to an Objective-C project
Add the #import "ModuleName-Swift.h" file that Xcode generates automatically
Try to use it or just try to compile the project
From time to time it simply doesn't work
It's probably best to file a radar on this issue as it seems that others are already calling it out.
One other thing you could try...
Historically, it was possible for Xcode to completely lose it's syntax highlighting and you could always find out what files the static analyser was giving up on by increasing log level of clang.
I'm not sure if it's still relevant but if I was in your position I'd be trying this command:
defaults write com.apple.dt.Xcode IDEIndexingClangInvocationLogLevel 3
This generates logs you can search with using Console.app for just xcode to highlight the messages. You'll want to trash the derived data of your project to force it to re-compile things.
Although not the same issue as what you're seeing, I have had this post on the syntax highlighting issue bookmarked for years for the above defaults write command to try in times like these.
I solved this recently by adding the following entry to my .xcconfig (you could add it in Xcode's Build Settings > User Header Search Paths if you prefer).
USER_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/MyFramework.framework/Headers
This tells the compiler to search for headers in the build output directory, which is where Xcode puts the generated header (at least in the case of this framework).
In my case this is a directory like ~/Library/Developer/Xcode/DerivedData/MyProject-LongCode/Build/Products/Debug-iphonesimulator/MyFramework.framework/Headers/MyFramework. You might find your generated header in there too.
Xcode's header and dependency management is a hot mess, and it's not surprising that it doesn't work for you.
I had trouble with this stuff & found that your -Swift file is the Product name of your Target ( not just the name of your Target ) . I found the details here helpful: http://ericasadun.com/2014/08/21/swift-calling-swift-functions-from-objective-c/
When you encounter such situation, just find your kinda "ProductName-Swift.h" file by just cmnd+click on it (even if xcode shows warning about it is not found, the #import "Aesculus-Swift.h" string is still clickable) and then in opened code editor window choose context menu and "Show in Finder" item, then explicitly add it to your project.

(ObjC) Unable to add libraries-Help please

I'm following an objC book and I need to use readline() to obtain a string.
However, before I can even get to that, I need to add the library that contains it. Therefore, I go into Build Phases -> Link Binary With Libraries -> Press the + ->Search and Add addlibreadline.dylib
After I do this, I have an icon under my top-level item that has the name of this library. BUT when I go into my code in main.m, NOTHING is imported. There is no #import
WHY? I have tried different things for hours and am frustrated!
Am I not understanding something about importing and libraries?
Btw: I am using Version 6.1.1 (6A2008a) and Yosemite 10.10.1 (14B25)
Thank you,
Since you've got the libraries linked, try adding this:
#import <readline/readline.h>
Then you should be able to use readline().
http://forums.bignerdranch.com/viewtopic.php?f=148&t=7617

Errors "OBJC_CLASS_$_MainViewController", referenced from and linker command failed with exit code 1

But i am not sure where is the cause of this problem. Can anyone guide me along?? Thanks a lot!
If you need my project for reference, i have upload my project to this link : http://www.mediafire.com/?l5cl3jegdb6x6bk
Thanks for your help !
Hi from your code u need to add the MainViewController.m file in the build phases compiled files
Click on the xcode project file and press in the testModel under the targets
press --> Build Phases then
press --> Compiled Sources then
press on the "+" symbol in the bottom bar
then add choose the MainVIewController.m file then press--> Add then run it will run
I hope this will help to solve your problem
Somewhere in your project you have a reference to a class called MainViewController but you've not defined a class of that name.

ZXing barcode iphone error

i'm trying to import the zxing into my project but i am getting the following :
can't open -exported_symbols_list file: /zxing/iphone/ZXingWidget/exportList
Anyone know how to fix this?
Which guide dou you use to import the framework? I reccoment this one.
Answer taken from here:
Ultimately you need to make a tweak so that ZXing actually decodes
barcode. In target section, double
click on your project target, and go to the build tab. Look for
the "Exported Symbols Files" and
double-click on it. Att the relative path to the exportList files
in "/zxing/iphone/ZXingWidget/exportList".
This will tell the linket to actually link with some key classes
so that this code registers the necessary
decoders.