├── preview.png
├── MEMiniMe
├── blacklist.plist
├── Info.plist
├── MEMiniMe.m
└── ZKSwizzle
│ ├── ZKSwizzle.h
│ └── ZKSwizzle.m
├── MEMiniMe.xcodeproj
├── project.xcworkspace
│ ├── xcuserdata
│ │ ├── w0lf.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ └── wolfgangbaird.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ ├── w0lf.xcuserdatad
│ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ └── wolfgangbaird.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── xcshareddata
│ └── xcschemes
│ │ └── MEMiniMe.xcscheme
└── project.pbxproj
├── readme.md
└── LICENSE
/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MacEnhance/MEMiniMe/HEAD/preview.png
--------------------------------------------------------------------------------
/MEMiniMe/blacklist.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/project.xcworkspace/xcuserdata/w0lf.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MacEnhance/MEMiniMe/HEAD/MEMiniMe.xcodeproj/project.xcworkspace/xcuserdata/w0lf.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/project.xcworkspace/xcuserdata/wolfgangbaird.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MacEnhance/MEMiniMe/HEAD/MEMiniMe.xcodeproj/project.xcworkspace/xcuserdata/wolfgangbaird.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/xcuserdata/w0lf.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MEMiniMe.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/xcuserdata/wolfgangbaird.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Goodbye.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # MEMiniMe
2 |
3 | 
4 |
5 | # Information:
6 |
7 | - Designed for 11.0+
8 | - MEMiniMe is a MacForge Plugin that makes all window toolbars compact on Big Sur
9 | - Author: [MacEnhance](https://github.com/MacEnhance)
10 |
11 | # Functionality:
12 |
13 | - Windows that use system drawn toolbar will be set to use `NSWindowToolbarStyleUnifiedCompact`
14 | - Note that this doesn't affect custom drawn titlebars / toolbars
15 |
16 | # Blacklisting:
17 |
18 | - To add an app the blacklist
19 |
20 | 1. Find the bundle ID of the application you want to blacklist. EG: `com.googlecode.iterm2`
21 | 2. Open `/System/Applications/Utilities/Terminal.app`
22 | 3. Enter the command `defaults write com.googlecode.iterm2 MEMiniMeBlacklist -bool true`
23 | 4. Restart the application
24 |
25 | - To remove an app, replace `true` with `false`
26 |
27 | # Installation:
28 |
29 | 1. Download and open [MacForge](https://github.com/w0lfschild/app_updates/raw/master/MacForge1/MacForge.zip)
30 | 2. Install [MEMiniMe](https://www.macenhance.com/mflink?com.macenhance.MEMiniMe)
31 |
--------------------------------------------------------------------------------
/MEMiniMe/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | BNDL
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 252
25 | NSPrincipalClass
26 | Goodbye
27 | SIMBLTargetApplications
28 |
29 |
30 | BundleIdentifier
31 | *
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 2-Clause License
2 |
3 | Copyright (c) 2021, macEnhance
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
--------------------------------------------------------------------------------
/MEMiniMe/MEMiniMe.m:
--------------------------------------------------------------------------------
1 | //
2 | // MEMiniMe.m
3 | // Created by Wolfgang Baird on 12/22/20.
4 | // Copyright © 2020 Wolfgang Baird. All rights reserved.
5 | //
6 |
7 | #import "ZKSwizzle.h"
8 | #import
9 |
10 | @interface Goodbye : NSObject @end
11 | @interface miniTitle : NSWindow @end
12 |
13 | @implementation Goodbye
14 |
15 | + (void)load {
16 | NSArray *globalBlacklist = [NSArray arrayWithContentsOfFile:[[NSBundle bundleForClass:self.class] pathForResource:@"blacklist" ofType:@"plist"]];
17 | if (![globalBlacklist containsObject:NSBundle.mainBundle.bundleIdentifier] && ![NSUserDefaults.standardUserDefaults boolForKey:@"MEMiniMeBlacklist"]) {
18 | ZKSwizzle(miniTitle, NSWindow);
19 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
20 | for (NSWindow *w in NSApp.windows)
21 | if (w.toolbarStyle != NSWindowToolbarStyleUnifiedCompact) [w setToolbarStyle:NSWindowToolbarStyleUnifiedCompact];
22 | });
23 | }
24 | }
25 |
26 | @end
27 |
28 | @implementation miniTitle
29 |
30 | - (void)setToolbarStyle:(NSWindowToolbarStyle)toolbarStyle {
31 | ZKOrig(void, NSWindowToolbarStyleUnifiedCompact);
32 | }
33 |
34 | - (void)display {
35 | if (self.toolbarStyle != NSWindowToolbarStyleUnifiedCompact) [self setToolbarStyle:NSWindowToolbarStyleUnifiedCompact];
36 | ZKOrig(void);
37 | }
38 |
39 | - (BOOL)makeFirstResponder:(NSResponder *)responder {
40 | if (self.toolbarStyle != NSWindowToolbarStyleUnifiedCompact) [self setToolbarStyle:NSWindowToolbarStyleUnifiedCompact];
41 | return ZKOrig(BOOL, responder);
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/xcshareddata/xcschemes/MEMiniMe.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/MEMiniMe/ZKSwizzle/ZKSwizzle.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZKSwizzle.h
3 | // ZKSwizzle
4 | //
5 | // Created by Alexander S Zielenski on 7/24/14.
6 | // Copyright (c) 2014 Alexander S Zielenski. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | // This is a class for streamlining swizzling. Simply create a new class of any name you want and
14 | // Example:
15 | /*
16 | @interface ZKHookClass : NSObject
17 | - (NSString *)description; // hooks -description on NSObject
18 | - (void)addedMethod; // all subclasses of NSObject now respond to -addedMethod
19 | @end
20 |
21 | @implementation ZKHookClass
22 | ...
23 | @end
24 |
25 | [ZKSwizzle swizzleClass:ZKClass(ZKHookClass) forClass:ZKClass(destination)];
26 | */
27 |
28 | #ifndef ZKSWIZZLE_DEFS
29 | #define ZKSWIZZLE_DEFS
30 |
31 | // CRAZY MACROS FOR DYNAMIC PROTOTYPE CREATION
32 | #define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0, ## __VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5 ,4 ,3 ,2, 1, 0)
33 | #define VA_NUM_ARGS_IMPL(_0, _1,_2,_3,_4,_5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20 ,N,...) N
34 |
35 | #define WRAP0()
36 | #define WRAP1(VARIABLE) , typeof ( VARIABLE )
37 | #define WRAP2(VARIABLE, ...) WRAP1(VARIABLE) WRAP1(__VA_ARGS__)
38 | #define WRAP3(VARIABLE, ...) WRAP1(VARIABLE) WRAP2(__VA_ARGS__)
39 | #define WRAP4(VARIABLE, ...) WRAP1(VARIABLE) WRAP3(__VA_ARGS__)
40 | #define WRAP5(VARIABLE, ...) WRAP1(VARIABLE) WRAP4(__VA_ARGS__)
41 | #define WRAP6(VARIABLE, ...) WRAP1(VARIABLE) WRAP5(__VA_ARGS__)
42 | #define WRAP7(VARIABLE, ...) WRAP1(VARIABLE) WRAP6(__VA_ARGS__)
43 | #define WRAP8(VARIABLE, ...) WRAP1(VARIABLE) WRAP7(__VA_ARGS__)
44 | #define WRAP9(VARIABLE, ...) WRAP1(VARIABLE) WRAP8(__VA_ARGS__)
45 | #define WRAP10(VARIABLE, ...) WRAP1(VARIABLE) WRAP9(__VA_ARGS__)
46 | #define WRAP11(VARIABLE, ...) WRAP1(VARIABLE) WRAP10(__VA_ARGS__)
47 | #define WRAP12(VARIABLE, ...) WRAP1(VARIABLE) WRAP11(__VA_ARGS__)
48 | #define WRAP13(VARIABLE, ...) WRAP1(VARIABLE) WRAP12(__VA_ARGS__)
49 | #define WRAP14(VARIABLE, ...) WRAP1(VARIABLE) WRAP13(__VA_ARGS__)
50 | #define WRAP15(VARIABLE, ...) WRAP1(VARIABLE) WRAP14(__VA_ARGS__)
51 | #define WRAP16(VARIABLE, ...) WRAP1(VARIABLE) WRAP15(__VA_ARGS__)
52 | #define WRAP17(VARIABLE, ...) WRAP1(VARIABLE) WRAP16(__VA_ARGS__)
53 | #define WRAP18(VARIABLE, ...) WRAP1(VARIABLE) WRAP17(__VA_ARGS__)
54 | #define WRAP19(VARIABLE, ...) WRAP1(VARIABLE) WRAP18(__VA_ARGS__)
55 | #define WRAP20(VARIABLE, ...) WRAP1(VARIABLE) WRAP19(__VA_ARGS__)
56 |
57 | #define CAT(A, B) A ## B
58 | #define INVOKE(MACRO, NUMBER, ...) CAT(MACRO, NUMBER)(__VA_ARGS__)
59 | #define WRAP_LIST(...) INVOKE(WRAP, VA_NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
60 |
61 | // Gets the a class with the name CLASS
62 | #define ZKClass(CLASS) objc_getClass(#CLASS)
63 |
64 | // returns the value of an instance variable.
65 | #if !__has_feature(objc_arc)
66 | #define ZKHookIvar(OBJECT, TYPE, NAME) (*(TYPE *)ZKIvarPointer(OBJECT, NAME))
67 | #else
68 | #define ZKHookIvar(OBJECT, TYPE, NAME) \
69 | _Pragma("clang diagnostic push") \
70 | _Pragma("clang diagnostic ignored \"-Wignored-attributes\"") \
71 | (*(__unsafe_unretained TYPE *)ZKIvarPointer(OBJECT, NAME)) \
72 | _Pragma("clang diagnostic pop")
73 | #endif
74 |
75 | ////////////////////////////////////////////////////////////////////////////////
76 | //// Core Macros (For fine-tuned Use)
77 | ////////////////////////////////////////////////////////////////////////////////
78 | // returns the original implementation of the swizzled function or null or not found
79 | #define ZKOrig(TYPE, ...) ((TYPE (*)(id, SEL WRAP_LIST(__VA_ARGS__)))(ZKOriginalImplementation(self, _cmd, __PRETTY_FUNCTION__)))(self, _cmd, ##__VA_ARGS__)
80 |
81 | // returns the original implementation of the superclass of the object swizzled
82 | #define ZKSuper(TYPE, ...) ((TYPE (*)(id, SEL WRAP_LIST(__VA_ARGS__)))(ZKSuperImplementation(self, _cmd, __PRETTY_FUNCTION__)))(self, _cmd, ##__VA_ARGS__)
83 |
84 | #define _ZKSwizzleInterfaceConditionally(CLASS_NAME, TARGET_CLASS, SUPERCLASS, GROUP, IMMEDIATELY) \
85 | @interface _$ ## CLASS_NAME : SUPERCLASS @end\
86 | @implementation _$ ## CLASS_NAME\
87 | + (void)initialize {}\
88 | @end\
89 | @interface CLASS_NAME : _$ ## CLASS_NAME @end\
90 | @implementation CLASS_NAME (ZKSWIZZLE)\
91 | + (void)load {\
92 | if (IMMEDIATELY) {\
93 | [self _ZK_unconditionallySwizzle];\
94 | } else {\
95 | _$ZKRegisterInterface(self, #GROUP);\
96 | }\
97 | }\
98 | + (void)_ZK_unconditionallySwizzle {\
99 | ZKSwizzle(CLASS_NAME, TARGET_CLASS);\
100 | }\
101 | @end
102 |
103 | // Bootstraps your swizzling class so that it requires no setup
104 | // outside of this macro call
105 | // If you override +load you must call ZKSwizzle(CLASS_NAME, TARGET_CLASS)
106 | // yourself, otherwise the swizzling would not take place
107 | #define ZKSwizzleInterface(CLASS_NAME, TARGET_CLASS, SUPERCLASS) \
108 | _ZKSwizzleInterfaceConditionally(CLASS_NAME, TARGET_CLASS, SUPERCLASS, ZK_UNGROUPED, YES)
109 |
110 | // Same as ZKSwizzleInterface, except
111 | #define ZKSwizzleInterfaceGroup(CLASS_NAME, TARGET_CLASS, SUPER_CLASS, GROUP) \
112 | _ZKSwizzleInterfaceConditionally(CLASS_NAME, TARGET_CLASS, SUPER_CLASS, GROUP, NO)
113 |
114 | ////////////////////////////////////////////////////////////////////////////////
115 | //// Sugar Macros (For general use)
116 | ////////////////////////////////////////////////////////////////////////////////
117 | // Inspired by logos. Credits to @mstg!
118 |
119 | #define __GEN_CLASS(TARGET, LINE) __ZK_## LINE## TARGET
120 | #define _GEN_CLASS(TARGET, LINE) __GEN_CLASS(TARGET, LINE)
121 | #define GEN_CLASS(TARGET) _GEN_CLASS(TARGET, __LINE__)
122 |
123 | #define hook_2(TARGET, GROUP) \
124 | ZKSwizzleInterfaceGroup(GEN_CLASS(TARGET), TARGET, NSObject, GROUP) @implementation GEN_CLASS(TARGET)
125 |
126 | #define hook_1(TARGET) \
127 | ZKSwizzleInterface(GEN_CLASS(TARGET), TARGET, NSObject) @implementation GEN_CLASS(TARGET)
128 |
129 | #define endhook @end
130 |
131 | #define _orig(...) ZKOrig(__VA_ARGS__)
132 | #define _super(...) ZKSuper(__VA_ARGS__)
133 |
134 | #define __HOOK(ARGC, ARGS...) hook_ ## ARGC (ARGS)
135 | #define _HOOK(ARGC, ARGS...) __HOOK(ARGC, ARGS)
136 | #define hook(...) _HOOK(VA_NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
137 | #define ctor __attribute__((constructor)) void init()
138 |
139 | #define ZKIgnoreTypes +(BOOL)_ZK_ignoreTypes { return YES; }
140 |
141 | __BEGIN_DECLS
142 |
143 | ////////////////////////////////////////////////////////////////////////////////
144 | //// C Backing (Don't typically call directly)
145 | ////////////////////////////////////////////////////////////////////////////////
146 |
147 | // Make sure to cast this before you use it
148 | typedef id (*ZKIMP)(id, SEL, ...);
149 |
150 | // returns a pointer to the instance variable "name" on the object
151 | void *ZKIvarPointer(id self, const char *name);
152 | // returns the original implementation of a method with selector "sel" of an object hooked by the methods below
153 | ZKIMP ZKOriginalImplementation(id self, SEL sel, const char *info);
154 | // returns the implementation of a method with selector "sel" of the superclass of object
155 | ZKIMP ZKSuperImplementation(id object, SEL sel, const char *info);
156 |
157 | // hooks all the implemented methods of source with destination
158 | // adds any methods that arent implemented on destination to destination that are implemented in source
159 | #define ZKSwizzle(src, dst) _ZKSwizzle(ZKClass(src), ZKClass(dst))
160 | BOOL _ZKSwizzle(Class src, Class dest);
161 |
162 | #define ZKSwizzleGroup(NAME) _ZKSwizzleGroup(#NAME)
163 | void _$ZKRegisterInterface(Class cls, const char *groupName);
164 | BOOL _ZKSwizzleGroup(const char *groupName);
165 |
166 | // Calls above method with the superclass of source for desination
167 | #define ZKSwizzleClass(src) _ZKSwizzleClass(ZKClass(src))
168 | BOOL _ZKSwizzleClass(Class cls);
169 |
170 | __END_DECLS
171 | #endif
172 |
--------------------------------------------------------------------------------
/MEMiniMe/ZKSwizzle/ZKSwizzle.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZKSwizzle.m
3 | // ZKSwizzle
4 | //
5 | // Created by Alexander S Zielenski on 7/24/14.
6 | // Copyright (c) 2014 Alexander S Zielenski. All rights reserved.
7 | //
8 |
9 | #import "ZKSwizzle.h"
10 | static NSMutableDictionary *classTable;
11 |
12 | @interface NSObject (ZKSwizzle)
13 | + (void)_ZK_unconditionallySwizzle;
14 | + (BOOL)_ZK_ignoreTypes;
15 | @end
16 |
17 | void *ZKIvarPointer(id self, const char *name) {
18 | Ivar ivar = class_getInstanceVariable(object_getClass(self), name);
19 | return ivar == NULL ? NULL : (__bridge void *)self + ivar_getOffset(ivar);
20 | }
21 |
22 | static SEL destinationSelectorForSelector(SEL cmd, Class dst) {
23 | return NSSelectorFromString([@"_ZK_old_" stringByAppendingFormat:@"%s_%@", class_getName(dst), NSStringFromSelector(cmd)]);
24 | }
25 |
26 | static Class classFromInfo(const char *info) {
27 | NSUInteger bracket_index = -1;
28 | for (NSUInteger i = 0; i < strlen(info); i++) {
29 | if (info[i] == '[') {
30 | bracket_index = i;
31 | break;
32 | }
33 | }
34 | bracket_index++;
35 |
36 | if (bracket_index == -1) {
37 | [NSException raise:@"Failed to parse info" format:@"Couldn't find swizzle class for info: %s", info];
38 | return NULL;
39 | }
40 |
41 | char after_bracket[255];
42 | memcpy(after_bracket, &info[bracket_index], strlen(info) - bracket_index - 1);
43 |
44 | for (NSUInteger i = 0; i < strlen(info); i++) {
45 | if (after_bracket[i] == ' ') {
46 | after_bracket[i] = '\0';
47 | }
48 | }
49 |
50 | return objc_getClass(after_bracket);
51 | }
52 |
53 | // takes __PRETTY_FUNCTION__ for info which gives the name of the swizzle source class
54 | /*
55 |
56 | We add the original implementation onto the swizzle class
57 | On ZKOrig, we use __PRETTY_FUNCTION__ to get the name of the swizzle class
58 | Then we get the implementation of that selector on the swizzle class
59 | Then we call it directly, passing in the correct selector and self
60 |
61 | */
62 | ZKIMP ZKOriginalImplementation(id self, SEL sel, const char *info) {
63 | if (sel == NULL || self == NULL || info == NULL) {
64 | [NSException raise:@"Invalid Arguments" format:@"One of self: %@, self: %@, or info: %s is NULL", self, NSStringFromSelector(sel), info];
65 | return NULL;
66 | }
67 |
68 | Class cls = classFromInfo(info);
69 | Class dest = object_getClass(self);
70 |
71 | if (cls == NULL || dest == NULL) {
72 | [NSException raise:@"Failed obtain class pair" format:@"src: %@ | dst: %@ | sel: %@", NSStringFromClass(cls), NSStringFromClass(dest), NSStringFromSelector(sel)];
73 | return NULL;
74 | }
75 |
76 | SEL destSel = destinationSelectorForSelector(sel, cls);
77 |
78 | Method method = class_getInstanceMethod(dest, destSel);
79 |
80 | if (method == NULL) {
81 | if (![NSStringFromClass(cls) isEqualToString:NSStringFromClass([self class])]) {
82 | // There is no implementation at this class level. Call the super implementation
83 | return ZKSuperImplementation(self, sel, info);
84 | }
85 |
86 | [NSException raise:@"Failed to retrieve method" format:@"Got null for the source class %@ with selector %@ (%@)", NSStringFromClass(cls), NSStringFromSelector(sel), NSStringFromSelector(destSel)];
87 | return NULL;
88 | }
89 |
90 | ZKIMP implementation = (ZKIMP)method_getImplementation(method);
91 | if (implementation == NULL) {
92 | [NSException raise:@"Failed to get implementation" format:@"The objective-c runtime could not get the implementation for %@ on the class %@. There is no fix for this", NSStringFromClass(cls), NSStringFromSelector(sel)];
93 | }
94 |
95 | return implementation;
96 | }
97 |
98 | ZKIMP ZKSuperImplementation(id object, SEL sel, const char *info) {
99 | if (sel == NULL || object == NULL) {
100 | [NSException raise:@"Invalid Arguments" format:@"One of self: %@, self: %@ is NULL", object, NSStringFromSelector(sel)];
101 | return NULL;
102 | }
103 |
104 | Class cls = object_getClass(object);
105 | if (cls == NULL) {
106 | [NSException raise:@"Invalid Argument" format:@"Could not obtain class for the passed object"];
107 | return NULL;
108 | }
109 |
110 | // Two scenarios:
111 | // 1.) The superclass was not swizzled, no problem
112 | // 2.) The superclass was swizzled, problem
113 |
114 | // We want to return the swizzled class's superclass implementation
115 | // If this is a subclass of such a class, we want two behaviors:
116 | // a.) If this imp was also swizzled, no problem, return the superclass's swizzled imp
117 | // b.) This imp was not swizzled, return the class that was originally swizzled's superclass's imp
118 | Class sourceClass = classFromInfo(info);
119 | if (sourceClass != NULL) {
120 | BOOL isClassMethod = class_isMetaClass(cls);
121 | // This was called from a swizzled method, get the class it was swizzled with
122 | NSString *className = classTable[NSStringFromClass(sourceClass)];
123 | if (className != NULL) {
124 | cls = NSClassFromString(className);
125 | // make sure we get a class method if we asked for one
126 | if (isClassMethod) {
127 | cls = object_getClass(cls);
128 | }
129 | }
130 | }
131 |
132 | cls = class_getSuperclass(cls);
133 |
134 | // This is a root class, it has no super class
135 | if (cls == NULL) {
136 | [NSException raise:@"Invalid Argument" format:@"Could not obtain superclass for the passed object"];
137 | return NULL;
138 | }
139 |
140 | Method method = class_getInstanceMethod(cls, sel);
141 | if (method == NULL) {
142 | [NSException raise:@"Failed to retrieve method" format:@"We could not find the super implementation for the class %@ and selector %@, are you sure it exists?", NSStringFromClass(cls), NSStringFromSelector(sel)];
143 | return NULL;
144 | }
145 |
146 | ZKIMP implementation = (ZKIMP)method_getImplementation(method);
147 | if (implementation == NULL) {
148 | [NSException raise:@"Failed to get implementation" format:@"The objective-c runtime could not get the implementation for %@ on the class %@. There is no fix for this", NSStringFromClass(cls), NSStringFromSelector(sel)];
149 | }
150 |
151 | return implementation;
152 | }
153 |
154 | static BOOL enumerateMethods(Class, Class);
155 | BOOL _ZKSwizzle(Class src, Class dest) {
156 | if (dest == NULL)
157 | return NO;
158 |
159 | NSString *destName = NSStringFromClass(dest);
160 | if (!destName) {
161 | return NO;
162 | }
163 |
164 | if (!classTable) {
165 | classTable = [[NSMutableDictionary alloc] init];
166 | }
167 |
168 | if ([classTable objectForKey:NSStringFromClass(src)]) {
169 | [NSException raise:@"Invalid Argument"
170 | format:@"This source class (%@) was already swizzled with another, (%@)", NSStringFromClass(src), classTable[NSStringFromClass(src)]];
171 | return NO;
172 | }
173 |
174 | BOOL success = enumerateMethods(dest, src);
175 | // The above method only gets instance methods. Do the same method for the metaclass of the class
176 | success &= enumerateMethods(object_getClass(dest), object_getClass(src));
177 |
178 | [classTable setObject:destName forKey:NSStringFromClass(src)];
179 | return success;
180 | }
181 |
182 | BOOL _ZKSwizzleClass(Class cls) {
183 | return _ZKSwizzle(cls, [cls superclass]);
184 | }
185 |
186 | static BOOL classIgnoresTypes(Class cls) {
187 | if (!class_isMetaClass(cls)) {
188 | cls = object_getClass(cls);
189 | }
190 |
191 | if (class_respondsToSelector(cls, @selector(_ZK_ignoreTypes))) {
192 | // Class cls2 = class_createInstance(cls, 0);
193 | return [class_createInstance(cls, 0) _ZK_ignoreTypes];
194 | }
195 |
196 | return NO;
197 | }
198 |
199 | static BOOL enumerateMethods(Class destination, Class source) {
200 | #if OBJC_API_VERSION < 2
201 | [NSException raise:@"Unsupported feature" format:@"ZKSwizzle is only available in objc 2.0"];
202 | return NO;
203 |
204 | #else
205 |
206 | unsigned int methodCount;
207 | Method *methodList = class_copyMethodList(source, &methodCount);
208 | BOOL success = YES;
209 | BOOL ignoreTypes = classIgnoresTypes(source);
210 |
211 | for (int i = 0; i < methodCount; i++) {
212 | Method method = methodList[i];
213 | SEL selector = method_getName(method);
214 | NSString *methodName = NSStringFromSelector(selector);
215 |
216 | // Don't do anything with the unconditional swizzle
217 | if (sel_isEqual(selector, @selector(_ZK_unconditionallySwizzle)) ||
218 | sel_isEqual(selector, @selector(_ZK_ignoreTypes))) {
219 | continue;
220 | }
221 |
222 | // We only swizzle methods that are implemented
223 | if (class_respondsToSelector(destination, selector)) {
224 | Method originalMethod = class_getInstanceMethod(destination, selector);
225 |
226 | const char *originalType = method_getTypeEncoding(originalMethod);
227 | const char *newType = method_getTypeEncoding(method);
228 | if (strcmp(originalType, newType) != 0 && !ignoreTypes) {
229 | NSLog(@"ZKSwizzle: incompatible type encoding for %@. (expected %s, got %s)", methodName, originalType, newType);
230 | // Incompatible type encoding
231 | success = NO;
232 | continue;
233 | }
234 |
235 | Method superImp = class_getInstanceMethod(class_getSuperclass(destination), selector);
236 |
237 | if (originalMethod != superImp) {
238 | // We are re-adding the destination selector because it could be on a superclass and not on the class itself. This method could fail
239 | class_addMethod(destination, selector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
240 |
241 | SEL destSel = destinationSelectorForSelector(selector, source);
242 | if (!class_addMethod(destination, destSel, method_getImplementation(method), method_getTypeEncoding(originalMethod))) {
243 | NSLog(@"ZKSwizzle: failed to add method %@ onto class %@ with selector %@", NSStringFromSelector(selector), NSStringFromClass(source), NSStringFromSelector(destSel));
244 | success = NO;
245 | continue;
246 | }
247 |
248 | method_exchangeImplementations(class_getInstanceMethod(destination, selector), class_getInstanceMethod(destination, destSel));
249 | } else {
250 | // If the method we are hooking is not implemented on the subclass at hook-time,
251 | // we want orig calls from those hooks to go to the superclass. (ZKOriginalImplementation
252 | // redirects to ZKSuperImplementation when destinationSelectorForSelector() is not implemented
253 | // on the target class, that, combined with the fact that ZKOrig is called from a hook, means
254 | // calls should redirect to super)
255 | success &= class_addMethod(destination, selector, method_getImplementation(method), method_getTypeEncoding(method));
256 | }
257 |
258 | } else {
259 | // Add any extra methods to the class but don't swizzle them
260 | success &= class_addMethod(destination, selector, method_getImplementation(method), method_getTypeEncoding(method));
261 | }
262 | }
263 |
264 | unsigned int propertyCount;
265 | objc_property_t *propertyList = class_copyPropertyList(source, &propertyCount);
266 | for (int i = 0; i < propertyCount; i++) {
267 | objc_property_t property = propertyList[i];
268 | const char *name = property_getName(property);
269 | unsigned int attributeCount;
270 | objc_property_attribute_t *attributes = property_copyAttributeList(property, &attributeCount);
271 |
272 | if (class_getProperty(destination, name) == NULL) {
273 | class_addProperty(destination, name, attributes, attributeCount);
274 | } else {
275 | class_replaceProperty(destination, name, attributes, attributeCount);
276 | }
277 |
278 | free(attributes);
279 | }
280 |
281 | free(propertyList);
282 | free(methodList);
283 | return success;
284 | #endif
285 | }
286 |
287 | // Options were to use a group class and traverse its subclasses
288 | // or to create a groups dictionary
289 | // This works because +load on NSObject is called before attribute((constructor))
290 | static NSMutableDictionary *groups = nil;
291 | void _$ZKRegisterInterface(Class cls, const char *groupName) {
292 | if (!groups)
293 | groups = [NSMutableDictionary dictionary];
294 |
295 | NSString *groupString = @(groupName);
296 | NSMutableArray *groupList = groups[groupString];
297 | if (!groupList) {
298 | groupList = [NSMutableArray array];
299 | groups[groupString] = groupList;
300 | }
301 |
302 | [groupList addObject:NSStringFromClass(cls)];
303 | }
304 |
305 | BOOL _ZKSwizzleGroup(const char *groupName) {
306 | NSArray *groupList = groups[@(groupName)];
307 | if (!groupList) {
308 | [NSException raise:@"Invalid Argument" format:@"ZKSwizzle: There is no group by the name of %s", groupName];
309 | return NO;
310 | }
311 |
312 | BOOL success = YES;
313 | for (NSString *className in groupList) {
314 | Class cls = NSClassFromString(className);
315 | if (cls == NULL)
316 | continue;
317 |
318 | if (class_respondsToSelector(object_getClass(cls), @selector(_ZK_unconditionallySwizzle))) {
319 | [cls _ZK_unconditionallySwizzle];
320 | } else {
321 | success = NO;
322 | }
323 | }
324 |
325 | return success;
326 | }
327 |
--------------------------------------------------------------------------------
/MEMiniMe.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | AB20B01D2447504200E05E17 /* blacklist.plist in Resources */ = {isa = PBXBuildFile; fileRef = AB20B01C2447504200E05E17 /* blacklist.plist */; };
11 | F39B2FE824462DAB00BB8B00 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F39B2FE724462DAB00BB8B00 /* AppKit.framework */; };
12 | F39B2FEA24462DAB00BB8B00 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F39B2FE924462DAB00BB8B00 /* Foundation.framework */; };
13 | F39B2FF124462DAB00BB8B00 /* MEMiniMe.m in Sources */ = {isa = PBXBuildFile; fileRef = F39B2FF024462DAB00BB8B00 /* MEMiniMe.m */; };
14 | F39B2FF524462DAB00BB8B00 /* ZKSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = F39B2FF424462DAB00BB8B00 /* ZKSwizzle.m */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXFileReference section */
18 | AB20B01C2447504200E05E17 /* blacklist.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = blacklist.plist; sourceTree = ""; usesTabs = 1; };
19 | F39B2FE424462DAB00BB8B00 /* MEMiniMe.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MEMiniMe.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
20 | F39B2FE724462DAB00BB8B00 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
21 | F39B2FE924462DAB00BB8B00 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
22 | F39B2FF024462DAB00BB8B00 /* MEMiniMe.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MEMiniMe.m; sourceTree = ""; };
23 | F39B2FF324462DAB00BB8B00 /* ZKSwizzle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZKSwizzle.h; sourceTree = ""; };
24 | F39B2FF424462DAB00BB8B00 /* ZKSwizzle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZKSwizzle.m; sourceTree = ""; };
25 | F39B2FFD244630BC00BB8B00 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
26 | FBBEC3942597D1310026A0E5 /* readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = readme.md; sourceTree = ""; };
27 | /* End PBXFileReference section */
28 |
29 | /* Begin PBXFrameworksBuildPhase section */
30 | F39B2FE124462DAB00BB8B00 /* Frameworks */ = {
31 | isa = PBXFrameworksBuildPhase;
32 | buildActionMask = 2147483647;
33 | files = (
34 | F39B2FE824462DAB00BB8B00 /* AppKit.framework in Frameworks */,
35 | F39B2FEA24462DAB00BB8B00 /* Foundation.framework in Frameworks */,
36 | );
37 | runOnlyForDeploymentPostprocessing = 0;
38 | };
39 | /* End PBXFrameworksBuildPhase section */
40 |
41 | /* Begin PBXGroup section */
42 | F39B2FDB24462DAA00BB8B00 = {
43 | isa = PBXGroup;
44 | children = (
45 | FBBEC3942597D1310026A0E5 /* readme.md */,
46 | F39B2FEB24462DAB00BB8B00 /* MEMiniMe */,
47 | F39B2FE624462DAB00BB8B00 /* Frameworks */,
48 | F39B2FE524462DAB00BB8B00 /* Products */,
49 | );
50 | sourceTree = "";
51 | };
52 | F39B2FE524462DAB00BB8B00 /* Products */ = {
53 | isa = PBXGroup;
54 | children = (
55 | F39B2FE424462DAB00BB8B00 /* MEMiniMe.bundle */,
56 | );
57 | name = Products;
58 | sourceTree = "";
59 | };
60 | F39B2FE624462DAB00BB8B00 /* Frameworks */ = {
61 | isa = PBXGroup;
62 | children = (
63 | F39B2FE724462DAB00BB8B00 /* AppKit.framework */,
64 | F39B2FE924462DAB00BB8B00 /* Foundation.framework */,
65 | );
66 | name = Frameworks;
67 | sourceTree = "";
68 | };
69 | F39B2FEB24462DAB00BB8B00 /* MEMiniMe */ = {
70 | isa = PBXGroup;
71 | children = (
72 | F39B2FF224462DAB00BB8B00 /* ZKSwizzle */,
73 | F39B2FF024462DAB00BB8B00 /* MEMiniMe.m */,
74 | F39B2FFD244630BC00BB8B00 /* Info.plist */,
75 | AB20B01C2447504200E05E17 /* blacklist.plist */,
76 | );
77 | path = MEMiniMe;
78 | sourceTree = "";
79 | };
80 | F39B2FF224462DAB00BB8B00 /* ZKSwizzle */ = {
81 | isa = PBXGroup;
82 | children = (
83 | F39B2FF324462DAB00BB8B00 /* ZKSwizzle.h */,
84 | F39B2FF424462DAB00BB8B00 /* ZKSwizzle.m */,
85 | );
86 | path = ZKSwizzle;
87 | sourceTree = "";
88 | };
89 | /* End PBXGroup section */
90 |
91 | /* Begin PBXNativeTarget section */
92 | F39B2FE324462DAB00BB8B00 /* MEMiniMe */ = {
93 | isa = PBXNativeTarget;
94 | buildConfigurationList = F39B2FFA24462DAB00BB8B00 /* Build configuration list for PBXNativeTarget "MEMiniMe" */;
95 | buildPhases = (
96 | F39B2FE024462DAB00BB8B00 /* Sources */,
97 | F39B2FE124462DAB00BB8B00 /* Frameworks */,
98 | F39B2FE224462DAB00BB8B00 /* Resources */,
99 | F39B300C24469F2600BB8B00 /* ShellScript */,
100 | );
101 | buildRules = (
102 | );
103 | dependencies = (
104 | );
105 | name = MEMiniMe;
106 | productName = Goodbye;
107 | productReference = F39B2FE424462DAB00BB8B00 /* MEMiniMe.bundle */;
108 | productType = "com.apple.product-type.bundle";
109 | };
110 | /* End PBXNativeTarget section */
111 |
112 | /* Begin PBXProject section */
113 | F39B2FDC24462DAA00BB8B00 /* Project object */ = {
114 | isa = PBXProject;
115 | attributes = {
116 | LastUpgradeCheck = 1140;
117 | ORGANIZATIONNAME = "Wolfgang Baird";
118 | TargetAttributes = {
119 | F39B2FE324462DAB00BB8B00 = {
120 | CreatedOnToolsVersion = 11.4;
121 | };
122 | };
123 | };
124 | buildConfigurationList = F39B2FDF24462DAA00BB8B00 /* Build configuration list for PBXProject "MEMiniMe" */;
125 | compatibilityVersion = "Xcode 9.3";
126 | developmentRegion = en;
127 | hasScannedForEncodings = 0;
128 | knownRegions = (
129 | en,
130 | Base,
131 | );
132 | mainGroup = F39B2FDB24462DAA00BB8B00;
133 | productRefGroup = F39B2FE524462DAB00BB8B00 /* Products */;
134 | projectDirPath = "";
135 | projectRoot = "";
136 | targets = (
137 | F39B2FE324462DAB00BB8B00 /* MEMiniMe */,
138 | );
139 | };
140 | /* End PBXProject section */
141 |
142 | /* Begin PBXResourcesBuildPhase section */
143 | F39B2FE224462DAB00BB8B00 /* Resources */ = {
144 | isa = PBXResourcesBuildPhase;
145 | buildActionMask = 2147483647;
146 | files = (
147 | AB20B01D2447504200E05E17 /* blacklist.plist in Resources */,
148 | );
149 | runOnlyForDeploymentPostprocessing = 0;
150 | };
151 | /* End PBXResourcesBuildPhase section */
152 |
153 | /* Begin PBXShellScriptBuildPhase section */
154 | F39B300C24469F2600BB8B00 /* ShellScript */ = {
155 | isa = PBXShellScriptBuildPhase;
156 | buildActionMask = 2147483647;
157 | files = (
158 | );
159 | inputPaths = (
160 | );
161 | outputPaths = (
162 | );
163 | runOnlyForDeploymentPostprocessing = 0;
164 | shellPath = /bin/sh;
165 | shellScript = "# Increment build number\n\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"${INFOPLIST_FILE}\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${INFOPLIST_FILE}\"\n";
166 | };
167 | /* End PBXShellScriptBuildPhase section */
168 |
169 | /* Begin PBXSourcesBuildPhase section */
170 | F39B2FE024462DAB00BB8B00 /* Sources */ = {
171 | isa = PBXSourcesBuildPhase;
172 | buildActionMask = 2147483647;
173 | files = (
174 | F39B2FF124462DAB00BB8B00 /* MEMiniMe.m in Sources */,
175 | F39B2FF524462DAB00BB8B00 /* ZKSwizzle.m in Sources */,
176 | );
177 | runOnlyForDeploymentPostprocessing = 0;
178 | };
179 | /* End PBXSourcesBuildPhase section */
180 |
181 | /* Begin XCBuildConfiguration section */
182 | F39B2FF824462DAB00BB8B00 /* Debug */ = {
183 | isa = XCBuildConfiguration;
184 | buildSettings = {
185 | ALWAYS_SEARCH_USER_PATHS = NO;
186 | CLANG_ANALYZER_NONNULL = YES;
187 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
188 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
189 | CLANG_CXX_LIBRARY = "libc++";
190 | CLANG_ENABLE_MODULES = YES;
191 | CLANG_ENABLE_OBJC_ARC = YES;
192 | CLANG_ENABLE_OBJC_WEAK = YES;
193 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
194 | CLANG_WARN_BOOL_CONVERSION = YES;
195 | CLANG_WARN_COMMA = YES;
196 | CLANG_WARN_CONSTANT_CONVERSION = YES;
197 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
198 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
199 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
200 | CLANG_WARN_EMPTY_BODY = YES;
201 | CLANG_WARN_ENUM_CONVERSION = YES;
202 | CLANG_WARN_INFINITE_RECURSION = YES;
203 | CLANG_WARN_INT_CONVERSION = YES;
204 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
205 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
206 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
207 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
208 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
209 | CLANG_WARN_STRICT_PROTOTYPES = YES;
210 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
211 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
212 | CLANG_WARN_UNREACHABLE_CODE = YES;
213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
214 | COMBINE_HIDPI_IMAGES = YES;
215 | COPY_PHASE_STRIP = NO;
216 | DEBUG_INFORMATION_FORMAT = dwarf;
217 | DEPLOYMENT_LOCATION = YES;
218 | DSTROOT = /;
219 | ENABLE_STRICT_OBJC_MSGSEND = YES;
220 | ENABLE_TESTABILITY = YES;
221 | GCC_C_LANGUAGE_STANDARD = gnu11;
222 | GCC_DYNAMIC_NO_PIC = NO;
223 | GCC_NO_COMMON_BLOCKS = YES;
224 | GCC_OPTIMIZATION_LEVEL = 0;
225 | GCC_PREPROCESSOR_DEFINITIONS = (
226 | "DEBUG=1",
227 | "$(inherited)",
228 | );
229 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
230 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
231 | GCC_WARN_UNDECLARED_SELECTOR = YES;
232 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
233 | GCC_WARN_UNUSED_FUNCTION = YES;
234 | GCC_WARN_UNUSED_VARIABLE = YES;
235 | INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins";
236 | MACOSX_DEPLOYMENT_TARGET = 10.9;
237 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
238 | MTL_FAST_MATH = YES;
239 | ONLY_ACTIVE_ARCH = YES;
240 | };
241 | name = Debug;
242 | };
243 | F39B2FF924462DAB00BB8B00 /* Release */ = {
244 | isa = XCBuildConfiguration;
245 | buildSettings = {
246 | ALWAYS_SEARCH_USER_PATHS = NO;
247 | CLANG_ANALYZER_NONNULL = YES;
248 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
250 | CLANG_CXX_LIBRARY = "libc++";
251 | CLANG_ENABLE_MODULES = YES;
252 | CLANG_ENABLE_OBJC_ARC = YES;
253 | CLANG_ENABLE_OBJC_WEAK = YES;
254 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
255 | CLANG_WARN_BOOL_CONVERSION = YES;
256 | CLANG_WARN_COMMA = YES;
257 | CLANG_WARN_CONSTANT_CONVERSION = YES;
258 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
259 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
260 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
261 | CLANG_WARN_EMPTY_BODY = YES;
262 | CLANG_WARN_ENUM_CONVERSION = YES;
263 | CLANG_WARN_INFINITE_RECURSION = YES;
264 | CLANG_WARN_INT_CONVERSION = YES;
265 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
266 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
267 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
268 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
269 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
270 | CLANG_WARN_STRICT_PROTOTYPES = YES;
271 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
272 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
273 | CLANG_WARN_UNREACHABLE_CODE = YES;
274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
275 | COMBINE_HIDPI_IMAGES = YES;
276 | COPY_PHASE_STRIP = NO;
277 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
278 | DEPLOYMENT_LOCATION = YES;
279 | DSTROOT = /;
280 | ENABLE_NS_ASSERTIONS = NO;
281 | ENABLE_STRICT_OBJC_MSGSEND = YES;
282 | GCC_C_LANGUAGE_STANDARD = gnu11;
283 | GCC_NO_COMMON_BLOCKS = YES;
284 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
285 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
286 | GCC_WARN_UNDECLARED_SELECTOR = YES;
287 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
288 | GCC_WARN_UNUSED_FUNCTION = YES;
289 | GCC_WARN_UNUSED_VARIABLE = YES;
290 | INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins";
291 | MACOSX_DEPLOYMENT_TARGET = 10.9;
292 | MTL_ENABLE_DEBUG_INFO = NO;
293 | MTL_FAST_MATH = YES;
294 | };
295 | name = Release;
296 | };
297 | F39B2FFB24462DAB00BB8B00 /* Debug */ = {
298 | isa = XCBuildConfiguration;
299 | buildSettings = {
300 | CLANG_ENABLE_OBJC_ARC = YES;
301 | CODE_SIGN_STYLE = Automatic;
302 | COMBINE_HIDPI_IMAGES = YES;
303 | CURRENT_PROJECT_VERSION = 10;
304 | DEPLOYMENT_LOCATION = YES;
305 | DEVELOPMENT_TEAM = EX596BNL45;
306 | DSTROOT = /;
307 | GCC_PRECOMPILE_PREFIX_HEADER = NO;
308 | INFOPLIST_FILE = MEMiniMe/Info.plist;
309 | INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins";
310 | MACH_O_TYPE = mh_dylib;
311 | MACOSX_DEPLOYMENT_TARGET = 11.0;
312 | MARKETING_VERSION = 1.3.0;
313 | ONLY_ACTIVE_ARCH = NO;
314 | PRODUCT_BUNDLE_IDENTIFIER = com.macenhance.MiniMe;
315 | PRODUCT_NAME = "$(TARGET_NAME)";
316 | SKIP_INSTALL = NO;
317 | WRAPPER_EXTENSION = bundle;
318 | };
319 | name = Debug;
320 | };
321 | F39B2FFC24462DAB00BB8B00 /* Release */ = {
322 | isa = XCBuildConfiguration;
323 | buildSettings = {
324 | CLANG_ENABLE_OBJC_ARC = YES;
325 | CODE_SIGN_STYLE = Automatic;
326 | COMBINE_HIDPI_IMAGES = YES;
327 | CURRENT_PROJECT_VERSION = 10;
328 | DEPLOYMENT_LOCATION = YES;
329 | DEVELOPMENT_TEAM = EX596BNL45;
330 | DSTROOT = /;
331 | GCC_PRECOMPILE_PREFIX_HEADER = NO;
332 | INFOPLIST_FILE = MEMiniMe/Info.plist;
333 | INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins";
334 | MACH_O_TYPE = mh_dylib;
335 | MACOSX_DEPLOYMENT_TARGET = 11.0;
336 | MARKETING_VERSION = 1.3.0;
337 | ONLY_ACTIVE_ARCH = NO;
338 | PRODUCT_BUNDLE_IDENTIFIER = com.macenhance.MiniMe;
339 | PRODUCT_NAME = "$(TARGET_NAME)";
340 | SKIP_INSTALL = NO;
341 | WRAPPER_EXTENSION = bundle;
342 | };
343 | name = Release;
344 | };
345 | /* End XCBuildConfiguration section */
346 |
347 | /* Begin XCConfigurationList section */
348 | F39B2FDF24462DAA00BB8B00 /* Build configuration list for PBXProject "MEMiniMe" */ = {
349 | isa = XCConfigurationList;
350 | buildConfigurations = (
351 | F39B2FF824462DAB00BB8B00 /* Debug */,
352 | F39B2FF924462DAB00BB8B00 /* Release */,
353 | );
354 | defaultConfigurationIsVisible = 0;
355 | defaultConfigurationName = Release;
356 | };
357 | F39B2FFA24462DAB00BB8B00 /* Build configuration list for PBXNativeTarget "MEMiniMe" */ = {
358 | isa = XCConfigurationList;
359 | buildConfigurations = (
360 | F39B2FFB24462DAB00BB8B00 /* Debug */,
361 | F39B2FFC24462DAB00BB8B00 /* Release */,
362 | );
363 | defaultConfigurationIsVisible = 0;
364 | defaultConfigurationName = Release;
365 | };
366 | /* End XCConfigurationList section */
367 | };
368 | rootObject = F39B2FDC24462DAA00BB8B00 /* Project object */;
369 | }
370 |
--------------------------------------------------------------------------------