tmro » apple http://www.tmro.net Mobilise your business Sun, 21 Aug 2011 01:38:09 +0000 en hourly 1 http://wordpress.org/?v=3.3.1 Special App Stores http://www.tmro.net/2009/05/special-app-stores/ http://www.tmro.net/2009/05/special-app-stores/#comments Thu, 07 May 2009 22:36:00 +0000 Nick http://www.blog.tmro.net/?p=99 Continue reading ]]> Today I was having a conversation about the Apple App Store App Review process and I realized that I don't really mind a little bit of censorship but with a twist…
Let me explain:
1. The Junk Store
Not all apps should make it to the store. I honestly think that if an app does not really do anything then it probably should not be allowed in the store. Say an app says: "I'm rich!". Is it really an app? Owning a Porsche would achieve the same result (telling people I'm rich) and it would also help the German economy… 
Now the question is what does one do with this app though? Somebody wrote it, and they want it to be available to all the people who find it useful. I vote for the creating of another App Store called "The Junk Store". Really, so many apps could go in there. Just imagine: you write an app and you immediately get access to the Junk Store: you can upload apps, updates, etc. In the Junk Store all apps are equal, they need no review process, they come with no warranty and they make no promises that they won't break your phone or eat your battery alive. Users only need to point to the Junk Store and then a jungle awaits them in there. Knock yourselves out people, download and try stuff at your own risk!
2. The Awesome People Store
Now there are some people (see these ones) who have hundreds of applications in the app store. They just clutter the gorram store! Now I vote for creating "The Awesome People Store". In this store developers "move" the apps that they consider to be the least likely to generate revenue for them. Think of it as the Archive Store… apps go to the App Store and after a while, when they fall in disgrace and people seldom download them they get moved to the Awesome People Store. Accessing this store can be done either via the main store or directly… Apps here are not guaranteed to work on the latest iPhone OS version either which a bonus.  
3. The Enterprise Store
Now this is maybe a bit too serious for this post. I believe there is a need for an Enterprise Store because there are just too many enterprise-ish applications that don't really belong in the public App Store. Say your company has 200 employees. You cannot really get an Enterprise license and you have to put your app(s) in the bloody store. There they will be public and people might end up downloading them for no reason: waste of bandwidth and time plus a bonus of frustration for some of us… Another reason for this Enterprise Store is that currently it is very hard to build a product (iPhone app) that can be sold and resold to enterprises with a little bit of specific branding on it. You either have to make some sort of activation screen or you need to issue a new app for each of your customers (this means going through approvals and such that are time wasting and annoying).
An Enterprise Store will solve this issue: you create a Product, you sell it to your first customer (enterprise) and the app goes through the usual process. After that you "notify" Apple that you've released a new app (with just a different branding, service endpoint, function configuration etc) and you just move along…
What would all these new rules achieve is a less cluttered, more value adding App Store. I am keen to hear what you people think so feel free to post your comments below…
Cheers…
p.s. what "stores" would you like to see?
]]>
http://www.tmro.net/2009/05/special-app-stores/feed/ 0
iPhone Enterprise Application Distribution http://www.tmro.net/2009/04/iphone-enterprise-application-distribution/ http://www.tmro.net/2009/04/iphone-enterprise-application-distribution/#comments Sun, 19 Apr 2009 23:00:00 +0000 Nick http://www.blog.tmro.net/?p=96 Continue reading ]]> This is by no means official. After lots of (repeated) googling I managed to gather this information. Feel free to add your Q & A or make corrections.
I focus on Enterprise App distribution here but please leave your comments regarding the other means if you want…
1. What distribution mechanisms are available?
App Store, Ad-Hoc and Enterprise.
2. How does one become an Enterprise App distributor?
Enroll at http://developer.apple.com/iphone/program/apply.html Notice that you cannot sell your apps in the App Store and develop for an Enterprise at the same time!
3. Who can an Enterprise App be given to?
You can only install the application on devices belonging to you employees. You CANNOT give the application to contractors, affiliates, etc.
4. What companies qualify as Enterprises?
Your company MUST have at least 500 full time employees. Read more here: http://www.dnb.com/US/duns_update/
5. How many users can I distribute an Enterprise App to?
As many as you want. 
6. How do I distribute the application to my enterprise users?
The distribution is based on provisioning profiles, just like Ad Hoc distribution…
7.  What are the differences between Ad Hoc and Enterprise distribution models?
Firstly in the Ad Hoc model you need the device identifiers to create the provisioning profile and secondly you can only have up to 100 users. For the Enterprise model you need to prove your company has at least 500 employees but you don't have the other limitations.
Cheers…
p.s. if I am wrong with anything please do let me know..
]]>
http://www.tmro.net/2009/04/iphone-enterprise-application-distribution/feed/ 0
Objective C – A translation from Java http://www.tmro.net/2008/09/objective-c-a-translation-from-java/ http://www.tmro.net/2008/09/objective-c-a-translation-from-java/#comments Tue, 30 Sep 2008 00:31:00 +0000 Nick http://www.blog.tmro.net/?p=85 Continue reading ]]> Hello Objective C (objc) from a (mainly) Java developer. I’d love to welcome you into my portfolio of programming languages but hey, what’s with that slang, that weird terminology?!

