From 1ef42fcb120f5432838de6b3812541196c3fffcd Mon Sep 17 00:00:00 2001 From: wuxudong Date: Mon, 7 Oct 2019 23:56:58 +0800 Subject: [PATCH] fix RCTFont, now this lib can be used as a static lib. --- Example/ios/Example.xcodeproj/project.pbxproj | 79 ++----------------- Example/ios/Podfile | 19 +---- installation_guide/README.md | 7 +- .../RNCharts-Bridging-Header.h | 1 + package.json | 2 +- 5 files changed, 13 insertions(+), 95 deletions(-) diff --git a/Example/ios/Example.xcodeproj/project.pbxproj b/Example/ios/Example.xcodeproj/project.pbxproj index ddd05fa33..49c79cfd1 100644 --- a/Example/ios/Example.xcodeproj/project.pbxproj +++ b/Example/ios/Example.xcodeproj/project.pbxproj @@ -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 */ @@ -24,10 +24,10 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = ""; }; + 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 = ""; }; 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 = ""; }; 64A29743210CDEC1008B6396 /* dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dummy.swift; sourceTree = ""; }; - 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 = ""; }; /* End PBXFileReference section */ @@ -36,7 +36,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7EBFC7C3EB1BF07B4AEEBC12 /* Pods_Example.framework in Frameworks */, + FE1992F8DC449D6F8F5B2B42 /* libPods-Example.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -62,7 +62,7 @@ 1E75486BD924689F1E65222B /* Frameworks */ = { isa = PBXGroup; children = ( - 65EBC6CE748463BA2F750E31 /* Pods_Example.framework */, + 32B4451BBC7FFC2A013B2C04 /* libPods-Example.a */, ); name = Frameworks; sourceTree = ""; @@ -116,7 +116,6 @@ 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - E545396F4D0034571078B57C /* [CP] Embed Pods Frameworks */, 64A29740210CD138008B6396 /* Start Packager */, ); buildRules = ( @@ -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 */ @@ -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 = ( @@ -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 = ( diff --git a/Example/ios/Podfile b/Example/ios/Podfile index 1c83e7a8c..bc7feedcc 100644 --- a/Example/ios/Podfile +++ b/Example/ios/Podfile @@ -1,6 +1,6 @@ platform :ios, '9.0' -use_frameworks! +#use_frameworks! target 'Example' do @@ -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 \ No newline at end of file +end diff --git a/installation_guide/README.md b/installation_guide/README.md index f5e6cba3b..a5aa0b52e 100644 --- a/installation_guide/README.md +++ b/installation_guide/README.md @@ -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 @@ -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 diff --git a/ios/ReactNativeCharts/RNCharts-Bridging-Header.h b/ios/ReactNativeCharts/RNCharts-Bridging-Header.h index 882e1ab52..a4915d546 100644 --- a/ios/ReactNativeCharts/RNCharts-Bridging-Header.h +++ b/ios/ReactNativeCharts/RNCharts-Bridging-Header.h @@ -5,3 +5,4 @@ #import "React/RCTBridgeModule.h" #import "React/RCTEventDispatcher.h" #import "React/RCTEventEmitter.h" +#import "React/RCTFont.h" \ No newline at end of file diff --git a/package.json b/package.json index 9789f5194..b340308fd 100644 --- a/package.json +++ b/package.json @@ -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",