SMS Switcher – tutorial

October 18th, 2009 by Chris 29 comments »

UPDATED!!!
http://chris-software.com/index.php/2009/10/27/solved-sms-switcher/

Updated: application was only tested on my old personal iPhone Classic. I’ve just tested it on 3G and confirm it’s not working as expected. Maybe today or on wednesday I will try to submit and update. I’m extremely sorry, but please believe me, I’ll do everything to make it working as I intended!

Updated: sorry for making you wait so long, but I have some technical problems: I’m trying to figure out, how to debug my application over SSH as long as it permanently lost WiFi (my 3G). I need to find somebody who is willing to borrow me the SIM Card with data plan so I can download it over 3G or to buy new iPhone… I’m quite busy recently.

Hi!

Yesterday I added to Cydia (BigBoss) my new simple but useful application: SMS Switcher, and I’ve been only receiving questions “how does it work?” or statements: “It doesn’t work”.

First I’d like to discuss some technical info. Your SMS/MMS messages (created by Messages application) are stored in one file called sms.db, which you will find in:

/var/mobile/Library/SMS/

My application allows you to create another databases for your messages, so when you create databased MyGirlfriendsMSGs, and ImportantMSGs, when you visit again /var/mobile/Library/SMS/ you should also see the libraries you created, that is MyGirlfriendsMSGs.db and ImportantMSGs.db.

But remember that Messages app uses only sms.db file, and doesn’t focus on other .db files in this directory. That is way I call sms.db file the active library – the library from which messages are read and to which new are saved. You can only have one library active at a time. So when you create new library You can set that you want to activate it straight away, or you can do it always later.

When you activate next library, it’s file – *.db file will rename to sms.db, so now it’s used as a Messages’ database, while the previous original library will rename to [previousActiveLibraryName].db.

You cannot assign your contacts to save messages from/to them to one of the libraries – they will be always saved in your active.

What is the point of such application:

  1. if your library is very big – like thousands of messages, opening it takes few seconds out of your life. Either you can delete some messages, or create new library while you always can switch the library to the original one and read your messages. You can always make a copy while creating new library, so now you have the same to files, but you can delete unwanted msgs – the app will respond faster and you have a backup if you delete something important.
  2. It saves your privacy. A lot of people read your messages when you left your iPhone unprotected. Not all of them are hackers and not all of them knows this application. So by switching libraries the typical inquisitive person won’t have access to your (very) private data.
  3. And the example from the application. If you have two or more girlfriends/boyfriends/wives/husbands/fiancees… (I don’t say it’s good, it isn’t) you can easily switch libraries so one girlfriend/boyfriend/wife/husband/fiancee won’t find out about the other.
  4. Think of your own reasons

So again step by step instruction

  1. Obvious: install the application from Cydia (search, type SMS Switcher).
  2. Obvious again: launch the application – nice icon like messages applications with recycle symbol (two arrows).
  3. You should see a list with one database only – it’s a database created by already using Messages app. If it’s not listed it simply means that you have never received any message (make some friends), you have never opened Messages or you have just restored your device and because of above two reasons, this file doesn’t exists – it’s not a problem.
  4. So now let’s create new SMS library – just tap the top right [+] button. Enter it’s name – just to remove typical file-naming problems you are only allowed to use letters A, B, C to Z and number 0, 1, 2, 3 to 9. If you want to activate this library straight away (it means that messages will be saved to this library, and read also from this library – and as long as it’s empty, your Messages app will display nothing). Only while creating new library, you can easily import all messages from any existing libraries.
  5. You can repeat step 4 to create more libraries. If you already activated one library it will be used for next messages. You can later launch the app again and switch back or switch to another.

OK and BTW: when you start your application, the main SMS library is always called Unnamed.

Please tell me that you get it. If not, use the comments above.

Touch Board

September 29th, 2009 by Chris 32 comments »

finger2

