Skip to content

Commit

Permalink
Improve Objective-C compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewchang-bird committed Jan 28, 2022
1 parent 8e3139b commit 9d5e886
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Mockingbird.xcodeproj/xcconfigs/MockingbirdFramework.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ TARGET_NAME = Mockingbird

// Build Flags
BUILD_LIBRARY_FOR_DISTRIBUTION = YES
GCC_ENABLE_OBJC_EXCEPTIONS = YES
GCC_WARN_SHADOW = YES

// Linking
OTHER_LDFLAGS = $(inherited) -framework XCTest
4 changes: 4 additions & 0 deletions Mockingbird.xcodeproj/xcconfigs/MockingbirdGenerator.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include "FrameworkBase.xcconfig"

// Identifiers
INFOPLIST_FILE = $(SRCROOT)/Sources/MockingbirdGenerator/Info.plist
SUPPORTED_PLATFORMS = macosx
PRODUCT_MODULE_NAME = MockingbirdGenerator
PRODUCT_NAME = MockingbirdGenerator
TARGET_NAME = MockingbirdGenerator

// Compatibility
MACOSX_DEPLOYMENT_TARGET = 10.15
4 changes: 2 additions & 2 deletions Sources/MockingbirdFramework/Objective-C/MKBConcreteMock.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ - (void)forwardInvocation:(NSInvocation *)invocation
case MKBInvocationRecorderModeNone: {
id _Nullable returnValue =
[self.mockingbirdContext.mocking
objcDidInvoke:objcInvocation evaluating:^id _Nullable(MKBObjCInvocation *invocation) {
return [self.mockingbirdContext.stubbing evaluateReturnValueFor:invocation];
objcDidInvoke:objcInvocation evaluating:^id _Nullable(MKBObjCInvocation *invo) {
return [self.mockingbirdContext.stubbing evaluateReturnValueFor:invo];
}];

if (returnValue == [MKBStubbingContext noImplementation]) {
Expand Down

0 comments on commit 9d5e886

Please sign in to comment.