小编use*_*610的帖子

'FABException',原因:'[Fabric] Info.plist键的值"Fabric"必须是NSDictionary.使用Firebase和Crashlytics时

在我们的应用程序中使用Firebase时,我有一个相当奇特的场景.在不向项目添加Crashlytics和Fabric的情况下,当我为项目运行单元测试时,会触及以下代码:

@try {
        [FIRApp configure];
} @catch (NSException *exception) {
        DLog(@"**** Unable to configure Firebase due to exception %@", exception.description);
}
Run Code Online (Sandbox Code Playgroud)

在调试单元测试时,不会引发异常,因此我假设已配置firebase并且所有内容都正常工作.测试通过,没有问题.

然后我非常简单地将Crashlytics with Fabric添加到项目中.我将此作为运行脚本添加到"${PODS_ROOT}/Fabric/run"项目的构建阶段,然后再次运行单元测试.单元测试失败,我得到:

Terminating app due to uncaught exception 'FABException', reason: '[Fabric] Value of Info.plist key "Fabric" must be a NSDictionary.'
Run Code Online (Sandbox Code Playgroud)

作为一个错误,当我运行项目,但一切都很好.只有在运行测试时才会出现此问题.我尝试过以下方法:

  1. 将Crashlytics和Fabric添加到项目目标中,我得到相同的错误.
  2. 我做第1步,也是单元测试目标,我仍然得到相同的错误.
  3. 我执行第2步,然后我还将Firebase Core添加到单元测试目标,我仍然得到相同的错误.
  4. 我执行第3步,然后还添加"${PODS_ROOT}/Fabric/run"到运行脚本但在单元测试目标上仍然得到相同的错误.

我认为Firebase没有正确初始化,这反过来导致Fabric无法正确初始化,从而导致失败.但我不确定如何解决这个问题.任何指导和建议将不胜感激.

ios firebase crashlytics google-fabric

21
推荐指数
3
解决办法
4002
查看次数

Facebook Uncaught SecurityError

我目前正在寻找一个Facebook JavaScript应用程序.因此,我只是将文档中的文档粘贴到我的页面中,并且我在控制台中不断收到以下错误:

Uncaught SecurityError: Blocked a frame with origin "http://static.ak.facebook.com" from accessing a frame with origin "http://localhost:8080". Protocols, domains, and ports must match. VM2813:1
Uncaught SecurityError: Blocked a frame with origin "https://s-static.ak.facebook.com" from accessing a frame with origin "http://localhost:8080".  The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
 VM2817:1
Uncaught SecurityError: Blocked a frame with origin "http://static.ak.facebook.com" from accessing a frame with origin "http://localhost:8080". Protocols, domains, and ports …
Run Code Online (Sandbox Code Playgroud)

javascript facebook

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

如何使用Swift打印Data类型变量的内容?

我要做的就是取一个字符串并获取其十六进制值.我一直关注这篇文章.这是我在操场上的代码:

let str = "Say Hello to My Little Friend"
let data = str.data(using: String.Encoding.utf16)
print("\(data!)")
Run Code Online (Sandbox Code Playgroud)

但是,我的代码只打印:

"60字节\n"

如何打印十六进制值?供参考,它应该是:

5361792048656c6c6f20746f204d79204c6974746c6520467269656e64
Run Code Online (Sandbox Code Playgroud)

ios swift

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

jQuery Mobile和PhoneGap性能问题

我目前正在开发一个PhoneGap和JQM项目,该项目是合理的完成我唯一的问题是jQuery Mobile本身.它似乎使应用程序缓慢而缓慢.页面之间的转换很慢.显示和隐藏动画是悲剧性的......除了所有这些问题之外,还有其他方法可以使用PhoneGap获得合理的美妙UI体验吗?

jquery-mobile cordova

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

Android模拟器在Android Studio中不使用网络摄像头

