- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我编写了一个简单的测试应用程序 (Mac/Cocoa) 来连接到 iCloud 中的键值存储。我似乎在第一道篱笆上摔倒了。
您可以在此处查看我的简单应用程序的代码,您会发现我没有从“URLForUbiquityContainerIdentifier”调用中获取返回的 URL。
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];
if (!ubiq)
NSLog(@"No iCloud");
else
NSLog(@"Yes iCloud");
}
应用程序运行时的屏幕截图:
在尝试查看我是否已正确设置所有内容方面,我在开发人员配置中心查看了我的 App Id(测试应用称为 Radio)的设置:
所以这似乎没问题。然后我重新创建了我的配置文件(称为 Radio Dev 2)并检查它是否使用了正确的 App Id:
好的,所以这似乎也可以。然后我检查权利是否已打开并且键值容器已激活:
所以他们被激活了。然后我查看了文件本身,看看是否有任何内容跳出:
所以我在权利文件中看不到任何内容。最后,我确认我正在使用我预期的配置文件使用正确的证书对构建进行签名:
我对此很满意。
所以我很难过。我已经重新生成了所有内容,但无济于事。
如果有人有任何想法,我将不胜感激。我错过了什么吗?
最佳答案
Damien 对这个问题的评论为我提供了解决方案。对于使用 Xcode 4.5 的任何人,您需要单击 Ubiquity Containers 框下方的 +。在我这样做之前,没有任何效果。
关于objective-c - 难倒了 [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier :nil] keeps returning nil,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11938231/
我正在开始学习 Javascript,但对我的第一个函数感到困惑。为了我自己的缘故拼写出来,这是我试图实现的目标: 声明变量:color和primary 设置颜色等于id“color”并抓取输入值 根
关于选取框效果,我已经尝试过无数种解决方案,但我完全被难住了。我也尝试了一些 webkit 示例,但他的演示不起作用。我主要使用 Chrome,但我的网站必须同时在 Chrome 和 Firefox
我正在为 Javascript 编写一个绘图/图形库,遇到了一个看起来很严重的问题。 我有 4 个数字输入用于定义图形将显示的最小值和最大值,很像 TI-84 图形计算器:XMin、XMax、YMin
我目前正在尝试编写一个小程序来测试 udp 套接字程序的较小功能。这部分代码打开一个文件,将文件的内容存储到缓冲区中,然后将缓冲区的每 1024 字节写入另一个缓冲区的一部分(将在 udp 应用程序中
我正在参加 C++ 初学者的远程类(class),但无法解决此编译错误。它的编写与示例书中的完全相同,当我的兄弟将其剪切并粘贴到他的 VS2015 中时,它工作正常,但在我的 VS2017 中却没有。
在我的 Rails 4.2.6/Ruby 2.2.4 应用程序中,我有一个生成字符串的数据库查询方法;例如: "Chest - pectoralis, Quads - quadriceps, Hams
关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。 这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topi
在 C++ 中,我想使用 Unicode 来做事。因此,在掉进 Unicode 的兔子洞之后,我最终陷入了困惑、头痛和语言环境的火车残骸中。 但在 Boost 中,我遇到了一个不幸的问题,即尝试使用
这方面的文献很糟糕——我只想从我定义但在代理 Controller 类中动态创建(希望这不会导致问题)的控件中冒出一个事件。该控件是一个 PopUp。 public static readonly R
我被难住了。尝试使用 NSURLConnection 发布到 php 脚本。整个下午都在做这个,所以我想是时候寻求帮助了。我已经阅读了@NSURLConnection 上的很多帖子,但我仍然没有弄清楚
首先,我是一个 java 新手。我一直在寻找一种不涉及列表或哈希表的简洁方法来解决这个问题,但还没有找到: **请注意,这不是家庭作业,而是“构建 Java 程序”第 7 章中的练习 #14 编写一个
与我合作的 vendor 最近为我的公司制作了一个页面。它通常运行良好,但在用 IE(任何版本)查看时会出现错误。 错误详情如下: User Agent: Mozilla/4.0 (compatibl
我是一名优秀的程序员,十分优秀!