I downloaded the alamofire library and opened the iOS Example.xcodeproj, but it won't run.
In import Alamofire , when i command press it it gives message that Alamofire symbol not found. Alamofire.framework is showing red. How to tackle this problem?
Asked
Active
Viewed 2,652 times
4

Fantasy Shao
- 615
- 4
- 8

bimal thapa
- 53
- 1
- 7
-
Screenshot and errors dump would be appreciate :) – VivienG Oct 22 '14 at 08:43
-
It is not working even the example file of Alamofire library.. Guys please help me – bimal thapa Oct 22 '14 at 09:16
-
Have you tried removing the red files? And then adding them back in.. – Raymond Oct 22 '14 at 09:17
-
Can you try `var method: Method? = nil` just before the error please. – VivienG Oct 22 '14 at 09:21
-
No, I just tried to run the example project given when I downloaded the Alamofire library, and just opened it to run and these red lines showed when i tried to run the example – bimal thapa Oct 22 '14 at 09:22
-
What's your Xcode version? – scottphc Oct 22 '14 at 09:25
-
hey VivienG when i did as you said,, error again shows,, screenshot is this url=> http://postimg.org/image/jl98bsn5r/,, – bimal thapa Oct 22 '14 at 09:28
-
@ Scott my xcode version is 6 – bimal thapa Oct 22 '14 at 09:29
-
the main issue is that Alamofire.framework is showing red and when i control press Alamofire is showing symbol not found,, – bimal thapa Oct 22 '14 at 09:30
-
It llook like someone had an error similar to yours [link](http://stackoverflow.com/questions/25327168/default-initializer-in-swift) – VivienG Oct 22 '14 at 09:33
-
Its not working,, can you tell me why framework is showing red,, may be this one is causing the trouble – bimal thapa Oct 22 '14 at 09:41
-
I am facing the same issue. Any fixes for it yet? – Bharat Oct 26 '14 at 23:47
2 Answers
0
I had the same problem.
So I removed all files related to Alamofire from project folder and also removed the framework from the project.
Then I again added Alamofire framework as per its guide and that ran successfully.
I suggest you to do same.
EDIT: This is why is the framework is showing in red color

Community
- 1
- 1

Saurabh Prajapati
- 2,348
- 1
- 24
- 42
-
when i did as you have said,, there is nothing error but the project doesn't run,, this is the screenshot => http://postimg.org/image/4vconiznb/,, please suggest me. Also tell me why the Alamofire.framework is showing red,, is this causing trouble or not? – bimal thapa Oct 22 '14 at 09:53
-
check this link for Why framework is showing red[http://stackoverflow.com/questions/3365114/frameworks-are-red-in-xcode] – Saurabh Prajapati Oct 22 '14 at 10:00
-
Alamofire.request(.GET,"http://httpbin.org/get", parameters: ["foo":"bar"], encoding: .URL) .responseJSON {(request, response, data, error) in I think You miss to add Encoding – Saurabh Prajapati Oct 22 '14 at 10:06
-
but in xcode 6 how to set the default setting is Relative to Current SDK,, i moved to general tab but found no area to set, can you help me if you are using xcode6 – bimal thapa Oct 22 '14 at 10:08
-
-
can you look if you have some time, what is happening i have zipped the sample project https://www.dropbox.com/s/gcmpwzdupj3gzrn/NetworkTest.zip?dl=0 and please make it runnable, i will greatly appreciate your help. – bimal thapa Oct 22 '14 at 10:39
-
again just delete all the files of alamofire from project folder and also remove framework! open terminal and navigate it upto location of your project and just write this "git submodule add https://github.com/Alamofire/Alamofire.git" without "". And again add Alamofire.xcodeproject to your project and add framework to the project! – Saurabh Prajapati Oct 22 '14 at 10:50
-
thapa-bimals-MacBook-Pro:Testingnetwork thapa_bimal$ git submodule add https://github.com/Alamofire/Alamofire.git fatal: Not a git repository (or any parent up to mount point /Volumes/E) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set) – bimal thapa Oct 22 '14 at 11:01
-
after cloning has finished, from where i have to add Alamofire.xcodeproject to my project,, – bimal thapa Oct 22 '14 at 11:07
-
see this http://stackoverflow.com/questions/16853624/git-discovery-across-filesystem-not-set – Saurabh Prajapati Oct 22 '14 at 11:07
-
-
i drag from my project to xcode, and tried to run but still got failed message, i put the breakpoint in the appdelegate also but the project never hit even appdelegate and show error when building project – bimal thapa Oct 22 '14 at 11:18
-
-
in xcode how to navigate to the target configuration window,, where is it? i am not seeing application target,, how to do it? can you be screen shot of the steps now onwards? – bimal thapa Oct 22 '14 at 11:39
-
1.terminal https://www.dropbox.com/s/8wuipz4hgwbxtid/Screen%20Shot%202014-10-22%20at%205.19.25%20pm.png?dl=0 – Saurabh Prajapati Oct 22 '14 at 11:54
-
Right click on NetworkTest(Your Project) add files to "NetworkTest" -->NetworkTest-->Alamofire-->Alamofire.xcodeproject – Saurabh Prajapati Oct 22 '14 at 11:57
-
if you get error in terminal "/NetworkTest/Alamofire' already exists in the index" then just follow last step – Saurabh Prajapati Oct 22 '14 at 11:58
-
after adding Alamofire.xcodeproject,, i am getting ? sign in all NetworkTest files,, whats wrong is happening – bimal thapa Oct 22 '14 at 12:27
-
after adding Alamofire.xcodeproject how to select the application target under the "Targets" heading in the sidebar. where is the application target,, please provide me screen shot of it – bimal thapa Oct 22 '14 at 12:35
-
when I add Target Dependencies to Alamofire.framework,, build failed,, if i delet it build succeed,, what is problem when i add Alamofire.framework in target dependencies – bimal thapa Oct 22 '14 at 13:06
-
I am getting this error, how to avoid it? => Unable to run command 'Ld Alamofire' - this target might include its own product. – bimal thapa Oct 23 '14 at 11:33
0
You could try to go to the Build Phases and add the framework from there or you could use cocoa pods to make reference to Alamofire I already give an answer in how to install cocoa and add a Podfile to import different libraries into a project here is the link Error: Importing Alamofire
Hope it works any doubts, I'm here to help

Community
- 1
- 1

Yeis Gallegos
- 444
- 2
- 14