diff --git a/CoreJPush.podspec b/CoreJPush.podspec new file mode 100644 index 0000000..3b74f53 --- /dev/null +++ b/CoreJPush.podspec @@ -0,0 +1,138 @@ +# +# Be sure to run `pod spec lint CoreJPush.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # These will help people to find your library, and whilst it + # can feel like a chore to fill in it's definitely to your advantage. The + # summary should be tweet-length, and the description more in depth. + # + + s.name = "CoreJPush" + s.version = "1.0.0" + s.summary = "三分钟,五句代码,搞定JPush" + + # This description is used to generate tags and improve search results. + # * Think: What does it do? Why did you write it? What is the focus? + # * Try to keep it short, snappy and to the point. + # * Write the description between the DESC delimiters below. + # * Finally, don't worry about the indent, CocoaPods strips it! + s.description = "CoreJPush,让您五句代码立即搞定JPush,集成到使用只需要3分钟。没错,3分钟!" + + s.homepage = "https://github.com/CharlinFeng/CoreJPush" + # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" + + + # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Licensing your code is important. See http://choosealicense.com for more info. + # CocoaPods will detect a license file if there is a named LICENSE* + # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. + # + + s.license = "MIT" + # s.license = { :type => "MIT", :file => "FILE_LICENSE" } + + + # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the authors of the library, with email addresses. Email addresses + # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also + # accepts just a name if you'd rather not provide an email address. + # + # Specify a social_media_url where others can refer to, for example a twitter + # profile URL. + # + + s.author = { "时点软件 冯成林" => "email@address.com" } + # Or just: s.author = "时点软件 冯成林" + # s.authors = { "时点软件 冯成林" => "email@address.com" } + # s.social_media_url = "http://twitter.com/时点软件 冯成林" + + # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If this Pod runs only on iOS or OS X, then specify the platform and + # the deployment target. You can optionally include the target after the platform. + # + + # s.platform = :ios + s.platform = :ios, "8.0" + + # When using multiple platforms + s.ios.deployment_target = "8.0" + # s.osx.deployment_target = "10.7" + # s.watchos.deployment_target = "2.0" + # s.tvos.deployment_target = "9.0" + + + # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the location from where the source should be retrieved. + # Supports git, hg, bzr, svn and HTTP. + # + + s.source = { :git => "https://github.com/TedLiuHome/CoreJPush.git", :tag => s.version.to_s, :commit => "2cafbfc44c0d761c6c4b7dee528957b7e597fb8a" } + + + # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # CocoaPods is smart about how it includes source code. For source files + # giving a folder will include any swift, h, m, mm, c & cpp files. + # For header files it will include any header in the folder. + # Not including the public_header_files will make all headers public. + # + + s.source_files = "CoreJPush/CoreJPush/**/*.{h,m,swift}" + # s.exclude_files = "Classes/Exclude" + + # s.public_header_files = "Classes/**/*.h" + + + # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # A list of resources included with the Pod. These are copied into the + # target bundle with a build phase script. Anything else will be cleaned. + # You can preserve files from being cleaned, please don't preserve + # non-essential files like tests, examples and documentation. + # + + # s.resource = "icon.png" + # s.resources = "Resources/*.png" + + # s.preserve_paths = "FilesToSave", "MoreFilesToSave" + + + # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Link your library with frameworks, or libraries. Libraries do not include + # the lib prefix of their name. + # + + # s.framework = "SomeFramework" + s.frameworks = "Security", "SystemConfiguration","CoreFoundation","CFNetwork" + + s.library = "z" + # s.libraries = "iconv", "xml2" + s.ios.vendored_library = 'CoreJPush/CoreJPush/Lib/jpush-ios-2.1.6.a' + + s.default_subspecs = 'Core', 'UI' + + # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If your library depends on compiler flags you can set them in the xcconfig hash + # where they will only apply to your library. If you depend on other Podspecs + # you can include multiple dependencies to ensure it works. + + s.requires_arc = true + + # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } + # s.dependency "JSONKit", "~> 1.4" + +end diff --git a/CoreJPush.xcodeproj/project.pbxproj b/CoreJPush.xcodeproj/project.pbxproj index c180b77..fabada8 100644 --- a/CoreJPush.xcodeproj/project.pbxproj +++ b/CoreJPush.xcodeproj/project.pbxproj @@ -9,7 +9,6 @@ /* Begin PBXBuildFile section */ 89229F5F1C53329600201995 /* sound.caf in Resources */ = {isa = PBXBuildFile; fileRef = 89229F5E1C53329600201995 /* sound.caf */; }; 89AA26BE1BAA6F3600B5B018 /* AppDelegate+JPush.m in Sources */ = {isa = PBXBuildFile; fileRef = 89AA26BB1BAA6F3600B5B018 /* AppDelegate+JPush.m */; }; - 89AA26BF1BAA6F3600B5B018 /* PushConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = 89AA26BD1BAA6F3600B5B018 /* PushConfig.plist */; }; 89C57EA71BAA4A6800F708E0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EA61BAA4A6800F708E0 /* main.m */; }; 89C57EAA1BAA4A6800F708E0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EA91BAA4A6800F708E0 /* AppDelegate.m */; }; 89C57EAD1BAA4A6800F708E0 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EAC1BAA4A6800F708E0 /* ViewController.m */; }; @@ -22,10 +21,9 @@ 89C57ED41BAA5CC400F708E0 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED31BAA5CC400F708E0 /* CoreTelephony.framework */; }; 89C57ED61BAA5CD000F708E0 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED51BAA5CD000F708E0 /* SystemConfiguration.framework */; }; 89C57ED81BAA5CDC00F708E0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED71BAA5CDC00F708E0 /* Security.framework */; }; - 89C57EDA1BAA5CE300F708E0 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 89C57ED91BAA5CE300F708E0 /* libz.dylib */; }; 89C57EDF1BAA61FE00F708E0 /* CoreJPush.m in Sources */ = {isa = PBXBuildFile; fileRef = 89C57EDE1BAA61FE00F708E0 /* CoreJPush.m */; }; - 89FAC4201C59FD77002336F1 /* AppDelegate+JPush+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89FAC41F1C59FD77002336F1 /* AppDelegate+JPush+Swift.swift */; }; - 89FAC4221C59FDC5002336F1 /* jpush-ios-2.1.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 89FAC4211C59FDC5002336F1 /* jpush-ios-2.1.0.a */; }; + 9F16666D1CCDFF040084E354 /* jpush-ios-2.1.6.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F16666B1CCDFF040084E354 /* jpush-ios-2.1.6.a */; }; + 9FBE90DD1CCE07B700276897 /* libz.1.2.5.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FBE90DC1CCE07B700276897 /* libz.1.2.5.tbd */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -40,11 +38,9 @@ /* Begin PBXFileReference section */ 89229F5E1C53329600201995 /* sound.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = sound.caf; sourceTree = ""; }; - 89A459661C532CC900327914 /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = ""; }; 89AA26BA1BAA6F3600B5B018 /* AppDelegate+JPush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AppDelegate+JPush.h"; sourceTree = ""; }; 89AA26BB1BAA6F3600B5B018 /* AppDelegate+JPush.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AppDelegate+JPush.m"; sourceTree = ""; }; 89AA26BC1BAA6F3600B5B018 /* CoreJPushSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreJPushSingleton.h; sourceTree = ""; }; - 89AA26BD1BAA6F3600B5B018 /* PushConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = PushConfig.plist; sourceTree = ""; }; 89AA26C01BAA6F8200B5B018 /* CoreJPushProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreJPushProtocol.h; sourceTree = ""; }; 89C57EA11BAA4A6800F708E0 /* CoreJPush.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CoreJPush.app; sourceTree = BUILT_PRODUCTS_DIR; }; 89C57EA51BAA4A6800F708E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -64,12 +60,12 @@ 89C57ED31BAA5CC400F708E0 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 89C57ED51BAA5CD000F708E0 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 89C57ED71BAA5CDC00F708E0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - 89C57ED91BAA5CE300F708E0 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 89C57EDD1BAA61FE00F708E0 /* CoreJPush.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreJPush.h; sourceTree = ""; }; 89C57EDE1BAA61FE00F708E0 /* CoreJPush.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreJPush.m; sourceTree = ""; }; - 89FAC41F1C59FD77002336F1 /* AppDelegate+JPush+Swift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+JPush+Swift.swift"; sourceTree = ""; }; - 89FAC4211C59FDC5002336F1 /* jpush-ios-2.1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "jpush-ios-2.1.0.a"; sourceTree = ""; }; 89FAC4231C59FE6C002336F1 /* oc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = oc.h; sourceTree = ""; }; + 9F16666B1CCDFF040084E354 /* jpush-ios-2.1.6.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "jpush-ios-2.1.6.a"; sourceTree = ""; }; + 9F16666C1CCDFF040084E354 /* JPUSHService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPUSHService.h; sourceTree = ""; }; + 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; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -77,8 +73,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 89FAC4221C59FDC5002336F1 /* jpush-ios-2.1.0.a in Frameworks */, - 89C57EDA1BAA5CE300F708E0 /* libz.dylib in Frameworks */, + 9FBE90DD1CCE07B700276897 /* libz.1.2.5.tbd in Frameworks */, + 9F16666D1CCDFF040084E354 /* jpush-ios-2.1.6.a in Frameworks */, 89C57ED81BAA5CDC00F708E0 /* Security.framework in Frameworks */, 89C57ED61BAA5CD000F708E0 /* SystemConfiguration.framework in Frameworks */, 89C57ED41BAA5CC400F708E0 /* CoreTelephony.framework in Frameworks */, @@ -100,8 +96,8 @@ 89A459641C532CC900327914 /* Lib */ = { isa = PBXGroup; children = ( - 89FAC4211C59FDC5002336F1 /* jpush-ios-2.1.0.a */, - 89A459661C532CC900327914 /* JPUSHService.h */, + 9F16666B1CCDFF040084E354 /* jpush-ios-2.1.6.a */, + 9F16666C1CCDFF040084E354 /* JPUSHService.h */, ); path = Lib; sourceTree = ""; @@ -112,9 +108,7 @@ 89AA26BA1BAA6F3600B5B018 /* AppDelegate+JPush.h */, 89AA26BB1BAA6F3600B5B018 /* AppDelegate+JPush.m */, 89AA26BC1BAA6F3600B5B018 /* CoreJPushSingleton.h */, - 89AA26BD1BAA6F3600B5B018 /* PushConfig.plist */, 89AA26C01BAA6F8200B5B018 /* CoreJPushProtocol.h */, - 89FAC41F1C59FD77002336F1 /* AppDelegate+JPush+Swift.swift */, ); path = Common; sourceTree = ""; @@ -157,7 +151,7 @@ 89C57EA41BAA4A6800F708E0 /* Supporting Files */ = { isa = PBXGroup; children = ( - 89C57ED91BAA5CE300F708E0 /* libz.dylib */, + 9FBE90DC1CCE07B700276897 /* libz.1.2.5.tbd */, 89C57ED71BAA5CDC00F708E0 /* Security.framework */, 89C57ED51BAA5CD000F708E0 /* SystemConfiguration.framework */, 89C57ED31BAA5CC400F708E0 /* CoreTelephony.framework */, @@ -243,12 +237,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0640; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "冯成林"; TargetAttributes = { 89C57EA01BAA4A6800F708E0 = { CreatedOnToolsVersion = 6.4; - DevelopmentTeam = P2957GLTVA; + DevelopmentTeam = 27P55QDC67; SystemCapabilities = { com.apple.BackgroundModes = { enabled = 1; @@ -286,7 +280,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 89AA26BF1BAA6F3600B5B018 /* PushConfig.plist in Resources */, 89C57EB01BAA4A6800F708E0 /* Main.storyboard in Resources */, 89229F5F1C53329600201995 /* sound.caf in Resources */, 89C57EB51BAA4A6800F708E0 /* LaunchScreen.xib in Resources */, @@ -311,7 +304,6 @@ 89C57EAD1BAA4A6800F708E0 /* ViewController.m in Sources */, 89C57EDF1BAA61FE00F708E0 /* CoreJPush.m in Sources */, 89C57EAA1BAA4A6800F708E0 /* AppDelegate.m in Sources */, - 89FAC4201C59FD77002336F1 /* AppDelegate+JPush+Swift.swift in Sources */, 89C57EA71BAA4A6800F708E0 /* main.m in Sources */, 89AA26BE1BAA6F3600B5B018 /* AppDelegate+JPush.m in Sources */, ); @@ -377,6 +369,7 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -392,7 +385,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; @@ -431,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; SDKROOT = iphoneos; @@ -445,7 +438,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; ENABLE_BITCODE = NO; HEADER_SEARCH_PATHS = ( @@ -454,14 +447,15 @@ "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", ); INFOPLIST_FILE = CoreJPush/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", ); + PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; + PROVISIONING_PROFILE = "40bb375d-88f8-442c-af2e-82c8c0ca15f9"; SWIFT_OBJC_BRIDGING_HEADER = /Users/Charlin/Documents/ShiDian/Github/CoreJPush/CoreJPush/oc.h; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; @@ -473,7 +467,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Chenglin Feng (VDH9H497CN)"; ENABLE_BITCODE = NO; HEADER_SEARCH_PATHS = ( @@ -482,14 +476,15 @@ "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", ); INFOPLIST_FILE = CoreJPush/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/CoreJPush/CoreJPush/Lib", ); + PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; + PROVISIONING_PROFILE = "40bb375d-88f8-442c-af2e-82c8c0ca15f9"; SWIFT_OBJC_BRIDGING_HEADER = /Users/Charlin/Documents/ShiDian/Github/CoreJPush/CoreJPush/oc.h; }; name = Release; @@ -510,6 +505,7 @@ ); INFOPLIST_FILE = CoreJPushTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CoreJPush.app/CoreJPush"; @@ -528,6 +524,7 @@ ); INFOPLIST_FILE = CoreJPushTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.ShiDian.Yeah; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = "afa5c3c3-3752-4bf7-aa46-5b925611a861"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CoreJPush.app/CoreJPush"; diff --git a/CoreJPush.xcodeproj/project.xcworkspace/xcuserdata/Ted.xcuserdatad/UserInterfaceState.xcuserstate b/CoreJPush.xcodeproj/project.xcworkspace/xcuserdata/Ted.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..58734eb Binary files /dev/null and b/CoreJPush.xcodeproj/project.xcworkspace/xcuserdata/Ted.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/CoreJPush.xcscheme b/CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/CoreJPush.xcscheme new file mode 100644 index 0000000..146aee5 --- /dev/null +++ b/CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/CoreJPush.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/xcschememanagement.plist b/CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..f23d148 --- /dev/null +++ b/CoreJPush.xcodeproj/xcuserdata/Ted.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,27 @@ + + + + + SchemeUserState + + CoreJPush.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 89C57EA01BAA4A6800F708E0 + + primary + + + 89C57EB91BAA4A6800F708E0 + + primary + + + + + diff --git a/CoreJPush/CoreJPush/Common/AppDelegate+JPush+Swift.swift b/CoreJPush/CoreJPush/Common/AppDelegate+JPush+Swift.swift deleted file mode 100644 index a2f34b2..0000000 --- a/CoreJPush/CoreJPush/Common/AppDelegate+JPush+Swift.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// AppDelegate+JPush.swift -// CoreJPush -// -// Created by 冯成林 on 16/1/28. -// Copyright © 2016年 冯成林. All rights reserved. -// - -import UIKit - -class AppDelegate: UIResponder, UIApplicationDelegate { - -} - -extension AppDelegate{ - - func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) { - - // Required - JPUSHService.registerDeviceToken(deviceToken) - } - - func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) { - - // Required,For systems with less than or equal to iOS6 - JPUSHService.handleRemoteNotification(userInfo) - } - - func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) { - - // IOS 7 Support Required - JPUSHService.handleRemoteNotification(userInfo) - completionHandler(UIBackgroundFetchResult.NewData) - CoreJPush.sharedCoreJPush().didReceiveRemoteNotification(userInfo) - } - -} - - - diff --git a/CoreJPush/CoreJPush/Common/PushConfig.plist b/CoreJPush/CoreJPush/Common/PushConfig.plist deleted file mode 100644 index d820e21..0000000 --- a/CoreJPush/CoreJPush/Common/PushConfig.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - APS_FOR_PRODUCTION - 0 - CHANNEL - AppStore - - diff --git a/CoreJPush/CoreJPush/CoreJPush.m b/CoreJPush/CoreJPush/CoreJPush.m index e279aaa..5d913bf 100644 --- a/CoreJPush/CoreJPush/CoreJPush.m +++ b/CoreJPush/CoreJPush/CoreJPush.m @@ -33,19 +33,11 @@ @implementation CoreJPush +(void)registerJPush:(NSDictionary *)launchOptions{ // Required - if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) { - //可以添加自定义categories - [JPUSHService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge | - UIUserNotificationTypeSound | - UIUserNotificationTypeAlert) - categories:nil]; - } else { - //categories 必须为nil - [JPUSHService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | - UIRemoteNotificationTypeSound | - UIRemoteNotificationTypeAlert) - categories:nil]; - } + //可以添加自定义categories + [JPUSHService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge | + UIUserNotificationTypeSound | + UIUserNotificationTypeAlert) + categories:nil]; // Required //如需兼容旧版本的方式,请依旧使用[JPUSHService setupWithOption:launchOptions]方式初始化和同时使用pushConfig.plist文件声明appKey等配置内容。 diff --git a/CoreJPush/CoreJPush/Lib/JPUSHService.h b/CoreJPush/CoreJPush/Lib/JPUSHService.h index 15435bd..62f6500 100755 --- a/CoreJPush/CoreJPush/Lib/JPUSHService.h +++ b/CoreJPush/CoreJPush/Lib/JPUSHService.h @@ -9,7 +9,7 @@ * Copyright (c) 2011 ~ 2015 Shenzhen HXHG. All rights reserved. */ -#define JPUSH_VERSION_NUMBER 2.1.0 +#define JPUSH_VERSION_NUMBER 2.1.6 #import @@ -51,6 +51,7 @@ extern NSString *const kJPFServiceErrorNotification; // 错误提示 * @param appKey 一个JPush 应用必须的,唯一的标识. 请参考 JPush 相关说明文档来获取这个标识. * @param channel 发布渠道. 可选. * @param isProduction 是否生产环境. 如果为开发状态,设置为 NO; 如果为生产状态,应改为 YES. + * @param advertisingIdentifier 广告标识符(IDFA) 如果不需要使用IDFA,传nil. * * @discussion 提供SDK启动必须的参数, 来启动 SDK. * 此接口必须在 App 启动时调用, 否则 JPush SDK 将无法正常工作. @@ -61,6 +62,13 @@ extern NSString *const kJPFServiceErrorNotification; // 错误提示 apsForProduction:(BOOL)isProduction; ++ (void)setupWithOption:(NSDictionary *)launchingOption + appKey:(NSString *)appKey + channel:(NSString *)channel + apsForProduction:(BOOL)isProduction + advertisingIdentifier:(NSString *)advertisingId; + + ///---------------------------------------------------- /// @name APNs about 通知相关 ///---------------------------------------------------- @@ -78,6 +86,7 @@ extern NSString *const kJPFServiceErrorNotification; // 错误提示 + (void)registerDeviceToken:(NSData *)deviceToken; + /*! * @abstract 处理收到的 APNs 消息 */ @@ -97,7 +106,7 @@ extern NSString *const kJPFServiceErrorNotification; // 错误提示 + (void) setTags:(NSSet *)tags alias:(NSString *)alias callbackSelector:(SEL)cbSelector - target:(id)theTarget; + target:(id)theTarget __attribute__((deprecated("JPush 2.1.1 版本已过期")));; + (void) setTags:(NSSet *)tags alias:(NSString *)alias @@ -108,9 +117,9 @@ callbackSelector:(SEL)cbSelector callbackSelector:(SEL)cbSelector object:(id)theTarget; -+ (void) setTags:(NSSet *)tags - alias:(NSString *)alias -fetchCompletionHandle:(void (^)(int iResCode, NSSet *iTags, NSString *iAlias))completionHandler; ++ (void)setTags:(NSSet *)tags + alias:(NSString *)alias + fetchCompletionHandle:(void (^)(int iResCode, NSSet *iTags, NSString *iAlias))completionHandler; + (void) setTags:(NSSet *)tags aliasInbackground:(NSString *)alias; diff --git a/CoreJPush/CoreJPush/Lib/jpush-ios-2.1.0.a b/CoreJPush/CoreJPush/Lib/jpush-ios-2.1.6.a similarity index 56% rename from CoreJPush/CoreJPush/Lib/jpush-ios-2.1.0.a rename to CoreJPush/CoreJPush/Lib/jpush-ios-2.1.6.a index 319d1a0..fca9af9 100644 Binary files a/CoreJPush/CoreJPush/Lib/jpush-ios-2.1.0.a and b/CoreJPush/CoreJPush/Lib/jpush-ios-2.1.6.a differ diff --git a/CoreJPush/Info.plist b/CoreJPush/Info.plist index 6a8991c..82e93ef 100644 --- a/CoreJPush/Info.plist +++ b/CoreJPush/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.ShiDian.Yeah + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,6 +22,11 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + UIBackgroundModes remote-notification @@ -40,12 +45,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - diff --git a/CoreJPushTests/Info.plist b/CoreJPushTests/Info.plist index 130a413..ba72822 100644 --- a/CoreJPushTests/Info.plist +++ b/CoreJPushTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.ShiDian.Yeah + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c522461 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 TedLiu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.