新增景区权限模块,集成 AMap CocoaPods 并支持模拟器

将景区选择与权限申请流程接入首页路由,集成高德 SDK 用于真机构建,并通过 Podfile post_install 钩子保证 arm64 模拟器可编译。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-23 10:15:26 +08:00
parent 5d4613f317
commit b61bf0d070
416 changed files with 18641 additions and 38 deletions

89
Podfile Normal file
View File

@ -0,0 +1,89 @@
platform :ios, '17.0'
target 'suixinkan' do
use_frameworks!
# 高德地图 SDK仅真机构建时链接模拟器通过 post_install 剥离(见下方说明)
pod 'AMap3DMap-NO-IDFA', '~> 11.1'
pod 'AMapSearch-NO-IDFA', '~> 9.7'
pod 'AMapLocation-NO-IDFA', '~> 2.11'
target 'suixinkanTests' do
inherit! :search_paths
end
end
# 模拟器可用的链接参数(不含高德 prebuilt framework
SIMULATOR_OTHER_LDFLAGS = <<~FLAGS.squish
-ObjC -l"c++" -l"z"
-framework "CoreGraphics" -framework "CoreLocation" -framework "CoreTelephony"
-framework "CoreText" -framework "ExternalAccessory" -framework "GLKit"
-framework "OpenGLES" -framework "QuartzCore" -framework "Security"
-framework "SystemConfiguration"
FLAGS
post_install do |installer|
# 1. 修正 aggregate xcconfig去掉 arm64 排除,模拟器单独链接(不链 AMap
%w[Pods-suixinkan Pods-suixinkanTests].each do |target_name|
support_dir = File.join(installer.sandbox.root, 'Target Support Files', target_name)
Dir.glob(File.join(support_dir, '*.xcconfig')).each do |path|
content = File.read(path)
content.gsub!("EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64\n", '')
unless content.include?('OTHER_LDFLAGS[sdk=iphonesimulator*]')
content << "\nOTHER_LDFLAGS[sdk=iphonesimulator*] = #{SIMULATOR_OTHER_LDFLAGS}\n"
content << "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*] = $(inherited)\n"
end
File.write(path, content)
end
end
# 2. AMap pod target 标记为仅真机
installer.pods_project.targets.each do |target|
next unless target.name.start_with?('AMap')
target.build_configurations.each do |config|
config.build_settings['SUPPORTED_PLATFORMS'] = 'iphoneos'
end
end
# 3. 模拟器跳过 AMap.bundle 资源拷贝(当前 Pods 资源仅此一项)
resources_script = File.join(
installer.sandbox.root,
'Target Support Files/Pods-suixinkan/Pods-suixinkan-resources.sh'
)
if File.exist?(resources_script)
content = File.read(resources_script)
unless content.include?('SKIP_AMAP_RESOURCES_FOR_SIMULATOR')
content.sub!(
"RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt",
<<~SHELL
# SKIP_AMAP_RESOURCES_FOR_SIMULATOR
if [ "${EFFECTIVE_PLATFORM_NAME}" = "-iphonesimulator" ]; then
exit 0
fi
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
SHELL
)
File.write(resources_script, content)
end
end
# 4. 主工程:允许 arm64 模拟器、真机编译期注入 AMAP_ENABLED、关闭脚本沙盒CocoaPods 兼容)
installer.aggregate_targets.each do |aggregate_target|
aggregate_target.user_project.native_targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = ''
config.build_settings['ENABLE_USER_SCRIPT_SANDBOXING'] = 'NO'
next unless target.name == 'suixinkan'
existing = config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphoneos*]'] || '$(inherited)'
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphoneos*]'] = "#{existing} AMAP_ENABLED" unless existing.to_s.include?('AMAP_ENABLED')
end
end
aggregate_target.user_project.save
end
end

30
Podfile.lock Normal file
View File

