我正在使用此处Facebook SDK
找到的,并且正在尝试提供的示例(在文件夹中).FacebookiOSSample
如果我只是AppId
用我的具体替换这里AppId
,那么我就不能再分享了.(我在AppDelegate
文件和info.plist
文件中都替换了它).我现在收到以下错误:
FBSDKLog:无效使用FBAppCall,fb****未注册为URL方案.你在plist中设置了'FacebookUrlSchemeSuffix'吗?
否则,这适用于样本的原始内容AppId
,该内容指向某个名称IFaceTouch
.
我的应用程序设置有什么问题,如何注册我的AppId
?
我有一个浮动值:12345.6489
我使用时格式化:
(12345.6489f)的ToString( "F1")
然后我得到了结果
12345.7
但这是不正确的,因为它应该是12345.6.
有谁知道为什么会这样?另一个提示是在格式化之前转换为double会返回正确的结果,如果我的浮点值稍微小一点,例如1234.6489,那么我也得到正确的结果.
我有一个视图,我已经使用xib文件创建.
现在,我想一些小元素添加到这一观点,即会利用一些从SpriteKit物理动画的,所以现在我需要一个SKView.
是否可以将SKView添加为与我的xib视图对应的视图的子视图?我尝试了这个,它似乎没有显示任何东西.
以下是与我的XIB视图对应的ViewController:
this.myCustomSKView = new CustomSKView()
this.View.AddSubview( this.myCustomSKView );
Run Code Online (Sandbox Code Playgroud)
我的自定义SKView的ViewController有:
public override void ViewWillLayoutSubviews ()
{
base.ViewWillLayoutSubviews ();
if(this.SKView.Scene == null)
{
this.SKView.ShowsFPS = true;
this.SKView.ShowsNodeCount = true;
this.SKView.ShowsDrawCount = true;
var scene = new MyCustomSKScene (this.SKView.Bounds.Size);
this.SKView.PresentScene (scene);
}
}
Run Code Online (Sandbox Code Playgroud) 在测试我的本地通知时,由于某种原因,在我的 iOS 设备上设置日期和时间不会触发我的本地通知出现。我的通知的触发日期设置为未来几天。如果我等几天,我就会看到本地通知。
为什么我在设备上设置日期和时间后看不到本地通知?
下面是一个示例:
playNotification.FireDate = DateTime.Now.AddHours(71.67f);
playNotification.AlertAction = "Alert text";
playNotification.AlertBody = "Alert body";
playNotification.SoundName = UILocalNotification.DefaultSoundName;
playNotification.ApplicationIconBadgeNumber = badgeCount;
UIApplication.SharedApplication.ScheduleLocalNotification(playNotification);
Run Code Online (Sandbox Code Playgroud)
我应该提到,我将“AddHours”更改为“AddSeconds”,并通过等待指定的秒数来测试这一点,并且通知按预期触发。但不知怎的,改变我的设备上的日期和时间却没有。
在尝试将视频流式传输到对等连接的 WebRTC 示例时:
https://github.com/webrtc/samples/tree/gh-pages/src/content/capture/video-pc
在 Firefox 中,我只看到右侧视频中呈现的黑色视频 :-(
在 Chrome 中,我遇到了一个跨域错误:Uncaught DOMException: Failed to execute 'captureStream' on 'HTMLMediaElement': Cannot capture from element with cross-origin data at HTMLVideoElement.maybeCreateStream
我没有进行任何代码更改,我只是克隆了 repo 并打开了 index.html。我还尝试在没有看到视频的情况下提供页面。
如何使用 Chrome 或 Firefox 在 Windows 上本地运行此示例?