Sunday, March 27, 2011

XCode Certificate and Provisioning Error

Note to self and anyone else that runs into this -

Today XCode 4 refused to build a project that used to build just fine till the last time I had opened it. A cryptic "Cannot find [pretty long string] profile".

After a bit of investigation, it turned out that my Developer certificate from Apple Developer Program had expired. Renewing and downloading the new certificate still did not solve the problem.

Keychain still had my old expired certificates in addition to the new ones. I was assuming that the new ones would start getting used but the existence of the old ones was causing XCode to still use them.

Finally, deleting all the expired certificates solved the issue.

Wednesday, February 23, 2011

WiFi Files


THIS PAGE HAS MOVED TO Files n Folders


The content below is maintained for legacy purposes only. 





WiFi Files is a utility app that lets you transfer files, images, videos from your personal computer to and from your mobile device over WiFi.


The app runs on iPhone, iPod Touch and iPad.

Features
DOWNLOAD & UPLOAD
* Browse folders and download files from both Mac and Windows machines to your device
* Upload files, photos & videos from your iDevice to your Mac or Windows machine

ZIP FILES
* Unzip saved compressed files on your device
* Create zip files from folders on your device

DO MORE WITH SAVED FILES
* Save files from other apps. Example, you can save attachments from Mail in the app for later access, save zip files from attachments and then unzip them.
* Organize saved files into folders via drag n drop
* Email saved files as attachments
* Sort file lists alphabetically and by modification date
* Add downloaded images and videos to the Photos app on your device
* Video AirPlay support

* Allows opening of different file types in other apps that support the file format


INTERNET FILES
* Browse the internet and save files from the web
* Save webpages as HTML or as PDF
* Capture and save web screenshots


Troubleshooting
  • Username/Password issues: The username is case-sensitive and cannot contain a space. The newer version (April 2, 2012) desktop app checks for this issue but older versions and the iOS app does not validate this. Will be fixed in a future release of the iOS app.
  • Ensure that the HTTP Service on the desktop app shows the status of "Started". If not, the iOS app cannot connect. 
  • The desktop app requires the port 48080 to be available to start the HTTP service. 
  • Try "Restarting Services". Sometimes if the desktop app is running for a long time, the IP address expires and must be renewed. The newer version of the desktop app (April 2, 2012) solves this issue. 
  • Check that you have entered the IP address correctly on iOS devices.

Saturday, January 08, 2011

UnixCrypt produces same values for different passwords

This is interesting. Learnt something new today.

I've been using the UnixCrypt class from Jetty and if the first eight characters of the password to be encrypted are the same for two passwords, the resulting encrypted (hashed) value is the same.

I was trying to reproduce an error message in my program by providing the wrong password and creating the wrong password by simply modifying the last character of the password. However, inspite of supplying the wrong password, the system was successfully authenticating.

The problem was that two different passwords like John1234$ and John1234b#, were producing the same value from UnixCrypt which was leading the system to think that it was the correct password. BTW, notice that one could potentially call these passwords quite strong given they have an Uppercase, lowercase, numbers, a special character and are greater than 8 characters.

The only way to get different values is to use completely different salts. But even there is a catch. Salts like '12abc$1' and '12gfd#2345' though completely different, produce the same value.

I've been using the class as part of a program that saves passwords and was using a salt of format - "constant + random". This was resulting in same value even though the salt was technically different. Here is a test program and the resulting output - (some boilerplate code omitted for brevity)

Code

String password = "John1234$";

String salt = "12abc$1";

String val = UnixCrypt.crypt(password,salt);

System.out.println("(" + password + "," + salt + ")" + " = " + val);

password = "John1234b#";

salt = "12gfd#2345";

val = UnixCrypt.crypt(password, salt);

System.out.println("(" + password + "," + salt + ")" + " = " + val);


Output

(John1234$,12abc$1) = 12FH7.yEd/XWI

