Skip to content

Commit

Permalink
fix RCTFont, now this lib can be used as a static lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxudong committed Oct 7, 2019
1 parent 2772fcf commit 1ef42fc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 95 deletions.
79 changes: 6 additions & 73 deletions Example/ios/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
64A29744210CDEC1008B6396 /* dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A29743210CDEC1008B6396 /* dummy.swift */; };
7EBFC7C3EB1BF07B4AEEBC12 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65EBC6CE748463BA2F750E31 /* Pods_Example.framework */; };
FE1992F8DC449D6F8F5B2B42 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 32B4451BBC7FFC2A013B2C04 /* libPods-Example.a */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -24,10 +24,10 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = "<group>"; };
32B4451BBC7FFC2A013B2C04 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
42FCDD3E1E68301A00CCE645 /* Example-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-Bridging-Header.h"; sourceTree = "<group>"; };
51C08068C6A30FA14DCFA43D /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
64A29743210CDEC1008B6396 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = "<group>"; };
65EBC6CE748463BA2F750E31 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9709CA5BA4B35D031398D32E /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -36,7 +36,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7EBFC7C3EB1BF07B4AEEBC12 /* Pods_Example.framework in Frameworks */,
FE1992F8DC449D6F8F5B2B42 /* libPods-Example.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -62,7 +62,7 @@
1E75486BD924689F1E65222B /* Frameworks */ = {
isa = PBXGroup;
children = (
65EBC6CE748463BA2F750E31 /* Pods_Example.framework */,
32B4451BBC7FFC2A013B2C04 /* libPods-Example.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -116,7 +116,6 @@
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
E545396F4D0034571078B57C /* [CP] Embed Pods Frameworks */,
64A29740210CD138008B6396 /* Start Packager */,
);
buildRules = (
Expand Down Expand Up @@ -221,72 +220,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E545396F4D0034571078B57C /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Charts/Charts.framework",
"${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework",
"${BUILT_PRODUCTS_DIR}/FBReactNativeSpec/FBReactNativeSpec.framework",
"${BUILT_PRODUCTS_DIR}/Folly/folly.framework",
"${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework",
"${BUILT_PRODUCTS_DIR}/RNGestureHandler/RNGestureHandler.framework",
"${BUILT_PRODUCTS_DIR}/React-Core/React.framework",
"${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTActionSheet/RCTActionSheet.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTAnimation/RCTAnimation.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTBlob/RCTBlob.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTImage/RCTImage.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTLinking/RCTLinking.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTNetwork/RCTNetwork.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTSettings/RCTSettings.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTText/RCTText.framework",
"${BUILT_PRODUCTS_DIR}/React-RCTVibration/RCTVibration.framework",
"${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework",
"${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework",
"${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework",
"${BUILT_PRODUCTS_DIR}/ReactCommon/ReactCommon.framework",
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework",
"${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
"${BUILT_PRODUCTS_DIR}/glog/glog.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Charts.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBReactNativeSpec.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNGestureHandler.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTActionSheet.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTBlob.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTLinking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTNetwork.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactCommon.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -330,7 +263,7 @@
"$(inherited)",
"$(PROJECT_DIR)",
);
HEADER_SEARCH_PATHS = "";
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -362,7 +295,7 @@
"$(inherited)",
"$(PROJECT_DIR)",
);
HEADER_SEARCH_PATHS = "";
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
Expand Down
19 changes: 2 additions & 17 deletions Example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
platform :ios, '9.0'

use_frameworks!
#use_frameworks!

target 'Example' do

Expand Down Expand Up @@ -39,19 +39,4 @@ target 'Example' do

pod 'RNCharts', :path => '../../'

swift5 = ['Charts', 'SwiftyJSON']




post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if swift5.include?(target.name)
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
end

end
end
7 changes: 3 additions & 4 deletions installation_guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ react-native run-android, that is it.
* link subproject

* **use cocoapods(suggested)**

* add `use_frameworks!` to ios/Podfile before `target 'demo' do`
* add `pod 'RNCharts', :path => '../node_modules/react-native-charts-wrapper'` to ios/Podfile after `pod 'Folly', :podspec => ......`

* add `pod 'RNCharts', :path => '../node_modules/react-native-charts-wrapper'` to ios/Podfile

* cd ios && pod install
* open demo.xcworkspace
Expand All @@ -164,7 +163,7 @@ react-native run-android, that is it.

* **manual setup**

Sometime `use_frameworks!` in Podfile conflict with other libs like react-native-maps. In this case, you can link this lib manually.
You can also link this lib manually.

* Add Source Files

Expand Down
1 change: 1 addition & 0 deletions ios/ReactNativeCharts/RNCharts-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
#import "React/RCTBridgeModule.h"
#import "React/RCTEventDispatcher.h"
#import "React/RCTEventEmitter.h"
#import "React/RCTFont.h"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/wuxudong/react-native-charts-wrapper.git"
},
"version": "0.5.6",
"version": "0.5.7",
"description": "A react-native charts support both android and iOS.",
"author": "wuxudong",
"license": "MIT",
Expand Down

0 comments on commit 1ef42fc

Please sign in to comment.