小编Que*_*tin的帖子

如何在PostMan中的预请求脚本中计算md5哈希?

我必须在我的请求中设置一个参数,它是另外两个参数的md5哈希值.我认为预请求脚本可以完成这项工作,但我不知道如何在这个脚本中计算md5.任何的想法?

javascript hash md5 postman

23
推荐指数
1
解决办法
1万
查看次数

如果部署目标<base sdk,如何检查是否使用了可用的方法?

我想知道当部署目标不如基础SDK时,如何检查代码是否不调用不可用的方法?

可以在SDK等于部署目标的设备上运行应用程序,但我搜索的方式更"自动".任何的想法 ?

问候,昆汀

iphone compatibility objective-c ios

7
推荐指数
1
解决办法
3560
查看次数

AVURLAsset无法加载远程文件

我使用AVURLAsset时遇到问题.

NSString * const kContentURL = @

"http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8";
...

    NSURL *contentURL = [NSURL URLWithString:kContentURL];
    AVURLAsset *asset = [AVURLAsset URLAssetWithURL:contentURL
                                               options:nil];
    [asset loadValuesAsynchronouslyForKeys:[NSArray arrayWithObject:tracksKey]
                            completionHandler:^{
    ...
                               NSError *error = nil;
                               AVKeyValueStatus status = [asset statusOfValueForKey:tracksKey
                                                                              error:&error];
    ...
    }
Run Code Online (Sandbox Code Playgroud)

在完成块中,状态为AVKeyValueStatusFailed,错误消息为"无法打开".我见过的所有例子都使用本地文件,所以使用远程文件可能有问题......

问候,昆汀

iphone avfoundation ios

5
推荐指数
1
解决办法
8797
查看次数

隐式依赖项不适用于 xcodebuild

我的一个项目有一点问题。在我的工作区中,我有我的主要项目和许多静态库项目。当我从 Xcode 构建时,一切正常,但是使用 xcodebuild,我的项目之一未构建,似乎隐式依赖项不起作用。也许我的配置有问题。所以就是这样。

我的方案配置: 在此处输入图片说明

我的 QAPreferences.a 信息: 在此处输入图片说明

我的目标设置: 在此处输入图片说明

从 Xcode 中,如果我在 iphoneos 的调试中使用 buildAppTarget 构建,它就可以工作。

从 xcodebuild,使用下面的命令,不会构建 QAPreferences 项目。

xcodebuild -workspace myProject.xcworkspace -scheme buildApp -configuration Debug -sdk iphoneos
Run Code Online (Sandbox Code Playgroud)

它以前有效,但我最近添加了 QAPreferences,从现在起它确实有效。也许问题来自 QAPreferences 项目......

问候,昆汀

xcode xcodebuild ios

5
推荐指数
1
解决办法
3160
查看次数

如何使用 Firebase 在 iOS 上调试通知

我已按照教程在 iOS 上设置通知,并且在函数中检查了application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken token: NSData)FCM 令牌是否可用FIRInstanceID.instanceID().token()

我尝试从 Firebase 控制台发送通知(状态为Completed),但我的 iOS 设备上未收到通知。

为了检查“Apple 方面”,我已将 y 推送通知证书上传到提供的另一个推送通知服务中,并且它有效。

所以我想知道如何调试我的应用程序?

ios firebase firebase-cloud-messaging

5
推荐指数
0
解决办法
3035
查看次数

如何知道设备是否支持自动对焦

我想知道是否有办法检查设备相机是否支持自动对焦?

我找到的唯一解决方案是检查设备名称,以了解它是否支持自动对焦.但我不喜欢它,因为它不适用于未来的设备.

iphone ios

4
推荐指数
1
解决办法
1691
查看次数

从资源加载文件

总结一下:为了便于为SAX解析器添加单元测试,我想从文件中加载XML.

现在,我将XML放在单元测试类中的静态字符串中,但对于大型XML来说它并不是很方便.

这就是为什么我想在我的项目中添加一些XML文件并在我的单元测试中加载它们.我怎样才能做到这一点?

android

3
推荐指数
1
解决办法
1万
查看次数

在后台线程中更新托管对象并在主线程中显示它们,出了什么问题

晚上好,

我在CoreData和Concurrency方面遇到了一些问题,所以我尝试了最简单的代码,但仍然无效.你能告诉我我错在哪里吗?

我创建了一个"DataManager"来更新一个CoreData对象

@implementation OBSDataManager

@synthesize persistentStoreCoordinator;

