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

Commit

Permalink
Update plugin to use GCM Cocoapods <framework> reference in plugin.xml (
Browse files Browse the repository at this point in the history
#1183)

* Update plugin to use CocoaPods <framework> references in plugin.xml.

Requires cordova-ios 4.3.0 or greater, and cordova-cli 6.4.0 or greater.

Add GoogleCloudMessaging CocoaPod v1.2.0
Add GGLInstanceID CocoaPod v1.2.1
Update package.json for cordovaDependencies cordova and cordova-ios
Update plugin.xml for cordova and cordova-ios dependencies in <engines>

* Update README and INSTALLATION docs for CocoaPods support.

* Updated plugin.xml version to 1.9.0
  • Loading branch information
shazron authored and macdonst committed Nov 1, 2016
1 parent e4779de commit b639d83
Show file tree
Hide file tree
Showing 53 changed files with 41 additions and 1,192 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -4,7 +4,9 @@
# What is this?

This plugin offers support to receive and handle native push notifications with a **single unified API**, and **with no dependency on any other plugins**.
This plugin offers support to receive and handle native push notifications with a **single unified API**.

Starting with version `1.9.0`, this plugin will support `CocoaPods` installation of the `Google Cloud Messaging` library. More details are available in the [Installation](docs/INSTALLATION.md#cocoapods) documentation.

- [Reporting Issues](docs/ISSUES.md)
- [Installation](docs/INSTALLATION.md)
Expand Down
26 changes: 23 additions & 3 deletions docs/INSTALLATION.md
Expand Up @@ -11,8 +11,9 @@
- [Browser quirks](#browser-quirks)
- [Browser Support](#browser-support)
- [iOS details](#ios-details)
- [XCode](#xcode)
- [Xcode](#xcode)
- [Bitcode](#bitcode)
- [CocoaPods](#cocoapods)
- [Additional Resources](#additional-resources)

This requires phonegap/cordova CLI 5.0+
Expand Down Expand Up @@ -191,9 +192,9 @@ Firefox 46+

## iOS details

### XCode
### Xcode

XCode version 7.0 or greater is required for building this plugin.
Xcode version 7.0 or greater is required for building this plugin.

### Bitcode

Expand All @@ -209,6 +210,25 @@ You have two options. The first is to [disable bitcode as per this StackOverflow
cordova platform update ios@4.0.0
```

### CocoaPods

Required `cordova-cli` version: `6.4.0`

Required `cordova-ios` version: `4.3.0`

Version `1.9.0` (and above) of this plugin supports [CocoaPods](https://cocoapods.org) installation of the [Google Cloud Messaging](https://cocoapods.org/pods/GoogleCloudMessaging) library.

If you are installing this plugin using `npm`, and you are using version `6.1.0` or greater of the `cordova-cli`, it will automatically download the right version of this plugin for both your platform and cli.

If you are on a `cordova-cli` version less than `6.1.0`, you will either have to upgrade your `cordova-cli` version, or install the plugin explicitly:

i.e.
```
cordova plugin add phonegap-plugin-push@1.8.1
```

If you are installing this plugin using a `local file reference` or a `git url`, you will have to specify the version of this plugin explicitly (see above) if you don't fulfill the `cordova-cli` and `cordova-ios` requirements.

## Additional Resources

The push plugin enables you to play sounds and display different icons during push (Android only). These additional resources need to be added to your projects `platforms` directory in order for them to be included into your final application binary. One way of doing it is to create a hook to do the copying for you on each build.
Expand Down
9 changes: 6 additions & 3 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "phonegap-plugin-push",
"description": "Register and receive push notifications.",
"version": "1.8.4",
"version": "1.9.0",
"homepage": "http://github.com/phonegap/phonegap-plugin-push#readme",
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,9 +36,12 @@
"cordova-android": ">=4.0.0",
"cordova-ios": ">=4.1.0"
},
"1.9.0": {
"cordova-ios": ">=4.3.0",
"cordova": ">=6.4.0"
},
"2.0.0": {
"cordova": ">100"
}
"cordova": ">100"
}
},
"author": "Adobe PhoneGap Team",
Expand Down
52 changes: 7 additions & 45 deletions plugin.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:amazon="http://schemas.android.com/apk/lib/com.amazon.device.ads" xmlns:rim="http://www.blackberry.com/ns/widgets" id="phonegap-plugin-push" version="1.8.4">
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:amazon="http://schemas.android.com/apk/lib/com.amazon.device.ads" xmlns:rim="http://www.blackberry.com/ns/widgets" id="phonegap-plugin-push" version="1.9.0">
<name>PushPlugin</name>
<description>
This plugin allows your application to receive push notifications on Android, iOS and Windows devices.
Expand All @@ -12,9 +12,9 @@
<clobbers target="PushNotification"/>
</js-module>
<engines>
<engine name="cordova" version=">=3.6.3"/>
<engine name="cordova" version=">=6.4.0"/>
<engine name="cordova-android" version=">=4.0.0"/>
<engine name="cordova-ios" version=">=4.1.0"/>
<engine name="cordova-ios" version=">=4.3.0"/>
</engines>
<preference name="SENDER_ID"/>
<platform name="android">
Expand Down Expand Up @@ -95,52 +95,14 @@
</config-file>
<source-file src="src/ios/AppDelegate+notification.m"/>
<source-file src="src/ios/PushPlugin.m"/>
<source-file target-dir="GCM/Libraries" src="src/ios/Google/Libraries/libGGLCloudMessaging.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/Google/Libraries/libGGLCore.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GGLInstanceID/Libraries/libGGLInstanceIDLib.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleIPhoneUtilities/Libraries/libGIP_Reachability.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleSymbolUtilities/Libraries/libGSDK_Overload.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleNetworkingUtilities/Libraries/libGTMSessionFetcher_core.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleNetworkingUtilities/Libraries/libGTMSessionFetcher_full.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTMStackTrace.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_AddressBook.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_DebugUtils.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_GTMURLBuilder.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_KVO.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_NSData+zlib.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_NSDictionary+URLArguments.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_NSScannerJSON.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_NSStringHTML.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_NSStringXML.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_Regex.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_RoundedRectPath.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_StringEncoding.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_SystemVersion.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_UIFont+LineHeight.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_core.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleUtilities/Libraries/libGTM_iPhone.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleCloudMessaging/Libraries/libGcmLib.a" framework="true"/>
<source-file target-dir="GCM/Libraries" src="src/ios/GoogleInterchangeUtilities/Libraries/libProtocolBuffers.a" framework="true"/>
<header-file src="src/ios/AppDelegate+notification.h"/>
<header-file src="src/ios/PushPlugin.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GGLInstanceID/Headers/Public/GGLInstanceID.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GGLInstanceID/Headers/Public/GGLInstanceIDConfig.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GGLInstanceID/Headers/Public/GGLInstanceIDDelegate.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GGLInstanceID/Headers/Public/GGLInstanceIDHeaders.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/Google/Headers/GGLCloudMessaging/Public/CloudMessaging.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/Google/Headers/GGLCloudMessaging/Public/GGLContext+CloudMessaging.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/Google/Headers/GGLCore/Public/Core.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/Google/Headers/GGLCore/Public/GGLConfiguration.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/Google/Headers/GGLCore/Public/GGLContext.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/Google/Headers/GGLCore/Public/GGLErrorCode.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GoogleCloudMessaging/Headers/Public/GCMConfig.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GoogleCloudMessaging/Headers/Public/GCMPubSub.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GoogleCloudMessaging/Headers/Public/GCMReceiverDelegate.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GoogleCloudMessaging/Headers/Public/GCMService.h"/>
<header-file target-dir="GCM/Headers" src="src/ios/GoogleCloudMessaging/Headers/Public/GoogleCloudMessaging.h"/>
<framework src="AddressBook.framework"/>
<framework src="libsqlite3.tbd"/>
<framework src="libz.tbd"/>
<framework src="GoogleCloudMessaging" type="podspec" spec="~> 1.2.0"/>
<framework src="GGLInstanceID" type="podspec" spec="~> 1.2.1"/>

</platform>
<platform name="windows">
<hook type="after_plugin_install" src="hooks/windows/setToastCapable.js"/>
Expand All @@ -151,4 +113,4 @@
<preference name="WindowsToastCapable" value="true"/>
</config-file>
</platform>
</plugin>
</plugin>

0 comments on commit b639d83

Please sign in to comment.