我已经仔细检查了一切,根据我的理解,这就是我需要做的全部:
self.inviteContent = [[FBSDKAppInviteContent alloc] initWithAppLinkURL:[NSURL URLWithString:@"http://mywebsite.com"]];
[FBSDKAppInviteDialog showWithContent:self.inviteContent delegate:self];
Run Code Online (Sandbox Code Playgroud)
在mywebsite.com上我在标题中有这个(这里显示的示例值):
<html>
<head>
<title>My Website</title>
<meta property="al:ios:url" content="appurl://action">
<meta property="al:ios:app_store_id" content="1234567">
<meta property="al:ios:app_name" content="My App">
</head>
<body>
...
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
因此,对话框切换到最新的Facebook iOS应用程序.我写了一条消息,然后选择我要发送邀请的人,点击发送,我收到此错误:
Missing App Link URL
The app link used with this invite does not contain an Android or iOS URL. Developers are required to enter a URL for at least one platform.
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我的应用处理自定义网址很好,因为如果我进入appurl://actionMobile Safari,它会打开我的应用程序.
我正在尝试创建一个自定义模式窗口,这是我到目前为止的代码:
NSWindowController *modalSheet = [[NSWindowController alloc]
initWithWindowNibName:@"MyCustomWindow" owner:self];
[NSApp beginSheet:[modalSheet window]
modalForWindow:[self windowForSheet]
modalDelegate:nil
didEndSelector:nil
contextInfo:nil];
Run Code Online (Sandbox Code Playgroud)
窗口弹出正常,但它不是模态的,例如,您仍然可以对请求来自的父窗口执行操作.从NSDocument对象调用此方法.
我试过阅读:使用自定义表格
但是我不确定myCustomSheet它是什么,因为它没有在任何地方声明.我假设它是一个NSWindow实例变量.
我只是无法理解为什么它不是模态的.任何帮助将非常感激.谢谢