Skip to content

Commit

Permalink
Move Bridge RCTSurfacePresenterStub category implementation to .m file (
Browse files Browse the repository at this point in the history
#23888)

Summary:
Move implementation out from header file. Because it may have potential linker issue.
CC. sahrens

<img width="716" alt="image" src="https://user-images.githubusercontent.com/5061845/54267283-ea11ac00-45b3-11e9-8d0e-9ff20db98b01.png">

[iOS] [Fixed] - Move Bridge RCTSurfacePresenterStub category implementation to .m file
Pull Request resolved: #23888

Differential Revision: D14477611

Pulled By: cpojer

fbshipit-source-id: 660f3c27806252fc8f47430582818d37d42fd365
  • Loading branch information
zhongwuzw authored and facebook-github-bot committed Mar 15, 2019
1 parent 1fe4799 commit af7efff
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
8 changes: 2 additions & 6 deletions React/Modules/RCTSurfacePresenterStub.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,10 @@ NS_ASSUME_NONNULL_BEGIN

@end

@implementation RCTBridge (RCTSurfacePresenterStub)
@interface RCTBridge (RCTSurfacePresenterStub)

- (id<RCTSurfacePresenterStub>)surfacePresenter
{
return objc_getAssociatedObject(self, @selector(surfacePresenter));
}
- (id<RCTSurfacePresenterStub>)surfacePresenter;

@end


NS_ASSUME_NONNULL_END
17 changes: 17 additions & 0 deletions React/Modules/RCTSurfacePresenterStub.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import "RCTSurfacePresenterStub.h"

@implementation RCTBridge (RCTSurfacePresenterStub)

- (id<RCTSurfacePresenterStub>)surfacePresenter
{
return objc_getAssociatedObject(self, @selector(surfacePresenter));
}

@end
8 changes: 6 additions & 2 deletions React/React.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
001BFCD01D8381DE008E587E /* RCTMultipartStreamReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 001BFCCF1D8381DE008E587E /* RCTMultipartStreamReader.m */; };
006FC4141D9B20820057AAAD /* RCTMultipartDataTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 006FC4131D9B20820057AAAD /* RCTMultipartDataTask.m */; };
008341F61D1DB34400876D9A /* RCTJSStackFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 008341F41D1DB34400876D9A /* RCTJSStackFrame.m */; };
0EA924CF22376844004AB895 /* RCTSurfacePresenterStub.h in Headers */ = {isa = PBXBuildFile; fileRef = 589515DF2231AD9C0036BDE0 /* RCTSurfacePresenterStub.h */; };
0EA924D02237686F004AB895 /* RCTSurfacePresenterStub.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 589515DF2231AD9C0036BDE0 /* RCTSurfacePresenterStub.h */; };
0EEEA8DF2239002200A8C82D /* RCTSurfacePresenterStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EEEA8DE2239002200A8C82D /* RCTSurfacePresenterStub.m */; };
0EEEA8E02239002200A8C82D /* RCTSurfacePresenterStub.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EEEA8DE2239002200A8C82D /* RCTSurfacePresenterStub.m */; };
130443A11E3FEAA900D93A67 /* RCTFollyConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1304439F1E3FEAA900D93A67 /* RCTFollyConvert.h */; };
130443A21E3FEAA900D93A67 /* RCTFollyConvert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 130443A01E3FEAA900D93A67 /* RCTFollyConvert.mm */; };
130443A31E3FEAAE00D93A67 /* RCTFollyConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 1304439F1E3FEAA900D93A67 /* RCTFollyConvert.h */; };
Expand Down Expand Up @@ -1807,6 +1808,7 @@
006FC4131D9B20820057AAAD /* RCTMultipartDataTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMultipartDataTask.m; sourceTree = "<group>"; };
008341F41D1DB34400876D9A /* RCTJSStackFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTJSStackFrame.m; sourceTree = "<group>"; };
008341F51D1DB34400876D9A /* RCTJSStackFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTJSStackFrame.h; sourceTree = "<group>"; };
0EEEA8DE2239002200A8C82D /* RCTSurfacePresenterStub.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTSurfacePresenterStub.m; sourceTree = "<group>"; };
1304439F1E3FEAA900D93A67 /* RCTFollyConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTFollyConvert.h; path = CxxUtils/RCTFollyConvert.h; sourceTree = "<group>"; };
130443A01E3FEAA900D93A67 /* RCTFollyConvert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RCTFollyConvert.mm; path = CxxUtils/RCTFollyConvert.mm; sourceTree = "<group>"; };
130443C31E401A8C00D93A67 /* RCTConvert+Transform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+Transform.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2526,6 +2528,7 @@
13723B4E1A82FD3C00F88898 /* RCTStatusBarManager.h */,
13723B4F1A82FD3C00F88898 /* RCTStatusBarManager.m */,
589515DF2231AD9C0036BDE0 /* RCTSurfacePresenterStub.h */,
0EEEA8DE2239002200A8C82D /* RCTSurfacePresenterStub.m */,
13B07FED1A69327A00A75B9A /* RCTTiming.h */,
13B07FEE1A69327A00A75B9A /* RCTTiming.m */,
3D0B842D1EC0B51200B2BD8E /* RCTTVNavigationEventEmitter.h */,
Expand Down Expand Up @@ -3094,7 +3097,6 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
0EA924CF22376844004AB895 /* RCTSurfacePresenterStub.h in Headers */,
3DA982391E5B0F8A004F2374 /* UIView+Private.h in Headers */,
13134C8D1E296B2A00B9F3CB /* RCTMessageThread.h in Headers */,
130443DE1E401B0D00D93A67 /* RCTTVView.h in Headers */,
Expand Down Expand Up @@ -4218,6 +4220,7 @@
2D3B5EB71D9B091800451313 /* RCTRedBox.m in Sources */,
3D7AA9C61E548CDD001955CF /* NSDataBigString.mm in Sources */,
13134C8F1E296B2A00B9F3CB /* RCTMessageThread.mm in Sources */,
0EEEA8E02239002200A8C82D /* RCTSurfacePresenterStub.m in Sources */,
2D3B5EAF1D9B08FB00451313 /* RCTAccessibilityManager.m in Sources */,
2D3B5EF11D9B09E700451313 /* UIView+React.m in Sources */,
2D3B5E931D9B087300451313 /* RCTErrorInfo.m in Sources */,
Expand Down Expand Up @@ -4453,6 +4456,7 @@
13CC8A821B17642100940AE7 /* RCTBorderDrawing.m in Sources */,
C60128AD1F3D1258009DF9FF /* RCTCxxConvert.m in Sources */,
3DCE53291FEAB23100613583 /* RCTDatePicker.m in Sources */,
0EEEA8DF2239002200A8C82D /* RCTSurfacePresenterStub.m in Sources */,
50E98FEA21460B0D00CD9289 /* RCTWKWebViewManager.m in Sources */,
83CBBA511A601E3B00E9B192 /* RCTAssert.m in Sources */,
59EB6DBD1EBD6FC90072A5E7 /* RCTUIManagerObserverCoordinator.mm in Sources */,
Expand Down

0 comments on commit af7efff

Please sign in to comment.