正如标题所示,我很难让模拟器在笔记本电脑上使用网络摄像头.我已启用前后摄像头来访问网络摄像头.每当模拟器启动时,它都会要求我提供网络摄像头访问权限.然而,当我在模拟器上点击相机应用程序时,网络摄像头永远不会工作.相机应用程序崩溃了.

这是一个支持摄像头的图像:

在此输入图像描述

基于StackOverflow上的其他帖子,建议我添加以下行:hw.camera=yes.下面是avd的配置文件.

avd.ini.encoding=UTF-8
AvdId=Nexus_5_API_21_x86
abi.type=x86
avd.ini.displayname=Nexus 5 API 21 x86
disk.dataPartition.size=1G
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.camera=yes
hw.camera.back=webcam0
hw.camera.front=webcam0
hw.cpu.arch=x86
hw.dPad=no
hw.device.hash2=MD5:2fa0e16c8cceb7d385183284107c0c88
hw.device.manufacturer=Google
hw.device.name=Nexus 5
hw.gps=yes
hw.gpu.enabled=yes
hw.keyboard=yes
hw.lcd.density=480
hw.mainKeys=no
hw.ramSize=1536
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no
image.sysdir.1=system-images\android-21\google_apis\x86\
runtime.network.latency=none
runtime.network.speed=full
runtime.scalefactor=auto
sdcard.path=C:\Users\Roberto\.android\avd\Nexus_5_API_21_x86.avd\sdcard.img
skin.dynamic=no
skin.name=nexus_5
skin.path=C:\Program Files\Android\Android Studio1\plugins\android\lib\device-art-resources\nexus_5
snapshot.present=no
tag.display=Google APIs
tag.id=google_apis
vm.heapSize=64
Run Code Online (Sandbox Code Playgroud)

在这个阶段,我不确定为什么这不起作用.有什么想法吗?

camera android

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

Facebook Javascript SDK和Phonegap URL错误

我目前正在尝试使用android应用程序中的phonegap开发facebook登录功能.我已经完成了所有必要的安装,并为我放在facebook上的应用程序生成了一个哈希键,但是我一直收到以下错误:

应用程序配置不允许使用URL:应用程序的设置不允许使用一个或多个给定的URL.它必须与网站URL或Canvas URL匹配,或者域必须是App域之一的子域.

我已经看了下面的链接并完成了链接的建议,但我仍然在logcat控制台中遇到同样的错误

android facebook-javascript-sdk cordova

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

iOS中的三重DES解密

