Skip to content

Commit

Permalink
fix macos api issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
yulingtianxia committed May 7, 2019
1 parent be385f9 commit 1c09d9f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
10 changes: 5 additions & 5 deletions MTDemo/MTDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
A4DB9ECC1FA709A400826A8F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "杨萧玉";
TargetAttributes = {
A489952E1FAE2F6200A7A58A = {
Expand Down Expand Up @@ -601,7 +601,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ../MessageThrottle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.MessageThrottle;
PRODUCT_NAME = MessageThrottle;
Expand All @@ -626,7 +626,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ../MessageThrottle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.MessageThrottle;
PRODUCT_NAME = MessageThrottle;
Expand Down Expand Up @@ -838,7 +838,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
Expand Down Expand Up @@ -867,7 +867,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A4E732482262175A003D7063"
BuildableName = "MessageThrottle_watchOS.framework"
BuildableName = "MessageThrottle.framework"
BlueprintName = "MessageThrottle watchOS"
ReferencedContainer = "container:MTDemo.xcodeproj">
</BuildableReference>
Expand Down Expand Up @@ -46,7 +46,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A4E732482262175A003D7063"
BuildableName = "MessageThrottle_watchOS.framework"
BuildableName = "MessageThrottle.framework"
BlueprintName = "MessageThrottle watchOS"
ReferencedContainer = "container:MTDemo.xcodeproj">
</BuildableReference>
Expand All @@ -64,7 +64,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A4E732482262175A003D7063"
BuildableName = "MessageThrottle_watchOS.framework"
BuildableName = "MessageThrottle.framework"
BlueprintName = "MessageThrottle watchOS"
ReferencedContainer = "container:MTDemo.xcodeproj">
</BuildableReference>
Expand Down
2 changes: 1 addition & 1 deletion MessageThrottle.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MessageThrottle"
s.version = "1.3.3"
s.version = "1.3.4"
s.summary = "A lightweight Objective-C message throttle and debounce library."
s.description = <<-DESC
MessageThrottle is a lightweight, simple library for controlling frequency of forwarding Objective-C messages. You can choose to control existing methods per instance or per class. It's an implementation of function throttle/debounce developed with Objective-C runtime.
Expand Down
2 changes: 1 addition & 1 deletion MessageThrottle/MessageThrottle.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Class mt_metaClass(Class cls);
iOS、macOS 和 tvOS 下杀掉 App 后会自动调用。
请在需要保存持久化规则的时候手动调用此方法。
*/
- (void)savePersistentRules;
- (void)savePersistentRules API_AVAILABLE(macosx(10.11));

@end

Expand Down
4 changes: 3 additions & 1 deletion MessageThrottle/MessageThrottle.m
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ - (instancetype)init

- (void)handleAppWillTerminateNotification:(NSNotification *)notification
{
[self savePersistentRules];
if (@available(macOS 10.11, *)) {
[self savePersistentRules];
}
}

- (void)savePersistentRules
Expand Down

0 comments on commit 1c09d9f

Please sign in to comment.