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

相关推荐
FungLeo16 小时前
Swift macOS 游戏开发实战|空当接龙 03|使用 Swift 实现可复现的洗牌算法
macos·swift·随机数·fisher-yates·洗牌算法
东坡肘子1 天前
我的代码我做主 -- 肘子的 Swift 周报 #164
人工智能·swiftui·swift
布莱克6052 天前
Swift 中的逃逸闭包与非逃逸闭包:@escaping 到底在做什么
开发语言·ios·swift·闭包·逃逸
FungLeo2 天前
Swift macOS 开发实战 01|用 Swift 开发空当接龙,如何定义范围与验收
macos·项目管理·需求分析·swift·游戏开发
布莱克6052 天前
Swift 可选链详解:从语法到实战
开发语言·ios·swift·可选链
布莱克6052 天前
Swift 类型转换详解:从基础语法到实战技巧
开发语言·ios·swift·类型转换
FungLeo2 天前
Swift macOS 开发实战 02|SwiftUI 与 AppKit 混合开发,如何划分职责
macos·swiftui·swift·软件架构·appkit
布莱克6052 天前
Objective-C 基本语法详解:从零开始掌握 iOS 开发语言
开发语言·ios·objective-c·基础·语法
黑科技iOS上架3 天前
iOS4.3合规自测手段:二进制分析
flutter·ios·cocoa·审核
网易易盾4 天前
iOS 设备环境核验接入实践:从特征扫描到运行时完整性识别
ios