CopierciN

November 21, 2008

CopierciN source code released, finally!

Filed under: CopierciN, iPhone — Tags: , — gomercin @ 1:55 am

It is now available at http://code.google.com/p/copiercin. You can follow the instructions there and build your homebrew CopierciN on your iPhone :)

I couldn’t have worked on CopierciN for a while now and now I hope other developers can bring it to a better place.  I will start working on it soon.

Actually, I just bought an old iBook and installed iPhone SDK on it. It might make development easier but first I must get used to it. 

So, later all…

October 18, 2008

CopierciN v0.3 Release Notes

Filed under: CopierciN, iPhone — Tags: , — gomercin @ 5:55 pm

New Feature:

- Export as new Safari Object: Now you can export the text in CopierciN to Safari as a new bookmarklet. Using the CopierciN bookmarklets, you can paste those text into textareas, test boxes and password boxes. It is a little bit complicated tho’:

1. Make your text ready in CopierciN
2. Select Export as New Safari Object (application will freeze for a while)
3. Close CopierciN and launch Safari manually, there should be 2 bookmarks: CopierciN-Initialize and CopierciN-Paste
4. Open the web-page which has the text, password or input box you want to paste your text into.
5. Open Bookmarks and select CopierciN-Initialize
6. Select the text-box in Safari, make sure the keyboard appears
7. Dismiss the keyboard, open Bookmarks and select CopierciN-Paste
8- Now, the text should be appended into the text-box

Let me remind that the pasted text is not the “copied” text, the entire text is pasted (appended at the end of contents the text box). So, to paste a part of the text in CopierciN, copy this part, touch the clear button and paste it back. Then, you can export this text as new Safari Object

Bug Fixes:

The application used to crash for some users when they select the “Import from SMS” option. Thanks to Chris, I found out the reason and fixed it. Hopefully, there shouldn’t be such problems anymore. Please inform me if you still have the same or a similar problem.

Some little fixes for making menus load faster.

What is not done yet :(

Contact list is still a mess. 

Selecting is still buggy. I think I will give it up for now and come up with an uglier but working solution.

SMS application is not launched automatically, same for other applications.

Writing to file and reading from it seems to be buggy for Cyrillic characters (and probably other non-UTF8 character sets) (Thanks Konstantin for pointing this out).

There might be more…

 

That’s all for now, please continue informing me about the bugs :)

September 26, 2008

Safari integration is on the way

Filed under: CopierciN, iPhone — Tags: , , — gomercin @ 12:43 am

I have finished preparing the bookmarklets I had mentioned. Now, it will be possible to export your text as a new Safari object (as I call it for now) and you will be able to paste it into the selected input box or textarea in Safari. I am sure it will be very useful if you are using iPhone to post stuff to forums or blogs. It is usually hard to write long stuff into textboxes and sometimes iPhone crashes when you are in the middle of writing something, causing you to lose all your text. Now you will be able to write your post in Notes application safely, then you will be able to use CopierciN to make that text available to use in Safari. 

I am currently testing it and will soon release a pre-beta version for voluntary testers.

Besides that, it is even easier to copy text from webpages but I must correct the selection mechanism first. The bugs in the selection mechanism is usually not an issue for other applications as they are usually smaller in size. But in webpage case, people should be able to select the part they want to copy successfully. 

Another good news is I will have a 9 days-off from the work starting from tomorrow and I will work on CopierciN during this time. I have some other stuff to do but I hope the remaining time will be enough to release a much more stable version. 

So, buckle up :)

Oh, by the way, if you want to be one of the testers, contact with me via gomercin *at* gmail.com. Those testers should better be ready to share their sms, contact list and notes databases with me to see the reasons for crashes or any other problems. I already have some names but having more will help us seeing how CopierciN acts on different iPhones. Especially people who use different language sets like Cyrillic or Kanji would help a lot to see the multilingual problems. Thanks in advance everyone. Have a nice day all :)

September 22, 2008

How to integrate with CopierciN?

Filed under: CopierciN, iPhone — gomercin @ 12:59 pm

Currently, I am using a very very primitive, yet effective technic as a clipboard: a file. “Copy”ing is just reading contents of that file and “Paste”ing is writing come content into that file. So, if you have a text based application, you can use the same clipboard file with CopierciN and voila, your application is also integrated with CopierciN :). If you want your text to be available in clipboard (and be overwritten if user copies something) then use the “/var/mobile/Documents/clipboard.gom” file. Then the users can launch CopierciN and press “paste” to paste your text. You can also read the contents of the last copied text from there.

