Xcode

info.plist

Appearance

Light 关闭黑暗模式

Bundle display name

设置app名称,默认为工程名

Location When In Use Usage Description

定位权限一共有3个key

1.Privacy - Location When In Use Usage Description

2.Privacy - Location Always and When In Use Usage Description

3.Privacy - Location Always Usage Description
推荐使用1,好上架,以下教程使用Location When In Use Usage Description

swift 复制代码
import CoreLocation

// 定位
let locationManager = CLLocationManager()
locationManager.requestWhenInUseAuthorization()

//定位权限判断
switch CLLocationManager.authorizationStatus() {
case .denied :
    //未授权
case .notDetermined :
    //不确定
case .authorizedAlways :
    //一直允许
case .authorizedWhenInUse :
    //使用期间允许
case .restricted :
    //受限的
}

// 跳转到app权限设置页面
func openSettings() {
    guard let settingsURL = URL(string: UIApplication.openSettingsURLString) else {
        return
    }
 
    if UIApplication.shared.canOpenURL(settingsURL) {
        UIApplication.shared.open(settingsURL, options: [:], completionHandler: nil)
    }
}

长按显示的复制、剪切的提示从英文改为中文



Archive报错

Invalid large app icon. The large app icon in the asset catalog in "App-lOS.app" can't be transparent or contain an alpha channel.

打开app图标-> 文件 -> 导出-> 取消勾选Alpha通道

注:App图标为1024 * 1024 的正方形,不能有圆角;有圆角启动时会有黑色阴影

相关推荐
东坡肘子17 小时前
Macbook Neo:苹果重回校园的起点 -- 肘子的 Swift 周报 #126
人工智能·swiftui·swift
开心就好20252 天前
iOS App 安全加固流程记录,代码、资源与安装包保护
后端·ios
开心就好20252 天前
iOS App 性能测试工具怎么选?使用克魔助手(Keymob)结合 Instruments 完成
后端·ios
zhongjiahao3 天前
面试常问的 RunLoop,到底在Loop什么?
ios
wvy4 天前
iOS 26手势返回到根页面时TabBar的动效问题
ios
RickeyBoy4 天前
iOS 图片取色完全指南:从像素格式到工程实践
ios
aiopencode4 天前
使用 Ipa Guard 命令行版本将 IPA 混淆接入自动化流程
后端·ios
二流小码农4 天前
鸿蒙开发:路由组件升级,支持页面一键创建
android·ios·harmonyos
iceiceiceice5 天前
iOS PDF阅读器段评实现:如何从 PDFSelection 精准还原一个自然段
前端·人工智能·ios
TT_Close5 天前
【Flutter×鸿蒙】FVM 不认鸿蒙 SDK?4步手动塞进去
flutter·swift·harmonyos