Touch Board, new application (so far in Cydia only, waiting for approval in App Store) is available since yesterday and I’ve just checked if anybody has enough patience to play it. To my surprise, You – Players have just traveled:

14,5 mile

with their fingers!

Diagonal of the iPhone screen is 3.5 inch, playable area is about 3″. That simply means that the players’ve swiped fingers across the screen at least 300′000 times! WOW it’s impressive.

I’m just worried about the speed in highscores. Guys, what have you done to your iPhone or iPod to achieve the speed approximately 50 mph with your finger? Or even 18 mph – so far the 10th best player. If you find a bug in the app please tell me. If not, my Congratulations, but please, don’t damage your device, it’s just a game.

Best regards
Chris

How to install apps on devices without certificate

September 28th, 2009 by Chris 29 comments »

As you know to distribute the applications in App Store or even to debug them on real device according to Apple you have to pay $99 to achieve the provisiong and distribution certificate.

But of course as you know, there are always other ways to achieve the similar result. But 1st. your device has to be jailbroken and 2nd. you can distribute your app only among jailbroken devices via Cydia, Icy or less friendly through SSH. It has advantages and disadvantage. Not all iPhones and iPod touches are jailbroken (I guess maybe 10% are), but you don’t have to obey the rules from Apple about submitted apps and you don’t have to wait at least one week for the review result.

Tasks you need to do only once (for developer):

  1. Jailbreak your iPhone
  2. Install LDID (Link Identity Editor), Mobile Termial and OpenSSH from Cydia
  3. Go to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.sdk/
    I personally tested in on 3.0 that’s why I put that in bold, if you are going to built your app on a higher SDK, go to the appropriate directory.
  4. Open the SDKSettings.plist in your favorite editor (I recommend Property List Editor in Utilities) and in Root -> DefaultProperties set CODE_SIGNING_REQUIRED = NO. BTW check if AD_HOC_CODE_SIGNING_ALLOWED equals NO and CODE_SIGNING_ENTITLEMENTS is blank.
  5. Save the file.

sdksettings

Please remember: modification of above .plist file simply allows you to build the package without signing it, so from now, you are able both to built package for Cydia and AppStore submission. Of course for App Store submission you provide a Distribution profile, for Cydia “Don’t Code Sign” in your project info under Build, Code Signing, Code Signing Identity, Any iPhone OS Device.

build

Tasks you need to do for every package (developer):

  1. Build your project without signing it (Don’t Code Sign).
  2. SSH your bundle to /Applications on your device. You can use Fugu for Mac or  WinSCP for Windows.
  3. Now you have to fake-sign it to make it working. Open Mobile Terminal and type:
    su root
    you will be asked for password, by default: alpine. Next:
    ldid -S /Applications/My\ Project\ Name.app/My\ Project\ Name
    make sure every space in name comes with the backslash before
  4. If any error occurs, it means that you have provided wrong file path or didn’t built it with “Don’t Code Sign”.
  5. Now you can test your application, how it works on real device with full touch control, accelerometer and device’s performance, it’s really different from the Simulator.
  6. If everything works correctly download the file that you modified with ldid – it’s the file named exactly the same as your project without any extensions, and replace it with original from your bundle.
  7. Now you can distribute it in your own way.

Too many things on my head

August 25th, 2009 by Chris 7 comments »

Hello!

I do really apologize that I haven’t added anything on my blog for last few weeks.

As many of noticed I do a lot of programming job recently. I’ve added a lot of applications, a lot of updates, and what is more, I have a lot of ideas what to do next with iPhone SDK.

Follow this link to see my productions in App Store:

http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewArtist?id=307085735

I’m also quite popular in Cydia in Big Boss repository. My best production I’m really proud of is Best of YouTube

boyt

To try my other apps in Cydia follow this link:

http://apt.thebigboss.org/packagesfordev.php?name=Best%20of%20YouTube

Regards

Chris

Please be patient

August 1st, 2009 by Chris 16 comments »

Hello!

It’s my first post published using the iPhone Wordpress application. Well done! It’s really nice and easy to use.