Another file is “/var/mobile/Documents/lasttext.gom”. This file holds the text to be shown when CopierciN is launched. So, you can write some stuff to this file and tell users to launch CopierciN (or launch it automatically if you can) and CopierciN will be showing the contents of this file when it is launched. Then the user can chose to send it as an SMS, or e-mail etc.

That’s all for basic integration. When I come up with a better, non-buggy way for text selection, I will share it too and hopefully, we will have a realistic looking copy-paste framework :)

September 21, 2008

CopierciN v0.2 Release Notes

Filed under: CopierciN, iPhone — Tags: , — gomercin @ 8:30 pm

Warning to 0.2 downloaders:

Please update to 0.2.1 as 0.2 is not different from 0.1. I sent the wrong file to the repository, my bad. Sorry for the inconvenience.

Fixed:

- com.apple.MobileSMS.plist file is not overwritten now, it is modified instead.

Added:

- BiteSMS support

- Very basic “import from contacts” interface

Compatibility:

I tested the application with 2.1 firmware and it does not seem to have a problem (besides the ones which already existed in 2.0.1 firmware). Only issue is you have to manually export the sms application after selecting “export as new sms”

Some Notes:

I am sorry I couldn’t add more stuff in this release. I was working on making the selection better as it is a core functionality. It is still buggy (maybe even more buggy) but I think I am onto something, I hope I will come up with a better method for selection soon. 

When you select “export as new SMS”, both native SMS application and biteSMS is prepared for new SMS. If you are using one of the 2.0.x firmwares, the default SMS application is automatically launched. In any case, you can close the launched application and open the other one, the text will be waiting for you to send.

Contact List table is even more uglier than the others :) The contacts are sorted in their addressbook id’s, so they are pretty much mixed up. Bear with it for a while :) 

I will soon upload the source to http://code.google.com/p/copiercin/. If you are interested in helping me in development process, please contact me via “gomercin *at* gmail.com”.

September 17, 2008

Visitor Graph

Filed under: Uncategorized — gomercin @ 9:46 pm

 

Visitor Graph

Visitor Graph

Seems like my blog was not popular before :)

CopierciN video on YouTube and some News

Filed under: CopierciN, iPhone — gomercin @ 9:31 pm

There is a video on YouTube showing how to use CopierciN. Thanks AaronBesson for that.

As you can watch in the video, selecting might be a little hard sometimes, I will work on that, I promise :)

For now, I am reading the comments in this blog and other blogs and forums, collecting feedback. As far as I saw until now, somehow CopierciN can be used in different languages. I am sure there are some problems about that and I will try to change to code to accept every kind of input iPhone itself supports. But before that, I will add a menu option to import contact information, this seems to be a feature people are longing for. I can’t promise for exporting contacts tho’. I might add it if there API functions for that but if there aren’t any, I just do not want to mess with the contacts database. 

Just after that, I will start working for Safari support. The thing about that is my technic of highlighting is surrounding the selected text with something like <span style=”background-color: <highlightcolor>”>…</span>, that is why selection is still buggy and laggy. In Safari case, it will probably be more buggy as the websites will have their own tags embedded and they will be hard to handle. In the first stage, I might just convert the selected webpage to plain text, which means you will not be able to copy images for example and the text version will probably be a little bit messed up. 

Unfortunately, I will be busy for the next two days but I think I can build a second version this weekend.

And there are some other issues, like showing the deleted notes and some unexplained crashes. Also I will try to see if I can find a way to launch biteSMS (or other SMS applications) instead of the default one. Launching is not an issue (except for 2.1 firmware) but setting the text-to-send might be a problem.

And, hmm, what else… Oh, the pronunciation (is it written like this :) ). Well, I read CopierciN like “Copier Jinn” but that is half-English and half-Turkish (”cin” actually means Jinn in Turkish). Say it how you like it, it does not matter, just write it correctly :). I choose this weird name because it rhymes with GomerciN and there is nothing else with the same name. Now I can search it in Google knowing that all the results are just for CopierciN itself.

Anything left? Oh, I just received my first and only donation today :) Amount is not important but it is nice being supported. Thanks Petr for that :) Actually, all my friends are mad at me now, seeing it has been downloaded more than 21000 already. If I had 1 dollar for each download, I would quit my current job right away :) I am having fun and I never thought of earning money from this application anyway. But I might add Google Adsense to the blog at least. Earning a few extra bucks will not hurt I assume :)  

That’s all for now, new version will be available very soon.

September 14, 2008

CopierciN v0.1 Release Notes

Filed under: CopierciN, iPhone — Tags: , , , — gomercin @ 10:17 pm

