Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Missing Push Notification Entitlement

Author
Message
Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 9th May 2014 18:53
So I used the Lite iOS template, which I thought didn't have Push in it anymore... yet I still get the warning email from Apple saying I included the API for Push and forgot the entitlement... what gives? Is this just a mistake or is Push still in the Lite template?

Do I need to worry about this, or is it ignore-able?
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 9th May 2014 19:17
You have to worry, cause they can reject your app.
You need to remove the API from the core.m or you need to add the entitlements.

Look if you correctly changed the linker path to the LITE version in Xcode.

Long life to Steve!
Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 9th May 2014 19:40
But doesn't the Lite version have the API removed already?

How would I go about removing the API, if not?

How do I check the linker path?

I'm not using push, would it still get rejected?

Thanks for the help.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 9th May 2014 20:50
They will only notice you the first time, from teh second they will reject the app.
You know OBJ C?

If not, you need to read some example.
Anyway the push notifications are in the core.m

You can found the linker path in the "Library Path" in the XCode build options window.
Check if the path is correct for the LITE or it point to the old COMPLETE version.

Long life to Steve!
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 9th May 2014 21:54
In core.m there are two methods:


I'm not sure if those can be safely removed, but you can try.
I don't see any standalone library/framework (unless it is packed in libAGKIOS.a) for push notifications so I've no clue what you'd remove, if anything. There's no specific Capability in xCode for push. Also I noticed the other day when creating a provisioning profile I could not unselect push notifications. Which means to me that the entitlement is built in to the app and required for all now. It could be similar to Unity where the push is in the base library (libAGKiOS.a in our case) so the entitlement needs to be there whether you utilize the feature or not. We're in process of having our next game reviewed by Apple and will be submitting another over the weekend. Both will include the push entitlement, but not make use of push. I'll try to remember to post here if they give us any warnings.

Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 9th May 2014 23:15
@ Gekko, thanks for the info on the linker, mine was fine. But I'm still not sure how to go about fixing this.

@ Naphier, Thanks for the insight. So is your suggestion to just leave the Push stuff in because its a part of the AppGameKit library? Have you had this email from Apple before on the uploading binary stage?

I'm just not sure about this.... I'm sure someone has ran into this issue before using AGK... what have they done?

Not sure if I should reject the binary or not... Is it an issue to leave the Push API in without an entitlement? Why would I get rejected on the second attempt but not the first, like Gekko said? Why would they care the second time?


Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 9th May 2014 23:25
If the API is in then the entitlement must be in. I'd reject and re-submit. You can find tons of cases with a Google search where developers (mainly Unity) were rejected for excluding the entitlement for push.
Why you'd get rejected on the first review, but not the second? No clue, there are humans actually reviewing the app so some of the process may be subjective, but I wouldn't count on it.

Our last app, Wordspionage (submitted in December), made use of push so the entitlements were included and the API used, so they wouldn't have had reason to reject for that. Prior to that our other app was submitted about a year ago so things were different with Apple back then - they weren't so strict, maybe? I've also not found any information about them rejecting an app for including push entitlement, but not making use of. I have heard of them rejecting for 3rd party SDKs that are not used, but I'm not sure how they can tell this unless they have someway to reverse engineer the binary and look at your code, or some special way to run through all of the features of your game, because who says you're going to ask for push notification permission from the user right up front? You might wait for a week of playing before asking. So I'm not all that sold on the rejection for 3rd party SDK inclusion. I've really only heard of Gekko talking about this and haven't seen the note from Apple itself.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 10th May 2014 05:27 Edited at: 10th May 2014 05:29
This is my Core.m



Hope you can understand!!

As you can see i'm trying also to include CoreMotion instead the deprecated Accelerometer.
TGC should fix this since 6 months...
Another incredible fix that could be done in 2 hours.
Mha!!

Long life to Steve!
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 10th May 2014 10:44 Edited at: 10th May 2014 10:45
So I sent the new version of dFenz through. When I created the App ID in the iOS Developer portal I was able to unselect push notification entitlements (Application Services). When I uploaded the binary I immediately got an email warning me that the binary delivery was successful, but I may want to correct the missing entitlement in my next delivery. So they're picking up that push is in one of the libraries used. Probably the agk library.

Here's a copy of the email:
Quote: "Dear developer,

We have discovered one or more issues with your recent delivery for "dFenz AE". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

Missing Push Notification Entitlement - Your app appears to include API used to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.

If you would like to update your binary for this app, you can reject this binary from the Binary Details page in iTunes Connect. Note that rejecting your binary will remove your app from the review queue and the review process will start over from the beginning when you resubmit your binary.

Regards,

The App Store team"


I looked through the IDE/platform/apple/lib folder and there is a ReleaseLite folder which contains an AppGameKit library which should have Facebook, Twitter, and Push stripped from it. It's called libAGKiOS.a just like the other interpreter library. If you want to use the lite interpreter you should make sure that the library linked is indeed this one. If it is the one in the Release folder then it likely contains the API for push. Furthermore, I wonder if it is also necessary to remove didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError methods from Core.m because these 2 methods are what makes calls to agk:: PNToken() to get the actual push token for you. I'm not sure if they need be removed, but it seems like they should be.

