我试图用C#为iPhone编写推送服务器.我有以下代码:
// Create a TCP/IP client socket.
using (TcpClient client = new TcpClient())
{
client.Connect("gateway.sandbox.push.apple.com", 2195);
using (NetworkStream networkStream = client.GetStream())
{
Console.WriteLine("Client connected.");
X509Certificate clientCertificate = new X509Certificate(@"certfile.p12", passwordHere);
X509CertificateCollection clientCertificateCollection = new X509CertificateCollection(new X509Certificate[1] { clientCertificate });
// Create an SSL stream that will close the client's stream.
SslStream sslStream = new SslStream(
client.GetStream(),
false,
new RemoteCertificateValidationCallback(ValidateServerCertificate),
null
);
try
{
sslStream.AuthenticateAsClient("gateway.sandbox.push.apple.com");
}
catch (AuthenticationException e)
{
Console.WriteLine("Exception: {0}", e.Message);
if (e.InnerException != null)
{
Console.WriteLine("Inner exception: {0}", …Run Code Online (Sandbox Code Playgroud) 所以我对这个很难过.
在Mac OS X中,可以通过内置的地址簿API轻松获取"我"卡(Mac /帐户的所有者).
有没有人找到一种方法来找出哪个联系人(如果存在)属于iPhone的所有者?
如何在C++中编写可以执行类似地图迭代器的Go代码?
typedef std::map<std::string, MyStruct> MyMap;
MyMap::iterator it = myMap.find("key");
if(it!=myMap.end()) {
it->v1 = something;
it->v2 = something;
}
Run Code Online (Sandbox Code Playgroud) 目前最感兴趣的是iPhone开发.我正在努力开始花大量时间推出我的第一个应用程序,我想知道可可/客观c编程是否可以让某人每天找到一份工作?我很想知道,因为我并没有完全处于我想要的位置,并希望我的空闲时间花在最终能让我找到更好工作的事情上.
我个人的感觉是iPhone开发将会发展壮大.我觉得有一段时间没有人会在移动市场上敲打苹果高手,但如果他们这样做了,那么你在iphone平台上获得的知识会不会转移到下一个重要的事情上?
我非常重视自己的时间,只是希望我花费大部分时间做的事情不仅对我现在有价值(我在应用程序商店里做的),而且还有将来的价值.
iphone ×3
addressbook ×1
c# ×1
cocoa ×1
cocoa-touch ×1
go ×1
iterator ×1
map ×1
objective-c ×1