Although, nothing appears on my blog except comments and my replies, it’s totaly different than how it looks.

As many of you’ve noticed, I have added some applications without even publishing any info about them here.

Two most popular apps are: Magic Ball (fortune telling toy) and Anonymous (send fake emails). Both available in Cydia.

I have a lot of reports than anonymous doesn’t work like it should. It sometimes does sometimes doesn’t send emails to hotmail or gmail accounts. Please excuse me and believe me I can’t do anything and fix it right now. Rather it’s unfixable. All the data you enter in the app is sent to my PHP script and email is sent using mail() function, withour providing any external SMTP server. Some providers don’t accept this emails. Even more, very rarely my provider fail to send an email even you’ve been told it was sent. That is way why Anonymous sometimes fail to send an email to the same address.

I have also to more questions about it. Yes, soon I’ll post an update with reply-to optional field. And the 2nd: NO you can’t read any emails from others’ email accounts. It’s almost impossible, illegal and… I’m not going to explain why.

Before I finish I’d like to tell you about one more thing. Since two weeks ago, I’ve almost stopped distributing stupid applications for free. Since then, all existing and new apps will be for free with tiny not-annoying ads from AdMob. Some apps that I’m really proud of like Funny Face, Hot Banana will be also available for 1$ without ads.

And next one more…
New really nice apps and tutorials are on their way.

New App: Bluetooth

May 26th, 2009 by Chris 21 comments »

Hello!

It was 1 of January 2009 when I started thinking about participating in iPhone Developer Program. Before I made the final decision I wanted to decide what product I’m going to develop firsts, to succeed. I know everybody is making fun (or used to make fun) of “iPhone people”, that their shiny, new iPhone out of the box, cannot send files via bluetooth. I wanted to make an application which interface looks like like the built-in applications made by Apple, that pretends that users can either send files or messages by bluetooth. So in other words, somebody is laughing at you, because you cannot send files with your iPhone, so you runs my app and proves him, that he is wrong.

Meanwhile the real BT application was released – iBluetooth, of course available only in Cydia. After few weeks of development and polishing my app was finished and I was ready to send it to iTunes. In app’s description on the top of it, there was a strong warning that “It’s only a toy and it doesn’t extend your Bluetooth functionality”.

mailbt

Guess what Apple – the review team said. Yes you are right, REJECTED:

Unfortunately, your application, iBluetooth, cannot be added to the App Store because it uses standard iPhone screen images in a non-standard way, potentially resulting in user confusion. Changing the behavior of standard iPhone graphics, actions, and images, or simulating failures of those graphics, actions, or images is a violation of the iPhone Developer Program agreement which requires applications to abide by the Human Interface Guidelines.

I was really confused trying to figure out what is wrong, so I asked them what I need to improve, and after several days I got new email:

Thank you for your email. Please refer to the email below for more information on the issue. If you believe you can make the necessary changes and would like your application to be considered for the App Store, we encourage you to upload a new binary to iTunes Connect.

Very helpful, not. After reading above I started to fix almost everything, changing images, descriptions, adding disclaimers and it didn’t help either. Later I asked the Netherlands iTunes App Store to review my app, but it was rejected as well, for about 6th time now.

Finally I was called by Apple, California and they asked me not to send my app again because it will be rejected anyway. Why? Because it has misleading functionality. Where, why, how? I’ve read all rules andeverything  about Human Interface Guidelines and I cannot agree that my bluetooth-toy app is abusing it. Everywhere I could, I put strong warnings that it’s only a toy, not to expect anything more. I wanted to develop the toy, so I did!

I can totaly understand many developers confused after their apps were rejected. I’m not going to get confused any longer. Since today, any app I created, not only to make fun of iPhone disfunctionalities, but others who Apple doesn’t like (3, including Bluetooth) will be posted in Cydia (BigBoss respository).

Bluetooth application

Bluetooth

May 26th, 2009 by Chris 37 comments »

