editable area in mail template
span contenteditable="true" apple-content-name="body" style="display;block;"
span contenteditable="true" apple-content-name="body" style="display;block;"
Move all items needed for the page (html files and images) into a new folder called Resources.
Using your favorite plist editor, create a new plist called Description.plist in that same Resources folder. Add a string called HTML File and set the value tocontent.html. Add the following additional strings: Display Name, Folder Name, Thumbnail Image, and stationery ID. The values for everything thing but stationery ID should be self-explanatory. In the stationery ID string, enter a value based on this "72A27F00-FF50-43E8-A304-B2F85Ere89tfb" but it should not be exactly the same this is only an example.
Add an Array called Images, and in it, place string entries titled 0 through nn, where nn is the total number of images in your HTML file minus one. For the value of each string, list the file name of your image; the order doesnt matter.
If you are using a background image, create an additional array titled Background Images and list your background images the same way you did in the last step. Background images must also be listed in the Images array from the prior step.
Save your plist file.
Create a new folder and place your Resources folder inside of it. Name your new folder mytemplate.mailstationery, where mytemplate is the name of your stationery.
Double-click your stationery file, and you will be asked if you would like to install the stationery
Reference files can be found on your machine at /Library/Application Support/Apple/Mail/Stationery/Apple/Contents/Resources. Using the same methods described above, you can fully customize all the Apple Stationery files pre-installed with Mail.app, if you wish.
[robg adds: For the stationery ID entry, you can use uuidgen in Terminal to create a guaranteed unique identifier string.]
//to get the email options from application.ini
$bootstrap = $this->getInvokeArg('bootstrap');
$configArray = $bootstrap->getOptions();
$this->config = new Zend_Config($configArray);
settings in application.ini should look like this:
email.outgoingserver = "auth.smtp.1and1.co.uk"
email.username = "noreply@playerreg.co.uk"
email.password = "pass"
call it in your action like this:
//setup email (this should really go elsewhere)
$emailusername = $this->config->email->username;
$emailpassword = $this->config->email->password;
$server = $this->config->email->outgoingserver;
$config = array('auth' => 'login',
'username' => $emailusername,
'password' => $emailpassword);
$transport = new Zend_Mail_Transport_Smtp($server,$config);
Zend_Mail::setDefaultTransport($transport);
Vital Stats:
iOS 4.0.1
Xcode 3.2.3
Mac OSX 10.6.4 Snow Leopard
iPhones 3G, 3GS, 4 (I finally have the whole lineup!)
PROBLEM: I still can't get iPhone 4 working. If you have one, please try it and help me out! UPDATE: Found the cause of the problem to be certain status bar libraries installed alongside other apps. I'm not sure why they cause the problem, but see full notes at the bottom of the post.
The Goal: As usual, we want to be able to click "build and go" in Xcode and get the app we're working on to load to the phone and start up. Also, we want to be able to debug from within Xcode itself. After all, Xcode is cool, and terminal+makefiles+gcc+gdb is lame.
Abstract: The plan remains unchanged from the 3.x method. In fact, you commenters practically wrote this one for me. This time we're going to tell Xcode that it doesn't need to codesign for iPhoneOS targets, then we're going to tell it don'tcodesign for iPhoneOS targets, then we're going to tell it, well, actually, codesign but do it using our script, not your built in method.
The Process: With Xcode closed and your device unplugged from the computer,
Find
and change YES to NO
then find
and change YES to NO again. HINT: in vi, you can type the '/' key in order to "Cmd-F"
Two times, the following appears:
Find each occurrence and replace the block
with
hit the "i" key and copy/paste:
type the keys, in order:
If it works right, you should see something like
At this point, you're done telling Xcode it doesn't need to codesign. Now, we tell it don't codesign:
Now you've told Xcode "don't codesign."
And finally, to link the device and computer. Plug your iPhone in and open Xcode. Open Window>Organizer. Select the device from the list on the left hand side, and click "Use for development." You'll be prompted for a provisioning website login, click cancel. It's there to make legitimate provisioning easier, but doesn't make illegitimate not-provisioning more difficult.
Now you're good to go! But there's just one last thing. You have to do this last part for every new project you make.Go to the menu Project > New Build Phase > New Run Script Build Phase. In the window, copy/paste this:
That will call the script you just downloaded in step 5 to sign our app with a fake signature. This is important only for debugging. If you do build and go otherwise, the app will load to the phone, but the app will fail to launch and you'll get:
Error from debugger: The program being debugged is not being run
That should do it. Take all those steps and you should be home free for JBDev without paying $99.
CREDITS: Once again, credit for this process goes to various posters in this forum thread at iphonedevsdk.com. All of these steps are there somewhere, it just took a while to re piece them together in the right combination.
iPhone 4 Issue (UPDATE see below): So the method above has been tested working for my 3G and my 3GS. I don't have my 2G right with me, but I expect it's no different from the previous method, given that it can't run iOS4.
The problem that I run into is this:
[Session started at 2010-08-04 20:35:02 -0400.]
//GDB stuff
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-93925-69
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
continue
warning: Unable to read symbols for "/Library/MobileSubstrate/MobileSubstrate.dylib" (file not found).
// A bunch of other lib load warnings like this here...
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.1/Symbols/usr/lib/libcrypto.0.9.8.dylib" (file not found).
Debugger stopped.
Program exited with status value:45.
The killer is that the app installs, launches, crashes, and then launches fine manually. But I also can't connect GDB to the running process after the fact either, GDB claims the process isn't running. I have no idea what's going on. Anyone?
UPDATE (8/3/10): Totally by chance I happened to read this article on TUAW today about FaceTime. I didn't pay much attention until about half way down something caught my eye:
...rather significant My3G bug -- when installed, you cannot use your iPhone for native software development....
I had initially thought that maybe third party software was to blame but I meticulously disabled each MobileSubstrate extension I had one at a time and ruled them all out. Turns out that wasn't good enough. The (since fixed) My3G bug was exactly the source of this issue, but I had actually uninstalled My3G and the problem persisted. The issue, it turns out, is with the status bar library Intelliborn uses in their products, IntelliStatusBarIcons. BUT, it doesn't stop there. By individually uninstalling apps, I've found that Backgrounder (and NOT libstatusbar) also cause a dealbreaking bug. Instead of the program exiting with status:45, the new error is "Program received signal: "SIGUSR1". at which point the application hangs. Conveniently, the workaround is easy, if annoying: For your particular project title, add an Override in Backgrounder. Hopefully this IS a bug in Backgrounder and not a byproduct of its function. But at least now you can debug again!
So partly I'm dumb and partly this is just a bummer. Full story in this post, but the general idea is that gdb catches a SIGUSR1 from Backgrounder and you have to 'continue' through it. And obviously, disabling Backgrounder for your app prevents the signal from getting sent.