From f11158b07f8351cdafa550b24453bfd1945a047b Mon Sep 17 00:00:00 2001 From: jiangteng Date: Mon, 22 Oct 2018 16:43:10 +0800 Subject: [PATCH] fix:fix macOS upload --- .../Logan-macOS.xcodeproj/project.pbxproj | 13 +++++++++++-- Example/Logan-macOS/Logan-macOS/AppDelegate.m | 2 -- .../Logan-macOS/Logan-macOS.entitlements | 14 ++++++++++++++ .../Logan-macOS/Logan_macOS.entitlements | 7 +------ Logan.podspec | 2 +- Logan/iOS/Logan.m | 5 +++++ 6 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 Example/Logan-macOS/Logan-macOS/Logan-macOS.entitlements diff --git a/Example/Logan-macOS/Logan-macOS.xcodeproj/project.pbxproj b/Example/Logan-macOS/Logan-macOS.xcodeproj/project.pbxproj index 83a3c67e..c44ac431 100644 --- a/Example/Logan-macOS/Logan-macOS.xcodeproj/project.pbxproj +++ b/Example/Logan-macOS/Logan-macOS.xcodeproj/project.pbxproj @@ -62,6 +62,7 @@ 84C23AB72172343D00588A19 /* clogan.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = clogan.xcodeproj; path = ../../../Logan/clogan.xcodeproj; sourceTree = ""; }; 84C23BB12172382B00588A19 /* Logan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logan.h; sourceTree = ""; }; 84C23BB22172382B00588A19 /* Logan.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Logan.m; sourceTree = ""; }; + A7E5B822217DC16C0055F2A8 /* Logan-macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Logan-macOS.entitlements"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -105,6 +106,7 @@ 84C23A97217233F400588A19 /* Logan-macOS */ = { isa = PBXGroup; children = ( + A7E5B822217DC16C0055F2A8 /* Logan-macOS.entitlements */, 84C23BB02172382B00588A19 /* iOS */, 84C23AB72172343D00588A19 /* clogan.xcodeproj */, 84C23A98217233F400588A19 /* AppDelegate.h */, @@ -203,6 +205,11 @@ TargetAttributes = { 84C23A94217233F400588A19 = { CreatedOnToolsVersion = 10.0; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; }; 84C23AA7217233F600588A19 = { CreatedOnToolsVersion = 10.0; @@ -440,7 +447,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = "Logan-macOS/Logan_macOS.entitlements"; + CODE_SIGN_ENTITLEMENTS = "Logan-macOS/Logan-macOS.entitlements"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "Logan-macOS/Info.plist"; @@ -448,6 +455,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.Logan-macOS-Example.Logan-macOS"; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -457,7 +465,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = "Logan-macOS/Logan_macOS.entitlements"; + CODE_SIGN_ENTITLEMENTS = "Logan-macOS/Logan-macOS.entitlements"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = "Logan-macOS/Info.plist"; @@ -465,6 +473,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.Logan-macOS-Example.Logan-macOS"; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/Example/Logan-macOS/Logan-macOS/AppDelegate.m b/Example/Logan-macOS/Logan-macOS/AppDelegate.m index ff7dc3d7..652d3510 100644 --- a/Example/Logan-macOS/Logan-macOS/AppDelegate.m +++ b/Example/Logan-macOS/Logan-macOS/AppDelegate.m @@ -34,8 +34,6 @@ @interface AppDelegate () @property (weak) IBOutlet NSWindow *window; @property (nonatomic, assign) int count; -//@property (weak, nonatomic) IBOutlet UITextView *filesInfo; -//@property (weak, nonatomic) IBOutlet UITextField *ipText; @property (weak) IBOutlet NSTextField *filesInfo; @property (weak) IBOutlet NSTextField *ipText; diff --git a/Example/Logan-macOS/Logan-macOS/Logan-macOS.entitlements b/Example/Logan-macOS/Logan-macOS/Logan-macOS.entitlements new file mode 100644 index 00000000..40b639e4 --- /dev/null +++ b/Example/Logan-macOS/Logan-macOS/Logan-macOS.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/Example/Logan-macOS/Logan-macOS/Logan_macOS.entitlements b/Example/Logan-macOS/Logan-macOS/Logan_macOS.entitlements index f2ef3ae0..0c67376e 100644 --- a/Example/Logan-macOS/Logan-macOS/Logan_macOS.entitlements +++ b/Example/Logan-macOS/Logan-macOS/Logan_macOS.entitlements @@ -1,10 +1,5 @@ - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - - + diff --git a/Logan.podspec b/Logan.podspec index d8cb2c03..cb7a1c32 100644 --- a/Logan.podspec +++ b/Logan.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Logan' - s.version = '1.0.0' + s.version = '1.1.1' s.summary = 'Logan is a lightweight case logging system based on mobile platform.' s.homepage = 'https://github.com/Meituan-Dianping/Logan' diff --git a/Logan/iOS/Logan.m b/Logan/iOS/Logan.m index cff2bfe6..18f16eab 100644 --- a/Logan/iOS/Logan.m +++ b/Logan/iOS/Logan.m @@ -41,7 +41,12 @@ @interface Logan : NSObject { NSTimeInterval _lastCheckFreeSpace; } @property (nonatomic, copy) NSString *lastLogDate; + +#if OS_OBJECT_USE_OBJC @property (nonatomic, strong) dispatch_queue_t loganQueue; +#else +@property (nonatomic, assign) dispatch_queue_t loganQueue; +#endif + (instancetype)logan;