It looks like you're new here. If you want to get involved, click one of these buttons!
I have taken a several month break from Codea, but have finally gotten around to updating Acorn Mayhem, and want to upgrade Acorn Mayhem to the codea 2.1 (or now 2.3) runtime, and fixing support for the xcode addons.
I have 2 questions, where do I get the updated runtime, and how do I update my Xcode addons to match? I need to fix @Zoyt 's Sharing addon and In-App purchase addon.
Thanks, ~Patrick
EDIT: I tried following these instructions to update the runtime, and then these to update the addons, but when I started replacing CodeavViewController with StandaloneCodeaViewController I get numerous errors and am unsure if everywhere that says codeaviewcontroller needs replacing or just some of them. I needed to restore with time machine to get the game back to a working state. How do I update them properly?
Comments
Anyone????
Progress report: I modified appdelegate.h, appdelegate.mm, iadsaddon.h, iadsadon.m, codeaaddon.h, codeaaddon.m, and standalonecodeaviewcontroller.h to match their equvalents in a freshly exported project, but need help with iapaddon.h/.m. in the meantime I tried to comment them out to test the rest of the code, but get errors in the freshly imported gamecenteraddon.m, saying "Implicit declaration of function 'luaL_setfuncs' is invalid in C99". I was surprised since this was copied straight from an exported project. what could be going wrong? What should I do?
Thanks for any help.
~Patrick
Where is the code for
iapaddon
? Is it on github somewhere?@pleiser all the header files in the
<project>/Lua
folder will need to be updated to the ones exported from a new project.My recommendation would be to do this the other way around: export a working version of your game from Codea 2.3, then add and fix the third-party addons.
@Simeon, here's the library thread, the github link doesn't seem to work anymore though.
After some searching, there's a version of @Zoyts in app purchases library in the source code of his Stackit game on github.
@Simeon, thanks, but after I copied over the header files from the /lua folder, I get several "Apple Mach-O Linker Error"s see this screenshot. what should I do?
Also, I can't export a version of my game because pretty much half of the game was written after exporting to xcode.
@Mr_Ninja, yes that is the correct library.
Thanks, ~Patrick
EDIT: I realised the script (under build phases> run script) was set to download version 2.0 of the runtime, I replaced it with the script from the freshly exported program. Now it downloaded the proper version of libtools and libcodea, and it builds sucessfully, but it crashes before it finishes running. according to the exception breakpoint it is failing when execution hits the line (in AppDelegate.mm)
, it gives the error message:"
"
@pleiser but you could re-export your game and then copy the old
<GameName.codea>
folder into the newly exported project? That would ensure your Lua code is all up-to-date.I don't think I will do that right now, a lot of the changes were done in xcode, I want to keep it like this for now. any suggestions on how to fix this crash?
I have tried splitting
into
It crashes on the second line. why is self.window.hidden = NO; making it crash?
Any Sugestions???
Edit: here is the code for appDelegate.h:
here is appDelegate.mm:
do you see any problems with these?
Also, it seems to be giving a more detailed call stack than it was earlier, here is the current error message:
@pleiser @Simeon - I'm a bit late, but I believe you're using my antiquated library. While none of my libraries have been updated for the new runtime, the most recent one is here: https://github.com/NathanFlurry/StackIt/blob/master/StackIt/Addons/IAPAddOn.m
@Zoyt @ pleiser I have a version of the addon that I modified to the point that it doesn't spit out an error in Xcode. I'll share it, just not sure how I should share it since its in a folder with the rest of the easy iap classes.
EDIT: Even though there are no errors, I still doubt it will work. The reason I can't test it is because Indont have a dev account.