I am using New Relic in my iOS app. In my original xcode-project things work as expected. When I check out the project from Git on another computer (or the same computer at another location), I am unable to find NewRelic.h. I get the following error when I try to build:
'NewRelicAgent/NewRelic.h' file not found
The framework is added to Git, and I use several other third party frameworks that work without problem. If I remove the New Relic import the rest of the project work as expected. In the non-functioning version that I check out, I have even tried to remove New Relic and re-add the framework, but this produces the same error.
I have searched the project for any absolute search paths, but it seems like there are none. I would like some advice on how to make xcode find the file.
This actually looks like a problem with xcode. A few users found a very simple fix that's outlined here: Why are static library headers not found?
Should be as simple as renaming the folder that contains the .xcodeproject.
I had this error when following their install instructions and imported the framework in the precompiled header. When importing it in the app delegate (which they explicitly state you should NOT do with the new version) everything works. Might be something with XCode6.1. Don't know.
Related
I am trying to import SQLite into an app in Xcode. The version of this app was originally developed using SQLite from the following link (not SQLite3).
https://github.com/stephencelis/SQLite.swift
The library has worked in previous iterations, but now I get an error that says "No such module SQLite" when I try to import the library at the top of the file I want to use it.
I have followed the instructions on the gitHub page and still have trouble with the library. One thing that I notice is that in the file explorer the SQLite.framework files are highlighted in red. I believe this is the source of the problem however, I don't know how to fix this.
File Picture:
Import Error:
It looks like you want to include SQLite into your ReadySetFit project? If so, what you really need to do is to follow the instructions under the "Installation" section found on the GitHub repo's main page. I'm a fan of Cocoapods (because all you'd need to do then is add a Podfile to the folder containing your ReadySetFit project), but there's also SwiftPackageManager or Carthage.
Along with the instructions in the SQLite github repo main page (or README.md), here's a tutorial on how to add a Podfile to your project.
I hope this helps!
I have created my cocoapod and cross check in sample project but it is showing everytime this error.
I googled and found solution
Reset content and setting
Clear derived data
Clean and build
Restart xcode
But non of them works
i tried on device
Make sure you are opening the newly created .workspace file rather than your original project.
Refer to this answer for debugging.
https://stackoverflow.com/a/26129829
Basically you need to look at ~/Library/logs/CoreSimulator/CoreSimulator.log for the source of the errors.
You need to consider the fact that the simulator is not linking files properly than any specific cocoapod issue.
Alternately, the problem could be related to code signing.
Refer : https://stackoverflow.com/a/17402788/2569560
If details like the Podspec and the simulator log were shared, perhaps we could be of more help.
I'm relatively new to XCode and iOS. My background for understanding how to add libraries/dependencies to a project is in the world of Java and Maven.
I need to add AFNetworking to my project and have been unable to do so successfully.
First, I tried going to my project -> Build Phases -> Link Binary With Libraries, clicking the "+" button, and then search for AFNetworking from the list. It wasn't in the list.
So, I figured I'd have to add it using the "Add Other..." option. Which means, of course, I'd need to download AFNetworking somehow. I'm not sure I was able to download it in the correct form -- it seems all I could get was the AFNetworking project itself, rather than a framework (if I understand correctly, frameworks are analogous to jars? Can you generate a framework by building an iOS project in a certain way?). I downloaded it from their GitHub page. (I also tried their "Getting Started" guide, but it had me using CocoaPods, which I couldn't get to work right and I'd rather avoid it for now.)
I've tried adding project files and folders from AFNetworking just to see if they worked (but of course they don't -- I think I need some sort of .framework file).
Bottom line: I can't seem to find a way to add AFNetworking to my project. How can I do it?
It sounds like you got the first part down, which is downloading it from the GitHub page.
When I follow this tutorial, it shows how they imported AFNetworking into their own sample project (that is, you'll see a "AFNetworking" group in the list of files and folders along the left side of your Xcode window).
Once AFNetworking is building along with the rest of your code in your project, you should be able to call into the various AFNetworking API's from your code. You'll need to make certain to add in the appropriate "#import "AFNetworking.h"" lines into your source code files from which you'll be calling AFNetworking.
Use pods, than you wont have to upload AFNetworking to your github project, and there is no worry about wrong linkers etc.
Use pods: install pods
Instalation AFNetworkign with pods: install AFNetworking
I believe if you download their code you can generate the .a file using the process in this stack overflow answer: (obviously replacing the project they are getting from gihut with the project you found)
How to create framework from Xcode 4 project?
Use this Manager to help you use AFNetwork.
So im trying to use the route-me widget in my app, but xcode keeps complaining that it cant find FMDatabase.h, yet its included in the project (albeit under a different project that is included into my project). I've copied how a sample app has been made yet the sample project doesnt get this error. The RMDBMapSource.h file is contained within the MapView project, so i shouldn't need to include the fmdb stuff myself (and because the sample project doesn't do that)
Surely if the files are under compile sources / copy headers under build phases, that means it should be able to find the file? This is a pretty lackluster explanation of my problem, but if anyone has used the route-me library before maybe they have had the same problem and can point me in the right direction
Resolved my own mistake. First off in the build settings of the main project, the 'search for header paths' was not set correctly, it was set to /MapView/ instead of /MapView/** that resolved the FMDatabase.h missing error.
Then in case someone else had a linker error like i did after i resolved the first issue, make sure you have libMapView.a included in your link binary with libraries section. (i had it their before, but during a version control commit, somehow our project file decided to not add that library anymore and i had totally forgotten about it, so took me quite a while to find out that it was missing)
I added the new Google Maps API framework to a project and checked it into subversion. The framework has the usual Apple structure which includes alias files that point to the actual static library and includes. Apparently XCode these days allows the use of the standard framework structure so you don't have to put header or library references in any more, merely adding the framework is sufficient.
However it appears that storing these in subversion does not work as the alias files seem to break when you check them out.
Anyone have an idea how to make this work? Clearly I can add manual references to the includes directory and the static library in the framework, ie the old fashioned way. It would be nice for this to just work somehow since people are shipping SDKs as proper frameworks now (Google, Crashlytics).
Update: The symbolic links inside the frame work are supposed to be stored in SVN marked as svn:special. However what I get back from checking this framework out is a symlink to the library, but with actual folders for Headers and Resources instead. This of course no longer matches the SVN repository. I wonder if my svn client (Versions) might be messing it up.
I avoided putting symbolic links into SVN by copying the real GoogleMaps file and the real Headers and Resources folders from GoogleMaps.framework/Versions/A/ up into the GoogleMaps.framework folder, overwriting the symbolic links (and then I removed the Versions folder).
This is probably not the 'right' way to do it, but it seems to be working okay so far :)
Update SVN global ignores:
Open terminal and execute:
vi ~/.subversion/config
Then search for global-ignores, and uncomment same line (remove # in first char). Then remove .a in same line
Someone's client was messing up the checkin. Versions OSX seems to do it correctly but once it's checked in wrong, strange things start to happen. The solution is to remove it from the repository and check it in with the command line or a client that works correctly like Versions.