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
ARC don't work on iOS 4 #70
Comments
Did you remove the -fno-objc-arc compiler flag in your target build phase settings for SVProgressHUD.m? |
No...how i can do it? |
In your project settings, select your target. Then select the Build Phases tab. Expand the Compile Sources section. Double-click on SVProgressHUD.m. Remove the -fno-objc-arc compiler flag. |
and then it's compatible with ios 4 and ios 5?...or i have to write release and dealloc in SVProgressHUD.m? |
If you have the -fno-objc-arc compiler flag set for SVProressHUD.m it means that it will treat that file as if there was no ARC. So when you remove it the compiler should be able to build the file without any errors/warnings. ARC is compatible with 4 I thought. Here's a stack overflow topic on compatibility http://stackoverflow.com/questions/7747783/is-arc-really-supported-in-ios-4-the-ios-4-2-sdk-is-missing-arc-related-symbols |
if i double-click on SVProgressHUD.m, there is no -fno-objc-arc flag...is empty, how i can do? |
You might need to set your deployment target to iOS 4.3 instead of 4.0 and use the iOS 5 SDK According to the stack overflow post: ARC is supported on iOS 4.0 and above. You need to use the iOS 5.x SDK but can select iOS 4.3 for the Deployment Target. The one thing that is not supported in 4.x is automatic weak reference zeroing. |
ok, so i have for deployment target iOS 4.2, and i use iOS SDK 5.1, it's the same?...so now i have to add the -fno-objc-arc flag for the SVProgressHUD.m? |
i have tried in ios5 and give me the same EXC_BAD_ACCESS on this line: [fadeOutTimer invalidate], fadeOutTimer = nil; so i think the problem, over the three warning about ARC, is another, i use the SVProgressHUD in this way, i have the FirstViewController class, inside a UIPageController so there is a lot of FirstViewController class, and in this firstviewcontroller i use the SVProgressHUD, i press a button, and i see the SVProgressHUD and then dismiss when do his job, then i scroll to pass to another Firstviewcontroller class, and when i press the button to display the SVProgressHUD give me that EXC_BAD_ACCESS on that line above...what i wrong? |
@Piero87 before I investigate this issue any further, are you sure you're using the latest version of SVProgressHUD? |
yes i use it, i hope you can solve this problem because it's a great project! thanks for all your work... |
@Piero87 to make sure I understand this correctly: you have a |
@Piero87 I also don't understand why you keep getting those ARC warnings. Does your project uses ARC? If not, did you try using the version on the last-mrc branch? The |
@samvermette the answer to your first comment is right, you have understood my implementation, for your second comment i have download the last-mrc branch, and i have tried it, and now i have no warning, and the SVProgressHUD works perfectly :)...can i ask you why? what is the difference between the last-mrc and the last? |
@Piero87 well you can use a non-ARC class inside an ARC project by setting the Bottom line is: you should consider migrating your code to ARC :) |
@samvermette thanks for the answer, so i can use with no problem the version of SVProgressHUD i'm using now? |
@Piero87 yep, except that version is no longer supported and won't be receiving updates. |
@samvermette ok, so what you suggest to do?..given that the new version don't work for me... |
@Piero87 Like I said, I think you should convert your project to ARC :) |
Switching to ARC should be a no-brainer for all projects. If you need |
I have hit the same issue in a project that we currently cannot migrate to ARC. Using the the latest code available in master caused EXC_BAD_ACCESS in [fadeOutTimer invalidate]. The solution, in case anyone else hits it and ends up here, is to set -fobjc-arc for SVProgressHUD.m under Project, Targets, Build Phases. |
@andrelieb hah, had no idea you could set a compiler flag that enables ARC for specific files. That's very good to know, will add it to the Read me. |
yes thanks, i have tried it but when the view disappear give me an error, so i have to but also this: -fobjc-arc in targets build setting, and Other Linker Flags, and now work fine... |
@Piero87 yep, like @andrelieb said that seems to be the right fix for this bug. Will add it to the read me. Sorry it took so long to find the proper fix! |
no problem! but @andrelieb said only for the SVProgressHUD.m, but only there the problem is not fixed, so i add also this -fobjc-arc in targets build setting, and Other Linker Flags, and now work fine... |
I have a question about it, i doing an app that is compatible for ios 4 and ios 5, and i see you have used ARC, but on ios 4 it's not compatible, and give me some warning, and then crashing using it on ios 4:
-No 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed
-Default property attribute 'assign' not appropriate for non-gc object
-Method possibly missing a [super dealloc] call
how i can do to solve it, to use on ios 4 and ios 5?
Thanks!
The text was updated successfully, but these errors were encountered: