According to new updated section of Apple agreement version 3.3.1

3.3.1 – Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

This means that Apple probably will refuse all apps developed using the new Flash CS5 and MonoTouch, forcing users to use theirs tools.

A suggestion to all the Flash developers that are waiting to use Flash CS5 to develop their applications for iPhone: WAIT, DON’T START HUGE PROJECTS AND GAMES UNTIL THE SITUATION WILL BE CLEARED, OTHERWISE YOU WILL RISK TO WASTE YOUR TIME.

UPDATE: i was right, no future for now for Flash -> iPhone developing, sorry folks.

Client: website http://sms.kdev.it/

Code: by me

Graphics: by me

Description: this Application allows to send SMS to italian mobile numbers paying a small feee (about 20-30% cheaper than other carries fees);

Time: about 2 full days of development;

iTunes Price: free

iTunes Link: download (http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=360990893&mt=8)


Problem:

your class has to support the  UITableView delegate and/or datasource and is a simple UITableViewController os NSobject subclass.

Description:

While developing on the iPhone, using XCode,  I found really annoying to recreate all the uitableview delegate and datasource methods if the class was before an NSObject or a UIViewController without any table, for now the only way was to do a copy and paste from another class or to create a new one class that is a subclass of UITableViewController.

The Solution:

  1. XCode: goto Scripts menu->Edit User Scripts
  2. Create a new Script
  3. Insert the following Code:
    #! /usr/bin/perl -w
    
    # Insert UITableView default methods (delegate and datasource) into a class.
    # insertTableViewMethod.pl - inserts delegate and datasource methods into a class.
    
    use strict;
    print "
    #pragma mark Table view methods
    
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
    }
    
    // Customize the number of rows in the table view.
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 0;
    }
    
    // Customize the appearance of table view cells.
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @\"Cell\";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }
    // Set up the cell...
    return cell;
    }
    
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // Navigation logic may go here. Create and push another view controller.
    // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@\"AnotherView\" bundle:nil];
    // [self.navigationController pushViewController:anotherViewController];
    // [anotherViewController release];
    }
    
    /*
    // Override to support conditional editing of the table view.
    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
    }
    */
    
    /*
    // Override to support editing the table view.
    - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
    // Delete the row from the data source
    [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
    }
    else if (editingStyle == UITableViewCellEditingStyleInsert) {
    // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }
    }
    */
    
    /*
    // Override to support rearranging the table view.
    - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
    }
    */
    
    /*
    // Override to support conditional rearranging of the table view.
    - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
    }
    */
    ";
    
    exit 0;
    
  4. Have -quick-fun!



In questo numero ben tre articoli:

1) intervista Bjarne Stroustrup: di mia iniziativa (e di nessun altro, come forse si potrebbe evincere da alcune frasi inserite non dal sottoscritto) ho contattato Bjarne Stroustrup e gli ho richiesto un’intervista via email, è stsato molto cortese e me l’ha concessa.

2) iPhone: questa vosta si parla dell’accelerometro

3) Go- il linguaggio di programmazione nato in casa Google: vorrei precisare che non consiglio a nessuno di utilizzare questo linguaggio poichè è troppo sperimentale, ma per divertirsi qualche ora merita
.

In questo articolo ho trattato di NSTimer, NSDate e di come eseguire semplici suoni.

E’ inoltre presente un articolo su Mono, framework che consente di eseguire .Net su piattaforme non microsoft.

Inside the -(BOOL)canPerformAction:(SEL)action withSender:(id)sender method

when holding the mouse pointer in the simulator on a word of a webpage loaded on a uiwebview this method is called properly, but the copy: selector isn’t analyzed and not even called (but the text is normaly copied) , I’ve opened a ticket o Apple Bug Report.

This bug don’t allow to fully disable the contextual menu on uiwebview, and the only solution is to disable all using javascript on the  loaded page.

