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 的正方形,不能有圆角;有圆角启动时会有黑色阴影

相关推荐
茶底世界之下3 小时前
海边书店的阴天:用 Awaking 留住青绿与暖灯
ios·app·产品
布莱克60513 小时前
Swift 类详解:从定义、继承到内存管理的完整指南
服务器·开发语言·ios·ssh·swift·类
布莱克60516 小时前
Swift 方法详解:实例方法、类型方法与 mutating 机制
服务器·开发语言·ios·ssh·swift·方法
茶底世界之下1 天前
旧电影院的红座椅:用 Awaking 留住放映前的光
ios·app·产品
茶底世界之下2 天前
洗衣房的午后斜光:用 Awaking 把光和影分开
ios·app·产品
我是谁的程序员3 天前
iOS 性能分析在 Windows 上怎么做,用 KXBuild 的 kxdevice 替代 Instruments
后端·ios
开心就好20253 天前
通配符 Bundle ID 和精确 Bundle ID 怎么选,推送、iCloud 能不能用通配符
后端·ios
布莱克6053 天前
Swift 枚举详解:从基础语法到关联值与模式匹配
开发语言·ios·swift·枚举
茶底世界之下3 天前
冬日窗边的早餐:用 Awaking 留住冷光里的暖意
ios·app·产品
布莱克6053 天前
Swift 闭包详解:从语法到实战的完整指南
服务器·开发语言·ios·ssh·swift·闭包