├── CoreJPush.podspec ├── CoreJPush.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── CoreJPush.xccheckout │ └── xcuserdata │ │ ├── Charlin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── Ted.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── Charlin.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── CoreJPush.xcscheme │ │ └── xcschememanagement.plist │ └── Ted.xcuserdatad │ └── xcschemes │ ├── CoreJPush.xcscheme │ └── xcschememanagement.plist ├── CoreJPush ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── CoreJPush │ ├── Common │ │ ├── AppDelegate+JPush.h │ │ ├── AppDelegate+JPush.m │ │ ├── CoreJPushProtocol.h │ │ └── CoreJPushSingleton.h │ ├── CoreJPush.h │ ├── CoreJPush.m │ └── Lib │ │ ├── JPUSHService.h │ │ └── jpush-ios-2.1.6.a ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── Info.plist ├── ViewController.h ├── ViewController.m ├── main.m ├── oc.h └── sound.caf ├── CoreJPushTests ├── CoreJPushTests.m └── Info.plist ├── LICENSE └── README.md /CoreJPush.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint CoreJPush.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "CoreJPush" 19 | s.version = "1.0.0" 20 | s.summary = "三分钟,五句代码,搞定JPush" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = "CoreJPush,让您五句代码立即搞定JPush,集成到使用只需要3分钟。没错,3分钟!" 28 | 29 | s.homepage = "https://github.com/CharlinFeng/CoreJPush" 30 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 31 | 32 | 33 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 34 | # 35 | # Licensing your code is important. See http://choosealicense.com for more info. 36 | # CocoaPods will detect a license file if there is a named LICENSE* 37 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 38 | # 39 | 40 | s.license = "MIT" 41 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 42 | 43 | 44 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 45 | # 46 | # Specify the authors of the library, with email addresses. Email addresses 47 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 48 | # accepts just a name if you'd rather not provide an email address. 49 | # 50 | # Specify a social_media_url where others can refer to, for example a twitter 51 | # profile URL. 52 | # 53 | 54 | s.author = { "时点软件 冯成林" => "email@address.com" } 55 | # Or just: s.author = "时点软件 冯成林" 56 | # s.authors = { "时点软件 冯成林" => "email@address.com" } 57 | # s.social_media_url = "http://twitter.com/时点软件 冯成林" 58 | 59 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 60 | # 61 | # If this Pod runs only on iOS or OS X, then specify the platform and 62 | # the deployment target. You can optionally include the target after the platform. 63 | # 64 | 65 | # s.platform = :ios 66 | s.platform = :ios, "8.0" 67 | 68 | # When using multiple platforms 69 | s.ios.deployment_target = "8.0" 70 | # s.osx.deployment_target = "10.7" 71 | # s.watchos.deployment_target = "2.0" 72 | # s.tvos.deployment_target = "9.0" 73 | 74 | 75 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 76 | # 77 | # Specify the location from where the source should be retrieved. 78 | # Supports git, hg, bzr, svn and HTTP. 79 | # 80 | 81 | s.source = { :git => "https://github.com/TedLiuHome/CoreJPush.git", :tag => s.version.to_s, :commit => "2cafbfc44c0d761c6c4b7dee528957b7e597fb8a" } 82 | 83 | 84 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 85 | # 86 | # CocoaPods is smart about how it includes source code. For source files 87 | # giving a folder will include any swift, h, m, mm, c & cpp files. 88 | # For header files it will include any header in the folder. 89 | # Not including the public_header_files will make all headers public. 90 | # 91 | 92 | s.source_files = "CoreJPush/CoreJPush/**/*.{h,m,swift}" 93 | # s.exclude_files = "Classes/Exclude" 94 | 95 | # s.public_header_files = "Classes/**/*.h" 96 | 97 | 98 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 99 | # 100 | # A list of resources included with the Pod. These are copied into the 101 | # target bundle with a build phase script. Anything else will be cleaned. 102 | # You can preserve files from being cleaned, please don't preserve 103 | # non-essential files like tests, examples and documentation. 104 | # 105 | 106 | # s.resource = "icon.png" 107 | # s.resources = "Resources/*.png" 108 | 109 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 110 | 111 | 112 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 113 | # 114 | # Link your library with frameworks, or libraries. Libraries do not include 115 | # the lib prefix of their name. 116 | # 117 | 118 | # s.framework = "SomeFramework" 119 | s.frameworks = "Security", "SystemConfiguration","CoreFoundation","CFNetwork" 120 | 121 | s.library = "z" 122 | # s.libraries = "iconv", "xml2" 123 | s.ios.vendored_library = 'CoreJPush/CoreJPush/Lib/jpush-ios-2.1.6.a' 124 | 125 | s.default_subspecs = 'Core', 'UI' 126 | 127 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 128 | # 129 | # If your library depends on compiler flags you can set them in the xcconfig hash 130 | # where they will only apply to your library. If you depend on other Podspecs 131 | # you can include multiple dependencies to ensure it works. 132 | 133 | s.requires_arc = true 134 | 135 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 136 | # s.dependency "JSONKit", "~> 1.4" 137 | 138 | end 139 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 89229F5F1C53329600201995 /* sound.caf in Resources */ = {isa = PBXBuildFile; fileRef = 89229F5E1C53329600201995 /* sound.caf */; }; 11 | 89AA26BE1BAA6F3600B5B018 /* AppDelegate+JPush.m in Sources */ = {isa = PBXBuildFile; fileRef = 89AA26BB1BAA6F3600B5B018 /* AppDelegate+JPush.m */; }; 12 | 89C57EA71BAA4A6800F708E0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EA61BAA4A6800F708E0 /* main.m */; }; 13 | 89C57EAA1BAA4A6800F708E0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EA91BAA4A6800F708E0 /* AppDelegate.m */; }; 14 | 89C57EAD1BAA4A6800F708E0 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EAC1BAA4A6800F708E0 /* ViewController.m */; }; 15 | 89C57EB01BAA4A6800F708E0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 89C57EAE1BAA4A6800F708E0 /* Main.storyboard */; }; 16 | 89C57EB21BAA4A6800F708E0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 89C57EB11BAA4A6800F708E0 /* Images.xcassets */; }; 17 | 89C57EB51BAA4A6800F708E0 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 89C57EB31BAA4A6800F708E0 /* LaunchScreen.xib */; }; 18 | 89C57EC11BAA4A6800F708E0 /* CoreJPushTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EC01BAA4A6800F708E0 /* CoreJPushTests.m */; }; 19 | 89C57ED01BAA5CAA00F708E0 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ECF1BAA5CAA00F708E0 /* CFNetwork.framework */; }; 20 | 89C57ED21BAA5CB600F708E0 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED11BAA5CB600F708E0 /* CoreFoundation.framework */; }; 21 | 89C57ED41BAA5CC400F708E0 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED31BAA5CC400F708E0 /* CoreTelephony.framework */; }; 22 | 89C57ED61BAA5CD000F708E0 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED51BAA5CD000F708E0 /* SystemConfiguration.framework */; }; 23 | 89C57ED81BAA5CDC00F708E0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED71BAA5CDC00F708E0 /* Security.framework */; }; 24 | 89C57EDF1BAA61FE00F708E0 /* CoreJPush.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EDE1BAA61FE00F708E0 /* CoreJPush.m */; }; 25 | 9F16666D1CCDFF040084E354 /* jpush-ios-2.1.6.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F16666B1CCDFF040084E354 /* jpush-ios-2.1.6.a */; }; 26 | 9FBE90DD1CCE07B700276897 /* libz.1.2.5.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FBE90DC1CCE07B700276897 /* libz.1.2.5.tbd */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 89C57EBB1BAA4A6800F708E0 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 89C57E991BAA4A6800F708E0 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 89C57EA01BAA4A6800F708E0; 35 | remoteInfo = CoreJPush; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 89229F5E1C53329600201995 /* sound.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = sound.caf; sourceTree = ""; }; 41 | 89AA26BA1BAA6F3600B5B018 /* AppDelegate+JPush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+JPush.h"; sourceTree = ""; }; 42 | 89AA26BB1BAA6F3600B5B018 /* AppDelegate+JPush.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+JPush.m"; sourceTree = ""; }; 43 | 89AA26BC1BAA6F3600B5B018 /* CoreJPushSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreJPushSingleton.h; sourceTree = ""; }; 44 | 89AA26C01BAA6F8200B5B018 /* CoreJPushProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreJPushProtocol.h; sourceTree = ""; }; 45 | 89C57EA11BAA4A6800F708E0 /* CoreJPush.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CoreJPush.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 89C57EA51BAA4A6800F708E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | 89C57EA61BAA4A6800F708E0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 48 | 89C57EA81BAA4A6800F708E0 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 89C57EA91BAA4A6800F708E0 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 89C57EAB1BAA4A6800F708E0 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 51 | 89C57EAC1BAA4A6800F708E0 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 52 | 89C57EAF1BAA4A6800F708E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 89C57EB11BAA4A6800F708E0 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 54 | 89C57EB41BAA4A6800F708E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 55 | 89C57EBA1BAA4A6800F708E0 /* CoreJPushTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoreJPushTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 89C57EBF1BAA4A6800F708E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 89C57EC01BAA4A6800F708E0 /* CoreJPushTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CoreJPushTests.m; sourceTree = ""; }; 58 | 89C57ECF1BAA5CAA00F708E0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 59 | 89C57ED11BAA5CB600F708E0 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; 60 | 89C57ED31BAA5CC400F708E0 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 61 | 89C57ED51BAA5CD000F708E0 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 62 | 89C57ED71BAA5CDC00F708E0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 63 | 89C57EDD1BAA61FE00F708E0 /* CoreJPush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreJPush.h; sourceTree = ""; }; 64 | 89C57EDE1BAA61FE00F708E0 /* CoreJPush.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreJPush.m; sourceTree = ""; }; 65 | 89FAC4231C59FE6C002336F1 /* oc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = oc.h; sourceTree = ""; }; 66 | 9F16666B1CCDFF040084E354 /* jpush-ios-2.1.6.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "jpush-ios-2.1.6.a"; sourceTree = ""; }; 67 | 9F16666C1CCDFF040084E354 /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = ""; }; 68 | 9FBE90DC1CCE07B700276897 /* libz.1.2.5.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.1.2.5.tbd; path = usr/lib/libz.1.2.5.tbd; sourceTree = SDKROOT; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | 89C57E9E1BAA4A6800F708E0 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | 9FBE90DD1CCE07B700276897 /* libz.1.2.5.tbd in Frameworks */, 77 | 9F16666D1CCDFF040084E354 /* jpush-ios-2.1.6.a in Frameworks */, 78 | 89C57ED81BAA5CDC00F708E0 /* Security.framework in Frameworks */, 79 | 89C57ED61BAA5CD000F708E0 /* SystemConfiguration.framework in Frameworks */, 80 | 89C57ED41BAA5CC400F708E0 /* CoreTelephony.framework in Frameworks */, 81 | 89C57ED21BAA5CB600F708E0 /* CoreFoundation.framework in Frameworks */, 82 | 89C57ED01BAA5CAA00F708E0 /* CFNetwork.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 89C57EB71BAA4A6800F708E0 /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 89A459641C532CC900327914 /* Lib */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 9F16666B1CCDFF040084E354 /* jpush-ios-2.1.6.a */, 100 | 9F16666C1CCDFF040084E354 /* JPUSHService.h */, 101 | ); 102 | path = Lib; 103 | sourceTree = ""; 104 | }; 105 | 89AA26B91BAA6F3600B5B018 /* Common */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 89AA26BA1BAA6F3600B5B018 /* AppDelegate+JPush.h */, 109 | 89AA26BB1BAA6F3600B5B018 /* AppDelegate+JPush.m */, 110 | 89AA26BC1BAA6F3600B5B018 /* CoreJPushSingleton.h */, 111 | 89AA26C01BAA6F8200B5B018 /* CoreJPushProtocol.h */, 112 | ); 113 | path = Common; 114 | sourceTree = ""; 115 | }; 116 | 89C57E981BAA4A6800F708E0 = { 117 | isa = PBXGroup; 118 | children = ( 119 | 89C57EA31BAA4A6800F708E0 /* CoreJPush */, 120 | 89C57EBD1BAA4A6800F708E0 /* CoreJPushTests */, 121 | 89C57EA21BAA4A6800F708E0 /* Products */, 122 | ); 123 | sourceTree = ""; 124 | }; 125 | 89C57EA21BAA4A6800F708E0 /* Products */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 89C57EA11BAA4A6800F708E0 /* CoreJPush.app */, 129 | 89C57EBA1BAA4A6800F708E0 /* CoreJPushTests.xctest */, 130 | ); 131 | name = Products; 132 | sourceTree = ""; 133 | }; 134 | 89C57EA31BAA4A6800F708E0 /* CoreJPush */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 89C57ECA1BAA4A8600F708E0 /* CoreJPush */, 138 | 89C57EA81BAA4A6800F708E0 /* AppDelegate.h */, 139 | 89C57EA91BAA4A6800F708E0 /* AppDelegate.m */, 140 | 89C57EAB1BAA4A6800F708E0 /* ViewController.h */, 141 | 89C57EAC1BAA4A6800F708E0 /* ViewController.m */, 142 | 89229F5E1C53329600201995 /* sound.caf */, 143 | 89C57EAE1BAA4A6800F708E0 /* Main.storyboard */, 144 | 89C57EB11BAA4A6800F708E0 /* Images.xcassets */, 145 | 89C57EB31BAA4A6800F708E0 /* LaunchScreen.xib */, 146 | 89C57EA41BAA4A6800F708E0 /* Supporting Files */, 147 | ); 148 | path = CoreJPush; 149 | sourceTree = ""; 150 | }; 151 | 89C57EA41BAA4A6800F708E0 /* Supporting Files */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 9FBE90DC1CCE07B700276897 /* libz.1.2.5.tbd */, 155 | 89C57ED71BAA5CDC00F708E0 /* Security.framework */, 156 | 89C57ED51BAA5CD000F708E0 /* SystemConfiguration.framework */, 157 | 89C57ED31BAA5CC400F708E0 /* CoreTelephony.framework */, 158 | 89C57ED11BAA5CB600F708E0 /* CoreFoundation.framework */, 159 | 89C57ECF1BAA5CAA00F708E0 /* CFNetwork.framework */, 160 | 89C57EA51BAA4A6800F708E0 /* Info.plist */, 161 | 89C57EA61BAA4A6800F708E0 /* main.m */, 162 | 89FAC4231C59FE6C002336F1 /* oc.h */, 163 | ); 164 | name = "Supporting Files"; 165 | sourceTree = ""; 166 | }; 167 | 89C57EBD1BAA4A6800F708E0 /* CoreJPushTests */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 89C57EC01BAA4A6800F708E0 /* CoreJPushTests.m */, 171 | 89C57EBE1BAA4A6800F708E0 /* Supporting Files */, 172 | ); 173 | path = CoreJPushTests; 174 | sourceTree = ""; 175 | }; 176 | 89C57EBE1BAA4A6800F708E0 /* Supporting Files */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 89C57EBF1BAA4A6800F708E0 /* Info.plist */, 180 | ); 181 | name = "Supporting Files"; 182 | sourceTree = ""; 183 | }; 184 | 89C57ECA1BAA4A8600F708E0 /* CoreJPush */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 89A459641C532CC900327914 /* Lib */, 188 | 89AA26B91BAA6F3600B5B018 /* Common */, 189 | 89C57EDD1BAA61FE00F708E0 /* CoreJPush.h */, 190 | 89C57EDE1BAA61FE00F708E0 /* CoreJPush.m */, 191 | ); 192 | path = CoreJPush; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXGroup section */ 196 | 197 | /* Begin PBXNativeTarget section */ 198 | 89C57EA01BAA4A6800F708E0 /* CoreJPush */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = 89C57EC41BAA4A6800F708E0 /* Build configuration list for PBXNativeTarget "CoreJPush" */; 201 | buildPhases = ( 202 | 89C57E9D1BAA4A6800F708E0 /* Sources */, 203 | 89C57E9E1BAA4A6800F708E0 /* Frameworks */, 204 | 89C57E9F1BAA4A6800F708E0 /* Resources */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | ); 210 | name = CoreJPush; 211 | productName = CoreJPush; 212 | productReference = 89C57EA11BAA4A6800F708E0 /* CoreJPush.app */; 213 | productType = "com.apple.product-type.application"; 214 | }; 215 | 89C57EB91BAA4A6800F708E0 /* CoreJPushTests */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = 89C57EC71BAA4A6800F708E0 /* Build configuration list for PBXNativeTarget "CoreJPushTests" */; 218 | buildPhases = ( 219 | 89C57EB61BAA4A6800F708E0 /* Sources */, 220 | 89C57EB71BAA4A6800F708E0 /* Frameworks */, 221 | 89C57EB81BAA4A6800F708E0 /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | 89C57EBC1BAA4A6800F708E0 /* PBXTargetDependency */, 227 | ); 228 | name = CoreJPushTests; 229 | productName = CoreJPushTests; 230 | productReference = 89C57EBA1BAA4A6800F708E0 /* CoreJPushTests.xctest */; 231 | productType = "com.apple.product-type.bundle.unit-test"; 232 | }; 233 | /* End PBXNativeTarget section */ 234 | 235 | /* Begin PBXProject section */ 236 | 89C57E991BAA4A6800F708E0 /* Project object */ = { 237 | isa = PBXProject; 238 | attributes = { 239 | LastSwiftUpdateCheck = 0720; 240 | LastUpgradeCheck = 0730; 241 | ORGANIZATIONNAME = "冯成林"; 242 | TargetAttributes = { 243 | 89C57EA01BAA4A6800F708E0 = { 244 | CreatedOnToolsVersion = 6.4; 245 | DevelopmentTeam = 27P55QDC67; 246 | SystemCapabilities = { 247 | com.apple.BackgroundModes = { 248 | enabled = 1; 249 | }; 250 | }; 251 | }; 252 | 89C57EB91BAA4A6800F708E0 = { 253 | CreatedOnToolsVersion = 6.4; 254 | DevelopmentTeam = WWAP5K9XGA; 255 | TestTargetID = 89C57EA01BAA4A6800F708E0; 256 | }; 257 | }; 258 | }; 259 | buildConfigurationList = 89C57E9C1BAA4A6800F708E0 /* Build configuration list for PBXProject "CoreJPush" */; 260 | compatibilityVersion = "Xcode 3.2"; 261 | developmentRegion = English; 262 | hasScannedForEncodings = 0; 263 | knownRegions = ( 264 | en, 265 | Base, 266 | ); 267 | mainGroup = 89C57E981BAA4A6800F708E0; 268 | productRefGroup = 89C57EA21BAA4A6800F708E0 /* Products */; 269 | projectDirPath = ""; 270 | projectRoot = ""; 271 | targets = ( 272 | 89C57EA01BAA4A6800F708E0 /* CoreJPush */, 273 | 89C57EB91BAA4A6800F708E0 /* CoreJPushTests */, 274 | ); 275 | }; 276 | /* End PBXProject section */ 277 | 278 | /* Begin PBXResourcesBuildPhase section */ 279 | 89C57E9F1BAA4A6800F708E0 /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | 89C57EB01BAA4A6800F708E0 /* Main.storyboard in Resources */, 284 | 89229F5F1C53329600201995 /* sound.caf in Resources */, 285 | 89C57EB51BAA4A6800F708E0 /* LaunchScreen.xib in Resources */, 286 | 89C57EB21BAA4A6800F708E0 /* Images.xcassets in Resources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 89C57EB81BAA4A6800F708E0 /* Resources */ = { 291 | isa = PBXResourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | /* End PBXResourcesBuildPhase section */ 298 | 299 | /* Begin PBXSourcesBuildPhase section */ 300 | 89C57E9D1BAA4A6800F708E0 /* Sources */ = { 301 | isa = PBXSourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | 89C57EAD1BAA4A6800F708E0 /* ViewController.m in Sources */, 305 | 89C57EDF1BAA61FE00F708E0 /* CoreJPush.m in Sources */, 306 | 89C57EAA1BAA4A6800F708E0 /* AppDelegate.m in Sources */, 307 | 89C57EA71BAA4A6800F708E0 /* main.m in Sources */, 308 | 89AA26BE1BAA6F3600B5B018 /* AppDelegate+JPush.m in Sources */, 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | }; 312 | 89C57EB61BAA4A6800F708E0 /* Sources */ = { 313 | isa = PBXSourcesBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | 89C57EC11BAA4A6800F708E0 /* CoreJPushTests.m in Sources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | /* End PBXSourcesBuildPhase section */ 321 | 322 | /* Begin PBXTargetDependency section */ 323 | 89C57EBC1BAA4A6800F708E0 /* PBXTargetDependency */ = { 324 | isa = PBXTargetDependency; 325 | target = 89C57EA01BAA4A6800F708E0 /* CoreJPush */; 326 | targetProxy = 89C57EBB1BAA4A6800F708E0 /* PBXContainerItemProxy */; 327 | }; 328 | /* End PBXTargetDependency section */ 329 | 330 | /* Begin PBXVariantGroup section */ 331 | 89C57EAE1BAA4A6800F708E0 /* Main.storyboard */ = { 332 | isa = PBXVariantGroup; 333 | children = ( 334 | 89C57EAF1BAA4A6800F708E0 /* Base */, 335 | ); 336 | name = Main.storyboard; 337 | sourceTree = ""; 338 | }; 339 | 89C57EB31BAA4A6800F708E0 /* LaunchScreen.xib */ = { 340 | isa = PBXVariantGroup; 341 | children = ( 342 | 89C57EB41BAA4A6800F708E0 /* Base */, 343 | ); 344 | name = LaunchScreen.xib; 345 | sourceTree = ""; 346 | }; 347 | /* End PBXVariantGroup section */ 348 | 349 | /* Begin XCBuildConfiguration section */ 350 | 89C57EC21BAA4A6800F708E0 /* Debug */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ALWAYS_SEARCH_USER_PATHS = NO; 354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 355 | CLANG_CXX_LIBRARY = "libc++"; 356 | CLANG_ENABLE_MODULES = YES; 357 | CLANG_ENABLE_OBJC_ARC = YES; 358 | CLANG_WARN_BOOL_CONVERSION = YES; 359 | CLANG_WARN_CONSTANT_CONVERSION = YES; 360 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 361 | CLANG_WARN_EMPTY_BODY = YES; 362 | CLANG_WARN_ENUM_CONVERSION = YES; 363 | CLANG_WARN_INT_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | CODE_SIGN_IDENTITY = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 368 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 369 | COPY_PHASE_STRIP = NO; 370 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 371 | ENABLE_STRICT_OBJC_MSGSEND = YES; 372 | ENABLE_TESTABILITY = YES; 373 | GCC_C_LANGUAGE_STANDARD = gnu99; 374 | GCC_DYNAMIC_NO_PIC = NO; 375 | GCC_NO_COMMON_BLOCKS = YES; 376 | GCC_OPTIMIZATION_LEVEL = 0; 377 | GCC_PREPROCESSOR_DEFINITIONS = ( 378 | "DEBUG=1", 379 | "$(inherited)", 380 | ); 381 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 382 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 383 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 384 | GCC_WARN_UNDECLARED_SELECTOR = YES; 385 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 386 | GCC_WARN_UNUSED_FUNCTION = YES; 387 | GCC_WARN_UNUSED_VARIABLE = YES; 388 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 389 | MTL_ENABLE_DEBUG_INFO = YES; 390 | ONLY_ACTIVE_ARCH = YES; 391 | PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; 392 | SDKROOT = iphoneos; 393 | }; 394 | name = Debug; 395 | }; 396 | 89C57EC31BAA4A6800F708E0 /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ALWAYS_SEARCH_USER_PATHS = NO; 400 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 401 | CLANG_CXX_LIBRARY = "libc++"; 402 | CLANG_ENABLE_MODULES = YES; 403 | CLANG_ENABLE_OBJC_ARC = YES; 404 | CLANG_WARN_BOOL_CONVERSION = YES; 405 | CLANG_WARN_CONSTANT_CONVERSION = YES; 406 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 407 | CLANG_WARN_EMPTY_BODY = YES; 408 | CLANG_WARN_ENUM_CONVERSION = YES; 409 | CLANG_WARN_INT_CONVERSION = YES; 410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 411 | CLANG_WARN_UNREACHABLE_CODE = YES; 412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 413 | CODE_SIGN_IDENTITY = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 414 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 415 | COPY_PHASE_STRIP = NO; 416 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 417 | ENABLE_NS_ASSERTIONS = NO; 418 | ENABLE_STRICT_OBJC_MSGSEND = YES; 419 | GCC_C_LANGUAGE_STANDARD = gnu99; 420 | GCC_NO_COMMON_BLOCKS = YES; 421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 423 | GCC_WARN_UNDECLARED_SELECTOR = YES; 424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 425 | GCC_WARN_UNUSED_FUNCTION = YES; 426 | GCC_WARN_UNUSED_VARIABLE = YES; 427 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 428 | MTL_ENABLE_DEBUG_INFO = NO; 429 | PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; 430 | SDKROOT = iphoneos; 431 | VALIDATE_PRODUCT = YES; 432 | }; 433 | name = Release; 434 | }; 435 | 89C57EC51BAA4A6800F708E0 /* Debug */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 440 | CLANG_ENABLE_MODULES = YES; 441 | CODE_SIGN_IDENTITY = "iPhone Developer"; 442 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 443 | ENABLE_BITCODE = NO; 444 | HEADER_SEARCH_PATHS = ( 445 | "$(inherited)", 446 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 447 | "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", 448 | ); 449 | INFOPLIST_FILE = CoreJPush/Info.plist; 450 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 452 | LIBRARY_SEARCH_PATHS = ( 453 | "$(inherited)", 454 | "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", 455 | ); 456 | PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | PROVISIONING_PROFILE = "40bb375d-88f8-442c-af2e-82c8c0ca15f9"; 459 | SWIFT_OBJC_BRIDGING_HEADER = /Users/Charlin/Documents/ShiDian/Github/CoreJPush/CoreJPush/oc.h; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | }; 462 | name = Debug; 463 | }; 464 | 89C57EC61BAA4A6800F708E0 /* Release */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 468 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 469 | CLANG_ENABLE_MODULES = YES; 470 | CODE_SIGN_IDENTITY = "iPhone Developer"; 471 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 472 | ENABLE_BITCODE = NO; 473 | HEADER_SEARCH_PATHS = ( 474 | "$(inherited)", 475 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 476 | "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", 477 | ); 478 | INFOPLIST_FILE = CoreJPush/Info.plist; 479 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 481 | LIBRARY_SEARCH_PATHS = ( 482 | "$(inherited)", 483 | "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", 484 | ); 485 | PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | PROVISIONING_PROFILE = "40bb375d-88f8-442c-af2e-82c8c0ca15f9"; 488 | SWIFT_OBJC_BRIDGING_HEADER = /Users/Charlin/Documents/ShiDian/Github/CoreJPush/CoreJPush/oc.h; 489 | }; 490 | name = Release; 491 | }; 492 | 89C57EC81BAA4A6800F708E0 /* Debug */ = { 493 | isa = XCBuildConfiguration; 494 | buildSettings = { 495 | BUNDLE_LOADER = "$(TEST_HOST)"; 496 | CODE_SIGN_IDENTITY = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 497 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 498 | FRAMEWORK_SEARCH_PATHS = ( 499 | "$(SDKROOT)/Developer/Library/Frameworks", 500 | "$(inherited)", 501 | ); 502 | GCC_PREPROCESSOR_DEFINITIONS = ( 503 | "DEBUG=1", 504 | "$(inherited)", 505 | ); 506 | INFOPLIST_FILE = CoreJPushTests/Info.plist; 507 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 508 | PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; 509 | PRODUCT_NAME = "$(TARGET_NAME)"; 510 | PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; 511 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CoreJPush.app/CoreJPush"; 512 | }; 513 | name = Debug; 514 | }; 515 | 89C57EC91BAA4A6800F708E0 /* Release */ = { 516 | isa = XCBuildConfiguration; 517 | buildSettings = { 518 | BUNDLE_LOADER = "$(TEST_HOST)"; 519 | CODE_SIGN_IDENTITY = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 520 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; 521 | FRAMEWORK_SEARCH_PATHS = ( 522 | "$(SDKROOT)/Developer/Library/Frameworks", 523 | "$(inherited)", 524 | ); 525 | INFOPLIST_FILE = CoreJPushTests/Info.plist; 526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 527 | PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; 530 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CoreJPush.app/CoreJPush"; 531 | }; 532 | name = Release; 533 | }; 534 | /* End XCBuildConfiguration section */ 535 | 536 | /* Begin XCConfigurationList section */ 537 | 89C57E9C1BAA4A6800F708E0 /* Build configuration list for PBXProject "CoreJPush" */ = { 538 | isa = XCConfigurationList; 539 | buildConfigurations = ( 540 | 89C57EC21BAA4A6800F708E0 /* Debug */, 541 | 89C57EC31BAA4A6800F708E0 /* Release */, 542 | ); 543 | defaultConfigurationIsVisible = 0; 544 | defaultConfigurationName = Release; 545 | }; 546 | 89C57EC41BAA4A6800F708E0 /* Build configuration list for PBXNativeTarget "CoreJPush" */ = { 547 | isa = XCConfigurationList; 548 | buildConfigurations = ( 549 | 89C57EC51BAA4A6800F708E0 /* Debug */, 550 | 89C57EC61BAA4A6800F708E0 /* Release */, 551 | ); 552 | defaultConfigurationIsVisible = 0; 553 | defaultConfigurationName = Release; 554 | }; 555 | 89C57EC71BAA4A6800F708E0 /* Build configuration list for PBXNativeTarget "CoreJPushTests" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | 89C57EC81BAA4A6800F708E0 /* Debug */, 559 | 89C57EC91BAA4A6800F708E0 /* Release */, 560 | ); 561 | defaultConfigurationIsVisible = 0; 562 | defaultConfigurationName = Release; 563 | }; 564 | /* End XCConfigurationList section */ 565 | }; 566 | rootObject = 89C57E991BAA4A6800F708E0 /* Project object */; 567 | } 568 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/project.xcworkspace/xcshareddata/CoreJPush.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | BBECAB70-FE42-4CDE-B544-9A997A844D71 9 | IDESourceControlProjectName 10 | CoreJPush 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 68460BB4DF43C2BCB607975F9352175AADF3D988 14 | https://github.com/CharlinFeng/CoreJPush.git 15 | 16 | IDESourceControlProjectPath 17 | CoreJPush.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 68460BB4DF43C2BCB607975F9352175AADF3D988 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/CharlinFeng/CoreJPush.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 68460BB4DF43C2BCB607975F9352175AADF3D988 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 68460BB4DF43C2BCB607975F9352175AADF3D988 36 | IDESourceControlWCCName 37 | CoreJPush 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/project.xcworkspace/xcuserdata/Charlin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharlinFeng/CoreJPush/afa20141c270fc6125ac1606303cf7bd79a52684/CoreJPush.xcodeproj/project.xcworkspace/xcuserdata/Charlin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/project.xcworkspace/xcuserdata/Ted.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharlinFeng/CoreJPush/afa20141c270fc6125ac1606303cf7bd79a52684/CoreJPush.xcodeproj/project.xcworkspace/xcuserdata/Ted.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/xcuserdata/Charlin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/xcuserdata/Charlin.xcuserdatad/xcschemes/CoreJPush.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/xcuserdata/Charlin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CoreJPush.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 89C57EA01BAA4A6800F708E0 16 | 17 | primary 18 | 19 | 20 | 89C57EB91BAA4A6800F708E0 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/CoreJPush.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CoreJPush.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 89C57EA01BAA4A6800F708E0 16 | 17 | primary 18 | 19 | 20 | 89C57EB91BAA4A6800F708E0 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CoreJPush/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /CoreJPush/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "CoreJPush.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | 22 | //注册JPush 23 | [CoreJPush registerJPush:launchOptions]; 24 | 25 | return YES; 26 | } 27 | 28 | 29 | 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /CoreJPush/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /CoreJPush/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/Common/AppDelegate+JPush.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate+JPush.h 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate (JPush) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/Common/AppDelegate+JPush.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate+JPush.m 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate+JPush.h" 10 | #import "JPUSHService.h" 11 | #import "CoreJPush.h" 12 | 13 | @implementation AppDelegate (JPush) 14 | 15 | 16 | - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { 17 | 18 | // Required 19 | [JPUSHService registerDeviceToken:deviceToken]; 20 | } 21 | 22 | - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { 23 | 24 | // Required,For systems with less than or equal to iOS6 25 | [JPUSHService handleRemoteNotification:userInfo]; 26 | } 27 | 28 | - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { 29 | 30 | // IOS 7 Support Required 31 | [JPUSHService handleRemoteNotification:userInfo]; 32 | completionHandler(UIBackgroundFetchResultNewData); 33 | 34 | CoreJPush *jpush = [CoreJPush sharedCoreJPush]; 35 | [jpush didReceiveRemoteNotification:userInfo]; 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/Common/CoreJPushProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreJPushProtocol.h 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | @protocol CoreJPushProtocol 10 | 11 | @required 12 | -(void)didReceiveRemoteNotification:(NSDictionary *)userInfo; 13 | 14 | 15 | @end -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/Common/CoreJPushSingleton.h: -------------------------------------------------------------------------------- 1 | // .h文件 2 | #define HMSingletonH(name) + (instancetype)shared##name; 3 | 4 | // .m文件 5 | #if __has_feature(objc_arc) 6 | 7 | #define HMSingletonM(name) \ 8 | static id _instace; \ 9 | \ 10 | + (id)allocWithZone:(struct _NSZone *)zone \ 11 | { \ 12 | static dispatch_once_t onceToken; \ 13 | dispatch_once(&onceToken, ^{ \ 14 | _instace = [super allocWithZone:zone]; \ 15 | }); \ 16 | return _instace; \ 17 | } \ 18 | \ 19 | + (instancetype)shared##name \ 20 | { \ 21 | static dispatch_once_t onceToken; \ 22 | dispatch_once(&onceToken, ^{ \ 23 | _instace = [[self alloc] init]; \ 24 | }); \ 25 | return _instace; \ 26 | } \ 27 | \ 28 | - (id)copyWithZone:(NSZone *)zone \ 29 | { \ 30 | return _instace; \ 31 | } 32 | 33 | #else 34 | 35 | #define HMSingletonM(name) \ 36 | static id _instace; \ 37 | \ 38 | + (id)allocWithZone:(struct _NSZone *)zone \ 39 | { \ 40 | static dispatch_once_t onceToken; \ 41 | dispatch_once(&onceToken, ^{ \ 42 | _instace = [super allocWithZone:zone]; \ 43 | }); \ 44 | return _instace; \ 45 | } \ 46 | \ 47 | + (instancetype)shared##name \ 48 | { \ 49 | static dispatch_once_t onceToken; \ 50 | dispatch_once(&onceToken, ^{ \ 51 | _instace = [[self alloc] init]; \ 52 | }); \ 53 | return _instace; \ 54 | } \ 55 | \ 56 | - (id)copyWithZone:(NSZone *)zone \ 57 | { \ 58 | return _instace; \ 59 | } \ 60 | \ 61 | - (oneway void)release { } \ 62 | - (id)retain { return self; } \ 63 | - (NSUInteger)retainCount { return 1;} \ 64 | - (id)autorelease { return self;} 65 | 66 | #endif -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/CoreJPush.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreJPush.h 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate+JPush.h" 11 | #import "CoreJPushSingleton.h" 12 | #import "CoreJPushProtocol.h" 13 | #import "JPUSHService.h" 14 | @interface CoreJPush : NSObject 15 | HMSingletonH(CoreJPush) 16 | 17 | 18 | /** 注册JPush */ 19 | +(void)registerJPush:(NSDictionary *)launchOptions; 20 | 21 | 22 | /** 添加监听者 */ 23 | +(void)addJPushListener:(id)listener; 24 | 25 | /** 移除监听者 */ 26 | +(void)removeJPushListener:(id)listener; 27 | 28 | 29 | /** 注册alias、tags */ 30 | +(void)setTags:(NSSet *)tags alias:(NSString *)alias resBlock:(void(^)(BOOL res, NSSet *tags,NSString *alias))resBlock; 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/CoreJPush.m: -------------------------------------------------------------------------------- 1 | // 2 | // CoreJPush.m 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import "CoreJPush.h" 10 | #import "JPUSHService.h" 11 | #import 12 | 13 | 14 | #define JPushAppKey @"da9152d6421af29ecf6f36aa" 15 | #define JPushChannel @"AppStore" 16 | #define JPushIsProduction NO 17 | 18 | @interface CoreJPush () 19 | 20 | @property (nonatomic,strong) NSMutableArray *listenerM; 21 | 22 | @property (nonatomic,copy) void(^ResBlock)(BOOL res, NSSet *tags,NSString *alias); 23 | 24 | @end 25 | 26 | 27 | 28 | @implementation CoreJPush 29 | HMSingletonM(CoreJPush) 30 | 31 | 32 | /** 注册JPush */ 33 | +(void)registerJPush:(NSDictionary *)launchOptions{ 34 | 35 | // Required 36 | //可以添加自定义categories 37 | [JPUSHService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge | 38 | UIUserNotificationTypeSound | 39 | UIUserNotificationTypeAlert) 40 | categories:nil]; 41 | 42 | // Required 43 | //如需兼容旧版本的方式,请依旧使用[JPUSHService setupWithOption:launchOptions]方式初始化和同时使用pushConfig.plist文件声明appKey等配置内容。 44 | [JPUSHService setupWithOption:launchOptions appKey:JPushAppKey channel:JPushChannel apsForProduction:JPushIsProduction]; 45 | 46 | } 47 | 48 | 49 | 50 | /** 添加监听者 */ 51 | +(void)addJPushListener:(id)listener{ 52 | 53 | CoreJPush *jpush = [CoreJPush sharedCoreJPush]; 54 | 55 | if([jpush.listenerM containsObject:listener]) return; 56 | 57 | [jpush.listenerM addObject:listener]; 58 | } 59 | 60 | 61 | /** 移除监听者 */ 62 | +(void)removeJPushListener:(id)listener{ 63 | 64 | CoreJPush *jpush = [CoreJPush sharedCoreJPush]; 65 | 66 | if(![jpush.listenerM containsObject:listener]) return; 67 | 68 | [jpush.listenerM removeObject:listener]; 69 | } 70 | 71 | 72 | -(NSMutableArray *)listenerM{ 73 | 74 | if(_listenerM==nil){ 75 | _listenerM = [NSMutableArray array]; 76 | } 77 | 78 | return _listenerM; 79 | } 80 | 81 | 82 | -(void)didReceiveRemoteNotification:(NSDictionary *)userInfo{ 83 | 84 | [self handleBadge:[userInfo[@"aps"][@"badge"] integerValue]]; 85 | 86 | if(self.listenerM.count==0) return; 87 | 88 | [self.listenerM enumerateObjectsUsingBlock:^(id listener, NSUInteger idx, BOOL *stop) { 89 | 90 | if([listener respondsToSelector:@selector(didReceiveRemoteNotification:)]) [listener didReceiveRemoteNotification:userInfo]; 91 | }]; 92 | } 93 | 94 | 95 | 96 | /** 处理badge */ 97 | -(void)handleBadge:(NSInteger)badge{ 98 | 99 | NSInteger now = badge-1; 100 | [[UIApplication sharedApplication] cancelAllLocalNotifications]; 101 | [UIApplication sharedApplication].applicationIconBadgeNumber=0; 102 | [UIApplication sharedApplication].applicationIconBadgeNumber=now; 103 | [JPUSHService setBadge:now]; 104 | } 105 | 106 | 107 | 108 | +(void)setTags:(NSSet *)tags alias:(NSString *)alias resBlock:(void(^)(BOOL res, NSSet *tags,NSString *alias))resBlock{ 109 | 110 | CoreJPush *jpush = [CoreJPush sharedCoreJPush]; 111 | 112 | [JPUSHService setTags:tags alias:alias callbackSelector:@selector(tagsAliasCallback:tags:alias:) object:jpush]; 113 | 114 | jpush.ResBlock=resBlock; 115 | } 116 | 117 | 118 | -(void)tagsAliasCallback:(int)iResCode tags:(NSSet *)tags alias:(NSString *)alias{ 119 | 120 | if(self.ResBlock != nil) self.ResBlock(iResCode==0,tags,alias); 121 | } 122 | 123 | 124 | @end 125 | -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/Lib/JPUSHService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * | | | | \ \ / / | | | | / _______| 3 | * | |____| | \ \/ / | |____| | / / 4 | * | |____| | \ / | |____| | | | _____ 5 | * | | | | / \ | | | | | | |____ | 6 | * | | | | / /\ \ | | | | \ \______| | 7 | * | | | | /_/ \_\ | | | | \_________| 8 | * 9 | * Copyright (c) 2011 ~ 2015 Shenzhen HXHG. All rights reserved. 10 | */ 11 | 12 | #define JPUSH_VERSION_NUMBER 2.1.6 13 | 14 | #import 15 | 16 | @class CLRegion; 17 | @class UILocalNotification; 18 | 19 | extern NSString *const kJPFNetworkIsConnectingNotification; // 正在连接中 20 | extern NSString *const kJPFNetworkDidSetupNotification; // 建立连接 21 | extern NSString *const kJPFNetworkDidCloseNotification; // 关闭连接 22 | extern NSString *const kJPFNetworkDidRegisterNotification; // 注册成功 23 | extern NSString *const kJPFNetworkDidLoginNotification; // 登录成功 24 | extern NSString *const kJPFNetworkDidReceiveMessageNotification; // 收到消息(非APNS) 25 | extern NSString *const kJPFServiceErrorNotification; // 错误提示 26 | 27 | @class CLLocation; 28 | 29 | 30 | /*! 31 | * JPush 核心头文件 32 | */ 33 | @interface JPUSHService : NSObject 34 | 35 | 36 | ///---------------------------------------------------- 37 | /// @name Setup 启动相关 38 | ///---------------------------------------------------- 39 | 40 | /*! 41 | * @abstract 启动SDK 42 | * 43 | * @discussion 这是旧版本的启动方法, 依赖于 PushConfig.plist 文件. 建议不要使用, 已经过期. 44 | */ 45 | + (void)setupWithOption:(NSDictionary *)launchingOption __attribute__((deprecated("JPush 2.1.0 版本已过期"))); 46 | 47 | /*! 48 | * @abstract 启动SDK 49 | * 50 | * @param launchingOption 启动参数. 51 | * @param appKey 一个JPush 应用必须的,唯一的标识. 请参考 JPush 相关说明文档来获取这个标识. 52 | * @param channel 发布渠道. 可选. 53 | * @param isProduction 是否生产环境. 如果为开发状态,设置为 NO; 如果为生产状态,应改为 YES. 54 | * @param advertisingIdentifier 广告标识符(IDFA) 如果不需要使用IDFA,传nil. 55 | * 56 | * @discussion 提供SDK启动必须的参数, 来启动 SDK. 57 | * 此接口必须在 App 启动时调用, 否则 JPush SDK 将无法正常工作. 58 | */ 59 | + (void)setupWithOption:(NSDictionary *)launchingOption 60 | appKey:(NSString *)appKey 61 | channel:(NSString *)channel 62 | apsForProduction:(BOOL)isProduction; 63 | 64 | 65 | + (void)setupWithOption:(NSDictionary *)launchingOption 66 | appKey:(NSString *)appKey 67 | channel:(NSString *)channel 68 | apsForProduction:(BOOL)isProduction 69 | advertisingIdentifier:(NSString *)advertisingId; 70 | 71 | 72 | ///---------------------------------------------------- 73 | /// @name APNs about 通知相关 74 | ///---------------------------------------------------- 75 | 76 | /*! 77 | * @abstract 注册要处理的远程通知类型 78 | * 79 | * @param types 通知类型 80 | * @param categories 81 | * 82 | * @discussion 83 | */ 84 | + (void)registerForRemoteNotificationTypes:(NSUInteger)types 85 | categories:(NSSet *)categories; 86 | 87 | + (void)registerDeviceToken:(NSData *)deviceToken; 88 | 89 | 90 | /*! 91 | * @abstract 处理收到的 APNs 消息 92 | */ 93 | + (void)handleRemoteNotification:(NSDictionary *)remoteInfo; 94 | 95 | 96 | ///---------------------------------------------------- 97 | /// @name Tag alias setting 设置别名与标签 98 | ///---------------------------------------------------- 99 | 100 | /*! 101 | * 下面的接口是可选的 102 | * 设置标签和(或)别名(若参数为nil,则忽略;若是空对象,则清空;详情请参考文档:http://docs.jpush.io/client/ios_api/#api-ios) 103 | * setTags:alias:fetchCompletionHandle:是新的设置标签别名的方法,不再需要显示声明回调函数,只需要在block里面处理设置结果即可. 104 | * WARN: 使用block时需要注意循环引用问题 105 | */ 106 | + (void) setTags:(NSSet *)tags 107 | alias:(NSString *)alias 108 | callbackSelector:(SEL)cbSelector 109 | target:(id)theTarget __attribute__((deprecated("JPush 2.1.1 版本已过期")));; 110 | 111 | + (void) setTags:(NSSet *)tags 112 | alias:(NSString *)alias 113 | callbackSelector:(SEL)cbSelector 114 | object:(id)theTarget; 115 | 116 | + (void) setTags:(NSSet *)tags 117 | callbackSelector:(SEL)cbSelector 118 | object:(id)theTarget; 119 | 120 | + (void)setTags:(NSSet *)tags 121 | alias:(NSString *)alias 122 | fetchCompletionHandle:(void (^)(int iResCode, NSSet *iTags, NSString *iAlias))completionHandler; 123 | 124 | + (void) setTags:(NSSet *)tags 125 | aliasInbackground:(NSString *)alias; 126 | 127 | + (void)setAlias:(NSString *)alias 128 | callbackSelector:(SEL)cbSelector 129 | object:(id)theTarget; 130 | 131 | /*! 132 | * @abstract 过滤掉无效的 tags 133 | * 134 | * @discussion 如果 tags 数量超过限制数量, 则返回靠前的有效的 tags. 135 | * 建议设置 tags 前用此接口校验. SDK 内部也会基于此接口来做过滤. 136 | */ 137 | + (NSSet *)filterValidTags:(NSSet *)tags; 138 | 139 | 140 | ///---------------------------------------------------- 141 | /// @name Stats 统计功能 142 | ///---------------------------------------------------- 143 | 144 | /*! 145 | * @abstract 开始记录页面停留 146 | * 147 | * @param pageName 页面名称 148 | */ 149 | + (void)startLogPageView:(NSString *)pageName; 150 | 151 | /*! 152 | * @abstract 停止记录页面停留 153 | * 154 | * @param pageName 页面 155 | */ 156 | + (void)stopLogPageView:(NSString *)pageName; 157 | 158 | /*! 159 | * @abstract 直接上报在页面的停留时工 160 | * 161 | * @param pageName 页面 162 | * @param seconds 停留的秒数 163 | */ 164 | + (void)beginLogPageView:(NSString *)pageName duration:(int)seconds; 165 | 166 | /*! 167 | * @abstract 开启Crash日志收集 168 | * 169 | * @discussion 默认是关闭状态. 170 | */ 171 | + (void)crashLogON; 172 | 173 | /*! 174 | * @abstract 地理位置上报 175 | * 176 | * @param latitude 纬度. 177 | * @param longitude 经度. 178 | * 179 | */ 180 | + (void)setLatitude:(double)latitude longitude:(double)longitude; 181 | 182 | /*! 183 | * @abstract 地理位置上报 184 | * 185 | * @param location 直接传递 CLLocation * 型的地理信息 186 | * 187 | * @discussion 需要链接 CoreLocation.framework 并且 #import 188 | */ 189 | + (void)setLocation:(CLLocation *)location; 190 | 191 | 192 | ///---------------------------------------------------- 193 | /// @name Local Notification 本地通知 194 | ///---------------------------------------------------- 195 | 196 | /*! 197 | * @abstract 本地推送,最多支持64个 198 | * 199 | * @param fireDate 本地推送触发的时间 200 | * @param alertBody 本地推送需要显示的内容 201 | * @param badge 角标的数字。如果不需要改变角标传-1 202 | * @param alertAction 弹框的按钮显示的内容(IOS 8默认为"打开", 其他默认为"启动") 203 | * @param notificationKey 本地推送标示符 204 | * @param userInfo 自定义参数,可以用来标识推送和增加附加信息 205 | * @param soundName 自定义通知声音,设置为nil为默认声音 206 | * 207 | * @discussion 最多支持 64 个定义 208 | */ 209 | + (UILocalNotification *)setLocalNotification:(NSDate *)fireDate 210 | alertBody:(NSString *)alertBody 211 | badge:(int)badge 212 | alertAction:(NSString *)alertAction 213 | identifierKey:(NSString *)notificationKey 214 | userInfo:(NSDictionary *)userInfo 215 | soundName:(NSString *)soundName; 216 | 217 | /*! 218 | * @abstract 本地推送 (支持 iOS8 新参数) 219 | * 220 | * IOS8新参数 221 | * @param region 自定义参数 222 | * @param regionTriggersOnce 自定义参数 223 | * @param category 自定义参数 224 | */ 225 | + (UILocalNotification *)setLocalNotification:(NSDate *)fireDate 226 | alertBody:(NSString *)alertBody 227 | badge:(int)badge 228 | alertAction:(NSString *)alertAction 229 | identifierKey:(NSString *)notificationKey 230 | userInfo:(NSDictionary *)userInfo 231 | soundName:(NSString *)soundName 232 | region:(CLRegion *)region 233 | regionTriggersOnce:(BOOL)regionTriggersOnce 234 | category:(NSString *)category NS_AVAILABLE_IOS(8_0); 235 | 236 | /*! 237 | * @abstract 前台展示本地推送 238 | * 239 | * @param notification 本地推送对象 240 | * @param notificationKey 需要前台显示的本地推送通知的标示符 241 | * 242 | * @discussion 默认App在前台运行时不会进行弹窗,在程序接收通知调用此接口可实现指定的推送弹窗。 243 | */ 244 | + (void)showLocalNotificationAtFront:(UILocalNotification *)notification 245 | identifierKey:(NSString *)notificationKey; 246 | /*! 247 | * @abstract 删除本地推送定义 248 | * 249 | * @param notificationKey 本地推送标示符 250 | * @param myUILocalNotification 本地推送对象 251 | */ 252 | + (void)deleteLocalNotificationWithIdentifierKey:(NSString *)notificationKey; 253 | 254 | /*! 255 | * @abstract 删除本地推送定义 256 | */ 257 | + (void)deleteLocalNotification:(UILocalNotification *)localNotification; 258 | 259 | /*! 260 | * @abstract 获取指定通知 261 | * 262 | * @param notificationKey 本地推送标示符 263 | * @return 本地推送对象数组, [array count]为0时表示没找到 264 | */ 265 | + (NSArray *)findLocalNotificationWithIdentifier:(NSString *)notificationKey; 266 | 267 | /*! 268 | * @abstract 清除所有本地推送对象 269 | */ 270 | + (void)clearAllLocalNotifications; 271 | 272 | 273 | ///---------------------------------------------------- 274 | /// @name Server badge 服务器端 badge 功能 275 | ///---------------------------------------------------- 276 | 277 | /*! 278 | * @abstract 设置角标(到服务器) 279 | * 280 | * @param value 新的值. 会覆盖服务器上保存的值(这个用户) 281 | * 282 | * @discussion 本接口不会改变应用本地的角标值. 283 | * 本地仍须调用 UIApplication:setApplicationIconBadgeNumber 函数来设置脚标. 284 | * 285 | * 本接口用于配合 JPush 提供的服务器端角标功能. 286 | * 该功能解决的问题是, 服务器端推送 APNs 时, 并不知道客户端原来已经存在的角标是多少, 指定一个固定的数字不太合理. 287 | * 288 | * JPush 服务器端脚标功能提供: 289 | * 290 | * - 通过本 API 把当前客户端(当前这个用户的) 的实际 badge 设置到服务器端保存起来; 291 | * - 调用服务器端 API 发 APNs 时(通常这个调用是批量针对大量用户), 292 | * 使用 "+1" 的语义, 来表达需要基于目标用户实际的 badge 值(保存的) +1 来下发通知时带上新的 badge 值; 293 | */ 294 | + (BOOL)setBadge:(NSInteger)value; 295 | 296 | /*! 297 | * @abstract 重置脚标(为0) 298 | * 299 | * @discussion 相当于 [setBadge:0] 的效果. 300 | * 参考 [JPUSHService setBadge:] 说明来理解其作用. 301 | */ 302 | + (void)resetBadge; 303 | 304 | 305 | ///---------------------------------------------------- 306 | /// @name Logs and others 日志与其他 307 | ///---------------------------------------------------- 308 | 309 | /*! 310 | * @abstract JPush标识此设备的 registrationID 311 | * 312 | * @discussion SDK注册成功后, 调用此接口获取到 registrationID 才能够获取到. 313 | * 314 | * JPush 支持根据 registrationID 来进行推送. 315 | * 如果你需要此功能, 应该通过此接口获取到 registrationID 后, 上报到你自己的服务器端, 并保存下来. 316 | * 317 | * 更多的理解请参考 JPush 的文档网站. 318 | */ 319 | + (NSString *)registrationID; 320 | 321 | /*! 322 | * @abstract 打开日志级别到 Debug 323 | * 324 | * @discussion JMessage iOS 的日志系统参考 Android 设计了级别. 325 | * 从低到高是: Verbose, Debug, Info, Warning, Error. 326 | * 对日志级别的进一步理解, 请参考 Android 相关的说明. 327 | * 328 | * SDK 默认开启的日志级别为: Info. 只显示必要的信息, 不打印调试日志. 329 | * 330 | * 调用本接口可打开日志级别为: Debug, 打印调试日志. 331 | */ 332 | + (void)setDebugMode; 333 | 334 | /*! 335 | * @abstract 关闭日志 336 | * 337 | * @discussion 关于日志级别的说明, 参考 [JPUSHService setDebugMode] 338 | * 339 | * 虽说是关闭日志, 但还是会打印 Warning, Error 日志. 这二种日志级别, 在程序运行正常时, 不应有打印输出. 340 | * 341 | * 建议在发布的版本里, 调用此接口, 关闭掉日志打印. 342 | */ 343 | + (void)setLogOFF; 344 | 345 | 346 | @end 347 | -------------------------------------------------------------------------------- /CoreJPush/CoreJPush/Lib/jpush-ios-2.1.6.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharlinFeng/CoreJPush/afa20141c270fc6125ac1606303cf7bd79a52684/CoreJPush/CoreJPush/Lib/jpush-ios-2.1.6.a -------------------------------------------------------------------------------- /CoreJPush/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /CoreJPush/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "minimum-system-version" : "7.0", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "orientation" : "portrait", 11 | "idiom" : "iphone", 12 | "minimum-system-version" : "7.0", 13 | "subtype" : "retina4", 14 | "scale" : "2x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CoreJPush/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UIBackgroundModes 31 | 32 | remote-notification 33 | 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIMainStoryboardFile 37 | Main 38 | UIRequiredDeviceCapabilities 39 | 40 | armv7 41 | 42 | UISupportedInterfaceOrientations 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /CoreJPush/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CoreJPush/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "CoreJPush.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | 21 | [CoreJPush addJPushListener:self]; 22 | 23 | // [CoreJPush setTags:[NSSet setWithArray:@[@"movie"]] alias:@"12343242" resBlock:^(BOOL res, NSSet *tags, NSString *alias) { 24 | // 25 | // if(res){ 26 | // NSLog(@"设置成功:%@,%@",@(res),tags,alias); 27 | // }else{ 28 | // NSLog(@"设置失败"); 29 | // } 30 | // }]; 31 | 32 | 33 | 34 | } 35 | 36 | 37 | 38 | -(void)dealloc{ 39 | 40 | [CoreJPush removeJPushListener:self]; 41 | } 42 | 43 | 44 | 45 | 46 | -(void)didReceiveRemoteNotification:(NSDictionary *)userInfo{ 47 | 48 | NSLog(@"ViewController: %@",userInfo); 49 | 50 | } 51 | 52 | 53 | 54 | 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /CoreJPush/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /CoreJPush/oc.h: -------------------------------------------------------------------------------- 1 | // 2 | // oc.h 3 | // CoreJPush 4 | // 5 | // Created by 冯成林 on 16/1/28. 6 | // Copyright © 2016年 冯成林. All rights reserved. 7 | // 8 | 9 | #ifndef oc_h 10 | #define oc_h 11 | 12 | #import "CoreJPush.h" 13 | 14 | #endif /* oc_h */ 15 | -------------------------------------------------------------------------------- /CoreJPush/sound.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharlinFeng/CoreJPush/afa20141c270fc6125ac1606303cf7bd79a52684/CoreJPush/sound.caf -------------------------------------------------------------------------------- /CoreJPushTests/CoreJPushTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CoreJPushTests.m 3 | // CoreJPushTests 4 | // 5 | // Created by 冯成林 on 15/9/17. 6 | // Copyright (c) 2015年 冯成林. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface CoreJPushTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation CoreJPushTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /CoreJPushTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 TedLiu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | CoreJPush (持续关注[信息公告牌](https://github.com/CharlinFeng/Show)) 4 | ========== 5 | #### CoreJPush,让您五句代码立即搞定JPush,集成到使用只需要3分钟。没错,3分钟! 6 | 7 |
8 | # 一.框架准备 9 | #### 1. 拖拽CoreJPush到您的项目中,并添加以下依赖框架 10 | 11 | >.CFNetwork.framework
12 | >.CoreFoundation.framework
13 | >.CoreTelephony.framework
14 | >.SystemConfiguration.framework
15 | >.Security.framework
16 | >. libz.tbd
17 | >. libresolv.tbd
18 | 19 |