Source Code:

I will release the source code once  tidy up it a bit. I modified some of the headers by hand instead of just class-dumping, so it is possible that the code can not be directly compiled in a standard toolchain build. I hope people with much more experience will contribute and the application will be improved. I am sure most of the bugs I mention here are easy to fix, or even the technics I am using can be improved dramaticaly.

Actually, to be honest, I implemented this application to learn Objective C :). Yeah, this is my first Objective C application which actually serves to a purpose and I believe it can be really useful for everyone.

Compatibility:

Built and tested on iPhone firmware 2.0.1. It would be great to have feedback about how it works in different firmwares.

I had read that some functions I was using were removed with 2.1 firmware. I had not tested but even if the program works, you may have to open the mobile SMS application manually once you chose to export the text as new SMS.

Warnings:

Be aware that this version is the first public beta. I tested it a lot in my own iPhone and I never had serious problems but still, it might cause some problems for someone else, like corrupting some files mentioned below, or making your girlfriend/boyfriend leave you or make your dog eat your shoes, anything might happen :)

This application modifies two system files: notes.db and com.apple.mobileSMS.plist file. Only new entries are made to notes.db file and if CopierciN somehow corrupts this file, it should be possible to correct this problem by just deleting the corrupted entry from Notes application. As this version is just a beta, you might want to backup this file before using CopierciN.

The mentioned plist file does not seem to hold too much of an important data as far as I see. If you have unsent short messages which you do not want to lose, it is better to backup this file too. You can restore the backup after you use CopierciN.

notes.db file resides in /var/mobile/Library/Notes and com.apple.mobileSMS.plist file is in /var/mobile/Library/Preferences folder.

Besides them, saving the text as a regular file just overwrites the file at the given path. Make sure that you are not overwriting any important data.

Known Issues:

  1. Selection highlighting is very buggy, but usually not a big obstacle:
    • You might see a selection is made when you are trying to scroll the page. Just touch on somewhere on the text and the selection will be cleared.
    • Spaces or line endings might get lost during or after selecting process. For example, if you start selecting just before a space character, this spce character gets lost once you clear the selection.
    • After making a selection, if you type something from keyboard, selection stays and extends to contain the newly entered text. If you press copy, this newly entered text is also copied. Actually, this is not a bug, it is a feature :)
    • There might be more I can’t remember. These are the ones that I see occasionaly.
  2. Only UTF8 strings are supported. I did not do much encoding checks and the application will probably crash if you try to import or export non-UTF8 strings. I have tested the application with only Turkish (and thus also English) characters up to now and it seemt to work flawlessly.
  3. If you manage to export a non-UTF8 text as a new Note and the application does not crash, there is a high probability that it will crash when you are trying to import that note. Besides that, the last entry of the Notes application might get corrupted. It would be best to open Notes application and see if the last entry can be viewed correctly or not.
  4. Only first 500 (or something) characters are imported from eMails. Unfortunately, this is not a bug; I just couldn’t manage to read the entire contents. For now, only this summary part is imported. There shouldn’t be a limit on exporting though.
  5. There are some issues with cursor position. After “cut”ting, you might see the cursor is put into a strange place. Also, after pasting, the cursor is set to the beginning of the pasted text instead of being set to the end of it.
  6. The tables look ugly, well, yeah. I should change the font size at least.
  7. Double tapping on the text will disable selection and it will just show the magnifier. Not a bug, but a feature again :)
  8. You might see nothing instead of mailboxes. This probably happens when the Mobile Mail Application was just in the middle of downloading new messages. Opening the mail application, waiting until it finishes loading new messages (until the loading animation-the turning circle disappears) and reopening CopierciN should correct the problem
  9. Meanwhile, mailbox folders are not divided into accounts, thus you will see a list of all folders from all accounts. This might be confusing with folders with same name in different accounts.
  10. Be sure to have a valid 2.x.x compatible notes database. I realized that the database format for notes.db is different in 1.x and 2.x firmwares. Thus, if you had just copied your notes database from your 1.1.4 iPhone after upgrading to 2.x, you might not be able to import or export notes. If this becomes an issue for majority of the users, I might add a compatibility version in the later releases.
  11. Short message groups are not ordered by the latest short message date as it is done in SMS application. For now, you have to look for the sender (or receiver).
