小编All*_*lan的帖子

如何在exisitng Xcode项目中安装phoneGap

我已经构建了一个没有phoneGap的Xcode项目,但客户端想要添加一些新功能.所以我决定使用phoneGap来做,我不知道如何将phoneGap导入我的旧Xcode项目.我怎样才能做到这一点?

iphone cordova

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

关于CGRectFromString使用

在我的应用程序中,我想使用CGRectFromString来设置UIButton位置.我的代码就是这样

NSString *g = @"{0,0},{100, 100}";
CGRect rect = CGRectFromString(g);
self.button1.frame = rect;
Run Code Online (Sandbox Code Playgroud)

但是很有效.我想念的任何东西或它的苹果虫?

iphone position

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

关于apple增强型通知格式

我使用PHP发送推送消息到apns,我使用"增强通知格式"发送..但我不能得到返回"错误响应包中的代码"任何人都可以帮助我?这是我的代码

<?php
header("Content-Type: text/html; charset=UTF-8");

$deviceToken = "123";

$content = "testing";

if(isset($content))

{

$newContent=substr($content,0,30)."...";

$re_content=iconv("GB2312","UTF-8",$newContent);
$pass = 'Ladder';

$body = array("aps" => array("alert" => $re_content, "badge" => 1, "sound" => 'received5.caf'));

            $ctx = stream_context_create();

            stream_context_set_option($ctx, 'ssl', 'local_cert', 'dev.pem');

            stream_context_set_option($ctx, 'ssl', 'passphrase', $pass);

            //$fp = stream_socket_client('ssl://gateway.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);

            $fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);

            stream_set_blocking ($fp, 0);
            if (!$fp) 
            {
                print "Failed to connect $err $errstrn";
                return;
            }
            else
            {
            print "Connection OK\n<br/>";
            }


            $payload = …
Run Code Online (Sandbox Code Playgroud)

php apple-push-notifications apns-php

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