diff --git a/External/Mac/Fabric.framework/Versions/A/Fabric b/External/Mac/Fabric.framework/Versions/A/Fabric index 407307e7..1e1f3552 100755 Binary files a/External/Mac/Fabric.framework/Versions/A/Fabric and b/External/Mac/Fabric.framework/Versions/A/Fabric differ diff --git a/External/Mac/Fabric.framework/Versions/A/Headers/FABAttributes.h b/External/Mac/Fabric.framework/Versions/A/Headers/FABAttributes.h index f4e06394..e35f9ce3 100644 --- a/External/Mac/Fabric.framework/Versions/A/Headers/FABAttributes.h +++ b/External/Mac/Fabric.framework/Versions/A/Headers/FABAttributes.h @@ -2,7 +2,19 @@ // FABAttributes.h // Fabric // -// Copyright (c) 2015 Twitter. All rights reserved. +// Copyright (C) 2015 Twitter, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // #pragma once diff --git a/External/Mac/Fabric.framework/Versions/A/Headers/Fabric.h b/External/Mac/Fabric.framework/Versions/A/Headers/Fabric.h index 47a3d055..23955fdc 100644 --- a/External/Mac/Fabric.framework/Versions/A/Headers/Fabric.h +++ b/External/Mac/Fabric.framework/Versions/A/Headers/Fabric.h @@ -1,7 +1,20 @@ // // Fabric.h +// Fabric // -// Copyright (c) 2015 Twitter. All rights reserved. +// Copyright (C) 2015 Twitter, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // #import diff --git a/External/Mac/Fabric.framework/Versions/A/Resources/Info.plist b/External/Mac/Fabric.framework/Versions/A/Resources/Info.plist index ad5bec27..c6b8c956 100644 --- a/External/Mac/Fabric.framework/Versions/A/Resources/Info.plist +++ b/External/Mac/Fabric.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 14E46 + 14F1021 CFBundleDevelopmentRegion en CFBundleExecutable @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.5.5 + 1.6.4 CFBundleSignature ???? CFBundleSupportedPlatforms @@ -25,11 +25,11 @@ MacOSX CFBundleVersion - 30 + 45 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 7A220 + 7B91b DTPlatformVersion GM DTSDKBuild @@ -37,9 +37,9 @@ DTSDKName macosx10.11 DTXcode - 0700 + 0710 DTXcodeBuild - 7A220 + 7B91b NSHumanReadableCopyright Copyright © 2015 Twitter. All rights reserved. UIDeviceFamily diff --git a/External/Mac/Fabric.framework/run b/External/Mac/Fabric.framework/run index f4c57328..9058ea62 100755 --- a/External/Mac/Fabric.framework/run +++ b/External/Mac/Fabric.framework/run @@ -11,8 +11,8 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) DIR="\"${DIR}" PATH_SEP="/" -VALIDATE_COMMAND="uploadDSYM\" $@ validate" -UPLOAD_COMMAND="uploadDSYM\" $@" +VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script" +UPLOAD_COMMAND="uploadDSYM\" $@ run-script" # Ensure params are as expected, run in sync mode to validate eval $DIR$PATH_SEP$VALIDATE_COMMAND diff --git a/External/Mac/Fabric.framework/uploadDSYM b/External/Mac/Fabric.framework/uploadDSYM index 952dc37d..5c74f105 100755 Binary files a/External/Mac/Fabric.framework/uploadDSYM and b/External/Mac/Fabric.framework/uploadDSYM differ diff --git a/MasterPassword/C/mpw-util.h b/MasterPassword/C/mpw-util.h index 154acbb9..491ee105 100644 --- a/MasterPassword/C/mpw-util.h +++ b/MasterPassword/C/mpw-util.h @@ -11,8 +11,8 @@ //// Logging. -int mpw_verbosity; #ifndef trc +int mpw_verbosity; #define trc_level 3 #define trc(...) \ if (mpw_verbosity >= 3) \ diff --git a/MasterPassword/ObjC/MPAppDelegate_Key.m b/MasterPassword/ObjC/MPAppDelegate_Key.m index 28365820..4c055070 100644 --- a/MasterPassword/ObjC/MPAppDelegate_Key.m +++ b/MasterPassword/ObjC/MPAppDelegate_Key.m @@ -20,6 +20,7 @@ static NSDictionary *createKeyQuery(MPUserEntity *user, BOOL newItem, MPKeyOrigin *keyOrigin) { +#if TARGET_OS_IPHONE if (user.touchID && kSecUseOperationPrompt) { if (keyOrigin) *keyOrigin = MPKeyOriginKeyChainBiometric; @@ -42,6 +43,7 @@ static NSDictionary *createKeyQuery(MPUserEntity *user, BOOL newItem, MPKeyOrigi } matches:nil]; } +#endif if (keyOrigin) *keyOrigin = MPKeyOriginKeyChain; diff --git a/MasterPassword/ObjC/Mac/MPMacConfig.m b/MasterPassword/ObjC/Mac/MPMacConfig.m index 4ce6931d..7cac08be 100644 --- a/MasterPassword/ObjC/Mac/MPMacConfig.m +++ b/MasterPassword/ObjC/Mac/MPMacConfig.m @@ -16,7 +16,7 @@ return self; [self.defaults registerDefaults:@{ - NSStringFromSelector( @selector(iTunesID) ) : @"510296984", + NSStringFromSelector( @selector(appleID) ) : @"510296984", }]; return self; diff --git a/MasterPassword/ObjC/Mac/MasterPassword-Mac.xcodeproj/project.pbxproj b/MasterPassword/ObjC/Mac/MasterPassword-Mac.xcodeproj/project.pbxproj index 0a1857b8..7e5940e9 100644 --- a/MasterPassword/ObjC/Mac/MasterPassword-Mac.xcodeproj/project.pbxproj +++ b/MasterPassword/ObjC/Mac/MasterPassword-Mac.xcodeproj/project.pbxproj @@ -37,8 +37,6 @@ DA2CA4F018D323D3007798F8 /* NSArray+Pearl.h in Headers */ = {isa = PBXBuildFile; fileRef = DA2CA4EA18D323D3007798F8 /* NSArray+Pearl.h */; }; DA2CA4F118D323D3007798F8 /* NSTimer+PearlBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = DA2CA4EB18D323D3007798F8 /* NSTimer+PearlBlock.m */; }; DA2CA4F218D323D3007798F8 /* NSTimer+PearlBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = DA2CA4EC18D323D3007798F8 /* NSTimer+PearlBlock.h */; }; - DA30E9CE15722ECA00A68B4C /* NSBundle+PearlMutableInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = DA30E9CB15722ECA00A68B4C /* NSBundle+PearlMutableInfo.h */; }; - DA30E9CF15722ECA00A68B4C /* NSBundle+PearlMutableInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = DA30E9CC15722ECA00A68B4C /* NSBundle+PearlMutableInfo.m */; }; DA30E9D015722ECA00A68B4C /* Pearl.m in Sources */ = {isa = PBXBuildFile; fileRef = DA30E9CD15722ECA00A68B4C /* Pearl.m */; }; DA30E9D215722EE500A68B4C /* Pearl-Crypto.m in Sources */ = {isa = PBXBuildFile; fileRef = DA30E9D115722EE500A68B4C /* Pearl-Crypto.m */; }; DA30E9D715723E6900A68B4C /* PearlLazy.h in Headers */ = {isa = PBXBuildFile; fileRef = DA30E9D515723E6900A68B4C /* PearlLazy.h */; }; @@ -158,6 +156,7 @@ DACA29741705E1A8002C6C22 /* dictionary.lst in Resources */ = {isa = PBXBuildFile; fileRef = DACA29721705E1A8002C6C22 /* dictionary.lst */; }; DACA298D1705E2BD002C6C22 /* JRSwizzle.h in Headers */ = {isa = PBXBuildFile; fileRef = DACA29771705E2BD002C6C22 /* JRSwizzle.h */; }; DACA299A1705E2BD002C6C22 /* JRSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = DACA298C1705E2BD002C6C22 /* JRSwizzle.m */; }; + DACBFCDF1C59B22E007EF90F /* NSMutableSet+Pearl.m in Sources */ = {isa = PBXBuildFile; fileRef = DACBFCDC1C59B22E007EF90F /* NSMutableSet+Pearl.m */; }; DAD9B5F01762CAA4001835F9 /* ServiceManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DAD9B5EF1762CAA4001835F9 /* ServiceManagement.framework */; }; DAD9B5F11762CAB9001835F9 /* MasterPassword-Mac-LoginHelper.app in Copy LoginHelper */ = {isa = PBXBuildFile; fileRef = DAD9B5E6176299BA001835F9 /* MasterPassword-Mac-LoginHelper.app */; }; DAEB942E18B47FB3000490CC /* MPInitialWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA0933C91747A56A00DE1CEF /* MPInitialWindow.xib */; }; @@ -303,8 +302,6 @@ DA2CA4EA18D323D3007798F8 /* NSArray+Pearl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Pearl.h"; sourceTree = ""; }; DA2CA4EB18D323D3007798F8 /* NSTimer+PearlBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTimer+PearlBlock.m"; sourceTree = ""; }; DA2CA4EC18D323D3007798F8 /* NSTimer+PearlBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+PearlBlock.h"; sourceTree = ""; }; - DA30E9CB15722ECA00A68B4C /* NSBundle+PearlMutableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+PearlMutableInfo.h"; sourceTree = ""; }; - DA30E9CC15722ECA00A68B4C /* NSBundle+PearlMutableInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+PearlMutableInfo.m"; sourceTree = ""; }; DA30E9CD15722ECA00A68B4C /* Pearl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Pearl.m; sourceTree = ""; }; DA30E9D115722EE500A68B4C /* Pearl-Crypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Pearl-Crypto.m"; sourceTree = ""; }; DA30E9D515723E6900A68B4C /* PearlLazy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PearlLazy.h; sourceTree = ""; }; @@ -868,6 +865,8 @@ DACA29721705E1A8002C6C22 /* dictionary.lst */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dictionary.lst; sourceTree = ""; }; DACA29771705E2BD002C6C22 /* JRSwizzle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JRSwizzle.h; sourceTree = ""; }; DACA298C1705E2BD002C6C22 /* JRSwizzle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JRSwizzle.m; sourceTree = ""; }; + DACBFCDB1C59B22E007EF90F /* NSMutableSet+Pearl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableSet+Pearl.h"; sourceTree = ""; }; + DACBFCDC1C59B22E007EF90F /* NSMutableSet+Pearl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableSet+Pearl.m"; sourceTree = ""; }; DAD0C5F619FD6034009CB08D /* icon_128x128.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_128x128.png; sourceTree = ""; }; DAD0C5F719FD6034009CB08D /* icon_128x128@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_128x128@2x.png"; sourceTree = ""; }; DAD0C5F819FD6034009CB08D /* icon_16x16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_16x16.png; sourceTree = ""; }; @@ -1060,9 +1059,9 @@ DA5E5C7917248AA1003798D8 /* lib */ = { isa = PBXGroup; children = ( - DA5E5C8717248AA1003798D8 /* libscryptenc-osx.a */, - DAE8E65319867ADA00416A0F /* libopensslcrypto-osx.a */, DAEB938518AB0FFD000490CC /* include */, + DAE8E65319867ADA00416A0F /* libopensslcrypto-osx.a */, + DA5E5C8717248AA1003798D8 /* libscryptenc-osx.a */, ); path = lib; sourceTree = ""; @@ -1799,8 +1798,6 @@ 93D39067C0AFDC581794E2B8 /* NSArray+Indexing.m */, DA2CA4EA18D323D3007798F8 /* NSArray+Pearl.h */, DA2CA4E918D323D3007798F8 /* NSArray+Pearl.m */, - DA30E9CB15722ECA00A68B4C /* NSBundle+PearlMutableInfo.h */, - DA30E9CC15722ECA00A68B4C /* NSBundle+PearlMutableInfo.m */, DAFE4A63150399FF003ABA93 /* NSDateFormatter+RFC3339.h */, DAFE4A63150399FF003ABA91 /* NSDateFormatter+RFC3339.m */, 93D393B97158D7BE9332EA53 /* NSDictionary+Indexing.h */, @@ -1809,6 +1806,8 @@ DA2CA4E718D323D3007798F8 /* NSError+PearlFullDescription.m */, DA3B8451190FC86F00246EEA /* NSManagedObject+Pearl.h */, DA3B8450190FC86F00246EEA /* NSManagedObject+Pearl.m */, + DACBFCDB1C59B22E007EF90F /* NSMutableSet+Pearl.h */, + DACBFCDC1C59B22E007EF90F /* NSMutableSet+Pearl.m */, DAADCC3E19FAFFAD00987B1D /* NSNotificationCenter+PearlEasyCleanup.h */, DAFE45D815039823003ABA7C /* NSObject+PearlExport.h */, DAFE45D915039823003ABA7C /* NSObject+PearlExport.m */, @@ -1929,7 +1928,6 @@ DAFE4A3615039824003ABA7C /* PearlKeyChain.h in Headers */, DAFE4A3815039824003ABA7C /* PearlRSAKey.h in Headers */, DAFE4A3A15039824003ABA7C /* PearlSCrypt.h in Headers */, - DA30E9CE15722ECA00A68B4C /* NSBundle+PearlMutableInfo.h in Headers */, DA30E9D715723E6900A68B4C /* PearlLazy.h in Headers */, DAADCC4719FAFFAD00987B1D /* NSNotificationCenter+PearlEasyCleanup.h in Headers */, DAFE4A63150399FF003ABA88 /* NSObject+PearlKVO.h in Headers */, @@ -2045,6 +2043,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = MP; + LastSwiftUpdateCheck = 0720; LastTestingUpgradeCheck = 0510; LastUpgradeCheck = 0710; ORGANIZATIONNAME = Lyndir; @@ -2222,7 +2221,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = "/bin/sh -e"; - shellScript = "../../../External/Mac/Crashlytics.framework/run \\\n \"$(/usr/libexec/PlistBuddy -c \"Print :'API Key'\" ../../Resources/Crashlytics/Crashlytics.plist)\" 410fb41450e3a2e50fa8357682d812ecd3e1846f2141a99bdb9d3a6a981ad69c"; + shellScript = "../../../External/Mac/Fabric.framework/run \\\n \"$(/usr/libexec/PlistBuddy -c \"Print :'API Key'\" ../../Resources/Crashlytics/Crashlytics.plist)\" 410fb41450e3a2e50fa8357682d812ecd3e1846f2141a99bdb9d3a6a981ad69c"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -2237,6 +2236,7 @@ DA32CFE519CF1C71004F3F0E /* MPUserEntity.m in Sources */, DA5E5CF71724A667003798D8 /* MPAlgorithmV0.m in Sources */, DA5E5CF81724A667003798D8 /* MPAlgorithmV1.m in Sources */, + DACBFCDF1C59B22E007EF90F /* NSMutableSet+Pearl.m in Sources */, DA6774311A4746AF004F356A /* mpw-util.c in Sources */, DA5E5CF91724A667003798D8 /* MPAppDelegate_Key.m in Sources */, DA5180CE19FF307E00A587E9 /* MPAppDelegate_Store.m in Sources */, @@ -2320,7 +2320,6 @@ DAFE4A3915039824003ABA7C /* PearlRSAKey.m in Sources */, DAFE4A3B15039824003ABA7C /* PearlSCrypt.m in Sources */, DA8ED895192906920099B726 /* PearlTween.m in Sources */, - DA30E9CF15722ECA00A68B4C /* NSBundle+PearlMutableInfo.m in Sources */, DA2CA4F118D323D3007798F8 /* NSTimer+PearlBlock.m in Sources */, DA3B8452190FC86F00246EEA /* NSManagedObject+Pearl.m in Sources */, DA30E9D015722ECA00A68B4C /* Pearl.m in Sources */, @@ -2563,6 +2562,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = MasterPassword.entitlements; CODE_SIGN_IDENTITY = "Mac Developer"; @@ -2573,6 +2573,7 @@ ); GCC_PREFIX_HEADER = "MasterPassword-Prefix.pch"; INFOPLIST_FILE = "MasterPassword-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "/Users/lhunath/Documents/workspace/lyndir/MasterPassword/External/Pearl/Pearl-Crypto/lib", @@ -2580,6 +2581,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.lyndir.lhunath.MasterPassword.Mac; PROVISIONING_PROFILE = ""; SKIP_INSTALL = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; WRAPPER_NAME = "Master Password.${WRAPPER_EXTENSION}"; }; name = "Debug-Mac"; @@ -2588,6 +2590,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = MasterPassword.entitlements; CODE_SIGN_IDENTITY = "Developer ID Application"; @@ -2598,6 +2601,7 @@ ); GCC_PREFIX_HEADER = "MasterPassword-Prefix.pch"; INFOPLIST_FILE = "MasterPassword-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "/Users/lhunath/Documents/workspace/lyndir/MasterPassword/External/Pearl/Pearl-Crypto/lib", @@ -2740,6 +2744,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = MasterPassword.entitlements; CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application"; @@ -2750,6 +2755,7 @@ ); GCC_PREFIX_HEADER = "MasterPassword-Prefix.pch"; INFOPLIST_FILE = "MasterPassword-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "/Users/lhunath/Documents/workspace/lyndir/MasterPassword/External/Pearl/Pearl-Crypto/lib", diff --git a/MasterPassword/ObjC/Mac/MasterPassword-Prefix.pch b/MasterPassword/ObjC/Mac/MasterPassword-Prefix.pch index 6dfd57fd..90959dfc 100644 --- a/MasterPassword/ObjC/Mac/MasterPassword-Prefix.pch +++ b/MasterPassword/ObjC/Mac/MasterPassword-Prefix.pch @@ -28,42 +28,80 @@ #import #import #import +#import +#import -#define trc(format, ...) objc_msgSend( \ - objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \ - sel_getUid( "inFile:atLine:trc:" ), \ - basename( (char *)__FILE__ ), __LINE__, \ - CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \ - ##__VA_ARGS__) -#define dbg(format, ...) objc_msgSend( \ - objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \ - sel_getUid( "inFile:atLine:dbg:" ), \ - basename( (char *)__FILE__ ), __LINE__, \ - CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \ - ##__VA_ARGS__) -#define inf(format, ...) objc_msgSend( \ - objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \ - sel_getUid( "inFile:atLine:inf:" ), \ - basename( (char *)__FILE__ ), __LINE__, \ - CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \ - ##__VA_ARGS__) -#define wrn(format, ...) objc_msgSend( \ - objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \ - sel_getUid( "inFile:atLine:wrn:" ), \ - basename( (char *)__FILE__ ), __LINE__, \ - CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \ - ##__VA_ARGS__) -#define err(format, ...) objc_msgSend( \ - objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \ - sel_getUid( "inFile:atLine:err:" ), \ - basename( (char *)__FILE__ ), __LINE__, \ - CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \ - ##__VA_ARGS__) -#define ftl(format, ...) do{objc_msgSend( \ - objc_msgSend( (id)objc_getClass("PearlLogger"), sel_getUid( "get" ) ), \ - sel_getUid( "inFile:atLine:ftl:" ), \ - basename( (char *)__FILE__ ), __LINE__, \ - CFStringCreateWithCString( NULL, format, kCFStringEncodingUTF8 ), \ - ##__VA_ARGS__); abort(); } while (0) +#define trc(format, ...) \ + do { \ + char *_msg = NULL; \ + asprintf( &_msg, format, ##__VA_ARGS__ ); \ + void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \ + _sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \ + sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \ + CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \ + CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 0, \ + CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \ + } while (0) + +#define dbg(format, ...) \ + do { \ + char *_msg = NULL; \ + asprintf( &_msg, format, ##__VA_ARGS__ ); \ + void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \ + _sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \ + sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \ + CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \ + CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 1, \ + CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \ + } while (0) + +#define inf(format, ...) \ + do { \ + char *_msg = NULL; \ + asprintf( &_msg, format, ##__VA_ARGS__ ); \ + void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \ + _sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \ + sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \ + CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \ + CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 2, \ + CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \ + } while (0) + +#define wrn(format, ...) \ + do { \ + char *_msg = NULL; \ + asprintf( &_msg, format, ##__VA_ARGS__ ); \ + void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \ + _sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \ + sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \ + CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \ + CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 3, \ + CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \ + } while (0) + +#define err(format, ...) \ + do { \ + char *_msg = NULL; \ + asprintf( &_msg, format, ##__VA_ARGS__ ); \ + void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \ + _sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \ + sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \ + CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \ + CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 4, \ + CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \ + } while (0) + +#define ftl(format, ...) \ + do { \ + char *_msg = NULL; \ + asprintf( &_msg, format, ##__VA_ARGS__ ); \ + void (*_sendMsg)(id, SEL, CFStringRef, NSInteger, CFStringRef, NSUInteger, CFStringRef) = (void *)objc_msgSend; \ + _sendMsg( objc_msgSend( (id)objc_getClass( "PearlLogger" ), sel_getUid( "get" ) ), \ + sel_getUid( "inFile:atLine:fromFunction:withLevel:text:" ), \ + CFStringCreateWithCString( NULL, basename( (char *)__FILE__ ), kCFStringEncodingUTF8 ), __LINE__, \ + CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 5, \ + CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \ + abort(); \ + } while (0) #endif diff --git a/MasterPassword/ObjC/iOS/MasterPassword-Prefix.pch b/MasterPassword/ObjC/iOS/MasterPassword-Prefix.pch index 85677158..db91deb3 100644 --- a/MasterPassword/ObjC/iOS/MasterPassword-Prefix.pch +++ b/MasterPassword/ObjC/iOS/MasterPassword-Prefix.pch @@ -102,6 +102,6 @@ CFStringCreateWithCString( NULL, __FUNCTION__, kCFStringEncodingUTF8 ), 5, \ CFStringCreateWithCString( NULL, _msg, kCFStringEncodingUTF8 ) ); \ abort(); \ -} while (0) + } while (0) #endif