Future work:
  • Integration with Safari: What I have in mind is to make the application load web pages from Safari bookmarks or history. After downloading the page, it will be converted to plain text (I am not sure how it would work with exact contents, I will look into it). Once it is converted, you can select and copy as you would do with other kind of texts. Pasting into a form object would be the problem though. Again, what I have in mind is copying the text into a cookie or something which can be read with a javascript bookmarklet. After that, this javascript bookmarklet can be used to paste this text into the selected text field. I actually am thinking aloud right now, I do not know this pasting thing can be made to work or not.
  • Contact list: This can be useful as there is no easy way to send a contact information with a short message or eMail. It is not very hard in theory but I should prepare a nice import interface to make it easier to list and select a contact. 
  • Plugin support: It would be nice to make it possible to write plugins to import/export to/from other applications. Hardcoding it for all the applications is just well, bad :)
  • Making a clipboard framework: just like suggested by www.openclip.org, people can write their applications which use the same file as clipboard. This way we can have applications sharing the same clipboard and some kind of system-wide copy/paste functionality. That is, if Apple insists on not putting this functionality with a firmware. I respect the idea of www.openclip.org but well, it is just hard without jailbroken phones. By the way, I might integrate my application with the openclip framework in the future. I saw this project just a few days ago, or else I would already be working on that.
  • Just leave a comment if you have any other thing in mind.
Thanks to:
Jay Freeman (Saurik) especially for porting GCC, Jonathan A. Zdziarski for the book iPhone Open Application Development, Erica Sadun, Dev-Team, and I don’t know every developer who share their source code with public. Phew, I am bad at thanking :) I have looked into many many code pieces while I was trying to learn ObjectiveC, I should have written down their names. Oh, I have one, thanks to gojohnnyboi, I got file load/save functions from his application gTxtEdit.
Meanwhile, guys who made the application MagicPad, how did you manage to make the selection so smooth :) I would love to have someone help me about having a better selection mechanism like the one used in MagicPad. 

About CopierciN

Filed under: CopierciN, iPhone — Tags: , — gomercin @ 6:47 pm

What is it?

CopierciN is a basic text editor which, hopefully, bring some kind of copy/paste mechanism to iPhone (to jailbroken ones only, unfortunately). It does not add copy/paste functionality directly to other applications but it provides a mechanism to import text from and export text to SMS, Notes, Mail applications (more to come in the future) and files in the filesystem. Clever, isn’t it :)

How to install?

It will be available in Cydia soon. It is available in Cydia under BigBoss repository, in Utilities section.

How is it used?

It basically has two parts: Text Editor and Importer/Exporter. Within the text editor, you can select a piece of text using your finger, cut or copy it, and paste it to a selected location.

To select a text, press a finger to the place where you want to begin selecting and wait until magnifier appears, move your finger and release when done.

Selecting within CopierciN

Selecting within CopierciN

Once a piece is selected, you can copy or cut it by using the buttons above. The button on the left (named Clear) clears the entire content of the text editor (you can use it to crop a piece of text: copy the text, clear the page and paste the text back).

The button named “Menu” opens the import/export menu.

Main menu of CopierciN

Main menu of CopierciN

As you can see, you can choose to import text from short messages (both received&send), Notes, saved eMails and files in the system. Short messages are groupped with respect to their groups and eMails are groupped with respect to mailboxes. For the files, you must enter the full path into a text field for now.

Exporting does not modify the contents of the original content (except for “regular file” case, as it will overwrite the entire contents of the given file). So, you can not change a stored short message, eMail or note. The process for exporting is as following for each type:

Short messages: CopierciN is terminated and SMS application is opened with the latest content of CopierciN is ready-to-be sent. You can chose a receiver within the SMS application. Be aware that CopierciN overwrites the /var/mobile/Library/Preferences/com.apple.mobileSMS.plist file which holds some stuff like unsent messages. So, if you want to keep your unsaved messages, just have a backup of this plist file.

Notes: A new note is added to the notes database. CopierciN does not get terminated during this operation unlike the SMS case.

eMails: Just like the SMS case, CopierciN gets terminated and Mobile Mail application is launched. Again, you can chose the receivers within the Mobile Mail application

Regular Files: The contents of the file at given path is overwritten. Be aware of that and avoid overwriting system files. I would rather open a folder under /var/mobile and save my text files in there.

That is all for a basic introduction I assume. Do not forget to read version information to see the list of known issues.

Hello World! Howdy?

Filed under: Uncategorized — gomercin @ 5:48 pm

Being too lazy to modify my original blog, I decided to setup this blog to post information about CopierciN. I will probably embed this blog into my original one or the original one into this. I am not sure, I am too lazy for either of them anyways. I did not even bother to change the theme, maybe later.

OK, let’s go on with the main subject. Another post perhaps…

Powered by WordPress