(John1234b#,12gfd#2345) = 12FH7.yEd/XWI


Why is this happening even when the salts are completely different? The problem is again the prefix. Looks like if the first two characters of the salt are same, the same value is produced. Simply altering the second character of the salts, '12abc$1' and '13gfd#2345' , results in different values.

New Output with second character of the salt changed -

(John1234$,12abc$1) = 12FH7.yEd/XWI

(John1234b#,13gfd#2345) = 13uN.eBnCs5io



Ideally, the salts should be dynamically generated. However, even if that is done, likelihood of a collision is quite high due to the small size of the salt prefix.

At this point the only certain way around that I can think of is to ensure that two passwords don't have the same first 8 characters.

When I get time it will be good to look into why this is happening. A little bit of browsing around the web told me that this might have something to do with the MD5 hashing algo but that is an exploration for another day.

Thursday, January 06, 2011

How about a Java app store?

Thought Process


The Apple Mac store is a very interesting development. Apple is trying to bring the iPhone like experience to the Mac - the traditional "desktop".


One of my iOS apps has a desktop component and it got me thinking that if I had to make the desktop component available in the Mac App store it would need to be re-coded in Objective C and Cocoa and then again in .NET for Windows. Based on the downloads, my audience for the desktop app is about evenly split between the two platforms - OSX and Windows. That makes it impossible for me to ignore either of the platforms.


Right now the app is an Eclipse-based RCP app, which solves my issue of coding for multiple platforms - OSX and Windows. I write the code once and just create two native builds. Being a stripped down RCP app with minimal plugins and inspite of being a Java app, I think it performs quite well on the desktop.


My next thought was that it would have been great if there was an consumer focussed "App-store" for Java apps that brought the same experience the iOS devices bring to mobile. Java does take the pain out of coding the app logic twice. While there are some compatibility issues, it cannot be as bad as writing code twice and trying to ensure coherency in the logic between two lines of code.


What is required?


A thin operating layer on the desktop that simply provided access to the lower filesystem, provided a security sandbox and allowed for extensions.


Here are some of the characteristics that I can think of -

  • An "App Store" app to find apps natively from within the desktop and do a one-click install.
  • Standard features in App Stores - ability to rate and review, feature, popular, ….
  • Ability to view all running apps, switch between them, kill them, …
  • Support for different kinds of apps types - widgets, full-blown apps, …
  • Preferably a unified app store instead of the user having to search multiple sources (i.e. preferably the iPhone experience vs Android experience)
  • Integrated eCommerce to sell apps and their features - An idea would be to integrate the plugin store with providers like PayPal, who have already solved this issue. Making a user go to multiple sites to make payments would not be a good experience. This is something Apple does well with iTunes - they make it easy to buy and install something immediately. Amazon does this well for various sellers on the web.
  • Other good features would be - in-App purchasing APIs, recurring payments, app sandboxing.
  • Developer guidelines with a focus on user experience and good looking apps.


How to set this up?


Make it Eclipse-based or Eclipse-like or OSGI-based

Eclipse already has a few good things going for it

- A solid plugin model. Plugins would be similar to Apps

- A fairly decent update mechanism

- There is already an Eclipse Marketplace. However, it is too IDE and developer focussed (it prompts to login with my "Bugzilla" ID :))


However, other than the IDE, Eclipse does not have a killer app that users will want to download and install on their desktops. The IDE is certainly not a killer app for consumers. Thus, Eclipse will need a killer app that will put the App control layer and marketplace apps on a users desktop.


Use JRE to distribute this Eclipse-based control layer and marketplace app

Integrate this operating app and the marketplace store app inside the JRE itself. With every download of JRE, users also get the ability to extend their JRE experience with plugins. However, the UI component will need to be SWT-based and not Swing based. Eclipse, in my opinion owes a lot of its success to SWT and JFace. There were free IDEs before Eclipse but reason I (and probably a lot of people) switched to it was due to its native look n feel and performance.


Who could make this happen?

Probably Oracle in cooperation with other Java supporters such as IBM, Google, Eclipse ...


In Summary


- Great to have a Java-based consumer focussed app store platform

- Borrow features from mobile devices such as sandboxing, integrated eCommerce.

- Eclipse-like plugin model except absolutely no IDE components

- Integrated with the JRE download


Sunday, December 19, 2010

Error - 32-bit SWT on 64-bit JVM

This is more of a note to myself for the future and for anyone running into this issue.

Issue
When building an Eclipse RCP application on OSX, you may receive the following error.

java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM

Resolution
Tested on
  • Macbook Pro
  • OSX Snow Leopard 10.6.5
  • JVM 1.6.0_22
  • Eclipse Helios 3.6.1

1. Open the Run Configuration and switch to the Arguments tab
(Run -> Run Configurations -> RUN_CONFIG_NAME -> Arguments)

2. Add the string '-d32' (a space at the beginning and end, without the quotes) to the arguments text box at the end of the existing value.

3. That should do it. Apply and Run the app

Rationale
My understanding is that if you download the 32-bit Eclipse package like I did, it will load 32-bit SWT by default. However, OSX defaults to 64-bit. Providing the above property forces the JVM to run in a 32-bit mode.

Probably, if you download Eclipse 64-bit for OSX you may not run into this issue - I have not tried that as yet




Monday, November 08, 2010

Notes N More update submitted

UPDATE: The new version with all the improvements and bug fixes is available in the App Store


An update has been submitted with a focus on adding features to improve the usability of the app. Highlights of the update -

Updated background textures for iPad
Updated header themes
Customize app preferences within the app itself

Select and move multiple items to trash
Select and move multiple items to a collection
Sort items by both name and time within a collection view (iPad only)

Take simultaneous notes during a browsing session
Scribble directly from a Picture view (clicked with camera or selected from photo album)
Add simultaneous notes during a scribble session
Email scribbles as pictures (JPEG files)
Export scribbles as pictures (JPEG files) to the desktop app

Add notes to a picture and video right in the media view (iPad)

Sundry improvements to improve app stability

Sunday, September 05, 2010

Notes n More at #21


Notes N More has reached #21 in paid business apps for iPad. Its been consistently in Whats Hot for the past three months.

The App later reached #17


Thursday, September 02, 2010

Notes n More


Create rich formatted notes, record voice memos, draw with your finger or stylus, include pictures & videos, save web pages as PDFs and even do tasks all in one app.

Organize your vacation trip, project, conference or event visits or any other activity into logical collections of notes and tasks

iCloud support lets you synchronize the notes across your iDevices - iPad, iPhone, iPod.

Features - Tasks | Rich Notes | Voice Memos | Scribbles | Internet Notes | Recycle Bin | Search

Download from App Store - [Notes n More is not available anymore]



Features
  • Create task lists organized by Date and Collections.
  • Easily schedule overdue tasks for today, tomorrow or any other day.
  • Select text from Notes and create Tasks from them
The following demonstration shows the key task management features of the app -




Notes
  • Format text - Bold, Italics, Underline, Strikethrough
  • List Support - Numbered and Unnumbered including indented lists
  • Insert pictures into notes (current iPad only)
  • Create multiple tasks from a note
This video provides a short demonstration of the Rich Notes feature - 



Voice Memos
  • Record or play voice memos simultaneously while taking notes. 
  • Insert time stamps in your notes to remind you of the location in the voice memo where you took notes.

Scribbles
  • Create a simple sketch, design or write something with your finger. 
  • Draw on a plain background or annotate over an existing image or picture. 
  • Multiple backgrounds, brush sizes and brush colors are supported.

Internet Notes
Great for just saving your online receipts, doing research, collecting articles you liked, .... 
  • Save files (PDFs, Office, ...) from the web in the app. 
  • You can also convert a web page to PDF and save it. 
  • Take a screenshot of a portion of web page with one-click, save it and attach notes to it.

Click Pictures and Record Videos
  • Click pictures and videos and organize them along with the rest of your notes. 
  • Attach notes to any picture or video that you record.

Collections
Logically organize and collect all your various note types together in collections. No need to jump across apps for various note types - video, text, pictures,...

More Features
  • FavoritesYou can bookmark notes and access them instantly from the Favorites view
  • Recycle BinDon't ever regret deleting a note. The Recycle Bin collects all your notes or entire collections allowing you to immediately restore items or permanently delete them.
  • Customizable UIChoose from multiple themes, fonts, font sizes, font colors and background paper to customize the app and make it truly yours.
  • SearchFull-text search through all your notes
  • EmailIndividual notes can be emailed. When emailing, multimedia items (e.g. voice memos, videos, files,...) are attached to the email.

Download
App Store - http://bit.ly/notes_n_more


Price
The app is completely Free to download and use as of version 1.7.7.

NOTE: There used to be in-app purchases prior to this version, which is what you will see in the app store. However, if you download the latest version, it is completely free. Overtime, as users upgrade from prior versions, the in-app will be removed.

Contact Email
For questions or issues feel free to email me at -
aashish.notes.improv At gmail DOT com

Tuesday, August 31, 2010

Notes N More references from around the web

Googling a bit, I found a few references and reviews of the Notes n More app, some of which I was not aware of. Here are some of the links I found -

Naughty Spawn


TheJournal.com (4th para) -


Chronicle.com (2nd comment)

Thanks to all the posters for referencing the Notes n More app

Monday, August 30, 2010

Daily Tasks (To Dos) iPhone / iPod Touch App - V1

Daily Tasks is a simple To Do list application that allows you to create task lists by day

The app also lets you add tasks to your device's Calendar app. This way you can first collect all your tasks for the day without worrying about time, location, people,... and finally schedule them for the day.

You can also repeat tasks (recurring tasks), categorize them, add custom colors (including fonts and font size), search for them and even drag n drop tasks.

Download from App Store [V1 is not available anymore - discontinued]


Contact Email
aashish.daily.tasks AT gmail.com


Quick Tour
See this short presentation of the various features of the app.

YouTube link (1 minute and 40 seconds) - http://www.youtube.com/watch?v=cLIpwhXArcA




Demonstration Videos
Add - Edit - Delete Tasks




Navigation & Search


Drag n Drop Tasks


Repeating (Recurring) Tasks


Configure Color Themes and Fonts

Wednesday, July 21, 2010

Notes n More Quick Tour Video

Here is a short video describing the Notes n More iPhone / iPad app. I suggest you watch this on YouTube to watch it in its original clarity


You Tube link - http://www.youtube.com/watch?v=u5AUz1mIqqo






Sunday, July 18, 2010

Notes N More Update available

The new version of Notes N More has been approved and is available for download / update from the iTunes App Store. The following major features were added -

1. Voice Memos
Ability to play or record and take notes simultaneously. It is also possible to add time stamps of the voice memos in your notes section

2. Freehand scribble
Ability to create notes by drawing with your finger or stylus. There are multiple color, background and color options. It is also possible to pick an image from the photo library and annotate it with freehand.

3. Tasks
A one click view of all open (unfinished) tasks

4. Cloud Sync
Ability to export notes and multimedia items to a cloud storage system and access them from your desktop.
Ability to store files from your desktop into the cloud store and accessing them in your mobile device.
Ability to share cloud items via email, twitter or facebook.


Notes N More Desktop (Version 1.0.1, 24MB)
Mac OSX (Leopard or higher and Intel Macs only)

The desktop application requires Java Runtime Environment version 6.
If using OS X, this is included by default with the OS.
If using Windows, you can download it from http://java.com


Monday, July 12, 2010

Update submitted

An update to Notes n More has been submitted for review on Sunday July 11.

Thanks,
Aashish

UPDATE: App status has been changed to "In Review"

Monday, July 05, 2010

Notes n More requires re submission

A quick update -
I had updated Notes n More with export options last week but a critical bug was discovered over the weekend and the submission had to be rejected. Am fixing the bug and hope to resubmit it by weekend.

Thanks,
Aashish

Friday, June 25, 2010

Export notes from Notes n More is coming

I have received quite a bit of feedback / requests and also some reviews requesting ability to export notes from the app.

The ability to export is coming in the next version which I expect to submit in the next few days for approval. It will include the ability to export not just notes but also the multimedia items like voice memos, videos and pictures.

Wednesday, May 26, 2010

Notes n More is now in Whats Hot section

Just saw this - my iPhone app Notes n More app is now in the "Whats Hot" list in the Business apps category

Notes n More page on iTunes

Sunday, October 25, 2009

Objective C for a Java Programmer

Been intending to write this for some time now. Here is a short list of things to watch out for when starting with Objective C for iPhone. The list is targeted at Java programmers beginning Objective C. Its written on my work blog.

Read Post

Sunday, September 20, 2009

Extra Mouse click in GIMP on OS X

Found this tip while searching for something else about GIMP. The default setup for GIMP on OS X requires a user to click on any of the app windows (toolbox, image window, ..) twice to edit it. This setting eliminates that extra click.

http://www.macosxhints.com/article.php?story=20090817083346589

In summary -
X11 -> Preferences -> Windows -> 'Check' Click through inactive Windows


Many many thanks to the anonymous poster. This will eliminate a lot of wear and tear of my fingers.

Saturday, February 07, 2009

Programmatically Taking a Screenshot in iPhone

It took me some time to find the code for this. Thought I'd share it here. The following code takes a screen capture of the currently visible portions of a UITableView but its applicable to any view.

UIGraphicsBeginImageContext(self.tableView.bounds.size);
[self.tableView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
//UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
UIGraphicsEndImageContext();

The commented out line saves the photo to a the Photos application on the iPhone.

Saturday, March 22, 2008

Transparent bordered shell in SWT

I've wanted to get a transparent bordered shell in SWT ever since I saw the transparent bordered video shell in Leopard video quickview.

A shell with alpha support is coming in 3.4. However, I have not looked at the 3.4 material as yet and this sample was built on 3.3.

The shell can be used in the same way that the org.eclipse.swt.custom.PopupList class can be used except that you can place any controls you want and not just a List. Lets see how to do this -

In SWT, a Canvas control can have an alpha value. Thus, the base needs to be a canvas. First, create a control that extends the Canvas. Set the layout for this canvas to a FillLayout. This canvas will contain other controls. It is important to set the margin of the layout. This margin will be the width of your transparent border. Now, set an alpha value for the canvas. The alpha determines how transparent the border will be.

Image -
Now create or load a gradiented (is there such a word?) image. In the paintListener for the Canvas, draw this gradiented image. Because of the alpha on the canvas, the image will be semi-transparent. Now add any controls (typically a composite with controls within it) to the canvas and these will be drawn with a transparent border around them.

To get the real transparency, this canvas needs to be placed inside a shell created with the style SWT.NO_TRIM and SWT.ON_TOP. Also, the canvas needs to be created with the style SWT.NO_BACKGROUND. However, due to these styles, the shell cannot be really moved around. Thus, its useful where no movement is necessary - a transparent menu, infopopups, ...

Thus, to summarize,
1. A shell with styles SWT.NO_TRIM and SWT.ON_TOP contains
2. a canvas with style NO_BACKGROUND, a gradiented image, an alpha value, a margin (border width) contains
3. a control (composite) that is displayed within the canvas.

iPhone not connecting to macOS from Xcode

 After trying everything standard (re-pair, restart, reconnects), it turned out that VPN was enabled on my Mac.  Turn Off VPN to let Xcode f...