Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

added aps-environment to plugin.xml, fixes #1408 #1467

Closed
wants to merge 1 commit into from

Conversation

tonijn
Copy link

@tonijn tonijn commented Dec 15, 2016

No description provided.

@frederikbosch
Copy link

Okay, this is a good PR. But there is no Entilements.plist until Cordova IOS 4.3.0, see PR #256. So we should have the Entitlements.plist added.

What we are trying now is to add this to our config.xml

    <asset src="Entitlements.plist" target="Entitlements-Release.plist" />
    <asset src="Entitlements.plist" target="Entitlements-Debug.plist" />

and with a Entilements.plist in our root folder like this.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<plist version="1.0">
    <dict>
    </dict>
</plist>

@jcesarmobile
Copy link
Collaborator

Those lines are already in plugin.xml https://github.com/phonegap/phonegap-plugin-push/blob/master/plugin.xml#L98-L103

@frederikbosch Adding the file is not enough, you definitely need Cordova IOS 4.3.0 to make it work

@frederikbosch
Copy link

@jcesarmobile Yes, those files are in the master. We cannot use the master, because version 1.9.x cannot be used in Phonegap now. Only version 1.8.4 can be used. Hence, we must make this work with 1.8.4.

@jcesarmobile And regarding Cordova IOS. We do not need 4.3.0, we need 4.2.0 with a Entitlements.plist.

@jcesarmobile
Copy link
Collaborator

But this PR is against master, right?

And as I told you, the files are not enough, the PR you reference also made changes in bin/templates/scripts/cordova/build.xcconfig, which are needed to make the project use the plist file, adding the file without that change will do nothing, so you need 4.3.0

@frederikbosch
Copy link

@jcesarmobile Hmm, that's right. That is wrong in the PR.

@frederikbosch
Copy link

@jcesarmobile You are right I guess. The only thing we can do is wait until this gets fixed.

@tonijn tonijn closed this Dec 15, 2016
@tonijn tonijn deleted the fix-aps-environment branch December 15, 2016 11:18
@rgagne
Copy link

rgagne commented Dec 15, 2016

It is possible to get Cordova iOS 4.3.0 by using the latest cli in PGB - worked ok for me:

<preference name='phonegap-version' value='cli-6.4.0' />

image

This solution is definitely a step in the right direction; for me it's enough.

@ef33zy
Copy link

ef33zy commented Dec 15, 2016

@rgagne When you complete the build, can you click on the "logs" for your iOS app and search for the push plugin if it installed correctly? And are you installing 1.8.4 or 1.9.x?

@rgagne
Copy link

rgagne commented Dec 15, 2016

It built and installed and device registration worked, settings and log snippet below. I don't think it works anymore however because the branch @tonijn created was deleted.

With the build I did I got:
Repository "https://github.com/tonijn/phonegap-plugin-push" checked out to git ref "fix-aps-environment" at "94b0cac".
Installing "phonegap-plugin-push" at "1.8.4" for ios

My settings were:

<preference name='phonegap-version' value='cli-6.4.0' />
<gap:plugin name="phonegap-plugin-push" source="npm" spec="https://github.com/tonijn/phonegap-plugin-push#fix-aps-environment">
	<param name="SENDER_ID" value="xxxxxx" />
</gap:plugin>

@macdonst
Copy link
Member

I was talking to the PGB team and Shaz today about this we are working on a fix for y'all.

@rgagne if you ever find that branch or a copy of it shoot me a link.

@rgagne
Copy link

rgagne commented Dec 15, 2016

@macdonst - that branch is gone, but great to hear that a fix is coming (that branch fixed it for me but a backwards compatible fix for older cli versions is even better)
image

@frederikbosch
Copy link

@macdonst That PR only contained these lines.

    <config-file target="*-Debug.plist" parent="aps-environment">
      <string>development</string>
    </config-file>
    <config-file target="*-Release.plist" parent="aps-environment">
      <string>production</string>
     </config-file>

It a try of @tonijn to make 1.8.x support the Entitlements.plist, but then we found out that it was not enough. But now I see the comment by @rgagne. That reminds me that it indeed could work when sets the cordova cli version to 6.4.0 the cordova ios to 4.3.0 and the plugin to that specific branch. I will reopen a new PR with the same content.

@frederikbosch
Copy link

Just opened a new PR.

@tonijn tonijn restored the fix-aps-environment branch December 16, 2016 09:23
@shazron
Copy link
Member

shazron commented Dec 17, 2016

New PR: #1469

@lock
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants