我在列表中看不到广告客户.我在设备和模拟器上运行此代码,你知道为什么吗?

这是添加到主viewcontroller的所有代码.我正在使用nshipser multipeer连接教程:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
static NSString * const XXServiceType = @"xx-service";
localPeerID = [[MCPeerID alloc] initWithDisplayName:[[UIDevice currentDevice] name]];
MCNearbyServiceAdvertiser *advertiser =
[[MCNearbyServiceAdvertiser alloc] initWithPeer:localPeerID
discoveryInfo:nil
serviceType:XXServiceType];
advertiser.delegate = self;
[advertiser startAdvertisingPeer];
MCSession *session = [[MCSession alloc] initWithPeer:localPeerID
securityIdentity:nil
encryptionPreference:MCEncryptionNone];
session.delegate = self;
MCNearbyServiceBrowser *browser = [[MCNearbyServiceBrowser alloc] initWithPeer:localPeerID serviceType:XXServiceType];
browser.delegate = self;
MCBrowserViewController *browserViewController =
[[MCBrowserViewController alloc] initWithBrowser:browser
session:session];
browserViewController.view.backgroundColor = [UIColor redColor];
browserViewController.delegate = self;
self.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:browserViewController animated:YES completion:
^{ …Run Code Online (Sandbox Code Playgroud) 我有进口Reachability.h的.m文件,就像写在这里为我的雨燕的项目,但开始后观察者/事件处理程序将不会被调用,为什么呢?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
NSNotificationCenter.defaultCenter().addObserver(self, selector: "reachabilityChanged:", name: kReachabilityChangedNotification, object: nil)
let hostReachability = Reachability(hostName: "www.apple.com");
hostReachability.startNotifier();
return true
}
func reachabilityChanged(note: NSNotification) { // <- DOES NOT GET CALLED
let reachability: Reachability = note.object as Reachability;
if(reachability.currentReachabilityStatus() != .NotReachable) {
}
}
Run Code Online (Sandbox Code Playgroud) 我Present as Popover在Interface Builder中选择了我的StoryBoard Segue.

我怎样才能获得对UIPopoverController的引用prepareForSegue?
我试过这样,但它不在if语句中.
if segue is UIStoryboardPopoverSegue {
let popoverSegue = segue as UIStoryboardPopoverSegue
simpleTableViewController.popoverController = popoverSegue.popoverController
}
Run Code Online (Sandbox Code Playgroud)
如果你需要popovercontroller,只是为了解雇它,那么解雇自适应视图控制器的方法是:
self.dismissViewControllerAnimated(true, completion: nil)
Run Code Online (Sandbox Code Playgroud) 我有一个应用程序用于CloudKit存储数据.当我测试,从Xcode安装时,它运行良好.当我提交到iTunes Connect并安装为beta App时,它不会通过某些CloudKit启动过程.我现在不是确切的问题.难道我需要CloudKit` 部署到生产中吗?
很难测试.我无法调试TestFlight版本,只能调试Xcode版本,但是可行.
当我CloudKit在 Xcode 中打开时,它会根据 app 的名称设置并创建一个默认容器。是否可以设置不同的默认名称?我不想在 CloudKit 仪表板的列表中看到新的容器名称,而是使用现有的。

我已将CloudKit开发环境部署到生产环境中.以前我在开发环境中测试了我的应用程序,它没有任何错误.现在在生产环境中运行应用程序,当客户端想要在CloudKit中插入记录时,我收到此错误:
Error saving record <CKRecordID: 0x17fddd60; 0188D8FE-F9EB-49A0-9CC2-A2AE513E9E25:(_defaultZone:__defaultOwner__)> to server: Cannot create a new field type in production schema
Run Code Online (Sandbox Code Playgroud)
你有什么主意吗?
想要将JPG二进制体数据保存到文件系统中OpenShift.但不知何故收到的信息将被转换.你知道为什么吗?node.js是否可能将数据视为文本并对其进行编码/解码?
var myServer = http.createServer(function(request, response)
{
var data = '';
request.on('data', function (chunk){
data += chunk;
});
request.on('end',function(){
var date = new Date();
var url_parts = url.parse(request.url,true);
if(url_parts.pathname == '/setImage') {
if(data != null && data.length > 0) {
fs.writeFile('/var/lib/openshift/555dd1415973ca1660000085/app-root/data/asset/' + url_parts.query.filename, data, 'binary', function(err) {
if (err) throw err
console.log(date + ' File saved. ' + url_parts.query.filename + ' ' + data.length)
response.writeHead(200)
response.end()
})
}
}
Run Code Online (Sandbox Code Playgroud)
在iOS中TextField有一个名为Appeareancecan 的属性Dark值.它将改变KEYBOARD颜色,(不是文本域itsels)但是在Android中我找不到适合EditText的颜色,将键盘颜色改为黑色或黑色.
是什么区别viewWillAppear和viewDidLayoutSubviews。
我知道在viewDidLoad视图中的大小是未知的。另外两种方法呢?哪个更好地使用调整子视图的位置?
In Javascript, Node.js I can generate with https://www.npmjs.com/package/uuid package a 15 digit length "random" string. Is it possible it with Swift?
Like this: 802128100247740
const uuidv4 = require("uuid/v4");
tempUserUuid = uuidv4();
Run Code Online (Sandbox Code Playgroud)