JNWSpringAnimation Framework for iOS (Compile Errors) - ios

I followed the instructions that came with the framework at the github repository. But I got an error when I tried to compile all stemming from the NSValue+JNWAdditions files. The example project that comes with the code is meant to run in Mac OS X and not iOS. What am I missing here when trying to use this framework for an iOS app? For giggles I removed the aforementioned files and was able to compile but got a runtime error, I guess not surprising. I'm fairly new to this stuff and just want to play with animation and springs :(
GitHub repository:
https://github.com/jwilling/JNWSpringAnimation
Help!

Ah. Got it. For any fellow newbs out there: I had to import UIKit into the header file of NSValue+JNWAdditions.h. This got rid of all the "Expected a type" errors! Makes sense to me now and I have no idea why this took me so long to figure out.
Womp womp

Related

iOS: #import AnyModule not found after editing class using cocoapods

I have an Obj-C/Swift project setup that imports modules using cocoapods. In any class where I am importing a framework using the #import function I get the error message SomeModule not found. However, when I build/run it compiles fine, and the framework works and functions as expected.
The problem here is that it messes me up when I'm trying to write code below the error (i.e., objects appear as ints because the error above messes up the compiler; function auto complete doesn't work, etc). What's weird, if I cmd+s to save the class, the error messages go away. Then the second I start typing again, they reappear.
I've gone as far as removing all of my cocoapods and reinstalling them, but to no avail. This has only been an issue since installing xcode 8.
Anyone have any insight into this?
Thanks in advance.
Sorry for super late response - the only way I found to get around this was to use the "old" style of framework import; i.e., ... it seems like some Frameworks just don't play nicely with the #import declaration. #pablo-martinez
If someone has a better solution please feel free to share.

iOS Metal: Unable to create compute pipeline state with function

I was trying to make a simple app for sudoku solving on GPU with iOS Metal Framework.
I was following instructions from this blog post:
http://memkite.com/blog/2014/12/15/data-parallel-programming-with-metal-and-swift-for-iphoneipad-gpu/
I version my code here:
https://github.com/mateuszbuda/Sudoku
(As of writing this question HEAD is commit c3e06e0)
And I've encountered error when calling
newComputePipelineStateWithFunction
that is while setting up MTLDevice in ViewController (line 95):
https://github.com/mateuszbuda/Sudoku/blob/c3e06e0e1edc724eea20962f32e49f0df8143b7d/Sudoku/ViewController.swift
The error I get is:
Error Domain=AGXMetal Code=1 "Compiler encountered an internal error"
I'm running this on iPhone 6 Plus with iOS 8.1.3
Have someone any idea what can cause the error I get?
You are experiencing one of the unfinished matters in Metal. The reason the error says "internal" is because this is a compiler error, CAUSED by the compiler. Not you. Try this:
Copy all of the code in the ".metal" file that is not compilable.
Delete the .metal file (NOT just the reference).
Remove all of the content of the "DerivedData" folder located at users/yourUser/Library/Developer/Xcode/DerivedData
Create a new .metal file and paste the old code in this new metal file.
Now build and run, you should be good to go.
Anybody who finds this error make sure to send some sort of error report to Apple so that they can properly debug it and fix it in the next release of Xcode.
For anyone having the same problem, I've figured it out.
It just means that there is something wrong with a kernel function. Most probably it doesn't compile, even if you don't see any errors in Xcode.

Unity Google Play Games Plugin Won't Compile in Xcode iOS

Whenever I try to compile my Unity game in Xcode I get a 3 compile errors which are coming from the Unity Google Play Games plugin:
GPGSAchOrLbDelegate.h - Lexical or Preprocessor Issue 'GooglePlayGames/GooglePlayGames.h' file not found
GPGSRealTimeRoomDelegate.h - Lexical or Preprocessor Issue 'GooglePlayGames/GooglePlayGames.h' file not found
GPGSManager.h - Lexical or Preprocessor Issue 'GooglePlus/GooglePlayGames.h' file not found
I've no idea why this is happening, I followed all the setup instructions correctly.
Any help would be greatly appreciated!
one gotchya is they recently changed many of the method names in the library, in a recent update...
it's possible this has caught you out?
It's very hard to resolve this, but I found some discussion about this for example here,
http://answers.unity3d.com/questions/679424/google-play-games-plugin-for-unity-not-authenticat.html
it's a bit easier on iOS than Android.
Alternately: note that, essentially, you have not included the GooglePlayGames.h file. Include the link to "which" instructions you were following, to guess which step is problematic. (Most Unity plugins - like Prime31 - have a "preprocessor" stage that does that for you or in the case of Android fills in the damned manifest. Something is going wrong at that stage.)
I actually solved this myself by removing the plugin and starting afresh, and then starting a completely new xcode project rather than appending to an old one.
Irritating and time consuming but I got there in the end!

Corona sdk build v2013.2076 having error loading my game

I am having this error after upgrading to v2013.2076. I didn't had this error message when working with pre version of corona sdk.
Why do I get this error message?
It looks like you are trying to import a module which can not be found. The proper way to import a modules is to use:
local sprite_module = require("modules.sprite")
where modules is a folder relative the main.lua and sprite is a .lua-file.
I have the same problem. I had to switch my system to Windows 8 64 bit and installed everything new (corona and zerobrane) and now corona no more finds the sprite.lua file.
I think I found the solution here:
http://docs.coronalabs.com/api/library/sprite/index.html
sprite.* is no more supported...
You can/have to use display.newSprite() to do this now.
Edit:
Now I found the definitive proof, its because the new grafic v2.0.
http://docs.coronalabs.com/guide/graphics/migration_v1.html
(scrole to removed libraries...)
I also have problems with my joystick now... prob. this is related, too...
I am very unhappy about this, corona!

Adding Chipmunk Files to XCode NSObjCRuntime NSZone Parse Issue

Im working on SpaceViking project from Ray Wenderlich's Cocos2D Book and the project has worked fine so far. Near the end we are told to add Chipmunk files to the Xcode project and compile & run to test everything is fine without adding any new code yet.
As soon as I do that I get many Parse Issue errors coming from NSZone, NSObject and NSObjCRuntime which I don't get otherwise.
Can anyone help me out on this one? It should be an error on some of the added files. How do I find which one and where the error is being generated so I can fix it?
I would check and make sure the added files are 'typed' correctly by Xcode. Make sure they are set to Objective-C, C++ or C (whatever is appropriate in this case). I used to get tons of errors when importing C files that were mistakenly recognized as Objective-C by Xcode. Just changing the file type would solve most of the compile errors. Just and idea.

Resources