New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alamofire was compiled with optimization - stepping may behave oddly; variables may not be available. #790
Comments
fixed it |
@cnoon how did you fix this? can you help me out. I have the same issue. |
Same problem here. Any idea? @mattt |
I ran into the same issue in ReactiveCocoa and running 'carthage build' fixed the problem. |
@andrewschreiber I'm using Cocoapods. Any solution for that? |
Perhaps a 'pod install' |
@andrewschreiber I've tried |
Sorry,I just see the email,Now,how to the error was solved, TARGETS->Build Phases->Embed Frameworks |
@ylj798 I can't see "Embed Frameworks". BTW, I think I'm in the wrong thread, I'm using AFNetworking not Alamofire |
This problem seems to (also) occur when you try to construct a url using optionals: let username: String? = "mattt"
let request = Alamofire.request(.GET, "http://localhost/user/\(username)").responseJSON { response in
// ...
} The solution is obvious; make sure you unwrap any optionals using My guess is that Carthage builds the Alamofire framework with the Release configuration (by default) for which optimizations are enabled, which results in the error message mentioned in the initial post instead of a more descriptive message. Could be wrong about this though ¯_(ツ)_/¯ |
Same error, PUT isn't working
error: Alamofire was compiled with optimization - stepping may behave oddly; variables may not be available. Update: |
@29satnam life saver !!!, unwraping was also my issue with different library :) |
Just incase anyone else is getting: error: Alamofire was compiled with optimization - stepping may behave oddly; variables may not be available. I was getting that error when constructing a URL for google geo services. I was appending a street address to the end of the URL WITHOUT encoding the street address itself first.
That fixed it for me! It didnt like that the address had spaces and commas, etc. Hope this helps someone else! |
man geoherna, you nailed it, yes there was a trailing space in input and your way worked... |
You got it @geoherna. We had server-provided media URLs with spaces in them, so this fixed it : NSURL(string: unsafeUrlString.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.whitespaceCharacterSet().invertedSet)) |
hi friends i have fetch same problem "Alamofire was compiled with optimization - stepping may behave oddly; variables may not be available." |
when I use Alamofire2.0,run app ,this is error occurred:
Alamofire was compiled with optimization - stepping may behave oddly; variables may not be available
Xcode pointed to Alamofire.swift,line number 92
who can help me?
Thanks~!
The text was updated successfully, but these errors were encountered: