Skip to content

Commit 2b94067

Browse files
authored
Fix several iOS build issues (#3)
Fix several iOS build issues
2 parents 2300da4 + 24c7f2b commit 2b94067

File tree

9 files changed

+179
-87
lines changed

9 files changed

+179
-87
lines changed

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.circleci
2+
/.github
3+
/example

example/index.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,23 @@
88
* @flow
99
*/
1010

11-
"use strict";
11+
'use strict';
1212

13-
import { name as appName } from "./app.json";
14-
15-
const React = require("react");
16-
const ReactNative = require("react-native");
17-
const { AppRegistry, ProgressViewIOS, StyleSheet, View } = ReactNative;
13+
import {name as appName} from './app.json';
14+
import * as React from 'react';
15+
import {AppRegistry, StyleSheet, View} from 'react-native';
16+
import ProgressViewIOS from '@react-native-community/react-native-progress-view';
1817

1918
type Props = {||};
2019
type State = {|
21-
progress: number
20+
progress: number,
2221
|};
2322

2423
class ProgressViewExample extends React.Component<Props, State> {
2524
_rafId: ?AnimationFrameID = null;
2625

2726
state = {
28-
progress: 0
27+
progress: 0,
2928
};
3029

3130
componentDidMount() {
@@ -40,7 +39,7 @@ class ProgressViewExample extends React.Component<Props, State> {
4039

4140
updateProgress = () => {
4241
const progress = this.state.progress + 0.01;
43-
this.setState({ progress });
42+
this.setState({progress});
4443
this._rafId = requestAnimationFrame(() => this.updateProgress());
4544
};
4645

@@ -87,24 +86,24 @@ class ProgressViewExample extends React.Component<Props, State> {
8786
const styles = StyleSheet.create({
8887
container: {
8988
marginTop: -20,
90-
backgroundColor: "transparent"
89+
backgroundColor: 'transparent',
9190
},
9291
progressView: {
93-
marginTop: 20
94-
}
92+
marginTop: 20,
93+
},
9594
});
9695

9796
exports.displayName = (undefined: ?string);
98-
exports.framework = "React";
99-
exports.title = "ProgressViewIOS";
100-
exports.description = "ProgressViewIOS";
97+
exports.framework = 'React';
98+
exports.title = 'ProgressViewIOS';
99+
exports.description = 'ProgressViewIOS';
101100
exports.examples = [
102101
{
103-
title: "ProgressViewIOS",
102+
title: 'ProgressViewIOS',
104103
render() {
105104
return <ProgressViewExample />;
106-
}
107-
}
105+
},
106+
},
108107
];
109108

110109
AppRegistry.registerComponent(appName, () => ProgressViewExample);

example/ios/ProgressViewExample.xcodeproj/project.pbxproj

Lines changed: 90 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
2DCD954D1E0B4F2C00145EB5 /* ProgressViewExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ProgressViewExampleTests.m */; };
3838
2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
3939
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
40+
8A9D789C227484C400190743 /* libRNCProgressView.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A9D788D2274849A00190743 /* libRNCProgressView.a */; };
4041
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
4142
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
4243
ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
@@ -176,20 +177,6 @@
176177
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
177178
remoteInfo = "double-conversion-tvOS";
178179
};
179-
2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = {
180-
isa = PBXContainerItemProxy;
181-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
182-
proxyType = 2;
183-
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
184-
remoteInfo = privatedata;
185-
};
186-
2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = {
187-
isa = PBXContainerItemProxy;
188-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
189-
proxyType = 2;
190-
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
191-
remoteInfo = "privatedata-tvOS";
192-
};
193180
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
194181
isa = PBXContainerItemProxy;
195182
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
@@ -267,20 +254,6 @@
267254
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
268255
remoteInfo = "cxxreact-tvOS";
269256
};
270-
3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
271-
isa = PBXContainerItemProxy;
272-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
273-
proxyType = 2;
274-
remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
275-
remoteInfo = jschelpers;
276-
};
277-
3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
278-
isa = PBXContainerItemProxy;
279-
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
280-
proxyType = 2;
281-
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
282-
remoteInfo = "jschelpers-tvOS";
283-
};
284257
5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
285258
isa = PBXContainerItemProxy;
286259
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
@@ -309,6 +282,41 @@
309282
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
310283
remoteInfo = RCTText;
311284
};
285+
8A9D783C2274835B00190743 /* PBXContainerItemProxy */ = {
286+
isa = PBXContainerItemProxy;
287+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
288+
proxyType = 2;
289+
remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8;
290+
remoteInfo = jsi;
291+
};
292+
8A9D783E2274835B00190743 /* PBXContainerItemProxy */ = {
293+
isa = PBXContainerItemProxy;
294+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
295+
proxyType = 2;
296+
remoteGlobalIDString = EDEBC73B214B45A300DD5AC8;
297+
remoteInfo = jsiexecutor;
298+
};
299+
8A9D78402274835B00190743 /* PBXContainerItemProxy */ = {
300+
isa = PBXContainerItemProxy;
301+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
302+
proxyType = 2;
303+
remoteGlobalIDString = ED296FB6214C9A0900B7C4FE;
304+
remoteInfo = "jsi-tvOS";
305+
};
306+
8A9D78422274835B00190743 /* PBXContainerItemProxy */ = {
307+
isa = PBXContainerItemProxy;
308+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
309+
proxyType = 2;
310+
remoteGlobalIDString = ED296FEE214C9CF800B7C4FE;
311+
remoteInfo = "jsiexecutor-tvOS";
312+
};
313+
8A9D788C2274849A00190743 /* PBXContainerItemProxy */ = {
314+
isa = PBXContainerItemProxy;
315+
containerPortal = 8A9D78632274849A00190743 /* RNCProgressView.xcodeproj */;
316+
proxyType = 2;
317+
remoteGlobalIDString = 134814201AA4EA6300B7C361;
318+
remoteInfo = RNCProgressView;
319+
};
312320
ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
313321
isa = PBXContainerItemProxy;
314322
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
@@ -344,6 +352,7 @@
344352
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
345353
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
346354
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
355+
8A9D78632274849A00190743 /* RNCProgressView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNCProgressView.xcodeproj; path = ../../ios/RNCProgressView.xcodeproj; sourceTree = "<group>"; };
347356
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
348357
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
349358
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
@@ -375,6 +384,7 @@
375384
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
376385
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
377386
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
387+
8A9D789C227484C400190743 /* libRNCProgressView.a in Frameworks */,
378388
);
379389
runOnlyForDeploymentPostprocessing = 0;
380390
};
@@ -507,16 +517,16 @@
507517
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
508518
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
509519
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
510-
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
511-
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
512520
2DF0FFDF2056DD460020B375 /* libjsinspector.a */,
513521
2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */,
514522
2DF0FFE32056DD460020B375 /* libthird-party.a */,
515523
2DF0FFE52056DD460020B375 /* libthird-party.a */,
516524
2DF0FFE72056DD460020B375 /* libdouble-conversion.a */,
517525
2DF0FFE92056DD460020B375 /* libdouble-conversion.a */,
518-
2DF0FFEB2056DD460020B375 /* libprivatedata.a */,
519-
2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */,
526+
8A9D783D2274835B00190743 /* libjsi.a */,
527+
8A9D783F2274835B00190743 /* libjsiexecutor.a */,
528+
8A9D78412274835B00190743 /* libjsi-tvOS.a */,
529+
8A9D78432274835B00190743 /* libjsiexecutor-tvOS.a */,
520530
);
521531
name = Products;
522532
sourceTree = "<group>";
@@ -552,6 +562,7 @@
552562
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
553563
isa = PBXGroup;
554564
children = (
565+
8A9D78632274849A00190743 /* RNCProgressView.xcodeproj */,
555566
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
556567
146833FF1AC3E56700842450 /* React.xcodeproj */,
557568
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
@@ -602,6 +613,14 @@
602613
name = Products;
603614
sourceTree = "<group>";
604615
};
616+
8A9D78642274849A00190743 /* Products */ = {
617+
isa = PBXGroup;
618+
children = (
619+
8A9D788D2274849A00190743 /* libRNCProgressView.a */,
620+
);
621+
name = Products;
622+
sourceTree = "<group>";
623+
};
605624
ADBDB9201DFEBF0600ED6528 /* Products */ = {
606625
isa = PBXGroup;
607626
children = (
@@ -770,6 +789,10 @@
770789
ProductGroup = 146834001AC3E56700842450 /* Products */;
771790
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
772791
},
792+
{
793+
ProductGroup = 8A9D78642274849A00190743 /* Products */;
794+
ProjectRef = 8A9D78632274849A00190743 /* RNCProgressView.xcodeproj */;
795+
},
773796
);
774797
projectRoot = "";
775798
targets = (
@@ -901,20 +924,6 @@
901924
remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */;
902925
sourceTree = BUILT_PRODUCTS_DIR;
903926
};
904-
2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = {
905-
isa = PBXReferenceProxy;
906-
fileType = archive.ar;
907-
path = libprivatedata.a;
908-
remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */;
909-
sourceTree = BUILT_PRODUCTS_DIR;
910-
};
911-
2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = {
912-
isa = PBXReferenceProxy;
913-
fileType = archive.ar;
914-
path = "libprivatedata-tvOS.a";
915-
remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */;
916-
sourceTree = BUILT_PRODUCTS_DIR;
917-
};
918927
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
919928
isa = PBXReferenceProxy;
920929
fileType = archive.ar;
@@ -992,20 +1001,6 @@
9921001
remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
9931002
sourceTree = BUILT_PRODUCTS_DIR;
9941003
};
995-
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
996-
isa = PBXReferenceProxy;
997-
fileType = archive.ar;
998-
path = libjschelpers.a;
999-
remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
1000-
sourceTree = BUILT_PRODUCTS_DIR;
1001-
};
1002-
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
1003-
isa = PBXReferenceProxy;
1004-
fileType = archive.ar;
1005-
path = libjschelpers.a;
1006-
remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
1007-
sourceTree = BUILT_PRODUCTS_DIR;
1008-
};
10091004
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
10101005
isa = PBXReferenceProxy;
10111006
fileType = archive.ar;
@@ -1034,6 +1029,41 @@
10341029
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
10351030
sourceTree = BUILT_PRODUCTS_DIR;
10361031
};
1032+
8A9D783D2274835B00190743 /* libjsi.a */ = {
1033+
isa = PBXReferenceProxy;
1034+
fileType = archive.ar;
1035+
path = libjsi.a;
1036+
remoteRef = 8A9D783C2274835B00190743 /* PBXContainerItemProxy */;
1037+
sourceTree = BUILT_PRODUCTS_DIR;
1038+
};
1039+
8A9D783F2274835B00190743 /* libjsiexecutor.a */ = {
1040+
isa = PBXReferenceProxy;
1041+
fileType = archive.ar;
1042+
path = libjsiexecutor.a;
1043+
remoteRef = 8A9D783E2274835B00190743 /* PBXContainerItemProxy */;
1044+
sourceTree = BUILT_PRODUCTS_DIR;
1045+
};
1046+
8A9D78412274835B00190743 /* libjsi-tvOS.a */ = {
1047+
isa = PBXReferenceProxy;
1048+
fileType = archive.ar;
1049+
path = "libjsi-tvOS.a";
1050+
remoteRef = 8A9D78402274835B00190743 /* PBXContainerItemProxy */;
1051+
sourceTree = BUILT_PRODUCTS_DIR;
1052+
};
1053+
8A9D78432274835B00190743 /* libjsiexecutor-tvOS.a */ = {
1054+
isa = PBXReferenceProxy;
1055+
fileType = archive.ar;
1056+
path = "libjsiexecutor-tvOS.a";
1057+
remoteRef = 8A9D78422274835B00190743 /* PBXContainerItemProxy */;
1058+
sourceTree = BUILT_PRODUCTS_DIR;
1059+
};
1060+
8A9D788D2274849A00190743 /* libRNCProgressView.a */ = {
1061+
isa = PBXReferenceProxy;
1062+
fileType = archive.ar;
1063+
path = libRNCProgressView.a;
1064+
remoteRef = 8A9D788C2274849A00190743 /* PBXContainerItemProxy */;
1065+
sourceTree = BUILT_PRODUCTS_DIR;
1066+
};
10371067
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
10381068
isa = PBXReferenceProxy;
10391069
fileType = archive.ar;

