我刚刚安装了一个新的 iPhone 分发证书,该证书从其他人的计算机导出为 .p12。
当我尝试使用与此新证书相关联的配置文件进行存档时,出现此无效信任设置错误:
恢复证书“iPhone Distribution”的系统默认信任设置,以便用它签署代码。
但是,当我修复信任设置(将证书的信任设置设置为“使用系统默认值”)时,它表示该证书不受信任:
iPhone 分发证书不受信任
如果我尝试在此状态下存档,则会收到此错误:
警告:无法为签名者“iPhone Distribution”构建到自签名根的链
我陷入了无限循环。请帮忙!
网络尝试完成后,我正在尝试使用IdlingResources测试某些内容。我CountingIdlingResource在主活动中一直跟踪正在运行的作业,但是我的测试文件无法识别getIdlingResource:
这是我的导入语句:
package com.example.android.bakingapp;
import android.support.test.espresso.Espresso;
import android.support.test.espresso.contrib.RecyclerViewActions;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.example.android.bakingapp.activities.MainActivity;
import com.example.android.bakingapp.activities.RecipeActivity;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
Run Code Online (Sandbox Code Playgroud)
我也将其包含在我的gradle依赖项中:
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
compile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2'
Run Code Online (Sandbox Code Playgroud) 我有一个连接到表视图的搜索栏.当搜索栏未激活但在搜索栏处于活动状态时禁用单元格选择时,它完全按照我的意愿工作.我调试了它,当搜索处于活动状态时选择一行时,甚至没有调用didSelectRowAtIndexPath.可能是什么导致了这个?
这是相关的代码:
class FabricsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UISearchBarDelegate, UISearchControllerDelegate, UISearchDisplayDelegate {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
searchController.delegate = self
searchController.searchBar.delegate = self
searchController.searchResultsUpdater = self
searchController.dimsBackgroundDuringPresentation = false
searchController.definesPresentationContext = false
searchController.hidesNavigationBarDuringPresentation = false
myTableView.tableHeaderView = searchController.searchBar
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if searching {
searching = false
searchBar?.resignFirstResponder()
FirebaseClient.sharedInstance.joinFabric(uid: self.appDelegate.uid!, fabricKey: allFabrics[indexPath.row].key)
updateFabricList()
} else {
appDelegate.selectedFabricKey = joinedFabrics[indexPath.row].key
performSegue(withIdentifier: "fabricSelected", sender: …Run Code Online (Sandbox Code Playgroud) 我想在 Vapor 4 中建立aLeague和 a之间的父子关系。Team我可以创建一个League就好了,但是当我尝试创建一个这样的新团队时:
{
"name": "Chicago Bulls",
"league_id": "C21827C2-8FAD-4A89-B8D3-A3E62E421258"
}
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
{
"error": true,
"reason": "Value of type 'League' required for key 'league'."
}
Run Code Online (Sandbox Code Playgroud)
我只想Team用从表league_id中引用 a 的 a初始化 a 。我在 Vapor 3 中使用过这个,但在 Vapor 4 中似乎无法正确使用。LeagueLeagues
请参阅下面的模型和迁移。
League 模型:
final class League: Model, Content {
init() {}
static let schema = "Leagues"
@ID(key: .id) var id: UUID?
@Field(key: .name) var name: String
@Field(key: .sport) var sport: …Run Code Online (Sandbox Code Playgroud)