Ver Fonte

update podspec

wenweiwei há 3 anos atrás
pai
commit
975e80e0d9

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 8 - 0
.idea/Trunk.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 20 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,20 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
+      <option name="ignoredErrors">
+        <list>
+          <option value="N802" />
+          <option value="N801" />
+        </list>
+      </option>
+    </inspection_tool>
+    <inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="ignoredIdentifiers">
+        <list>
+          <option value="main.raw_input" />
+        </list>
+      </option>
+    </inspection_tool>
+  </profile>
+</component>

+ 6 - 0
.idea/inspectionProfiles/profiles_settings.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="USE_PROJECT_PROFILE" value="false" />
+    <version value="1.0" />
+  </settings>
+</component>

+ 4 - 0
.idea/misc.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/Trunk.iml" filepath="$PROJECT_DIR$/.idea/Trunk.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 3 - 5
BFCommonKit.podspec

@@ -23,6 +23,8 @@ TODO: Add long description of the pod here.
   s.subspec 'BFConfig' do |gg|
     gg.source_files = 'BFCommonKit/Classes/BFConfig/*'
     gg.frameworks = 'UIKit'
+    gg.dependency 'BFCommonKit/BFEnums'
+    gg.dependency 'BFCommonKit/BFCategorys'
   end
   s.subspec 'BFBase' do |bb|
     bb.source_files = 'BFCommonKit/Classes/BFBase/**/*'
@@ -52,13 +54,9 @@ TODO: Add long description of the pod here.
     uu.dependency 'Toast-Swift','5.0.1'
     uu.dependency 'BFCommonKit/BFCategorys'
     uu.dependency 'BFCommonKit/BFConfig'
-  end
-  s.subspec 'BFDebug' do |dd|
-    dd.source_files = 'BFCommonKit/Classes/BFDebug/*'
-    dd.frameworks = 'UIKit','MessageUI','WebKit'
-    dd.dependency 'BFCommonKit/BFCategorys'
   end
    s.resource_bundles = {
       'BFCommonKit_Resources' => ['BFCommonKit/Assets/*']
     }
+   s.prepare_command = '/usr/local/bin/Python3 build_lib.py'
 end

+ 1 - 1
BFCommonKit/Classes/BFCategorys/BFColor+Ext.swift

@@ -10,7 +10,7 @@ import Foundation
 import UIKit
 
 public extension UIColor {
-    class func hexColor(hexadecimal: String, alpha:CGFloat = 1) -> UIColor {
+    public class func hexColor(hexadecimal: String, alpha:CGFloat = 1) -> UIColor {
         var cstr = hexadecimal.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased() as NSString
         if cstr.length < 6 {
             return UIColor.clear

+ 0 - 1
_Pods.xcodeproj

@@ -1 +0,0 @@
-Example/Pods/Pods.xcodeproj

+ 36 - 0
build_lib.py

@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+import os
+
+
+def remove_swiftUI(code_file):
+    try:
+        fo = open(code_file, 'r')
+        code_text = fo.read()
+        print("替换前:", code_text)
+        if "canImport(SwiftUI) && canImport(Combine)" in code_text and "canImport(SwiftUI) && canImport(Combine) && (" \
+                                                                       "arch(arm64) || arch(x86_64))" not in code_text:
+            code_text = code_text.replace("canImport(SwiftUI) && canImport(Combine)", "canImport(SwiftUI) && canImport("
+                                                                                      "Combine) "
+                                                                                      "&& (arch(arm64) || arch(x86_64))")
+            print("替换后:", code_text)
+            os.remove(code_file)
+            fo = open(code_file, 'w+')
+            fo.write(code_text)
+            fo.closed
+        else:
+            print("没有变化")
+    except IOError:
+        print("文件错误")
+    else:
+        print("没有变化")
+
+
+remove_swiftUI("/Users/sanw/Desktop/BytesFlow/Projects/BFCommonKit/Trunk/Example/Pods/Kingfisher/Sources/General"
+               "/KFOptionsSetter.swift")
+remove_swiftUI("/Users/sanw/Desktop/BytesFlow/Projects/BFCommonKit/Trunk/Example/Pods/Kingfisher/Sources/SwiftUI"
+               "/KFImage.swift")
+remove_swiftUI("/Users/sanw/Desktop/BytesFlow/Projects/BFCommonKit/Trunk/Example/Pods/Kingfisher/Sources/SwiftUI"
+               "/ImageBinder.swift")
+remove_swiftUI("/Users/sanw/Desktop/BytesFlow/Projects/BFCommonKit/Trunk/Example/Pods/Kingfisher/Sources/SwiftUI"
+               "/KFImageOptions.swift")
+# remove_swiftUI("./Example/Pods/RealmSwift/RealmSwift/SwiftUI.swift")