@Gekko - I see where you commented out the didReceiveLocalNotification method, but you still have didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError are you including push services in your apps when you make your App ID on the Developer Portals? Because this is the area Braj is having trouble with. If the AppGameKit library still contains push API then they will still complain if you don't have the entitlement/service set up with the App ID. I also see where you commented out the entire method for the accelerometer, but I don't see where you've replaced it with anything from CoreMotion. Also, can you take a look a this thread and let me know if you can help out? You're the most experienced iOS dev here so maybe you know how to do what I'm looking for.


@Braj - I'd let the submission go through this time, actually. I'm trying it out with dFenz to see what happens, but the next time you should either try making sure the ReleaseLite/libAGKiOS.lib is the one that is truly linked to the project OR simply go in to the Apple Dev Portal and in your App ID section you can add the push entitlement. I'm not sure if they care if you are actually using push when you include the API and the entitlement. They are really just warning you that you have the push API in, but you didn't include the entitlement. They don't say that they will reject you for this, but they do retain that right. And you'll likely continue to get this warning whenever you upload a new binary. With Shape Time I have the entitlement in and the API, but I never make use of it, I'll let you know if they reject because of that.

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 11th May 2014 04:33 Edited at: 11th May 2014 04:36
@Naphier
Well, when i create my app ID on the dev center, i never add the push notifications as i don't need it at the moment.

In my core.m, if i comment out some DELEGATE internal methods is cause when you send the app for validation (before upload it), the auto scanner see you are using push notifications.

I use only the local, you can use it. In fact, if you look better, i commented only the one by AppGameKit, and i added my personal one.
The problem is only on the remote one that need the certificate.

Now i don't remember what i done the first time it happened to me in September, but i use AppGameKit LITE + my version of core.m

For the accelerometer, i commented it, but i not solved yet, even if i know how to do.
the new CoreMotion framework is easy to use, so we can use it and pass X, Y and other variables to the AppGameKit functions, instead the old one.

I saw it in the past on StackOverflow.

If i will add it, i will post for sure.

Long life to Steve!
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 11th May 2014 07:14
Interesting. Validation has never said anything to me about push entitlement missing. Only an email from Apple. Validation always says all is OK. So far they let the app without push entitlement go through. I even rejected the binary and resubmitted to see if they would actually reject instead of just warn. They only warned again. If they actually reject during the review process I'll update the info here.

I must have somehow overlooked you comment blocks before and was confused. The code display on the forums makes it hard to see the comment blocks.

Did you take a look a this thread? http://forum.thegamecreators.com/?m=forum_view&t=210797&b=44 I need someone with iOS Obj-C experience to take a look.

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 12th May 2014 19:54
Paul just confirmed that the two methods in core.m, didRegisterForRemoteNotificationsWithDeviceToken
and
didFailToRegisterForRemoteNotificationsWithError
Do NOT need to be removed.
The only thing that needs to be done is that you need to make sure you are using the lite library.

Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 13th May 2014 02:41
First and foremost, thank you Naphier and Gekko for discussing this topic and trying to find solutions! Thanks for being awesome!

@ Gekko - Thanks for sharing the core.m !

@ Naphier - That is the same email I got as well. I looked into my linked libraries and I see that I AM in fact using the ReleaseLite version of the libAGKios. I even checked through the Frameworks list to make sure it was referencing the ReleaseLite version, it was. But I still get the warning while using the Lite library.

If I let this go through review, and they approve of it... is it ok to release the app and not worry about this API warning? I'm just curious about the future of updates.. and I'm not sure I want to change the core.m .... it seems like from the Apple email, they say you can just disregard the warning email if you aren't utilizing Push, but who knows with Apple.

Is what Gekko was talking about in the core.m (the things he commented out) causing the Apple warning to come through after upload because it thinks it is a part of Push even when using Lite?

Thanks again Naphier and Gekko!
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 13th May 2014 02:46
Paul said those things don't need to be commented out, but perhaps they do. You might want to contact him and let him know you're still getting the warning with the lite lib.

Im not releasing anything else for a while so I can't test and I'll likely use FB so I won't use the lite lib.

Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 13th May 2014 12:41
Just to confirm what Naphier is saying. We have released an app recently and received the same 'warning' email... You can just disregard it, your app will not be rejected for this.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 13th May 2014 16:03
The Lite version of the lib has the push notification code surrounded with a #ifdef so it should never appear in the library for Apple to see, but maybe they are looking at the two functions
didRegisterForRemoteNotificationsWithDeviceToken
didFailToRegisterForRemoteNotificationsWithError
and assuming you will call the push notification code. Try commenting them out and seeing what happens, I haven't tried it so I don't know what will happen.
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 13th May 2014 17:44
Yes, this is the reason i commented out them.
Apple reviewers are very different from each other.
You can find a nice one, and you can find the EVIL one.

If you find the EVIL one, you are in the hell until you do all that he wants.
And you will lose 7 days every time he wants.
It happened to me much times, especially when i launched bigger games.

If you don't use the remote push, comment it out, is better!!

Long life to Steve!
Braj
10
Years of Service
User Offline
Joined: 21st Feb 2014
Location:
Posted: 14th May 2014 02:00
My app has passed review, so it didn't seem to be an issue.

Perhaps next time I'll look into changing the core.m, but I may just go along with Funnell7 and disregard the "warning". Especially since Paul is saying the Push commands in Lite are not appearing in the library for Apple to see, with #ifdef.... And it may just be the two functions in core.m making it seem like I'll call push, from Apple's perspective.

Login to post a reply

Server time is: 2024-04-28 19:33:30
Your offset time is: 2024-04-28 19:33:30