- (OBSDataManager *)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)aPersistentStoreCoordinator {
   if (self = [super init]) {
      self.persistentStoreCoordinator = aPersistentStoreCoordinator;
   }

   return self;
}

- (void)dealloc {
   [persistentStoreCoordinator release];

   [super dealloc];
}

- (void)start {

   [self performSelectorInBackground:@selector(updateData) withObject:nil];
}

- (void)updateData {
   NSManagedObjectContext *context = [[NSManagedObjectContext alloc] init];
   context.persistentStoreCoordinator = self.persistentStoreCoordinator;

   // get chunk if it exists, or create it
   OBSChunk *chunk = [OBSChunk theChunkInContext:context];
   if (!chunk) {
      chunk = [NSEntityDescription insertNewObjectForEntityForName:@"Chunk"
                                            inManagedObjectContext:context];
   }

   while (1) {
      // update …
Run Code Online (Sandbox Code Playgroud)

iphone core-data

2
推荐指数
1
解决办法
814
查看次数

如何在公式中动态设置选项卡名称?

我有一个摘要选项卡和多个其他选项卡,它们的构造方式相同。我想在我的摘要选项卡中收集所有其他选项卡的信息

今天,在摘要选项卡中,我对每一行都有:

  • 第一个单元格:My tab 1->同一电子表格中选项卡的名称
  • 第二个单元格:=COUNTIF('My tab 1'!$B7:$B; "OK")-> B 列中带有“OK”文本的所有单元格的计数。

我想使用第二个单元格的公式内第一个单元格中定义的选项卡名称。有可能吗?如果有,如何实现?

google-sheets

2
推荐指数
1
解决办法
6366
查看次数

如何使用Eureka创建自定义内联行?

我想inline cell这里描述的Eureka 实现一个自定义.但是在我的具体案例中,我在编译时遇到了一些问题.当我尝试运行时出现以下错误,Swift编译器崩溃.

...
Call parameter type does not match function signature!
...
1.  Running pass 'Module Verifier' on function'@_TWaC7TonyPro22ServiceCheckInlineRow26Eureka13InlineRowTypeS_'
...
Run Code Online (Sandbox Code Playgroud)

我可折叠的Row和Cell.

public final class ServiceRow: Row<Service, ServiceCell>, RowType {
...
}

public class ServiceCell: Cell<Service>, CellType {
...
}
Run Code Online (Sandbox Code Playgroud)

我的内联行

public class ServiceCheckInlineRow: ImageCheckInlineRow<Service>, InlineRowType {
    public typealias InlineRow = ServiceRow

    required public init(tag: String?) {
        super.init(tag: tag)
        onExpandInlineRow { cell, row, _ in
            let color = cell.detailTextLabel?.textColor
            row.onCollapseInlineRow { cell, _, _ in
                cell.detailTextLabel?.textColor …
Run Code Online (Sandbox Code Playgroud)

ios swift eureka-forms

2
推荐指数
1
解决办法
1728
查看次数

是否有可能从部分模拟中"预期"一种方法

这不是最好的事情,但我想验证一个对象的私有方法被调用,所以我创建一个局部模拟并在私有方法上添加一个期望.

Synchronizer * sync = [[Synchronizer alloc] initWithCleanup:YES];

sync = [OCMockObject partialMockForObject:sync];
[[(id)sync expect] cleanupPreviousContents];      
Run Code Online (Sandbox Code Playgroud)

当我运行测试时,不调用cleanupPreviousContents但测试仍然成功.这个bug在哪里?

问候,昆汀

ocmock

1
推荐指数
1
解决办法
1258
查看次数

如何以编程方式滚动ScrollView?

我对ScrollView有一点问题.我有一个用ScrollView制作的活动布局.此滚动视图包含两个ListView.

<?xml version="1.0" encoding="utf-8"?>

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rootViewGroup" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:scrollbars="vertical">

<LinearLayout android:orientation="vertical"
    android:gravity="top" android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:background="@drawable/cmb_bg">

    <ListView android:id="@+id/accountsListView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:scrollbars="none" />

    <ListView android:id="@+id/cardsListView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:scrollbars="none" />

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

onCreate我的活动方法中,我根据内容计算ListViews高度.

在执行期间,在活动启动时,ScrollView已经滚动了一点.

所以我尝试在onCreate结束时调用方法scrollTo(0, 0),但它没有改变任何东西.

有任何想法吗?

android

0
推荐指数
1
解决办法
2366
查看次数