我目前在iOS上使用以下三重DES解密:

    NSString* plainText = @"My Text";
    NSString* keyText = @"cf6f1ed3bf0a156e";

    NSData *plainData = [plainText dataUsingEncoding:NSUTF8StringEncoding];
    NSData *keyData = [keyText dataUsingEncoding:NSUTF8StringEncoding];

    size_t bufferSize = plainData.length + kCCBlockSize3DES;
    NSMutableData *cypherData = [NSMutableData dataWithLength:bufferSize];
    size_t movedBytes = 0;

    CCCryptorStatus ccStatus;
    ccStatus = CCCrypt(kCCDecrypt,
            kCCAlgorithm3DES,
            kCCOptionECBMode,
            keyData.bytes,
            kCCBlockSize3DES,
            NULL,
            plainData.bytes,
            plainData.length,
            cypherData.mutableBytes,
            cypherData.length,
            &movedBytes);

    cypherData.length = movedBytes;

    if( ccStatus == kCCSuccess ) {
        NSLog(@"Data: %@",cypherData);
        NSLog(@"Data encoded string: %@",[NSString stringWithUTF8String:[cypherData bytes]]);
        NSLog(@"Data encoded: %@",[[NSString alloc] initWithData:cypherData encoding:NSUTF8StringEncoding]);
    } else {
        NSLog(@"Failed DES decrypt ..."); …
Run Code Online (Sandbox Code Playgroud)

encryption ios

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

基于共享存储器的1d模板CUDA实现中的负数组索引

我目前正在使用CUDA编程,我正在尝试从我在网上找到的工作室学习幻灯片,可以在这里找到.我遇到的问题是幻灯片48.可以在那里找到以下代码:

__global__ void stencil_1d(int *in, int *out) {

    __shared__ int temp[BLOCK_SIZE + 2 * RADIUS];

    int gindex = threadIdx.x + blockIdx.x * blockDim.x;
    int lindex = threadIdx.x + RADIUS;

    // Read input elements into shared memory
    temp[lindex] = in[gindex];
    if (threadIdx.x < RADIUS) {
        temp[lindex - RADIUS] = in[gindex - RADIUS];
        temp[lindex + BLOCK_SIZE] = in[gindex + BLOCK_SIZE];
    }

....
Run Code Online (Sandbox Code Playgroud)

添加一些上下文.我们有一个叫做in长度的数组N.然后,我们有另一个out具有长度的数组N+(2*RADIUS),其中RADIUS具有3此特定示例的值.我们的想法是复制阵列in,到数组out …

arrays cuda

6
推荐指数
2
解决办法
1136
查看次数

从Hostgator服务器上托管的PHP脚本发送SMTP电子邮件

我已经在我需要发送的应用程序中创建了一个Web应用程序,以便在忘记密码时向用户发送密码.现在我使用Gmail帐户发送电子邮件.当我使用XAMPP从我的机器本地发送电子邮件时,一切正常,它按预期交付.当我想把php脚本放到Hostgator服务器上并尝试向用户发送他们的密码我不能.但我认为这种情况发生的原因是因为Gmail立即向我发送以下信息:

Someone recently used your password to try to sign in to your Google Account myemail@gmail.com. This person was using an application such as an email client or mobile device. 

We prevented the sign-in attempt in case this was a hijacker trying to access your account. Please review the details of the sign-in attempt: 

Tuesday, January 21, 2014 1:42:56 PM UTC 
IP Address: 198.57.247.245 (gator3281.hostgator.com.) 
Location: Los Angeles, CA, USA


If you do not recognize this sign-in attempt, someone else …
Run Code Online (Sandbox Code Playgroud)

php email gmail codeigniter

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

在 Java 中使用模数和指数的 RSA 加密

我目前正在 Java 上进行 RSA 加密,我必须使用私有和公共模数进行加密。我目前有以下几点:

private void createPublicKey() throws NoSuchAlgorithmException, InvalidKeySpecException {
        String publicModulus = "d2c34017ef94f8ab6696dae66e3c0d1ad186bbd9ce4461b68d7cd017c15bda174045bfef36fbf048" +
                "73cfd6d09e3806af3949f99c3e09d6d3c37f6398d8c63f9a3e39b78a187809822e8bcf912f4c44a8" +
                "92fe6a65a477ddea9582738317317286a2610ba30b6b090c3b8c61ffb64207229b3f01afe928a960" +
                "c5a44c24b26f5f91";

        BigInteger keyInt = new BigInteger(publicModulus, 16);
        BigInteger exponentInt = new BigInteger("10001", 16);
        RSAPublicKeySpec keySpeck = new RSAPublicKeySpec(keyInt, exponentInt);
        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
        publicKey = keyFactory.generatePublic(keySpeck);

    }

private void createPrivateKey() throws NoSuchAlgorithmException, InvalidKeySpecException {
        String privateModulus = "6c97ab6369cf00dd174bacd7c37e6f661d04e5af10670d4d88d30148ec188e63227b8dac0c517cf9" +
                "67aa73cd23684c9165dc269f091bfab33b6c5c7db95b54130e348255c30aaaac1c7f09ef701e0d6f" +
                "6dc142d2e4ed78466cc104e28d50be7adf3863afc021dbdd8b5f0b968b7cd965242c7d8d4b32ee84" +
                "0fac3cad134344c1";
        BigInteger privateModulusInt = new BigInteger(privateModulus, 16);
        BigInteger exponentInt = new BigInteger("10001", 16);
        RSAPrivateKeySpec privateKeySpec = …
Run Code Online (Sandbox Code Playgroud)

java encryption cryptography rsa

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