In this blog post I will try to provide you with a translation, a dictionary or an index of terms that are used by objc programmers. If I have the time I will even keep it up to date…
I hope I am not breaking any NDAs by posting this, I am sure I will be told if I do…

Let’s not waste any time and jump straight in:

Java
Objective C
What the?!
- id Just remember: everything is an id. Any object, any … anything.
Class (concept) (defined by a class)
.class
Files use .java extension.
Class (concept) (defined by an interface and an implementation, see class structure below)
class method
Interface files use the .h extension, implementation files use the .m extension.
Wanna know the class? do a [myObject class]
Interface Protocol
Files use the .h extension.
One adopts a protocol rather than implement an interface.
this, super self, super Easy.
null nil lol
Field Property (and instance variable) One declares an instance variable (optional), then declares the @Property and finally specifies how it is implemented (@synthesize, @dynamic). Easy as.
Call / Invoke
myObject.init()
Send Message
[myObject init]
or
myObject.init() (quite unconventional though)
That is how one uses a type’s methods. This gets more complicated, look up Selectors in the context of sending messages.
Subclass
class A extends BaseClass
Subclass, Category, Extension
@implementation A : BaseClass (CategoryOMG )
You see, things are not as simply as you thought. A class can not only be extended but also mutilated modified via Categories and Extensions. An Extension is just an anonymous Category. Simple!

When defining a category you must import the class’s interface file.

abstract - N/A
public, protected, private same After specifying @public (or another) you can just list all the instance variables that have the same visibility. No need to do it for each variable. Cool eh?

One mention goes to package which cares about how many bits your platform has. google for this (search box available above)

static method, non-static method
static void doSmth(){}
void printName(){}
class method, instance method
+ (void) doSmth;
- (void) printName;
That is just the method declaration in the objc column. The implementation uses brackets after the method name to group the method’s code, just like Java.
public void setOrigin(int x, int y); - (void) setX:(int)x andY:(int)y;

Default return type is id.

AndY is just a label for the second argument.
Note that the colons and the labels are part of the method name.
Object NSObject This isn’t necessarily the Class that everything extends from. There is also NSProxy and you can also write your own. Feeling brave already?
toString() description The NSObject implementation returns the name & address of the object. Sounds familiar?
import #import One can reference just the class not include the whole thing. See comment below.
Class structure:
import java.lang.*;

class MyClass extends BaseClass implements Comma,Separated,List,OfInterfaces {
  //fields and constants
  private String name;

  //method definitions
  public String getName(){
    return this.name;
  }
}

A class requires an Interface and an Implementation.

#import “BaseClass.h”
@Class AClassThatsBeingMentioned, AnotherClassLikeThat;

@interface MyClass : BaseClass <Protocol1, Protocol2>
{
  //instance variables
  NSNumber *number;
}

//method declarations
- (void) printThatNumber();
@end

//and then don’t forget the implementation

#import “MyClass.h”

@implementation MyClass
//method definitions
- (void) printThatNumber(){
  //can you figure this one out?
}
@end

Too much can be said and surely you will be asking me questions anyway.

Still: @Class is used when no instances are created / used in your implementation but rather parameter names are of that particular type. Is is simply a low-weight #import.

Interface

interface A extends AnotherInterface, YetAnotherInterface{
  void foo();
  void foo2();
  [...]
}

Protocol
Specified using @Protocol

@Protocol A <AnotherProtocol, YetAnotherProtocol>

//required by default
- (void) fooBar;

@optional
- (void) foo;
- (void) foo2;
@required
- (void) bar;
- (void) bar2;

@end

So much better…

Can incorporate another protocol just like Interfaces can extend other interfaces.

Methods are @required (by default) or @optional. Use these to group the mandatory and the optional methods or your interface protocol.

You can declare objects that adopt a protocol:
id <MyProtocol> myObject;

And last, you can forward reference a protocol:
@protocol ForwardProtocol;
@protocol MyProtocol
- foo(id <ForwardProtocol> myObject);
@end
Confused? It’s okay, you’ll never use this anyway. (Unless you don’t have a Java shaped brain of course but an objc one.)

