It looks like they added a bunch of new AVCapture input and output ( it seems that the APIs were added for 3rd party cameras ), and iAd APIs in this one.
Appadvice found this so far:
Alright, the most interesting update I can see for now is an extended time limit for app multitasking. In the beta 1, a closed app could ask for 5 extra minutes to complete its task (like the Flickr one in the keynote). Well, now you can ask iPhone OS 4.0 Beta 2 to give you as much as 10 minutes before it freezes the application.
We will update this post with a detailed change log as soon as we get our hands on one.