Skip to content
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

Cannot run in iOS 6 Simulator #4

Closed
objectmethod opened this issue Oct 3, 2013 · 22 comments
Closed

Cannot run in iOS 6 Simulator #4

objectmethod opened this issue Oct 3, 2013 · 22 comments

Comments

@objectmethod
Copy link

I assumed that this category would degrade more gracefully if running on iOS 6, but I'm unable to run at all. I'm getting the following error:

dyld: Symbol not found: OBJC_CLASS$_UIInterpolatingMotionEffect
Referenced from: /Users/RichardGuy/Library/Application Support/iPhone Simulator/6.0/Applications/19E194FD-988A-4499-9EB1-A559989359C9/Nibblr.app/Nibblr
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit
in /Users/RichardGuy/Library/Application Support/iPhone Simulator/6.0/Applications/19E194FD-988A-4499-9EB1-A559989359C9/Nibblr.app/Nibblr
(lldb)

@michaeljbishop
Copy link
Owner

My bad. I'll try to fix this ASAP.

@michaeljbishop
Copy link
Owner

I think I fixed it. Can you try this

a4b457e

And close the issue if it fixes your problem?

@objectmethod
Copy link
Author

No, it still crashes. Here's a screenshot: http://d.pr/i/BPex

It appears to be at compilation time vs runtime, so just the presence of it causes it to crash, like this: http://d.pr/i/uuuB

@michaeljbishop
Copy link
Owner

Hmmm... Here's my test: I open the Demo project in XCode5.

Building

I can build the project against both the iOS7 SDK and the iOS6 SDK. With the iOS6 SDK, I get a warning that the feature will be disabled.

Runtime

When I run the version built with the iOS6SDK, I get nothing on iOS6 or 7.
When I run the version built with the iOS7 SDK, I get the effect in the iOS7 Simulator and nothing in the iOS6 Simulator (but it doesn't crash).

Does that not work for you either?

@objectmethod
Copy link
Author

Yeah, I see that now. I just downloaded your demo project, and it's running fine. Let me try to figure out the differences in our projects then.

@michaeljbishop
Copy link
Owner

Thanks. I'm curious to see what you find. Are you using cocoapods?

@objectmethod
Copy link
Author

EXACTLY what I just discovered! Your timing couldn't have been better. When I removed your locally-referenced classes from your demo project and used cocoapods instead, it broke! :)

@michaeljbishop
Copy link
Owner

That makes sense. I haven't updated the cocoapods version to 1.0.1 (which would include this fix) because I wanted to make sure the fix worked before I bumped the version number.
Can you please manually use these source files in your other project and see if it works? I'd like to bump the cocoapods version number and put this out.

@objectmethod
Copy link
Author

Yep. That worked!

@michaeljbishop
Copy link
Owner

Great! Thanks. I'll bump the version and update the CocoaPod and get back to you...

@michaeljbishop
Copy link
Owner

Watch this space...

CocoaPods/Specs#4433

@michaeljbishop
Copy link
Owner

Ok, you are good to go. Thanks for the bug report. That was very helpful.

@objectmethod
Copy link
Author

Even installing 1.0.1 via CocoaPods still produces that same error! :(

@michaeljbishop
Copy link
Owner

I think the problem is that UIKit needs to be weakly linked.

@michaeljbishop michaeljbishop reopened this Oct 3, 2013
@michaeljbishop
Copy link
Owner

I'm guessing it crashes before your app has even run?

@objectmethod
Copy link
Author

Yes, exactly.

@michaeljbishop
Copy link
Owner

I think I know what the problem is. Let me run some tests. If this is the problem, it makes sense that my project worked but that it doesn't in a podspec environment. I'm a little new to podspecs so I'll need a little time to test.

@michaeljbishop
Copy link
Owner

Can you try this?
Open up your podfile and put this at the top

# Uncomment this line to define a global platform for your project
platform :ios, "6.0"

The run pod update (I think. Whatever command regenerates the pod workspace)

@michaeljbishop
Copy link
Owner

The problem is that the final project that is compiling the pod code has a deployment target of 7.0. That means that the symbols for UIInterpolatingMotionEffect are being hard-linked. When the app starts the runtime can't find the symbol and the whole thing crashes. If the project had a deployment target of 6.0, the symbol would be weak-linked and would present no problem. I'm trying to figure out what setting in the podspec will make sure the deployment target is properly set.

@michaeljbishop
Copy link
Owner

Okay, now let's wait for this...

CocoaPods/Specs#4437

@michaeljbishop
Copy link
Owner

Ok, try with this one. I just changed the podspec. Sorry for all the trouble.

@objectmethod
Copy link
Author

No trouble at all! You're the one contributing your time and efforts, and it is greatly appreciated!

I installed v1.0.2, and it still didn't work. But then I noticed your earlier comment about changing the targeted platform version in my podfile from 7.0 to 6.0, and that worked.

Thanks again!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants