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

MTAnimation Cocoapod crashes in Xcode 6 #20

Open
thebarndog opened this issue Jul 7, 2014 · 15 comments
Open

MTAnimation Cocoapod crashes in Xcode 6 #20

thebarndog opened this issue Jul 7, 2014 · 15 comments

Comments

@thebarndog
Copy link

Compiling a project using MTAnimation in Xcode 6 produces a bunch of errors, a lot about expected identifiers and unknown type name "NSString". I think it has something to do with Metal and QuartzCore but it's not a super pressing issue since it's in beta still.

@jtmarmon
Copy link

+1

@thebarndog
Copy link
Author

I think I've figured it out, MTAnimation has .c files and the Swift compiler just shits the bed when trying to figure it out.

@atomkirk
Copy link
Member

Oh great 😦 I haven't don't anything in swift yet and probably won't until it's out of beta, but then I will update this project to work with swift or rewrite it in swift. Sorry about that.

@glenstorey
Copy link

I don't think this is a problem to do with swift, since I'm using xCode 6 DP6 but not swift and experiencing the issue when building for a device. I think you guys are right though - it's something to do with including .c files.

@thebarndog
Copy link
Author

From my understanding, the Swift compiler can compile C code when its embedded in Objective-C code since Objective-C is a strict super set of C. The problem comes in with .c files, I don't think it's supported. Although I'd be curious to know how Apple implements their C APIs. Can't wait to see MTAnimation in Swift by the way, by far my favorite animation library.

@glenstorey
Copy link

Yeah - I just don't know if this problem is caused by swift at all (I agree - it'd be cool to see this library in swift). This is the sort of error you get when you include ObjC headers in a C file, isn't it? (It's totally possible that I'm off on some tangent and my problem is unrelated to this thread, or that I've done something stupid, or that it's Friday).

@thebarndog
Copy link
Author

It's only Thursday where I am so stupidity nullified! Yeah I'm not sure although they're likely related.

@atomkirk
Copy link
Member

Ok I'm working on this problem now. I don't think it has to do with c files, cause I made them legit .m files with dummy class and get the same problem. I've tried everything. An annoying work around is to open the pod specific target build settings and turn off modules. But you have to do that after every pod install/update. Seems like a compiler or cocoa pods bug. I lean towards compiler bug. Can't figure it out.

@atomkirk
Copy link
Member

Happens when cocoa pods is not used. Unrelated to cocpapods

@RyanNelwan
Copy link

Heads up; I was able to get this to work by changing the two c source files to objective-c.

MTMatrixInterpolation.c -> MTMatrixInterpolation.m
MTTimingFunctions.c -> MTTimingFunctions.m

Built and ran without any issues from the compiler. However, there were some unusual behaviors with the 64-bit processors; animation duration appears to be a lot slower. I was only able to test this in the simulator, not sure if the actual device running on A7 will produce the same results.

@atomkirk
Copy link
Member

I can get it to compile for the simulator as is, it's compiling for devices that causes problems

@RyanNelwan
Copy link

I was able to compile onto my iPhone 5c without any issues. I'll try on the 5s next.

@scastro
Copy link

scastro commented Sep 24, 2014

I can confirm that renaming the files solves the issue

@boozi2
Copy link

boozi2 commented Sep 29, 2014

also confirming that renaming the files compiles on 5s with iOS8

@mitchellporter
Copy link

Can anyone confirm whether this works on Xcode 6.1, iOS 8, and the iPhone 6?

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

8 participants