@ -0,0 +1,30 @@
PODS:
- AMap3DMap-NO-IDFA (11.1.200):
- AMapFoundation-NO-IDFA (>= 1.8.7)
- AMapFoundation-NO-IDFA (1.8.7)
- AMapLocation-NO-IDFA (2.11.1):
- AMapFoundation-NO-IDFA (>= 1.8.7)
- AMapSearch-NO-IDFA (9.7.5):
- AMapFoundation-NO-IDFA (>= 1.8.0)
DEPENDENCIES:
- AMap3DMap-NO-IDFA (~> 11.1)
- AMapLocation-NO-IDFA (~> 2.11)
- AMapSearch-NO-IDFA (~> 9.7)
SPEC REPOS:
trunk:
- AMap3DMap-NO-IDFA
- AMapFoundation-NO-IDFA
- AMapLocation-NO-IDFA
- AMapSearch-NO-IDFA
SPEC CHECKSUMS:
AMap3DMap-NO-IDFA: 393a24abb0451fed2daa4316c8d3d356a395f2be
AMapFoundation-NO-IDFA: f48acbf6e74913dc6744581053f7d984f2432850
AMapLocation-NO-IDFA: 0fa6e7d5e42e10253f4437424d98966f53760862
AMapSearch-NO-IDFA: 8e9d104032990a3b0cab66afb535299887c61047
PODFILE CHECKSUM: 50778cfc2820db549075417f39146c17f4bd07f1
COCOAPODS: 1.16.2

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

View File

