我的应用程序(仅限iOS 8)因尝试IAP时崩溃而被拒绝.我在AdHoc版本中尝试了几乎所有购买过程,但无法重现崩溃.查看审核小组附带的崩溃日志,我在最后一个异常回溯中看到了一个非常奇怪的堆栈跟踪.崩溃看起来涉及UIPopoverController,但是我的应用程序虽然是通用的,但不会在任何地方显式或隐式显示弹出窗口.有没有人知道什么可能触发导致此崩溃的活动?什么可能导致我的应用程序在审核小组仅查看时显示popovers?
Last Exception Backtrace:
0 CoreFoundation 0x186d52084 __exceptionPreprocess + 132
1 libobjc.A.dylib 0x1977a40e4 objc_exception_throw + 60
2 UIKit 0x18bc0aee0 -[UIPopoverPresentationController presentationTransitionWillBegin] + 2464
3 UIKit 0x18b7d27d8 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 1324
4 UIKit 0x18b7d1310 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 212
5 UIKit 0x18b557388 _applyBlockToCFArrayCopiedToStack + 356
6 UIKit 0x18b4c8e4c _afterCACommitHandler + 532
7 CoreFoundation 0x186d0a388 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
8 CoreFoundation 0x186d07314 __CFRunLoopDoObservers + 360
9 CoreFoundation 0x186d076f4 __CFRunLoopRun + 836
10 CoreFoundation 0x186c35664 CFRunLoopRunSpecific + 396
11 GraphicsServices 0x18fd435a4 GSEventRunModal + 168 …
Run Code Online (Sandbox Code Playgroud) 看来(未记录)对于Facebook Bots聊天系统中的按钮消息类型,最多有3个按钮.这似乎是武断和限制的.有谁知道有没有办法超过3个按钮?
要清楚,我指的是以下消息JSON:
{
"recipient":{
"id":"USER_ID"
},
"message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"button",
"text":"What do you want to do next?",
"buttons":[
{
"type":"web_url",
"url":"https://petersapparel.parseapp.com",
"title":"Show Website"
},
{
"type":"postback",
"title":"Start Chatting",
"payload":"USER_DEFINED_PAYLOAD"
}
]
}
}
}
}
Run Code Online (Sandbox Code Playgroud) 在Apple上发布这个没有运气,但现在iOS 6 NDA已经上市,希望更多的目光能够在这里看到它.
我正在尝试修改应用程序以仅允许用户选择已在本地下载的音乐.我在iOS 6 GM下面有以下代码:
MPMediaPickerController* mpc = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAnyAudio];
mpc.allowsPickingMultipleItems = YES;
mpc.modalPresentationStyle = UIModalPresentationCurrentContext;
mpc.showsCloudItems = NO;
[self presentViewController:mpc animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
从文档:
媒体项目选择器的默认行为是YES,这意味着选择器显示可用的iCloud项目.如果媒体项目可通过iTunes Match获得且尚未存储在设备上,则该媒体项目被视为iCloud项目.
我认为这意味着如果启用了iTunes Match,则只有已下载到设备的项目才会显示在选择器中,但我总是会看到整个iTunes Match库.我为此提出了一个雷达,因为它似乎是一个严重的错误.如果有人能告诉我,我很想知道我在这里缺少什么.
我在使用clang-format和blocks时遇到了一些麻烦.我想使用尾随块维护以下格式的方法调用:
[self presentViewController:alertController animated:YES completion:^{
NSLog(@"Output");
// Do something
}];
Run Code Online (Sandbox Code Playgroud)
我已将ColumnLimit设置为0,它可以在任何地方使用,但它的副作用是不在块内格式化任何内容(if语句,其他调用等).我可以找到格式化块内部代码的唯一方法是将ColumnLimit设置为> 0,但是,即使我将其设置为像100000这样的大小,它也会为每个参数添加中断,这是我不想要的:
[self presentViewController:alertController
animated:YES
completion:^{
NSLog(@"Output");
// Do something
}];
Run Code Online (Sandbox Code Playgroud)
因此,我想要的组合是对块内的代码进行适当格式化,而不涉及方法调用的任何其他内容.
我的clang格式配置:
Language: Cpp
ColumnLimit: 0
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLoopsOnASingleLine: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
IndentWidth: 4
TabWidth: 4
UseTab: Never
PointerAlignment: Right
DerivePointerAlignment: false
ObjCSpaceAfterProperty: true
BreakBeforeBraces: Stroustrup
AllowShortIfStatementsOnASingleLine: false
BreakBeforeTernaryOperators: false
IndentCaseLabels: true
AllowShortCaseLabelsOnASingleLine: false
AlignTrailingComments: true
BinPackParameters: false
BinPackArguments: false
AllowShortFunctionsOnASingleLine: false
IndentWrappedFunctionNames: false
ObjCSpaceBeforeProtocolList: true
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: …
Run Code Online (Sandbox Code Playgroud) 我使用node.js和express.js来呈现一个index.jade页面,其中包含几个脚本块,包含通过主干和下划线使用的模板.我面临的问题是,由于模板中包含<%=%>样式变量,因此Jade渲染失败.以下代码段会导致语法错误:
script#tpl-things-list-item(type='text/template')
td
a(href=<%= _id %>) link text
td <%= name %>
td <%= age %>
Run Code Online (Sandbox Code Playgroud)
请注意,当我在href值中使用变量时,这只是一个问题,如果我删除整个href,这个片段工作得很好.有办法解决这个问题吗?我想继续使用Jade来定义模板,因为它非常简洁,但这是一个显示停止.
我正在通过一个将外部Web服务中的数据提取到私有CloudKit数据库中的应用程序进行工作。该应用程序是单用户应用程序,但是我遇到了无法确定如何避免的竞赛情况。
外部数据中的每个记录都有一个唯一的标识符,该标识符映射到CKRecord实例。一般应用启动流程为:
现在的问题是,如果同时在用户的两个设备上启动此过程,则由于CK和外部提取都是异步的,因此很可能会得到重复的记录。
我知道我可以使用区域原子地提交所有CKRecord实例,但是我认为这不能解决我的问题,因为如果所有这些提取都在同一时间发生,那么保存并不是真正的问题。
我的问题是:
我在这里先向您的帮助表示感谢!