diff --git a/ios/WildGrowth/Config/Develop.xcconfig b/ios/WildGrowth/Config/Develop.xcconfig new file mode 100644 index 0000000..4f2f6ab --- /dev/null +++ b/ios/WildGrowth/Config/Develop.xcconfig @@ -0,0 +1,12 @@ +// Develop.xcconfig - 开发/测试环境 +// 用于连接测试服、预发布环境 + +#include "Shared.xcconfig" + +// API 域名(注入 Info.plist,运行时通过 Bundle.main 读取) +API_DOMAIN = https://api.muststudy.xin +INFOPLIST_KEY_API_DOMAIN = $(API_DOMAIN) + +// Swift 编译条件:代码中可用 #if API_ENV_DEVELOP +SWIFT_ACTIVE_COMPILATION_CONDITIONS = API_ENV_DEVELOP $(inherited) +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) diff --git a/ios/WildGrowth/Config/Info-API.plist b/ios/WildGrowth/Config/Info-API.plist new file mode 100644 index 0000000..20df465 --- /dev/null +++ b/ios/WildGrowth/Config/Info-API.plist @@ -0,0 +1,8 @@ + + + + + API_DOMAIN + $(API_DOMAIN) + + diff --git a/ios/WildGrowth/Config/Local.xcconfig b/ios/WildGrowth/Config/Local.xcconfig new file mode 100644 index 0000000..219be54 --- /dev/null +++ b/ios/WildGrowth/Config/Local.xcconfig @@ -0,0 +1,13 @@ +// Local.xcconfig - 本地开发环境 +// 用于连接本机 localhost 或局域网后端 +// 真机调试时可将 API_DOMAIN 改为本机局域网 IP,如 http://192.168.1.100:3000 + +#include "Shared.xcconfig" + +// API 域名(注入 Info.plist,运行时通过 Bundle.main 读取) +API_DOMAIN = http://localhost:3000 +INFOPLIST_KEY_API_DOMAIN = $(API_DOMAIN) + +// Swift 编译条件:代码中可用 #if API_ENV_LOCAL +SWIFT_ACTIVE_COMPILATION_CONDITIONS = API_ENV_LOCAL $(inherited) +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) diff --git a/ios/WildGrowth/Config/Online.xcconfig b/ios/WildGrowth/Config/Online.xcconfig new file mode 100644 index 0000000..30edb1e --- /dev/null +++ b/ios/WildGrowth/Config/Online.xcconfig @@ -0,0 +1,12 @@ +// Online.xcconfig - 线上生产环境 +// 用于 Release 打包、TestFlight、App Store + +#include "Shared.xcconfig" + +// API 域名(注入 Info.plist,运行时通过 Bundle.main 读取) +API_DOMAIN = https://wildgrowth.upolar.com +INFOPLIST_KEY_API_DOMAIN = $(API_DOMAIN) + +// Swift 编译条件:代码中可用 #if API_ENV_ONLINE +SWIFT_ACTIVE_COMPILATION_CONDITIONS = API_ENV_ONLINE $(inherited) +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) diff --git a/ios/WildGrowth/Config/Shared.xcconfig b/ios/WildGrowth/Config/Shared.xcconfig new file mode 100644 index 0000000..22f701a --- /dev/null +++ b/ios/WildGrowth/Config/Shared.xcconfig @@ -0,0 +1,6 @@ +// Shared.xcconfig - 公共配置(被各环境 xcconfig 引用) +// 包含 Swift 版本、编译选项等通用设置 + +SWIFT_VERSION = 5.0 +SWIFT_EMIT_LOC_STRINGS = YES +ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES diff --git a/ios/WildGrowth/电子成长.xcodeproj/project.xcworkspace/xcuserdata/wendazhi.xcuserdatad/WorkspaceSettings.xcsettings b/ios/WildGrowth/电子成长.xcodeproj/project.xcworkspace/xcuserdata/wendazhi.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..bbfef02 --- /dev/null +++ b/ios/WildGrowth/电子成长.xcodeproj/project.xcworkspace/xcuserdata/wendazhi.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,14 @@ + + + + + BuildLocationStyle + UseAppPreferences + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + ShowSharedSchemesAutomaticallyEnabled + + +