Skip to content

Commit 41975ff

Browse files
Install OCMock separately from pods
When OCMock was being installed via pods, it was referencing the source files instead of the pre-built binaries which contains x86_64 version that's required when building in Release mode.
1 parent 4eb676e commit 41975ff

File tree

13 files changed

+622
-2
lines changed

13 files changed

+622
-2
lines changed

InstabugSample/ios/InstabugSample.xcodeproj/project.pbxproj

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1515
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1616
39B75062AA5F42B6E4C8E3C7 /* libPods-InstabugSampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A03A15E2685C1231729CA8B /* libPods-InstabugSampleTests.a */; };
17+
C006102922E9EBCA00EDC852 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C006102822E9EBCA00EDC852 /* libOCMock.a */; };
1718
/* End PBXBuildFile section */
1819

1920
/* Begin PBXContainerItemProxy section */
@@ -45,6 +46,7 @@
4546
7A03A15E2685C1231729CA8B /* libPods-InstabugSampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InstabugSampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4647
A0EF1FBF0176E13B30EA2D29 /* libPods-InstabugSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InstabugSample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4748
B5BDF7C4EF0BC367832D3796 /* Pods-InstabugSampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSampleTests.debug.xcconfig"; path = "Target Support Files/Pods-InstabugSampleTests/Pods-InstabugSampleTests.debug.xcconfig"; sourceTree = "<group>"; };
49+
C006102822E9EBCA00EDC852 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libOCMock.a; path = usr/lib/libOCMock.a; sourceTree = "<group>"; };
4850
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4951
/* End PBXFileReference section */
5052

