1
1

I'm using pushwoosh for push notification. Getting push in android devices. But it says "Failed to register" Error Domain=NSCocoaErrorDomainCode=3000 \"no valid 'aps-environment'.

I have created another provision profile with Push Notification and made a build with it. But no change.

I have tried deleting the app from PGBuild and uploaded new. No change.

I'm getting this issue from yesterday. Worked perfectly till then. Using same provision profile(tried with both old and new profiles.)

APP ID : A328E-530E1

I'm stuck in this. Please help.

Asked the same query on PGBuild community. They said its about the plugin.

http://community.phonegap.com/nitobi/topics/_ios_push_messages_authenticating_issue_while_registering_push_messages_in_ios?utm_content=reply_link&utm_medium=email&utm_source=reply_notification#reply_13711918

I'm adding <gap:plugin name="com.pushwoosh.plugins.pushwoosh" version="3.0.1"/> to my config.

Using phonegap version 2.9

asked 23 Jan '14, 06:41
vishnurajreubro's gravatar image

vishnurajreubro
4615

edited 23 Jan '14, 06:43

This issue is solved now. Registered successfully and got token.

Thnks

permanent link
answered 24 Jan '14, 07:09
vishnurajreubro's gravatar image

vishnurajreubro
4615

Did PGB guys fix this? You can accept your answer.

(24 Jan '14, 13:01) shader shader's gravatar image

Hi,

It is a known problem with Phonegap Build and we have notified them about 6 months ago, but it still not fixed :( The problem that PGB don't put correct push entitlements into the executable during the build process. The entitlements section goes right before Codesign section in the executable. And after receiving executable from PGB system - that section is empty and not containing push entitlements from provisioning profile! Unfortunately this is not about the plugin, this is about PGB build server :(

This is 100% confirmed with Apple Developers Provisioning Profile.

AdHoc and Production profile should work fine (that's why I suppose PGB team doesn't hurry fixing this bug). However there have been some cases reported when Production profiles didn't work as well. If you receive this message with AdHoc/Production profile I would suggest recreating profile in the Apple Developers Portal.

Of course please make sure you have "aps-environment" string in the mobieprovisioning profile!

I would suggest opening a support ticket to PGB team as well, they really need to fix this bug!

Thanks!

permanent link
answered 23 Jan '14, 06:55
shader's gravatar image

shader
3.9k7

I'm now using AdHoc profile. How can I fix this? I tried creating a new adhoc profile. But same effect.

permanent link
answered 23 Jan '14, 07:17
vishnurajreubro's gravatar image

vishnurajreubro
4615

Well. There are some ways how to fix this. But you'll definitely need a mac for this:

  • Use codesign utility to resign the IPA (.app) with the profile. This way the entitlements will be included in the executable correctly. Just download the build from PGB and re-sign it with the profile. See more here:

http://stackoverflow.com/questions/6896029/re-sign-ipa-iphone

Also some tech docs from Apple: https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/codesign.1.htmlWrite

  • Open the ticket with PhonegapBuild support as well to push them fixing this issue.

Thanks!

permanent link
answered 23 Jan '14, 14:11
shader's gravatar image

shader
3.9k7

Shader,

I have no mac machine. :( Will try with my frnd's mac.

I have posted the issue in PG community.

http://community.phonegap.com/nitobi/topics/push_registration_fail_on_ios

permanent link
answered 23 Jan '14, 14:27
vishnurajreubro's gravatar image

vishnurajreubro
4615

I'm having the exact same issue with Phonegap build. Unfortunately the re-signing instructions on StackOverflow are giving me a hard time, specifically this part:

/usr/bin/codesign -f -s "iPhone Distribution: Certificate Name" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"

Because there is no ResourceRules.plist in the app folder I end up getting: Payload/App.app/ResourceRules.plist: cannot read resources

I'm also using the production profile and certificate.

permanent link
answered 23 Jan '14, 16:50
Max%20Ellinger's gravatar image

Max Ellinger
1

That's very strange. You must have ResourceRules.plist in the .app file. It tells the system not to hash Info.plist for example during the codesigning procedure.

(23 Jan '14, 18:27) shader shader's gravatar image

Looks like there's a lot of strange things going on with them, just look at this thread! http://community.phonegap.com/nitobi/topics/embedded_mobileprovision_is_missing

Thanks for shedding some light on this, shader — after being alone with the Phonegap Build forum for so long it's nice to get responses.

(23 Jan '14, 18:42) Max Ellinger Max%20Ellinger's gravatar image

https://twitter.com/dino_krs/status/426390489114636288

It looks like things aren't going too well at Phonegap right now. I'm thinking maybe his issue could be linked to ours?

permanent link
answered 23 Jan '14, 17:05
Max%20Ellinger's gravatar image

Max Ellinger
1

It does look like the reason!

(23 Jan '14, 18:06) shader shader's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×446
×33
×25

question asked: 23 Jan '14, 06:41

question was seen: 5,370 times

last updated: 24 Jan '14, 13:01