From c95e901edbe508d928c73510c4145ebeb848099a Mon Sep 17 00:00:00 2001 From: diaoshu Date: Fri, 6 Feb 2015 17:16:13 +0800 Subject: [PATCH] update the NSObject+JTObjectMapping.h to support for OSX and iOS --- Default-568h@2x.png | Bin 0 -> 18594 bytes JTObjectMapping.podspec | 3 ++- JTObjectMapping.xcodeproj/project.pbxproj | 11 +++++++---- .../Source/NSObject+JTObjectMapping.h | 7 ++++++- 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 Default-568h@2x.png diff --git a/Default-568h@2x.png b/Default-568h@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0891b7aabfcf3422423b109c8beed2bab838c607 GIT binary patch literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R)M~A5wUDZhx?ULMX z3x1P&qt=trOY6P2U67L=m=U?F|5#Uj(eCueNTZaHs_ceWiHeET+j+tp3Jt9g(ekqP z2WOvfR{qV+9r+o4J5?qK>7;;^+I7tGv-i)es$X_D=EoKF+S?zsyj^oRFElP}c}JT< zd8SUs-?O?}2YD#ngKbnHgzHBcboxK_2r9l(?eNCl-pEzkJm}fY?WC*jnS?VBE4EpY zO$fEejz6fU;W2Kl>JeQBZBl-%Irg`obSlg*@4QB;Dd1H7^Oi5wvt4d{RZ!8Og?^aE z)k0$1g+V3fd(gdQ3d&q2q-FL*uy#}|bc^=VhFsl0jBgUGJ+-s3U8MK9A!YJJMxpci z5hJ%|{DwV48fZn0{n5l$N_KcSb#NKE4plB`9I6Zt=Z!~-zw0{9tg$L&Ju1F0X)Cy8 zKF;(&lJ>x)Jw(=;p~sF(Sd9VWGwFE2rnyS9!f^DZ8+aCLq zQ};>lcJ1GDLqjm6Hd>|Eabno@P`~Bn(~6^aD_#yoEH(a?Nm1S<;S+hSxI5d16^<1lEM3NPFi zkqPrpL)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u literal 0 HcmV?d00001 diff --git a/JTObjectMapping.podspec b/JTObjectMapping.podspec index cd546e8..05f0686 100644 --- a/JTObjectMapping.podspec +++ b/JTObjectMapping.podspec @@ -6,7 +6,8 @@ Pod::Spec.new do |s| s.homepage = 'http://github.com/jamztang/JTObjectMapping' s.author = { 'James Tang' => 'j@jamztang.com' } s.source = { :git => 'https://github.com/jamztang/JTObjectMapping.git', :tag => s.version.to_s } - s.platform = :ios + s.ios.deployment_target = '6.0' + s.osx.deployment_target = '10.8' s.source_files = 'JTObjectMapping/Source/*.{h,m}' s.requires_arc = false end diff --git a/JTObjectMapping.xcodeproj/project.pbxproj b/JTObjectMapping.xcodeproj/project.pbxproj index 2344833..6884fb6 100644 --- a/JTObjectMapping.xcodeproj/project.pbxproj +++ b/JTObjectMapping.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ 1A7E720E141613C900AE157A /* JTUserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A7E720D141613C800AE157A /* JTUserTest.m */; }; 1AF05842141D1C9A00CD7E50 /* JTObjectMappingArrayTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AF05841141D1C9A00CD7E50 /* JTObjectMappingArrayTest.m */; }; 681D24CF1835327A00200A11 /* JTURLMappings.m in Sources */ = {isa = PBXBuildFile; fileRef = 681D24CE1835327A00200A11 /* JTURLMappings.m */; }; + 8E10B4AC1A7C67B700966B9E /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8E10B4AB1A7C67B700966B9E /* Default-568h@2x.png */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -91,6 +92,7 @@ 1AF05841141D1C9A00CD7E50 /* JTObjectMappingArrayTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JTObjectMappingArrayTest.m; sourceTree = ""; }; 681D24CD1835327A00200A11 /* JTURLMappings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JTURLMappings.h; sourceTree = ""; }; 681D24CE1835327A00200A11 /* JTURLMappings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JTURLMappings.m; sourceTree = ""; }; + 8E10B4AB1A7C67B700966B9E /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -121,6 +123,7 @@ 1A7E71B61415F96700AE157A = { isa = PBXGroup; children = ( + 8E10B4AB1A7C67B700966B9E /* Default-568h@2x.png */, 1A7E71CB1415F96700AE157A /* JTObjectMapping */, 1A7E71ED1415F96800AE157A /* JTObjectMappingTests */, 1A7E71C41415F96700AE157A /* Frameworks */, @@ -260,7 +263,7 @@ name = JTObjectMappingTests; productName = JTObjectMappingTests; productReference = 1A7E71E51415F96800AE157A /* JTObjectMappingTests.octest */; - productType = "com.apple.product-type.bundle"; + productType = "com.apple.product-type.bundle.ocunit-test"; }; /* End PBXNativeTarget section */ @@ -268,7 +271,7 @@ 1A7E71B81415F96700AE157A /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0440; + LastUpgradeCheck = 0610; }; buildConfigurationList = 1A7E71BB1415F96700AE157A /* Build configuration list for PBXProject "JTObjectMapping" */; compatibilityVersion = "Xcode 3.2"; @@ -296,6 +299,7 @@ 1A7E71D01415F96700AE157A /* InfoPlist.strings in Resources */, 1A1B4C801953D563004ACE90 /* JTObjectMappingTests.json in Resources */, 1A7E71D91415F96800AE157A /* MainWindow.xib in Resources */, + 8E10B4AC1A7C67B700966B9E /* Default-568h@2x.png in Resources */, 1A7E71DF1415F96800AE157A /* JTObjectMappingViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -407,7 +411,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -423,6 +426,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 4.3; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; @@ -431,7 +435,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; diff --git a/JTObjectMapping/Source/NSObject+JTObjectMapping.h b/JTObjectMapping/Source/NSObject+JTObjectMapping.h index 18eeafe..31ed843 100755 --- a/JTObjectMapping/Source/NSObject+JTObjectMapping.h +++ b/JTObjectMapping/Source/NSObject+JTObjectMapping.h @@ -6,7 +6,12 @@ * file that was distributed with this source code. */ -#import +#if !TARGET_OS_IPHONE + #import +#else + #import +#endif + #import "JTDataMappings.h" #import "JTDateMappings.h" #import "JTMappings.h"