Stripe.h file not found - ios

I am trying to use the Stripe SDK in my iOS App but there seems to be a problem. Whenever I try to import it like this:
#import "Stripe.h"
I get the following error:
Stripe.h file not found
But I have the file right here:
Thanks in advance,
Abdullah Shafique

The folders are blue in Xcode, indicating that the folders themselves have been added as resources, rather than the source files within them. You should remove the stripe-ios folder from your project, and re-add it, ensuring that you choose the option to "Make groups for any added folders"; this will ensure each source file is added to your project, rather than the folder being added to your resources.

I can only speculate what the problem is, but I guess the .h file is just in the wrong directory...
So, find a .h file in your project that you CAN import. In which directory is this file?
In which directory is the Stripe.h file? Is it even in a subdirectory of the project root?

In your bridging header file use this statement as it is #import <Stripe/Stripe.h> . If it does not work, clean your project several times, I had the same error and nothing else worked except what I specified above.

Related

How to import chilikat classes to swift?

I'm trying to use chilikat's ftp classes in my project. But when I tried to compile I got an error(shown below) from xcode. What reason of that error?
And my second question is: I used this import statement:#import "CkoFtp2/CkoFtp2.h" and I got the second error here?
Path of bridging header file:
P.S. I got the path by dragging the file into terminal.
You seem to be assuming that the problem is in the path of the bridging header. That path is fine (otherwise you wouldn't have gotten an error about the #import line inside the bridging header).
The problem appears to be the CkoFtp2/CkoFtp2.h header path. Looking at your directory listing, there is no CkoFtp2 subdirectory, but rather you appear to have copied it to your main project directory. That means that you should try:
#import "CkoFtp2.h"

Xcode doesn't see the file

I have this file structure:
But Xcode doesn't see file for :#import "VKSdk.h" , because it's in another project, what do I need to do:
Perhaps consider looking into how to work with workspaces in Xcode. It offers great features when working with multiple interconnected projects.
Check this out
https://developer.apple.com/library/ios/featuredarticles/XcodeConcepts/Concept-Workspace.html
VK guid said to add only sdk.xcodeproj file, so it didn't see all the files in this added project, but when I tried to cope these files into the project, it failed to launch.
I added $(PROJECT_DIR)/DatingService/3d\ Party/VKAPI/sdk into Header Search Paths of Build Settings and now it works.
Try to clean your project. I hope it helps
File is not present make sure you are writing right class name
Make sure file is present over there.
If you are adding file from somewhere it is recommended to tick the check box copy item into destination folder.
Fix: you need to update User Header Search Paths in Build Settings like this ../**
Look at the image: https://www.dropbox.com/s/beytwz8ev262l53/header_vksdk_fix.png

Xcode file not found

I am facing an error of file not found.
I have added all necessary files, but it gives file not found for a file.
#import "MagickWand.h"
for above file it gives error.
#import "FrameSection.h"
#import "FreeCropIphone5.h"
#import "DoodleView.h"
Please help me.
Clean the build folder by pressing ⌘ + ⇧ + k. It may help you to rectify the error caused.
There can be many cases that cause this error. This is one of the option to clear that error.
NOTE
As According to this kind of problem the reason may be sometime due to cyclic import. means like you have a file with the name first.h and you importing second.h and in second.h you importing first.h and you not including first.h.
Try these steps hope this will help you.
target of project -> Build Phases -> Compile Sources ->
delete the [found filename that cause the error in program].m
Add it back again in you project.
Clean Your iOS project And then Build Again.
I dragged folder in XCode, it started appearing blue and files in that folder wasn't accessible in Project anywhere although they does exists in blue folder.
Solution:
I simply deleted that folder reference from project, created "New Group" and added files in it, its started working correctly.
I was facing this error after a merge from the repository (git). The final solution was:
Delete the files from the xcode project navigator (only deleting references).
Add them again to the project (dragging from finder into the project navigator).
Hope it helps!
Check that your corresponding frameworks are included in your bundle.
For that, access to your project settings, select your target, and under Build Phases, check on the "Link binaries with libraries" section that your frameworks are here.
Use the search bar in the Target -> Build Phases window to make sure the missing file's .m is listed under the Compile Sources and the .h file is listed under the Copy Files. If it's not there, add it.
I was able to fix this problem by adding the missing .h file.

XCode header search paths

I am trying to use a third-party library in my ios project called ZXingObjC. I've added the library to my project by dragging the library's .xcodeproj file into my project. When I try to build, I get this error:
Lexical or Preprocessor Issue
'ZXingObjC/ZXAztecDecoder.h' file not found
This is the offending line of code:
#import <ZXingObjC/ZXAztecDecoder.h>
The actual path (on my Mac's filesystem) to the .h file is:
/Users/jalmberg/Documents/ios/projects/ZXingObjC/ZXingObjC/aztec/decoder/ZXAztecDecoder.h
I've added the path to the Header Search Path, using the following:
/Users/jalmberg/Documents/ios/projects/ZXingObjC recursive
I've tried several variations on this search path, but nothing works.
What am I doing wrong?
Your problem looks like your path. If you are using this:
/Users/jalmberg/Documents/ios/projects/ZXingObjC recursive
and the path is:
/Users/jalmberg/Documents/ios/projects/ZXingObjC/ZXingObjC/aztec/decoder/ZXAztecDecoder.h
Then you would could just use
#import <ZXAztecDecoder.h>
Note that it searches based on the relative path you defined in your import. So
#import <ZXingObjC/ZXAztecDecoder.h>
Is looking for a path that has the directory ZXingObjC which contains the file ZXAztecDecoder.h.
Not an answer per-say but have you looked at cocoa pods, makes working with 3rd party libs sooo much easier, made me like developing ios again.
Dead simple to setup
http://cocoapods.org/

Is it possible to Add .pch File in project?

I Download Project for learning purpose. But in this project i got error that is display in MY Screen Shot . i know that Prefix headers are compiled and stored in a cache, and then automatically included in every file during compilation. This can speed up compilation, and lets you include a file without adding an import statement to every file using it. They are not required, and actually slow compilation whenever you change them.
Screenshot
My Question is that is it possible in my case to add .pch file or not ??? if possible then please explain it.
Thanks in Advance.
The screenshot shows that you do not have the pch file added to the physical folder or it is removed somehow from there even though it is added to the project. You need to add that file again and build to remove this error. You can remove the reference from project before doing that and add it as a new file to this project once you have added it in your physical folder.
A red file name in project as shown in screenshot normally represents a missing file from the project folder structure.

Resources