Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

[DEPRECATED] Various Codea Objective-C Libraries

2»

Comments

  • Posts: 178

    @Zoyt or @JakAttak. Can you explain how to implement the Lua part of the IAP? I have the iTunes Connect part ready, but I'm not sure which functions I call when a user wants to disable ads. Thanks!

  • Posts: 2,043

    I suggest having a look through the Stack It source code and looking at how Zoyt implemented it.

  • Posts: 178

    @JakAttak, wow. I just got done reading through parts of the code. I think I'll save implementing IAPs for some other time. Seems like too much work especially when I have read about your posts about how not many people buy IAPs

  • Posts: 2,820

    @YoloSwag - It's actually quite simple, considering how much code has to go into the Obj-C side. But yes, it's not the first thing you should worry about when writing an app.

  • Posts: 167

    I'm terrible at objective c, sorry to say it but I can't help you, if it's in Lua 5.1 or batch then, yes, but other than that, no

  • Posts: 178

    @Zoyt. I am having trouble repositioning the game center banner in landscape mode. The banner works great on the iPhone portrait and iPad portrait view, but on the iPad landscape view its too much to the right.

    This is the code for the banner:

    static int showGCBanner(struct lua_State *state) {
        [gameCenterAddOnInstance showGCBannerAction:[NSString stringWithCString:lua_tostring(state, 1) encoding:NSUTF8StringEncoding] withMessage:[NSString stringWithCString:lua_tostring(state, 2) encoding:NSUTF8StringEncoding]];
    
        return 0;
    }
    
    - (void) showGCBannerAction : (NSString*) title withMessage: (NSString*) message
    {
        [GKNotificationBanner showBannerWithTitle: title message: message
                                completionHandler:nil];
    }
    
  • Posts: 2,820

    @YoloSwag - It's probably a bug in iOS. If you don't mind sharing a screenshot, that'd be great.
    There's really no way to fix it, unless you found a way to isolate and snapshot the notification banner or managed to get a reference to it. Sorry.

  • Posts: 178

    @Zoyt. How do you add pictures from your camera roll here?

  • Posts: 178

    @Zoyt. I'll try that if I can.
    In StackIt, did you use achievements? I'm thinking of trying this.

  • Posts: 2,043

    @YoloSwag, see above I posted all the code you need for achievements

  • Posts: 178

    @JakAttak. Thank you! I didn't see that at first.

  • Posts: 178

    @JakAttak. I'm not receiving a notification banner when I complete the achievement, but it registers in Game Center. At first I tried your code, but then I switched to another method, but they both don't show the banner. Is this supposed to happen?

  • Posts: 2,043

    If you want it to show a banner, you have to call the banner yourself. The Game Center Add On already includes a function for showing Game Center banners, so when you complete an achievement just call both my report function and the function to show a banner with the text you want.

  • edited August 2014 Posts: 178

    @Zoyt. You are right. Its just an iOS 8 bug. Gamecenter works perfectly on iOS 8. :)

  • When I call showGameCenter() it shows that I have no leaderboards but in ITunesConnect there is in fact a leaderboard under my app. Anyone know why this is?

  • Also, when I exit the leaderboards, the draw function does not respond but the touched function does.

  • Posts: 2,043

    @austinmccoy give it a little time for the leaderboard to go online.

  • I have given it around 30 hours, is that not enough?

  • Posts: 2,820

    @austinmccoy - Haha, I think so. Are you sure that your app has GameCenter enabled and is linked the right way to iTunes connect?

  • Posts: 167

    You know, these keep confusing me so could you please post this in another website? This forums if for Codea after all with uses Lua

  • Jmv38Jmv38 Mod
    Posts: 3,297

    @code_maker i dont agree, this forum is the place for making apps from codea, so that is fine. Just ignore this discussion if you're not interested. :O

  • Posts: 2,820

    @code_maker - As @Jmv38 said, if you don't mind, just ignore it. I put the key word "Objective-C" in the title to make it clear it's not related to Lua. But thanks for the concern.

  • edited February 2015 Posts: 277

    Hey, I think there has been some change with iOS 8, as Xcode 6 warns that

    [achievement reportAchievementWithCompletionHandler:^(NSError *error)
    

    is depreciated.

    How much work would be involved in making the code compliant with the most recent api (Xcode 6 suggests to use "+reportAchievement:withCompletionHandler")?

  • Posts: 2,820

    @Rodolphe - Theoretically nothing. I haven't tried it myself, but it should give you a suggested fix that should work fine. Sorry I don't update the libraries, I've just moved on from Codea. I don't even have an iPad anymore.

    If it doesn't work, feel free to LMK. I'd be more than happy to help me.

  • Posts: 277

    Thanks so much Zoyt! (what are you coding on if I may ask? I'm trying pure swift/xcode6 coding, and oh do I miss code... :) )

Sign In or Register to comment.