Latest Episode
Share This Page

Go Back   Keith and The Girl Forums Keith and The Girl Forums Talk Shite

Talk Shite General discussion

Reply
 
Thread Tools Display Modes
Old 06-13-2009, 09:44 PM   #481 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,386
Here's a build with push enabled and I'm looking for testers. whywontyoudie.com/06-13-09-KATG.com.app.zip I'm gonna try to find people tonight, but let me know when/if you're interested in giving push a test run
(Online)   Reply With Quote
Old 06-13-2009, 09:46 PM   #482 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,386
and for hypercrypt and other devs here's some early push code written in python which I love so very much more than obj-c

Code:
#!/usr/bin/env python2.6
import socket, ssl, json, struct, urllib, time, sys
from xml.dom.minidom import parse, parseString

# Needs python 2.6 - for 2.5 replace ssl and json (with simplejson)

# Export your "Apple Development Push Services" certificate from your Keychain (important: select it from the "My Certificates" category in the sidebar). Export the certificate as a "Personal Information Exchange (.p12) file. You shouldn't give the exported file a password (well you could but YMMV).
# Convert the .p12 file you just exported into a pem file:
# openssl pkcs12 -in certificates.p12 -out certfile.pem -nodes -clcerts
# Replace the device token with YOUR applications device token.
# For testing don't forget to quit the app (you wont see the push notification dialogs while the app is running).

# Tested on iPod 1st Generation with 3.0b2 - yes it all works.


for arg in sys.argv:
	if arg.startswith('--'):
		Message = arg[2:]

print 'Sending: ' + Message

url = 'whereever your xml is'
filehandle = urllib.urlopen(url, data)

time.sleep(5)
xml = filehandle.read()
xmldoc = parseString(xml)
nodeArray = xmldoc.getElementsByTagName('deviceToken')
tokens = []
for node in nodeArray:
	try:
		deviceToken = node.firstChild.toxml()
		tokens.append(deviceToken)
	except:
		continue
	

for deviceToken in tokens:
	thePayLoad = {
	     'aps': {
	          'alert':Message,
	          'sound':'default',
	          'badge':1,
	          },
	     }
	theCertfile = 'cert.pem'
	theHost = ('gateway.push.apple.com', 2195)
	
	data = json.dumps(thePayLoad)
	deviceToken = deviceToken.replace(' ','').decode('hex')
	
	theFormat = '!BH32sH%ds' % len(data)
	theNotification = struct.pack(theFormat, 0, 32, deviceToken, len(data), data)
	
	ssl_sock = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM), certfile=theCertfile)
	ssl_sock.connect(theHost)
	ssl_sock.write(theNotification)
	ssl_sock.close()
	
print 'Done Transmitting'
and use this openssl to turn a p12 into a pem that doesn't require a password

openssl pkcs12 -in certificates.p12 -out certfile.pem -nodes -clcerts
(Online)   Reply With Quote
Old 06-14-2009, 01:53 AM   #483 (permalink)
Senior Member
 
yoav's Avatar
 
Join Date: Apr 2006
Posts: 888
Quote:
Originally Posted by Mayank View Post
You cannot download episodes that are older than the past 200 or 300 shows. The greatest feature I'd want is to be able to search episodes by guest name right upto episode 1. These days with spooky's hiatus, I'm digging his old episodes.
FUUUUUUUUUUUUUUUUUUUUUUUCK YOUUUUUUUUUUUUUUUUUU and welcome to the forums.

i'm excited about the iphone app as anyone but let's not forget our manners.



Screenshots look freaking amazing too btw! all you guys working on it deserve blowjobs. ...

if you're a hottie and would like to donate your time to the cause, pm me your boobies and i'll send you in the right direction. least i could do.
(Offline)   Reply With Quote
Old 06-14-2009, 02:02 AM   #484 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,386
Quote:
Originally Posted by yoav View Post
Screenshots look freaking amazing too btw! all you guys working on it deserve blowjobs. ...

if you're a hottie and would like to donate your time to the cause, pm me your boobies and i'll send you in the right direction. least i could do.
You're a good man Charlie Brown, glad you're ready to help.
(Online)   Reply With Quote
Old 06-14-2009, 04:17 AM   #485 (permalink)
Senior Member
 
Emelath's Avatar
 
Join Date: Jun 2006
Location: Napoli, Italy
Posts: 243
OK now I feel like a dummy! HElP! OK I'm on my Mac and clicked on the app. Said it's not supported on this architecture. So, I dragged it to my itunes library. It's in my itunes library. I can't find it in the library. It's not in the applications or music so where did it go? I tried to drag it again but it says it is already in the library.

Anyone with some advice. It's very rare that the computer teacher is beaten by the computer but there it is!


Thanks!
(Offline)   Reply With Quote
Old 06-14-2009, 04:52 AM   #486 (permalink)
Senior Member
 
hypercrypt's Avatar
 
Join Date: Nov 2006
Location: My Place: Liverpool. Born and raised in Berlin.
Posts: 771
Quote:
Originally Posted by hayroob View Post
Here's a build with push enabled and I'm looking for testers. whywontyoudie.com/06-13-09-KATG.com.app.zip I'm gonna try to find people tonight, but let me know when/if you're interested in giving push a test run
I'm interested... Thanks for the push server code btw!
(Offline)   Reply With Quote
Old 06-14-2009, 11:15 AM   #487 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,386
Quote:
Originally Posted by hypercrypt View Post
I'm interested... Thanks for the push server code btw!
When are you available?
(Online)   Reply With Quote
Old 06-14-2009, 11:16 AM   #488 (permalink)
Senior Member
 
hypercrypt's Avatar
 
Join Date: Nov 2006
Location: My Place: Liverpool. Born and raised in Berlin.
Posts: 771
Pretty much any time. Got some time off work at the moment, so just relaxing and programming today and tomorrow. Whenever it suits you basically.

PS: I see that katgapp.com is down. Are you having a problem or do you no longer want / need it?

Last edited by hypercrypt; 06-14-2009 at 11:20 AM.
(Offline)   Reply With Quote
Old 06-14-2009, 11:24 AM   #489 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,386
Quote:
Originally Posted by hypercrypt View Post
Pretty much any time. Got some time off work at the moment, so just relaxing and programming today and tomorrow. Whenever it suits you basically.

PS: I see that katgapp.com is down. Are you having a problem or do you no longer want / need it?
It took a fat shit when they did the mobile me "upgrades" for the 3gs features, been too busy to mess with it.
(Online)   Reply With Quote
Old 06-14-2009, 11:25 AM   #490 (permalink)
Senior Member
 
hypercrypt's Avatar
 
Join Date: Nov 2006
Location: My Place: Liverpool. Born and raised in Berlin.
Posts: 771
Strange, mine is working perfectly (except for Find my iPhone, which is still a little spotty)
(Offline)   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -5. The time now is 02:01 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Keith and The Girl
iPhone news and app directory