Importing Framework in iOS5 Project - ios

I have a project in Xcode that I need to use the AWS SDK in, and for whatever reason, I cannot get it to work. If I copy the AWS.framework folder into my project folder, and then drag it into the Xcode window under Frameworks, all of the files under the Headers folder are red.
If I drag the folder from another location and allow Xcode to copy the framework over, all the files are black in the list.
However, when I try and import the headers (#import <AWSiOSSDK/etc), it says it can't find the file, and the AWS SDK doesn't appear in the autocomplete when I'm typing out the import statement. Am I importing it right, or is there something else I'm doing wrong?

Go to target and click tab "Build Phases" and add your SDK into "link binary with libraries".. I didn't try add SDK files into my project. But try it. After you added that, clean your project and then try import files from your framework.

Related

adding libraries manually to Xcode project

I am trying to add a library "WeScan" to my Xcode project manually. I just downloaded the source file from GitHub and by drag and drop, added that we scan folder to my project. Then I tried to import that, but it is giving an error like
No such module 'WeScan'
And also this library is not adding with linkbinarywithlibraries.If anyone help's me would be great.Thanks in advance.
enter image description here
Notice the blue color of the WeScan folder in your project navigator. This tells you that you have added this folder as a folder reference. You can't do that with code files. Delete the WeScan folder from the project navigator and drag it in from the Finder again, and this time make it a group. Now the code files will be part of your project.

how to avoid importing ZBarSDK(libzbar.a) in Xcode Everytime while opening project in xcode

While opening the project in Xcode, I require to import ZBarSDK(libzbar.a) & GoogleAnalytics (libGoogleAnalyticsServices.a )Everytime how to overcome this problem by importing just once.
First Delete the ZBarSDK(libzbar.a) & GoogleAnalytics (libGoogleAnalyticsServices.a ) from your projects.
Now add (Drag)again these two file in your project. Then xcode will ask to copy or set reference in your project. Just Copy it.
then Clean and build your project. Quit xcode and reopen it.
If then also it will ask to add these files, then you have to set path of this file in your Xcode.
Step: Click on your project -> Target project ->Build setting ->now search for Header Search Path.
In Header Search path , you have to set the path of these two file respectively.
thank you.

Import my custom module/framework Xcode Swift

I want to import my custom module/framework in my Swift project on Xcode 7. I understand how to normally do it. But I don't want to keep dragging and dropping my framework and linking it every time I make a new project. I was thinking I could move the framework to folders in the iPhoneOS.sdk/../Frameworks folder and/or the iPhoneSimulator.sdk/../Frameworks folder. Without dragging or dropping my custom framework into the project, I can import module (with autocomplete). However I get an error "Could not build Objective-C module 'Tumblr'". Is there a Setting in Build Settings I am missing.
**The Tumblr module is a module I created.
I have also created a .tbd and module.map files for the framework existing in the iPhoneOS.sdk
Drag your module's x-code project into the left pane with all the files.
Then click on your main project file and go to general, scroll down to Embedded Binaries and add it through the menu there.

Problems when adding an external framework in iOS

I want to add the PLCrashFramework in my app. This frameworks deals with crash reporting for iOS/MAC applications. What I did
Downloaded and unzipped the .zip file from the URL I have already provided.
In Xcode "Build Phases" -> Link Binary With Libraries
From the pop up "Choose frameworks and libraries to add"
Select "Add Other"... and select "CrashReporter.framework" and Open
After those steps I successfully built the project without problems.
I closed the Xcode, opened it again and tried to build. The build failed with
"header file not found", referring to a header file that belongs to the framework.
Why the xcode 6 does not find the header after closing and reopening the project?
Check your Framework Search Paths and Library Search Paths in your project's Build Settings. Check if you have a space in your directory structure. It's probably looking for 2 folders, one with the first part of the folder structure and one with the second. To fix this, simply add quotes around the whole folder structure.
You should add the framework though add file in project navigator by right click and select add file in your project and than browse to framework location and add framework. Remember to check copy file in your project it is must do. In this way Xcode will manage library header search path. You can see the framework will be added in Xcode "Build Phases" -> Link Binary With Libraries. If it is somehow not there you can add it by dragging framework from project navigator. The error will be gone.

#import not finding .h file in Xcode (Version 6.3)

I am unable import the .h file. The file is shown in the Project Navigator in Xcode.
Actually for adding the Localytics SDK, I dragged the SDK folder to the project navigator & 'Add to Target' checkbox selected.
Is it required to add the library to the 'Header Search Path' in the 'Build Settings' ? Presently below values are there in my 'Header Search Path'.
"$(TARGET_BUILD_DIR)/usr/local/lib/include"
"$(OBJROOT)/UninstalledProducts/include"
"$(BUILT_PRODUCTS_DIR)"
Double-click on the Header Search Paths value to open the window that lets you add a new path.
Open a Finder window and navigate so that you can see the folder that contains Localytics.h.
Drag the folder into the search path window.
Change your import to #import "Localytics.h".
For all who have not found issue:
Go to Build settings and search for "Framework Search Paths", then remove everything and put ./ and make it recursive (by double-clicking on it)
IMPORTANT - Don't download Parse framework on Windows and then copy to Mac! inside framework there are some links and while copying they get corrupted. Download the framework directly from Mac and when added to xcode make sure it has "Headers" folder under it in XCode frameworks.
I hope it helps some people.

Resources