img_0034 img_0031

Bluetooth

version: 1.0

Hosted by:

bigboss

available in Cydia only! your iPhone / iPod touch need to be jailbroken
To get this app: Cydia => * => Search =>
Bluetooth (description: A toy that pretends to be a built -in applicati…)  => Install => Confirm

* make sure you have BigBoss & Planet-iPhones respository included (by default), if not, add this respository:
http://apt.bigboss.us.com/repofiles/cydia

Description:

WARNING: This application doesn’t extend iPhone Bluetooth functionality. It’s only a toy. All the task only pretend that the application is communicating with other Bluetooth devices.

Are you tired explaining everyone that’s it’s better way to send image via e-mail? Are you tired explaining that Bluetooth only works with a headset?

Are you tired explaining the Apple’s final decisions?

Here comes my solution. I’m are introducing you a toy that pretend to be an built-in application providing Bluetooth functionality. Everything is categorized into 4 tabs:

1. Settings

- turning Bluetooth on/off

- changing the device name

- setting the visibility mode

- permanent visibility

- temporary visibility

- hidden

- advanced settings

where you are able to set up to twenty devices (names, and types: iPhone ; Other phone; Bluetooth Headset ; Mac ; PC ; Other device) and quickly enable/disable device

2. Choose file

- file preview (with name and size)

- select from photo albums

- select from camera

- write a message

3. Devices

- displays a list of previously prepared devices via transitions categorized into types

- you are also able to pair devices, displays passcodes etc

4. Transfers

- displays a status of current stage (sending header; sending data, finishing)

- displays a name and it’s size of sending file

- displays a random speed in kB/s and progress bar slowly filling to 100%

- if you are not on transfers tab the label always notify you about current progress

Application track many common mistakes and displays notifications. You can’t send files to Headset – only pair. Rarely random transfers might be corrupted. You can’t get list of “active” devices while Bluetooth is turned off.

img_0036 img_0033 img_0032


Copyright:

ˆ 2009 www.chris-software.com
Source code, idea: Krzysztof Rutkowski
Icon, images: Pawel Blazejewski

Creating a nice glass buttons

May 13th, 2009 by Chris 18 comments »

You can easily create buttons, link actions to them, but they aren’t cool at all.

This is the typical button:
buttonnormal

And when being pressed (highlighted):
buttonhighlighted

stopwatchbuttonIn my opinion rounded corners look nice, so do the highlighted version, but this white background doesn’t appeal to me. Open the Clock application and go to the Stopwatch. Don’t you think that these Start/Stop and Reset/Lap buttons are more acceptable? Yes, they are.

You might have noticed that using Interface Builder you can set the background color of UIButton. Exacly. Below you can see the button with green background:
buttonbackground

That’s it. UIButton has the green background color. Thank you very much and read my next tutorial.

Oh, sorry for the irony. So, in the case above, button looks like a TV from ’90s rather than a green button. There is a simple way to achieve results similar to the Stopwatch application. All you have to do is to get rid of UIButton and use UISegmentedControl.

UISegmentedControl is typicaly used in options / settings views, where you are able to pick one option of many.

Today, I’m going to show you how to customize this UISegmentedControl:
segmentedcontrol

so it will look like this nice button below:
segmentedcontrolbutton

Unfortunately you cannot do everything in Interface Builder only, so you will need to create an IBOutlet and connect it to created UISegmentedControl in Interface Builder.

IBOutlet UISegmentedControl *myShinyButton;

In Interface Builder go to UISegmentedControl’s attributes, and set Segments=1 – so your UISegmentedControl will consist of only one segment – button. Check momentary – as you see on above UISegmentedControl example (First | Second), First is selected an it stays in that state until you select Second. Once momentary is checked the segment returns to the normal state after a second. Change the style to Bar – only bar can be customized in the way I want to show you. And the last thing you need to do: uncheck the selected for the current segment. Double click the button to type your own text on it. Your button should look like this:

uisegmentedcontrolfirststate

Now you can customize the color, but you can only do it in Xcode. Use the property tintColor:

myShinyButton.tintColor = [UIColor darkGrayColor];

Here is how your button will look like after it:

mybuttondarkgray

Please note: avoid setting “strong colors” as a tintColor. Otherwise there will be no visible difference between normal and selected state when the color becomes more intensive. darkGrayColor will be perfect replacement of blackColor. You can also play with setting RGB colors where you have full control of intesitivity of red, green and blue.

Programmatically

	codeButton = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"My Button"]];
	codeButton.segmentedControlStyle = UISegmentedControlStyleBar;
	codeButton.momentary = YES;
	codeButton.tintColor = [UIColor lightGrayColor];
	codeButton.center = CGPointMake(160,400);
	[self.view addSubview:codeButton];

Please note:

It won’t be discussed with details here, but remember, you can always use an image as a button (UIButton type: custom). Simple code:

	[button setImage:[UIImage imageNamed:@"myButton.png"] forState:UIControlStateNormal];
	[button setImage:[UIImage imageNamed:@"myButton_highlighted.png"] forState:UIControlStateHighlighted];
	[button setImage:[UIImage imageNamed:@"myButton_selected.png"] forState:UIControlStateSelected];

Providing the right images will give you any effect you need.

Actions

To link any action to buttons created with UISegmentedControl use a value changed event instead of Touch Up Inside. In Interface Builder it should be quite easy, but to do it programmatically:

	[codeButton addTarget:self action:@selector(simpleAction) forControlEvents:UIControlEventValueChanged];

As usuall, sample project for you:

glassbuttonssimulator

xcodeproj

Download the project

New free App: Crazy Waiter (what a shame)

May 11th, 2009 by Chris 2 comments »

crazywaitericon

Hello. Our next game is available in the App Store. To be honest, the game didn’t work out. I wanted to develop something fun, but we are currently busy developing something bigger. When I received graphics to this game (Crazy Waiter) I was really disappointed, but I finished it anyway. Later I realized that there are major bugs in levels 12+. I don’t have time to fix them, so to be kind and don’t waste your $0.99 I decided to distribute it for free. The price was changed today, one day after the app became available in the App Store so the change can take few hours.

iTunes link: http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315141860

www: http://chris-software.com/index.php/our-apps/crazy-waiter/

Crazy Waiter

May 11th, 2009 by Chris No comments »

img_0046

Crazy Waiter (Free)

version: 1.0

app_store_badge

Description:

— UPDATE —

Now, game is for free. Sorry, it didn’t work out. We are currently busy developing much more advanced games and apps and we are not going to fix aby bugs here. There are problems with lvl 13 and higher.

— – - – - – —

Have you ever wanted to be a waiter?

This job isn’t as cool as it looks like from the other site. I know, I was a waiter few years ago.

To show that it’s pretty hard work. I made a game for you, where you become a waiter and have to catch everything dropped by customers including:

  • the bottle of bier
  • the bottle of coke
  • empty glasses
  • and three kind of drinks customers haven’t ordered

You have 3 trays you use to catch everything dropped. You move them by sliding your finger. Each time you miss a thing you lose one of the trays, game is over when you have no more trays.

The point of the game is to have the biggest score. Game has an unlimited number of levels, each has the higher score multiplier, if you don’t drop anything you got a bonus. Your scores are saved on the high-scores board.

Choosing the difficulty level medium or hard allows you to skip the 5 or 10 first levels so you don’t have to start from the beginning once you mastered the game.

During gameplay the nice piano ballad is played in the background, sounds of cracked glass included :) . Please excuse me for poor graphics.

img_0050 img_0049

img_0047 img_0053


Copyright:

ˆ 2009 www.chris-software.com
Source code, idea: Krzysztof Rutkowski
Cracked glass sounds: Sean McCabe
Other sounds and music: Apple Inc.
Icon, all images: Rafal Lipinski