Latest 1.0.4
Homepage https://github.com/JKshared92/CMPushNotificationService
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, CFNetwork, CoreFoundation, CoreTelephony, SystemConfiguration, CoreGraphics, Foundation, Security, UserNotifications*
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

CMPushNotificationService is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'CMPushNotificationService'

License

CMPushNotificationService is available under the MIT license. See the LICENSE file for more info.

使用方法

  • 创建一个NSOjbect类,遵循CMPushNotificationHandler协议 (例:CMPushManager,下面均使用这个类)

  • 在didFinishLaunchingWithOptions里面注册推送服务

JPushConfig *config = [JPushConfig configWithAppKey:@"" channel:@"" apsForProduction:YES isDebug:YES]; [[CMPushNotificationService sharedManager] configurePushWithLaunchOptions:launchOptions pushConfig:config pushNotificationHandler:[CMPushManager new]];

  • 在需要的地方注册推送

[[CMPushNotificationService sharedManager] registerRemoteNotification];

  • 在视图加载完成的地方开始推送

[[CMPushNotificationService sharedManager] applicationDidLoad];

  • 在CMPushManager.m 实现协议方法即可

  • 具体使用方法可参考Example

Latest podspec

{
    "name": "CMPushNotificationService",
    "version": "1.0.4",
    "summary": "u5bf9u63a8u9001u670du52a1u7684u5c01u88c5",
    "homepage": "https://github.com/JKshared92/CMPushNotificationService",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "comma": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JKshared92/CMPushNotificationService.git",
        "tag": "1.0.4"
    },
    "requires_arc": true,
    "static_framework": true,
    "platforms": {
        "ios": "8.0"
    },
    "xcconfig": {
        "VALID_ARCHS": "arm64 x86_64"
    },
    "frameworks": [
        "UIKit",
        "CFNetwork",
        "CoreFoundation",
        "CoreTelephony",
        "SystemConfiguration",
        "CoreGraphics",
        "Foundation",
        "Security"
    ],
    "weak_frameworks": "UserNotifications",
    "libraries": [
        "resolv",
        "z",
        "sqlite3"
    ],
    "subspecs": [
        {
            "name": "Core",
            "source_files": "CMPushNotificationService/Classes/Core/*.{h,m}",
            "public_header_files": "CMPushNotificationService/Classes/Core/*.h",
            "dependencies": {
                "CMPushNotificationService/JPushLib": [],
                "CMPushNotificationService/XGLib": []
            }
        },
        {
            "name": "JPushLib",
            "dependencies": {
                "JPush": []
            }
        },
        {
            "name": "XGLib",
            "source_files": "CMPushNotificationService/Classes/XGPushLib/*.{h}",
            "vendored_libraries": "CMPushNotificationService/Classes/XGPushLib/*.{a}",
            "public_header_files": "CMPushNotificationService/Classes/XGPushLib/*.{h}"
        }
    ]
}

Pin It on Pinterest

Share This