@@ -53,6 +55,7 @@
5355
isa = PBXFrameworksBuildPhase;
5456
buildActionMask = 2147483647;
5557
files = (
58+
C006102922E9EBCA00EDC852 /* libOCMock.a in Frameworks */,
5659
39B75062AA5F42B6E4C8E3C7 /* libPods-InstabugSampleTests.a in Frameworks */,
5760
);
5861
runOnlyForDeploymentPostprocessing = 0;
@@ -102,6 +105,7 @@
102105
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
103106
isa = PBXGroup;
104107
children = (
108+
C006102822E9EBCA00EDC852 /* libOCMock.a */,
105109
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
106110
A0EF1FBF0176E13B30EA2D29 /* libPods-InstabugSample.a */,
107111
7A03A15E2685C1231729CA8B /* libPods-InstabugSampleTests.a */,
@@ -416,9 +420,39 @@
416420
"DEBUG=1",
417421
"$(inherited)",
418422
);
423+
HEADER_SEARCH_PATHS = (
424+
"$(inherited)",
425+
"\"${PODS_ROOT}/Headers/Public\"",
426+
"\"${PODS_ROOT}/Headers/Public/DoubleConversion\"",
427+
"\"${PODS_ROOT}/Headers/Public/React-Core\"",
428+
"\"${PODS_ROOT}/Headers/Public/React-DevSupport\"",
429+
"\"${PODS_ROOT}/Headers/Public/React-RCTActionSheet\"",
430+
"\"${PODS_ROOT}/Headers/Public/React-RCTAnimation\"",
431+
"\"${PODS_ROOT}/Headers/Public/React-RCTBlob\"",
432+
"\"${PODS_ROOT}/Headers/Public/React-RCTImage\"",
433+
"\"${PODS_ROOT}/Headers/Public/React-RCTLinking\"",
434+
"\"${PODS_ROOT}/Headers/Public/React-RCTNetwork\"",
435+
"\"${PODS_ROOT}/Headers/Public/React-RCTSettings\"",
436+
"\"${PODS_ROOT}/Headers/Public/React-RCTText\"",
437+
"\"${PODS_ROOT}/Headers/Public/React-RCTVibration\"",
438+
"\"${PODS_ROOT}/Headers/Public/React-RCTWebSocket\"",
439+
"\"${PODS_ROOT}/Headers/Public/React-cxxreact\"",
440+
"\"${PODS_ROOT}/Headers/Public/React-fishhook\"",
441+
"\"${PODS_ROOT}/Headers/Public/React-jsi\"",
442+
"\"${PODS_ROOT}/Headers/Public/React-jsiexecutor\"",
443+
"\"${PODS_ROOT}/Headers/Public/React-jsinspector\"",
444+
"\"${PODS_ROOT}/Headers/Public/glog\"",
445+
"\"${PODS_ROOT}/Headers/Public/instabug-reactnative\"",
446+
"\"${PODS_ROOT}/Headers/Public/yoga\"",
447+
"$(PROJECT_DIR)/usr/include",
448+
);
419449
INFOPLIST_FILE = InstabugSampleTests/Info.plist;
420450
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
421451
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
452+
LIBRARY_SEARCH_PATHS = (
453+
"$(inherited)",
454+
"$(PROJECT_DIR)/usr/lib",
455+
);
422456
OTHER_LDFLAGS = (
423457
"-ObjC",
424458
"-lc++",
@@ -436,9 +470,39 @@
436470
buildSettings = {
437471
BUNDLE_LOADER = "$(TEST_HOST)";
438472
COPY_PHASE_STRIP = NO;
473+
HEADER_SEARCH_PATHS = (
474+
"$(inherited)",
475+
"\"${PODS_ROOT}/Headers/Public\"",
476+
"\"${PODS_ROOT}/Headers/Public/DoubleConversion\"",
477+
"\"${PODS_ROOT}/Headers/Public/React-Core\"",
478+
"\"${PODS_ROOT}/Headers/Public/React-DevSupport\"",
479+
"\"${PODS_ROOT}/Headers/Public/React-RCTActionSheet\"",
480+
"\"${PODS_ROOT}/Headers/Public/React-RCTAnimation\"",
481+
"\"${PODS_ROOT}/Headers/Public/React-RCTBlob\"",
482+
"\"${PODS_ROOT}/Headers/Public/React-RCTImage\"",
483+
"\"${PODS_ROOT}/Headers/Public/React-RCTLinking\"",
484+
"\"${PODS_ROOT}/Headers/Public/React-RCTNetwork\"",
485+
"\"${PODS_ROOT}/Headers/Public/React-RCTSettings\"",
486+
"\"${PODS_ROOT}/Headers/Public/React-RCTText\"",
487+
"\"${PODS_ROOT}/Headers/Public/React-RCTVibration\"",
488+
"\"${PODS_ROOT}/Headers/Public/React-RCTWebSocket\"",
489+
"\"${PODS_ROOT}/Headers/Public/React-cxxreact\"",
490+
"\"${PODS_ROOT}/Headers/Public/React-fishhook\"",
491+
"\"${PODS_ROOT}/Headers/Public/React-jsi\"",
492+
"\"${PODS_ROOT}/Headers/Public/React-jsiexecutor\"",
493+
"\"${PODS_ROOT}/Headers/Public/React-jsinspector\"",
494+
"\"${PODS_ROOT}/Headers/Public/glog\"",
495+
"\"${PODS_ROOT}/Headers/Public/instabug-reactnative\"",
496+
"\"${PODS_ROOT}/Headers/Public/yoga\"",
497+
"$(PROJECT_DIR)/usr/include",
498+
);
439499
INFOPLIST_FILE = InstabugSampleTests/Info.plist;
440500
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
441501
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
502+
LIBRARY_SEARCH_PATHS = (
503+
"$(inherited)",
504+
"$(PROJECT_DIR)/usr/lib",
505+
);
442506
OTHER_LDFLAGS = (
443507
"-ObjC",
444508
"-lc++",

InstabugSample/ios/Podfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ target 'InstabugSample' do
2323
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
2424
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
2525
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
26-
27-
pod 'OCMock', '~> 3.4'
2826

2927
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
3028
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2009-2018 Erik Doernenburg and contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use these files except in compliance with the License. You may obtain
6+
* a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
#import <Foundation/Foundation.h>
18+
19+
@class OCObserverMockObject;
20+
21+
22+
@interface NSNotificationCenter(OCMAdditions)
23+
24+
- (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender;
25+
26+
@end
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright (c) 2009-2018 Erik Doernenburg and contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use these files except in compliance with the License. You may obtain
6+
* a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
#import <Foundation/Foundation.h>
18+
19+
@interface OCMArg : NSObject
20+
21+
// constraining arguments
22+
23+
+ (id)any;
24+
+ (SEL)anySelector;
25+
+ (void *)anyPointer;
26+
+ (id __autoreleasing *)anyObjectRef;
27+
+ (id)isNil;
28+
+ (id)isNotNil;
29+
+ (id)isEqual:(id)value;
30+
+ (id)isNotEqual:(id)value;
31+
+ (id)isKindOfClass:(Class)cls;
32+
+ (id)checkWithSelector:(SEL)selector onObject:(id)anObject;
33+
+ (id)checkWithBlock:(BOOL (^)(id obj))block;
34+
35+
// manipulating arguments
36+
37+
+ (id *)setTo:(id)value;
38+
+ (void *)setToValue:(NSValue *)value;
39+
+ (id)invokeBlock;
40+
+ (id)invokeBlockWithArgs:(id)first,... NS_REQUIRES_NIL_TERMINATION;
41+
42+
+ (id)defaultValue;
43+
44+
// internal use only
45+
46+
+ (id)resolveSpecialValues:(NSValue *)value;
47+
48+
@end
49+
50+
#define OCMOCK_ANY [OCMArg any]
51+
52+
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
53+
#define OCMOCK_VALUE(variable) \
54+
({ __typeof__(variable) __v = (variable); [NSValue value:&__v withObjCType:@encode(__typeof__(__v))]; })
55+
#else
56+
#define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))]
57+
#endif
58+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Copyright (c) 2007-2018 Erik Doernenburg and contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use these files except in compliance with the License. You may obtain
6+
* a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
#import <Foundation/Foundation.h>
18+
19+
20+
@interface OCMConstraint : NSObject
21+
22+
+ (instancetype)constraint;
23+
- (BOOL)evaluate:(id)value;
24+
25+
// if you are looking for any, isNil, etc, they have moved to OCMArg
26+
27+
// try to use [OCMArg checkWith...] instead of the constraintWith... methods below
28+
29+
+ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject;
30+
+ (instancetype)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue;
31+
32+
33+
@end
34+
35+
@interface OCMAnyConstraint : OCMConstraint
36+
@end
37+
38+
@interface OCMIsNilConstraint : OCMConstraint
39+
@end
40+
41+
@interface OCMIsNotNilConstraint : OCMConstraint
42+
@end
43+
44+
@interface OCMIsNotEqualConstraint : OCMConstraint
45+
{
46+
@public
47+
id testValue;
48+
}
49+
50+
@end
51+
52+
@interface OCMInvocationConstraint : OCMConstraint
53+
{
54+
@public
55+
NSInvocation *invocation;
56+
}
57+
58+
@end
59+
60+
@interface OCMBlockConstraint : OCMConstraint
61+
{
62+
BOOL (^block)(id);
63+
}
64+
65+
- (instancetype)initWithConstraintBlock:(BOOL (^)(id))block;
66+
67+
@end
68+
69+
70+
#define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self]
71+
#define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2014-2018 Erik Doernenburg and contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use these files except in compliance with the License. You may obtain
6+
* a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
#import <Foundation/Foundation.h>
18+
19+
20+
#if defined(__cplusplus)
21+
#define OCMOCK_EXTERN extern "C"
22+
#else
23+
#define OCMOCK_EXTERN extern
24+
#endif
25+
26+
27+
OCMOCK_EXTERN BOOL OCMIsObjectType(const char *objCType);
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2014-2018 Erik Doernenburg and contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use these files except in compliance with the License. You may obtain
6+
* a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
#import <Foundation/Foundation.h>
18+
#import "OCMFunctions.h"
19+
20+
21+
@interface OCMLocation : NSObject
22+
{
23+
id testCase;
24+
NSString *file;
25+
NSUInteger line;
26+
}
27+
28+
+ (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
29+
30+
- (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
31+
32+
- (id)testCase;
33+
- (NSString *)file;
34+
- (NSUInteger)line;
35+
36+
@end
37+
38+
OCMOCK_EXTERN OCMLocation *OCMMakeLocation(id testCase, const char *file, int line);
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (c) 2014-2018 Erik Doernenburg and contributors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use these files except in compliance with the License. You may obtain
6+
* a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
#import <Foundation/Foundation.h>
18+
19+
@class OCMLocation;
20+
@class OCMRecorder;
21+
@class OCMStubRecorder;
22+
@class OCMockObject;
23+
24+
25+
@interface OCMMacroState : NSObject
26+
{
27+
OCMRecorder *recorder;
28+
}
29+
30+
+ (void)beginStubMacro;
31+
+ (OCMStubRecorder *)endStubMacro;
32+
33+
+ (void)beginExpectMacro;
34+
+ (OCMStubRecorder *)endExpectMacro;
35+
36+
+ (void)beginRejectMacro;
37+
+ (OCMStubRecorder *)endRejectMacro;
38+
39+
+ (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation;
40+
+ (void)endVerifyMacro;
41+
42+
+ (OCMMacroState *)globalState;
43+
44+
- (OCMRecorder *)recorder;
45+
46+
- (void)switchToClassMethod;
47+
48+
@end

0 commit comments

Comments
 (0)