These weeks Windows 7 finds a new update(s) quite every week and asks to reboot, nice feature, this means a much secure os, but the continue reboots is becoming really annoying, i keep my pc turned on to avoid shutdown/reboot times and now it’s useless…

I discovered that ntfs-3g (current version) , an application that allows to write on ntfs partitions is really buggy, it corrupted some external ntfs usb drives i own, and in windows they became unreadable (it asks to format them!).

The only solution to fix this issue was to remove these drivers, and use paragon ntfs. I managed also to repair those drives using the disk utility application after uninstalling ntfs-3g, because before its features didn’t work.

I’m not very happy about this project, I believe it will bring much confusion and problems than else.

  • Performances: the pre-alpha version creates executable of about 7MB for applications of about 3 sheets, i develop them, same functionalities, on about 700KB. Actionscript uses a virtual machine with garbage collector, iPhone OS doesn’t, so who knows if the Actionscript->Source  Code conversion is the best available, and developers will be allowed to fix it?
  • API sync: how long it will take to Adobe to release the update to be in sync with the official iPhone SDK? Weeks, months? And will be bug-proof? i don’t think so.
  • Bugs: Apple fixes bugs not so quickly, how long it will take for Adobe to fix theirs?
  • Project killed: if Adobe will drop this feature what will happen to the projects developed in Actionscript? You will have to learn Objective-C and redo the project from scratch.
  • Debug: if the conversion made by Adobe will create leaks or crash how the developer will be able to fix them if it create the final package without any Objective-C source? Debugger? how will  work?
  • Compiler: Adobe uses only LLVM, in XCode you can choose between GCC and LLVM.
  • Fast-food programmers: the power of Objective-C is his nature of being so close to C allowing to develop using object-oriented programming; a well trained developer can use C to speed his applications/game: an Actionscript developer will never be allowed to go so deeply (at least for now).
  • Black Box: all the conversions will be hidden to the developer: he has to trush in the Adobe engineers.
  • Multithread: AVM2 doesn’t support to develop multithreaded applications, while Objective-C/C and the iPhone OS yes: did they allow to use this feature or not?

When the first beta will be release we will see hundred of applications and games on the Apple Store developed with this version: bugs, crashes, slow applications, and what else?

Design Patterns teach to decrease to the lower level the coupling, in this way the developer is coupled to Adobe decisions and timing: this is really the

I will test it but without any real interest, I want to have full control on my application/game and to know how in the core my software works: I’m able to dectect and fix bugs in minutes cause i only need to know the language. i’ll never t be forced to wait for Adobe to fix conversions bug hoping that they will be fixed in the “who knows when” fix-release.

Finally a simple way to enable heavy calculation operations in Adobe AIR, using the new Native process API users will be allowed to call and communicate with native applications, so passing an complex structure and letting the CPUs to do the job using C++/C/Java/.NET will be soon allowed.

I faced this problem analyzing huge excel logs using an Excel Actionscript library, the whole interface got  frozen until the end of processing.

I’ll try as soon as possible how the application will work using this new approach.

Athers new really cool additions (copy and paste from Adobe website):

  • Server sockets support: You can listen for incoming socket connections. Using the server socket API, it is now possible to build lightweight servers that run locally, and to communicate across applications using TCP sockets.
  • UDP sockets: You can send and receive messages using the User Datagram Protocol (UDP). For real-time, time-sensitive applications, including multiplayer games, you may find that UDP support in AIR will help provide a better user experience.
  • TLS/SSL sockets:You can now connect to a server that requires TLSv1 or SSLv3 for socket communications. For developers, this means that you have new cryptographic protocols available for accessing sensitive data over network that can help you build more secure applications.
  • More efficient CPU usage: On the Mac, without code change, many applications are consuming 50% less CPU usage when running in the background.
  • Reduced memory usage: Without rebuilding the application, many AIR applications such as TweetDeck are seeing reductions of memory between 15–20%.
  • Smaller runtime installer sizes: The runtime installer sizes for Mac OS and Windows are smaller than AIR 1.5.