@ -0,0 +1,191 @@
info face="Arial" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 outline=0
common lineHeight=32 base=26 scaleW=256 scaleH=256 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0
page id=0 file="anscii_0.png"
chars count=95
char id=32 x=110 y=22 width=3 height=1 xoffset=-1 yoffset=31 xadvance=8 page=0 chnl=15
char id=33 x=199 y=63 width=4 height=20 xoffset=2 yoffset=6 xadvance=8 page=0 chnl=15
char id=34 x=242 y=79 width=10 height=7 xoffset=0 yoffset=6 xadvance=10 page=0 chnl=15
char id=35 x=0 y=48 width=16 height=20 xoffset=-1 yoffset=6 xadvance=15 page=0 chnl=15
char id=36 x=94 y=0 width=15 height=23 xoffset=0 yoffset=5 xadvance=15 page=0 chnl=15
char id=37 x=161 y=0 width=22 height=20 xoffset=1 yoffset=6 xadvance=24 page=0 chnl=15
char id=38 x=132 y=21 width=17 height=20 xoffset=1 yoffset=6 xadvance=18 page=0 chnl=15
char id=39 x=0 y=106 width=5 height=7 xoffset=0 yoffset=6 xadvance=5 page=0 chnl=15
char id=40 x=47 y=0 width=8 height=25 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=15
char id=41 x=56 y=0 width=8 height=25 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=15
char id=42 x=230 y=79 width=11 height=8 xoffset=0 yoffset=6 xadvance=11 page=0 chnl=15
char id=43 x=187 y=84 width=14 height=12 xoffset=1 yoffset=10 xadvance=16 page=0 chnl=15
char id=44 x=6 y=106 width=4 height=6 xoffset=2 yoffset=24 xadvance=8 page=0 chnl=15
char id=45 x=53 y=106 width=9 height=2 xoffset=0 yoffset=18 xadvance=9 page=0 chnl=15
char id=46 x=209 y=79 width=4 height=2 xoffset=2 yoffset=24 xadvance=8 page=0 chnl=15
char id=47 x=153 y=63 width=10 height=20 xoffset=-1 yoffset=6 xadvance=8 page=0 chnl=15
char id=48 x=15 y=69 width=14 height=20 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
char id=49 x=164 y=63 width=9 height=20 xoffset=2 yoffset=6 xadvance=15 page=0 chnl=15
char id=50 x=134 y=42 width=14 height=20 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
char id=51 x=59 y=68 width=13 height=20 xoffset=1 yoffset=6 xadvance=15 page=0 chnl=15
char id=52 x=179 y=42 width=14 height=20 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
char id=53 x=45 y=69 width=13 height=20 xoffset=1 yoffset=6 xadvance=15 page=0 chnl=15
char id=54 x=194 y=42 width=14 height=20 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
char id=55 x=115 y=66 width=13 height=20 xoffset=1 yoffset=6 xadvance=15 page=0 chnl=15
char id=56 x=102 y=45 width=15 height=20 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
char id=57 x=118 y=43 width=15 height=20 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
char id=58 x=251 y=63 width=4 height=15 xoffset=2 yoffset=11 xadvance=8 page=0 chnl=15
char id=59 x=204 y=63 width=4 height=19 xoffset=2 yoffset=11 xadvance=8 page=0 chnl=15
char id=60 x=172 y=84 width=14 height=13 xoffset=1 yoffset=10 xadvance=16 page=0 chnl=15
char id=61 x=215 y=79 width=14 height=8 xoffset=1 yoffset=12 xadvance=16 page=0 chnl=15
char id=62 x=157 y=84 width=14 height=13 xoffset=1 yoffset=10 xadvance=16 page=0 chnl=15
char id=63 x=101 y=68 width=13 height=20 xoffset=1 yoffset=6 xadvance=15 page=0 chnl=15
char id=64 x=0 y=0 width=26 height=26 xoffset=1 yoffset=6 xadvance=27 page=0 chnl=15
char id=65 x=227 y=0 width=19 height=20 xoffset=-1 yoffset=6 xadvance=18 page=0 chnl=15
char id=66 x=17 y=48 width=16 height=20 xoffset=1 yoffset=6 xadvance=18 page=0 chnl=15
char id=67 x=58 y=26 width=18 height=20 xoffset=1 yoffset=6 xadvance=20 page=0 chnl=15
char id=68 x=168 y=21 width=17 height=20 xoffset=2 yoffset=6 xadvance=20 page=0 chnl=15
char id=69 x=51 y=47 width=16 height=20 xoffset=1 yoffset=6 xadvance=18 page=0 chnl=15
char id=70 x=240 y=21 width=15 height=20 xoffset=2 yoffset=6 xadvance=17 page=0 chnl=15
char id=71 x=0 y=27 width=19 height=20 xoffset=1 yoffset=6 xadvance=21 page=0 chnl=15
char id=72 x=186 y=21 width=17 height=20 xoffset=1 yoffset=6 xadvance=19 page=0 chnl=15
char id=73 x=184 y=63 width=4 height=20 xoffset=2 yoffset=6 xadvance=8 page=0 chnl=15
char id=74 x=129 y=64 width=12 height=20 xoffset=0 yoffset=6 xadvance=13 page=0 chnl=15
char id=75 x=39 y=26 width=18 height=20 xoffset=1 yoffset=6 xadvance=18 page=0 chnl=15
char id=76 x=0 y=69 width=14 height=20 xoffset=1 yoffset=6 xadvance=15 page=0 chnl=15
char id=77 x=184 y=0 width=21 height=20 xoffset=1 yoffset=6 xadvance=23 page=0 chnl=15
char id=78 x=96 y=24 width=17 height=20 xoffset=1 yoffset=6 xadvance=19 page=0 chnl=15
char id=79 x=206 y=0 width=20 height=20 xoffset=1 yoffset=6 xadvance=21 page=0 chnl=15
char id=80 x=85 y=47 width=16 height=20 xoffset=1 yoffset=6 xadvance=17 page=0 chnl=15
char id=81 x=110 y=0 width=21 height=21 xoffset=0 yoffset=6 xadvance=21 page=0 chnl=15
char id=82 x=77 y=26 width=18 height=20 xoffset=2 yoffset=6 xadvance=20 page=0 chnl=15
char id=83 x=68 y=47 width=16 height=20 xoffset=1 yoffset=6 xadvance=18 page=0 chnl=15
char id=84 x=34 y=48 width=16 height=20 xoffset=0 yoffset=6 xadvance=16 page=0 chnl=15
char id=85 x=204 y=21 width=17 height=20 xoffset=1 yoffset=6 xadvance=19 page=0 chnl=15
char id=86 x=222 y=21 width=17 height=20 xoffset=0 yoffset=6 xadvance=17 page=0 chnl=15
char id=87 x=132 y=0 width=28 height=20 xoffset=0 yoffset=6 xadvance=28 page=0 chnl=15
char id=88 x=150 y=21 width=17 height=20 xoffset=0 yoffset=6 xadvance=17 page=0 chnl=15
char id=89 x=20 y=27 width=18 height=20 xoffset=0 yoffset=6 xadvance=18 page=0 chnl=15
char id=90 x=114 y=22 width=17 height=20 xoffset=0 yoffset=6 xadvance=17 page=0 chnl=15
char id=91 x=73 y=0 width=7 height=25 xoffset=1 yoffset=6 xadvance=8 page=0 chnl=15
char id=92 x=174 y=63 width=9 height=20 xoffset=-1 yoffset=6 xadvance=8 page=0 chnl=15
char id=93 x=65 y=0 width=7 height=25 xoffset=0 yoffset=6 xadvance=8 page=0 chnl=15
char id=94 x=202 y=84 width=12 height=10 xoffset=0 yoffset=6 xadvance=12 page=0 chnl=15
char id=95 x=35 y=106 width=17 height=2 xoffset=-1 yoffset=29 xadvance=15 page=0 chnl=15
char id=96 x=28 y=106 width=6 height=4 xoffset=1 yoffset=6 xadvance=9 page=0 chnl=15
char id=97 x=48 y=90 width=14 height=15 xoffset=0 yoffset=11 xadvance=15 page=0 chnl=15
char id=98 x=149 y=42 width=14 height=20 xoffset=1 yoffset=6 xadvance=15 page=0 chnl=15
char id=99 x=106 y=89 width=13 height=15 xoffset=0 yoffset=11 xadvance=14 page=0 chnl=15
char id=100 x=164 y=42 width=14 height=20 xoffset=0 yoffset=6 xadvance=15 page=0 chnl=15
char id=101 x=0 y=90 width=15 height=15 xoffset=0 yoffset=11 xadvance=15 page=0 chnl=15
char id=102 x=142 y=63 width=10 height=20 xoffset=-1 yoffset=6 xadvance=7 page=0 chnl=15
char id=103 x=209 y=42 width=14 height=20 xoffset=0 yoffset=11 xadvance=15 page=0 chnl=15
char id=104 x=73 y=68 width=13 height=20 xoffset=1 yoffset=6 xadvance=15 page=0 chnl=15
char id=105 x=189 y=63 width=4 height=20 xoffset=1 yoffset=6 xadvance=6 page=0 chnl=15
char id=106 x=81 y=0 width=7 height=25 xoffset=-2 yoffset=6 xadvance=6 page=0 chnl=15
char id=107 x=87 y=68 width=13 height=20 xoffset=1 yoffset=6 xadvance=14 page=0 chnl=15
char id=108 x=194 y=63 width=4 height=20 xoffset=1 yoffset=6 xadvance=6 page=0 chnl=15
char id=109 x=209 y=63 width=20 height=15 xoffset=1 yoffset=11 xadvance=22 page=0 chnl=15
char id=110 x=78 y=89 width=13 height=15 xoffset=1 yoffset=11 xadvance=15 page=0 chnl=15
char id=111 x=16 y=90 width=15 height=15 xoffset=0 yoffset=11 xadvance=15 page=0 chnl=15
char id=112 x=30 y=69 width=14 height=20 xoffset=1 yoffset=11 xadvance=15 page=0 chnl=15
char id=113 x=224 y=42 width=14 height=20 xoffset=0 yoffset=11 xadvance=15 page=0 chnl=15
char id=114 x=147 y=84 width=9 height=15 xoffset=1 yoffset=11 xadvance=9 page=0 chnl=15
char id=115 x=63 y=89 width=14 height=15 xoffset=0 yoffset=11 xadvance=14 page=0 chnl=15
char id=116 x=247 y=0 width=8 height=20 xoffset=0 yoffset=6 xadvance=8 page=0 chnl=15
char id=117 x=92 y=89 width=13 height=15 xoffset=1 yoffset=11 xadvance=15 page=0 chnl=15
char id=118 x=32 y=90 width=15 height=15 xoffset=-1 yoffset=11 xadvance=13 page=0 chnl=15
char id=119 x=230 y=63 width=20 height=15 xoffset=-1 yoffset=11 xadvance=19 page=0 chnl=15
char id=120 x=134 y=85 width=12 height=15 xoffset=0 yoffset=11 xadvance=12 page=0 chnl=15
char id=121 x=239 y=42 width=14 height=20 xoffset=0 yoffset=11 xadvance=14 page=0 chnl=15
char id=122 x=120 y=87 width=13 height=15 xoffset=0 yoffset=11 xadvance=13 page=0 chnl=15
char id=123 x=37 y=0 width=9 height=25 xoffset=0 yoffset=6 xadvance=9 page=0 chnl=15
char id=124 x=89 y=0 width=4 height=25 xoffset=1 yoffset=6 xadvance=6 page=0 chnl=15
char id=125 x=27 y=0 width=9 height=25 xoffset=0 yoffset=6 xadvance=9 page=0 chnl=15
char id=126 x=11 y=106 width=16 height=4 xoffset=0 yoffset=14 xadvance=16 page=0 chnl=15
kernings count=91
kerning first=32 second=65 amount=-2
kerning first=32 second=84 amount=-1
kerning first=32 second=89 amount=-1
kerning first=121 second=46 amount=-2
kerning first=121 second=44 amount=-2
kerning first=119 second=46 amount=-2
kerning first=119 second=44 amount=-2
kerning first=118 second=46 amount=-2
kerning first=118 second=44 amount=-2
kerning first=114 second=46 amount=-2
kerning first=49 second=49 amount=-2
kerning first=65 second=32 amount=-2
kerning first=65 second=84 amount=-2
kerning first=65 second=86 amount=-2
kerning first=65 second=87 amount=-1
kerning first=65 second=89 amount=-2
kerning first=65 second=118 amount=-1
kerning first=65 second=119 amount=-1
kerning first=65 second=121 amount=-1
kerning first=114 second=44 amount=-2
kerning first=70 second=44 amount=-3
kerning first=70 second=46 amount=-3
kerning first=70 second=65 amount=-2
kerning first=76 second=32 amount=-1
kerning first=76 second=84 amount=-2
kerning first=76 second=86 amount=-2
kerning first=76 second=87 amount=-2
kerning first=76 second=89 amount=-2
kerning first=76 second=121 amount=-1
kerning first=102 second=102 amount=-1
kerning first=80 second=32 amount=-1
kerning first=80 second=44 amount=-4
kerning first=80 second=46 amount=-4
kerning first=80 second=65 amount=-2
kerning first=82 second=84 amount=-1
kerning first=82 second=86 amount=-1
kerning first=82 second=87 amount=-1
kerning first=82 second=89 amount=-1
kerning first=84 second=32 amount=-1
kerning first=84 second=44 amount=-3
kerning first=84 second=45 amount=-2
kerning first=84 second=46 amount=-3
kerning first=84 second=58 amount=-3
kerning first=89 second=118 amount=-2
kerning first=84 second=65 amount=-2
kerning first=84 second=79 amount=-1
kerning first=84 second=97 amount=-3
kerning first=84 second=99 amount=-3
kerning first=84 second=101 amount=-3
kerning first=84 second=105 amount=-1
kerning first=84 second=111 amount=-3
kerning first=84 second=114 amount=-1
kerning first=84 second=115 amount=-3
kerning first=84 second=117 amount=-1
kerning first=84 second=119 amount=-2
kerning first=84 second=121 amount=-2
kerning first=86 second=44 amount=-3
kerning first=86 second=45 amount=-2
kerning first=86 second=46 amount=-3
kerning first=86 second=58 amount=-1
kerning first=89 second=117 amount=-2
kerning first=86 second=65 amount=-2
kerning first=86 second=97 amount=-2
kerning first=86 second=101 amount=-2
kerning first=86 second=105 amount=-1
kerning first=86 second=111 amount=-2
kerning first=86 second=114 amount=-1
kerning first=86 second=117 amount=-1
kerning first=86 second=121 amount=-1
kerning first=87 second=44 amount=-2
kerning first=87 second=45 amount=-1
kerning first=87 second=46 amount=-2
kerning first=87 second=58 amount=-1
kerning first=89 second=113 amount=-3
kerning first=87 second=65 amount=-1
kerning first=87 second=97 amount=-1
kerning first=87 second=101 amount=-1
kerning first=89 second=112 amount=-2
kerning first=87 second=111 amount=-1
kerning first=87 second=114 amount=-1
kerning first=87 second=117 amount=-1
kerning first=89 second=111 amount=-3
kerning first=89 second=32 amount=-1
kerning first=89 second=44 amount=-4
kerning first=89 second=45 amount=-3
kerning first=89 second=46 amount=-4
kerning first=89 second=58 amount=-2
kerning first=89 second=105 amount=-1
kerning first=89 second=65 amount=-2
kerning first=89 second=97 amount=-2
kerning first=89 second=101 amount=-3

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

Some files were not shown because too many files have changed in this diff Show More