ios/RNCProgressView.xcodeproj/project.pbxproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
8A9D78492274841C00190743 /* RNCProgressViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A9D78472274841C00190743 /* RNCProgressViewManager.m */; };
1011
B3E7B58A1CC2AC0600A0062D /* RNCProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNCProgressView.m */; };
1112
/* End PBXBuildFile section */
1213

@@ -24,6 +25,8 @@
2425

2526
/* Begin PBXFileReference section */
2627
134814201AA4EA6300B7C361 /* libRNCProgressView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNCProgressView.a; sourceTree = BUILT_PRODUCTS_DIR; };
28+
8A9D78472274841C00190743 /* RNCProgressViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNCProgressViewManager.m; sourceTree = "<group>"; };
29+
8A9D78482274841C00190743 /* RNCProgressViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNCProgressViewManager.h; sourceTree = "<group>"; };
2730
B3E7B5881CC2AC0600A0062D /* RNCProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNCProgressView.h; sourceTree = "<group>"; };
2831
B3E7B5891CC2AC0600A0062D /* RNCProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNCProgressView.m; sourceTree = "<group>"; };
2932
/* End PBXFileReference section */
@@ -52,6 +55,8 @@
5255
children = (
5356
B3E7B5881CC2AC0600A0062D /* RNCProgressView.h */,
5457
B3E7B5891CC2AC0600A0062D /* RNCProgressView.m */,
58+
8A9D78482274841C00190743 /* RNCProgressViewManager.h */,
59+
8A9D78472274841C00190743 /* RNCProgressViewManager.m */,
5560
134814211AA4EA7D00B7C361 /* Products */,
5661
);
5762
sourceTree = "<group>";
@@ -113,6 +118,7 @@
113118
buildActionMask = 2147483647;
114119
files = (
115120
B3E7B58A1CC2AC0600A0062D /* RNCProgressView.m in Sources */,
121+
8A9D78492274841C00190743 /* RNCProgressViewManager.m in Sources */,
116122
);
117123
runOnlyForDeploymentPostprocessing = 0;
118124
};
@@ -204,7 +210,7 @@
204210
isa = XCBuildConfiguration;
205211
buildSettings = {
206212
HEADER_SEARCH_PATHS = (
207-
"$(inherited)",
213+
"$(inherited)",
208214
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
209215
"$(SRCROOT)/../../../React/**",
210216
"$(SRCROOT)/../../react-native/React/**",

ios/RNCProgressViewManager.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#import <React/RCTViewManager.h>
9+
10+
@interface RNCProgressViewManager : RCTViewManager
11+
12+
@end

0 commit comments

Comments
 (0)