Pārlūkot izejas kodu

修改podfile for xcode because swiftUI

harry 3 gadi atpakaļ
vecāks
revīzija
74a94aa8c5

+ 2 - 0
.gitignore

@@ -1 +1,3 @@
 Pods
+Introduce.xcworkspace/xcuserdata
+Introduce.xcodeproj/xcshareddata

+ 2 - 0
Introduce.xcodeproj/project.pbxproj

@@ -422,6 +422,7 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = UH52C8A7SN;
 				ENABLE_BITCODE = NO;
+				EXCLUDED_ARCHS = "";
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = Introduce/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = "开讲";
@@ -458,6 +459,7 @@
 				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = UH52C8A7SN;
 				ENABLE_BITCODE = NO;
+				EXCLUDED_ARCHS = "";
 				GENERATE_INFOPLIST_FILE = YES;
 				INFOPLIST_FILE = Introduce/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = "开讲";

+ 0 - 81
Introduce.xcodeproj/xcshareddata/xcschemes/Introduce.xcscheme

@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "1310"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "4A426DD8275484DF00B3733B"
-               BuildableName = "Introduce.app"
-               BlueprintName = "Introduce"
-               ReferencedContainer = "container:Introduce.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      enableAddressSanitizer = "YES"
-      enableASanStackUseAfterReturn = "YES"
-      disableMainThreadChecker = "YES"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "4A426DD8275484DF00B3733B"
-            BuildableName = "Introduce.app"
-            BlueprintName = "Introduce"
-            ReferencedContainer = "container:Introduce.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "4A426DD8275484DF00B3733B"
-            BuildableName = "Introduce.app"
-            BlueprintName = "Introduce"
-            ReferencedContainer = "container:Introduce.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>

BIN
Introduce.xcworkspace/xcuserdata/harry.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 6
Introduce.xcworkspace/xcuserdata/harry.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Bucket
-   uuid = "D712B89B-34D9-4CFA-B630-4B4DCEA3EF38"
-   type = "0"
-   version = "2.0">
-</Bucket>

+ 25 - 2
Podfile

@@ -28,13 +28,36 @@ target 'Introduce' do
 
   
   post_install do |installer|
+    
+    remove_swift_ui("./Pods/Kingfisher/Sources/General/KFOptionsSetter.swift")
+    remove_swift_ui("./Pods/Kingfisher/Sources/SwiftUI/KFImage.swift")
+    remove_swift_ui("./Pods/Kingfisher/Sources/SwiftUI/ImageBinder.swift")
+    remove_swift_ui("./Pods/Kingfisher/Sources/SwiftUI/KFImageOptions.swift")
+    remove_swift_ui_realm("./Pods/RealmSwift/RealmSwift/SwiftUI.swift")
+#    remove_RealmSwift_swift_ui
     installer.pods_project.targets.each do |target|
-      #if target.name =="App" || target.name =="App1"
       target.build_configurations.each do |config|
         config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
       end
-      #end
     end
   end
   
+def remove_swift_ui(code_file)
+  code_text = File.read(code_file)
+  code_text.gsub!(/#if canImport\(SwiftUI\) && canImport\(Combine\)(\n)/,"#if canImport(SwiftUI) && canImport(Combine) && (arch(arm64) || arch(x86_64))\n")
+  system("rm -rf " + code_file)
+  aFile = File.new(code_file, 'w+')
+  aFile.syswrite(code_text)
+  aFile.close()
+end
+
+def remove_swift_ui_realm (code_file)
+  code_text = File.read(code_file)
+  code_text.gsub!(/#if canImport\(SwiftUI\) && canImport\(Combine\) && swif/,'#if canImport(SwiftUI) && canImport(Combine) && (arch(arm64) || arch(x86_64)) && swif')
+  system("rm -rf " + code_file)
+  aFile = File.new(code_file, 'w+')
+  aFile.syswrite(code_text)
+  aFile.close()
+end
+
 end