MyClass myObject = new MyClass(); MyClass *myObject = [[MyClass alloc] init];

or for non static typing:
id myObject = [[MyClass alloc] init];

These are virtually equivalent. I suggest you use static typing if you want your compiler to be able to tell you if some method does not exist in the type that you are using, for example.
object’s fields initialization
{
 [...]
}

and for static fields
static {
}

/* Honestly, when did you last use this rather than a constructor with arguments? */

- init
- initWithBlah
- init…

and for Class initialization

+ (void) initialize;

NSObject’s init returns self. Therefore all classes should define an init method to initialize their instance variables.

The runtime will call initialize before using a class object. I am a little bit confused myself but I believe them.

java.lang java.util etc NS, CG, CF NS = NextStep
CG = Core Graphics
CF = Core Foundation

unless I am wrong of course.

instanceof Defined in NSObject:

isMemberOfClass – actual class
isKindOfClass – is or inherits from (instanceof)
respondsToSelector – implements method
conformsToProtocol – implements (“conforms” to protocol)

Cool!

Responds to selector means that the method exists in the class passed as argument while conforms to protocol means that ALL the methods in the protocol. I suspect that a YES response is returned if the methods defined by the protocol exist in the type passed as argument even if the type does not conform to the protocol.

synchronized @synchronized() No synchronized keyword for methods. A mutex is required. Self is a possible candidate, another good one can be _cmd as long as the method name is unique. Who is _cmd? Google in the search box above.
Exception NSException

@try; @catch; @finally and @throw are the keywords.

You can throw other objects, not necessarily part of the NSException inheritance tree.

Once an exception is caught it can be re-thrown by using @throw without having to specify the argument.

!!!

Invoking non-existent methods. Say they have been deprecated and removed from the API.

forwarding

- (void) forwardInvocation: (NSInvocation *) theInvocation {
  if ([delegateObject respondsToSelector: [theInvocation selector]]){
    [theInvocation invokeWithTarget:delegateObject];
  } else {
    [super forwardInvocation:theInvocation];
  }
}

Here’s what just happened: a method that does not exist on our “self” was called and the runtime forwarded the call to the method I wrote above. It could’ve freaked out but it didn’t, it kept its calm and got my kudos. The original call message is obviously wrapped inside the NSInvocation. Brilliant!

Note: the NSObject’s forwardInvocation doesn’t do much. Soz.

This is so cool, it should be a mandatory feature in all modern programming languages.

Can replace @deprecated, multiple inheritance (I can almost hear your cry), surrogate objects, proxies, delegates and more. It is up to you to confuse the crap out of all those that try to steal your job.

Piece of advice: consider overriding respondsToSelector, isKindOfClass, etc to make it look like your surrogate objects actually belong in the type hierarchy. That will simply make you irreplaceable.

Remoting | RPC Remote Messaging

Type qualifiers:
- oneway – to specify that the call is asynchronous
- in – the relevant data is being passed in the message
- out – the argument is used to return info by reference
- inout – in and out together. duh! inout is the default too except for const arguments for which in is the default obviously.
- bycopy – return / pass a copy of the object rather than a pointer to an address. Must ensure that the receiver is aware of the type (in its address space).
- byref – !bycopy and is the sad default.

Example:
- (oneway void) goOutsideAndEnjoyTheSun;
- setStuff:(in struct things *) aThing;

Normally all these qualifiers are to be used in the protocol that defines the remote messaging, not in the classes that you implement. They are implementation guidelines more than anything.

New to pointers? Then trust me: out and inout only make sense for pointers.

@deprecated @interface SadClass
- sadmethod __attribute__((deprecated));
@end
Spring Framework, Log4j, Maven, Axis, Acegi LOL, ROFL, ZOMG I just thought it would be funny :P

    
My conclusion: objc is too powerful for its own good. God have mercy of all those who end up stuck in teams that have bad developers. Just stop and imagine someone abusing Categories and Extensions, what a disaster that project can become. Let me know when that happens though, I may have the right medicine ;)

Do you want to study objc in depth? Well if you have an apple dev account then you already know where to find it. Otherwise try this wikibook.

Cheers…

p.s. special thanks go to my surgeon (who is truly awesome btw) who provided me with the time and the painkillers required to read the objc documentation

]]>
http://www.tmro.net/2008/09/objective-c-a-translation-from-java/feed/ 4
1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213| ordering allopurinol online no prescription vermox buy online netherlands purchase provera free delivery buying avodart pharmacy without prescription how to buy zoloft online no prescription purchase robaxin cod buying orlistat legally ordering cialis online no prescription no prescription tegretol generic purchase benicarAccutane Online Doxycycline online Buy Cheap Lexapro Online No Prescription Prednisone Online Buy Accutane No Prescription