今天我终于得到了我的公司 - 开发者 - 账户.我正在开发一个应用程序,首先是我的私人帐户,今天我想将应用程序移到公司帐户.所以我在developer.apple.com上创建了一个新的Bundle-Identifier,并在我的Xcode-Project中更改了Bundle-Identifier.此外,我已将帐户添加到Xcode,将签名更改为我的新公司帐户,并让Xcode修复Provisioning-File-Troubles.(在Xcode中,我看到来自一个帐户的两个团队成员,一个是代理,另一个是用户.也许重要的是我选择了代理团队成员.不幸的是我无法改变,因为我得到错误"改变到一个唯一的bundle-id,因为bundle-id已经在Agent-Team上?^^)使用模拟器运行正常,但是当我想在我的手机上测试时,我得到以下错误: The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).
在Entitlements下我只启用了Push-Notifications.但是在更改Bundle Identifier之前就是这样的
我的设置VC中有一个简单的tableview。有两种不同的情况,即登录的用户是雇员还是管理员。管理员能够将用户添加到组织中,因此他看到两个部分,每个部分一行(添加用户并注销),而普通员工只看到一个一行(注销)。要管理indexPaths,我具有以下结构:
struct Indexes {
struct AddEmployee {
static let row = 0
static let section = isEmployee() ? -1 : 0
static func indexPath() -> IndexPath {
return IndexPath(row: row, section: section)
}
}
struct SignOut {
static let row = 0
static let section = isEmployee() ? 0 : 1
static func indexPath() -> IndexPath {
return IndexPath(row: row, section: section)
}
}
}
Run Code Online (Sandbox Code Playgroud)
在我的TableView委托中,我得到了以下方法:
func numberOfSections(in tableView: UITableView) -> Int {
return isEmployee() ? 1 : 2
} …Run Code Online (Sandbox Code Playgroud)