20 | #### 2. 项目配置 21 | >. (1) Search Paths 下的 User Header Search Paths 和 Library Search Paths为`$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib`。
22 | >. (2) 选中Project-Target-Capabilities-Background Modes,勾选Remote Notifications。
23 | >. (3) 请修改CoreJPush框架内Common文件夹下PushConfig.plist的Appkey为您的Appkey。
24 | >. (4) 如果你的工程需要支持小于7.0的iOS系统,请到Build Settings 关闭 bitCode 选项,否则将无法正常编译通过。
25 | >. (5)允许XCode7支持Http传输方法 26 | 27 | 如果用的是Xcode7时,需要在App项目的plist手动加入以下key和值以支持http传输: 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | 34 | 35 | 36 | 37 |


38 | # 二.光速集成 39 | 40 | #### 1.注册JPush(一句代码) 41 | 请删除您的AppDelgate中所有有关推送的方法,因为CoreJPush内部已经封装。 42 | 43 | #import "CoreJPush.h" 44 | //注册JPush 45 | [CoreJPush registerJPush:launchOptions]; 46 | 47 |

48 | #### 2.突破空间限制,在您任意想得到推送数据的地方,三句代码搞定: 49 | 50 | //1.添加一个监听者:此监听者是遵循了CoreJPushProtocol协议 51 | [CoreJPush addJPushListener:self]; 52 | 53 | 54 | //2.你需要在合适的地方(比如dealloc),移除监听者 55 | [CoreJPush removeJPushListener:self]; 56 | 57 | 58 | //3.您已经遵循了CoreJPushProtocol协议,直接在.m文件里面敲did ,Xcode会提示你如下方法: 59 | -(void)didReceiveRemoteNotification:(NSDictionary *)userInfo{ 60 | NSLog(@"ViewController: %@",userInfo); 61 | } 62 | 63 | 64 |


65 | # 三. 定义标签与别名 66 | #### 注:标签与别名为覆盖操作,而非增量操作。传nil为本次设置值忽略,传""为清除操作。 67 | #### 请注意返回block的res值为设置结果,只有res = YES,才表示标签与别名操作成功。 68 | 69 | [CoreJPush setTags:[NSSet setWithArray:@[@"movie"]] alias:@"12343242" resBlock:^(BOOL res, NSSet *tags, NSString *alias) { 70 | 71 | if(res){ 72 | NSLog(@"设置成功:%@,%@",@(res),tags,alias); 73 | }else{ 74 | NSLog(@"设置失败"); 75 | } 76 | }]; 77 | 78 | 79 |


80 | # 四. Badge管理 81 | #### 框架内部已经完成封装,你无需管理。 82 | 83 | 84 |


85 | # 五. 系统通知栏提示信息管理 86 | #### 框架内部已经完成封装,你无需管理。 87 | 88 | 89 |


90 | # 六. Swift支持 91 | #### 支持Swift只需做一件事情,就是在框架的Common文件夹中的AppDelegate+JPush.h中引入YourAppName-Swift.h即可。 92 | --------------------------------------------------------------------------------