是否可以应用笔划和填充 a NSAttributedString和a UILabel?
我们曾经设置我们的开发机器来接收任务栏中的构建通知.
但是,我们遵循的过程 - 根据此描述 - 不再适用于Visual Studio 2015,因为Build Notification应用程序不再是该软件包的一部分?
有什么想法发生了什么事吗?更换?变通?
更新4/2016:
更新2似乎没有任何更改 - 新的构建定义仍然没有显示 ..
我意识到这已经在SO上不止一次被问过了,但我找不到一个问题明确地在C++ 11中寻找这个问题的当前解决方案,所以我们再来一次..
我们可以使用C++ 11方便地获取枚举的字符串值吗?
即(现在)C++ 11中的任何内置功能,它允许我们获取枚举类型的字符串表示,如
typedef enum {Linux, Apple, Windows} OS_type;
OS_type myOS = Linux;
cout << myOS
Run Code Online (Sandbox Code Playgroud)
那将Linux在控制台上打印?
我的其中一个应用程序非常偶尔会将其存储(通过设置 - >常规 - >使用 - >存储)报告为4GB,实际上,应用程序沙箱(文档,库,tmp)中所有文件的总大小平均值大约10MB左右.
我有点在我的智慧结束,并想知道是否有人经历过这样的事情.我怀疑这是与UIDocument有关的东西,但不能肯定.现在提交雷达似乎太少了.
在某些情况下,应用程序将强制系统显示一个对话框,警告用户系统存储空间不足.当发生这种情况时,似乎系统会协调它认为应用程序正在使用的存储与现实之间的差异,然后存储数量将下降到10MB左右.
这真的很奇怪.
关于我可能会看到的事情的任何想法将不胜感激.
contentsForType的实现:错误:
- (id) contentsForType: (NSString *) inTypeName
error: (NSError **) outError
{
NSFileWrapper *newWrapper, *audioFileWrapper;
NSString *audioFilename;
NSURL *newAudioWrapperURL;
newWrapper = [[[NSFileWrapper alloc] initDirectoryWithFileWrappers: nil] autorelease];
// add updated info
[newWrapper addRegularFileWithContents: [NSKeyedArchiver archivedDataWithRootObject: self.testInfo] preferredFilename: QSDocumentInfoKey];
// scan audio files and clean up where needed
for (NSDictionary *wordInfo in self.wordInfoList) {
if ((audioFilename = [wordInfo objectForKey: QSInfoAudioKey]) != nil) {
newAudioWrapperURL = [self.fileURL URLByAppendingPathComponent: audioFilename];
if ([[NSFileManager defaultManager] …Run Code Online (Sandbox Code Playgroud) 我有一个我开发了一段时间的iOS应用程序.最初在iOS开发帐户中有大约8个设备,广告构建通过Hockey App准备和分发,没有问题.最近,我们添加了更多设备,但出于某种原因,ad hoc版本不会安装在这些设备上(但继续在原始设备上安装得很好).
我已经遍历iOS开发人员中心的证书,设备和配置文件.我已经三次检查了XCode中的所有Build Settings.该应用仅适用于iOS 6和iOS 7.它是在XCode 5中构建的.我尝试通过HockeyApp安装应用程序并直接通过iTunes.
尝试在设备上安装应用程序时,这是控制台的输出:
Sep 24 21:45:02 Micks-iPad itunesstored[88] : LaunchServices: updating placeholder for com.purifier.ios with icons Sep 24 21:45:02 Micks-iPad installd[62] : 0x304000 handle_install_for_ls: Install of "/var/mobile/Library/Caches/com.apple.itunesstored/AppPlaceholders/3119681654421541181.app" requested by itunesstored Sep 24 21:45:02 Micks-iPad installd[62] : 0x304000 MobileInstallationInstall_Server: Installing app com.purifier.ios Sep 24 21:45:02 Micks-iPad installd[62] : 0x304000 install_application: Installing placeholder Sep 24 21:45:03 Micks-iPad installd[62] : 0x304000 MobileInstallationInstall_Server: Staging: 0.01s; Waiting: 0.00s; Installation: 0.14s; LS Sync: 0.00s; Overall: 0.15s Sep 24 21:45:06 Micks-iPad …
ad-hoc-distribution ios provisioning-profile ios-provisioning hockeyapp
以下代码是否有助于延迟初始化?
或者singletonInstance只要有人包含标题(甚至在程序启动时),就会创建?
class SingletonClass
{
private:
SingletonClass();
~SingletonClass();
public:
static const SingletonClass& Instance()
{
static SingletonClass singletonInstance;
return singletonInstance;
}
};
Run Code Online (Sandbox Code Playgroud) 我正在开发一个非基于文档的Core Data应用程序.
我希望在发生变化时保存更改.这是用户在此类应用程序中所期望的.这也是Apple在iPhoto或iTunes中实现的.
蛮力方法是设置一个频繁保存的计时器.然后,由保存触发的方法将吞下所有验证错误,以免打扰用户.只有在退出时,用户才会被安排数据以便保存.恕我直言,那种方法很臭.
所以我在想,必须有办法以某种方式将保存挂钩到类似NSEditor协议之类的东西.每次用户(或控制器)完成编辑数据时,应以某种方式通知应用程序委托触发保存操作.事情是我不知道在哪里看.
我认为对于更复杂的操作,可能需要进行一些交叉验证,我会向用户提供与专用相关的接口位NSManagedObjectContext.
我们已将TFS-2013配置为使用git存储库.一切都在大部分时间都很好,但是我们会出现间歇性的构建错误 - 随着时间的推移,它们甚至会变得更加频繁.
发生问题时,我们可以在构建日志中找到这些内容:
异常消息:libgit2引发了一个错误.Category = Os(错误).
无法删除目录.无法删除文件'C:/Builds/1/MyTool/MyTool_CI/src/.git/objects/pack/pack_git2_a02380':进程无法访问该文件,因为该文件正由另一个进程使用.
(输入LibGit2SharpException)
异常数据字典:
libgit2.code = -1
libgit2.category = 1
什么可能导致这些错误..?
我正在尝试追踪沙盒创建过程中出现的一些问题.在多种情况下,似乎未在Data/Library/Preferences中创建NSUserDefaults .plist文件.我在调试器中以及从Applications目录启动应用程序时已经看到了这一点.我没有尝试存档,签署应用程序然后启动.这需要吗?
创建以.LSSharedFileList.plist结尾的别名文件,但它指向自身,因此不存在.
我不知道它是否相关但是控制台报告:
appleeventsd[72]: <rdar://problem/11489077> A sandboxed application with pid ... checked in with appleeventsd, but its code signature could not be validated ( either because it was corrupt, or could not be read by appleeventsd ) and so it cannot receive AppleEvents targeted by name, bundle id, or signature. Error=ERROR: #100013 { "NSDescription"="SecCodeCopySigningInformation() returned 100013, -." } (handleMessage()/appleEventsD.cp #2072) client-reqs-q
Run Code Online (Sandbox Code Playgroud)
谢谢.
我有一个使用基于NSFileWrapper的UIDocument的应用程序.我的文件包装器是一个名为"XXX.cp"的目录,有两个子文件"photo.data"和"photo.metadata".它似乎可以保存和加载文档,但是当我转到Settings\Manage Storage\Unknown时,子文件会单独列出:

我期待它显示"XXX.cp"而不是这两个子文件.我想我已经正确设置并导出文件UTI:

我认为我正在创建文件包装器(特别是因为它读/写正常):
- (void)encodeObject:(id<NSCoding>)object toWrappers:(NSMutableDictionary *)wrappers preferredFilename:(NSString *)preferredFilename {
@autoreleasepool {
NSMutableData * data = [NSMutableData data];
NSKeyedArchiver * archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:object forKey:@"data"];
[archiver finishEncoding];
NSFileWrapper * wrapper = [[NSFileWrapper alloc] initRegularFileWithContents:data];
[wrappers setObject:wrapper forKey:preferredFilename];
}
}
- (id)contentsForType:(NSString *)typeName error:(NSError *__autoreleasing *)outError {
if (self.captionedPhotoMetadata == nil || self.captionedPhoto == nil) {
*outError = [[NSError alloc] initWithDomain:CaptionedPhotoErrorDomain code:CaptionedPhotoInvalidDocument userInfo:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Invalid document!", @""), NSLocalizedDescriptionKey, nil]];
return nil;
}
NSMutableDictionary * wrappers = [NSMutableDictionary dictionary]; …Run Code Online (Sandbox Code Playgroud)