development – Geek 2.0 https://www.stormacq.com Some not-so random thoughts about this small IT World Mon, 04 Aug 2014 19:04:05 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.1 Using Apple’s XCode for open application development https://www.stormacq.com/using-apples-xcode-for-open-application-development/ https://www.stormacq.com/using-apples-xcode-for-open-application-development/#respond Fri, 25 May 2012 17:38:31 +0000 https://www.stormacq.com/?p=468 When developing iOS application for jailbroken devices, you have to take care of many dirty details of application deployments on iOS.  In particular, you have to take care of creating and registering your own development certificate, as detailed below.

This is where IOSOpenDev comes into the game, this packages a set of XCode plugins that automates most of this process.  More than that : it also provides templates (aka empty project) to build your own Widgets, command line applications, SBSettings etc …

IOSOpenDev is a must use if you are serious about jailbroken app development on iOS.

But just for the sake of archiving – or if you want to do it manually, here is the process to code sign an application without using Apple’s provided certificate.

1/ generate self signed certificate using the Certificate Assistant in KeyChain Access application

2/ tell Xcode to use that identity

 

3/ change XCode signature method (and restart XCode)

marsu:Contents sst$ sudo cp Developer/Platforms/iPhoneOS.platform/Info.plist Developer/Platforms/iPhoneOS.platform/Info.plist.orig
Password:
marsu:Contents sst$ sudo /usr/bin/sed -i .bak 's/XCiPhoneOSCodeSignContext/XCCodeSignContext/' Developer/Platforms/iPhoneOS.platform/Info.plist
marsu:Contents sst$ ls Developer/Platforms/iPhoneOS.platform/Info.plist*
Developer/Platforms/iPhoneOS.platform/Info.plist      Developer/Platforms/iPhoneOS.platform/Info.plist.orig
Developer/Platforms/iPhoneOS.platform/Info.plist.bak

 

4/ create, compile and deploy your application
scp -r MyApp.app root@ip_address:/Applications

 

5/ restart SpringBoard (Respring) or reboot

 

Enjoy !
]]>
https://www.stormacq.com/using-apples-xcode-for-open-application-development/feed/ 0
Evaluating Coherence on Mac OS X https://www.stormacq.com/evaluating-coherence-on-mac-os-x/ https://www.stormacq.com/evaluating-coherence-on-mac-os-x/#respond Fri, 10 Dec 2010 12:42:20 +0000 https://www.stormacq.com/?p=411 Coherence is a in-memory distributed cache system, usually sitting in between your application servers and your databases.
Coherence is designed to be extremely scalable and has no single point of failure.
It was originally developed by TangoSol and acquired by Oracle in March 2007.

Although usually used by large scale Internet web site and transactional system, Coherence happens to be very lightweight and easy to use for evaluation / development.

Coherence is fully developed in Java and runs on any Java-enabled platform, including Solaris, Linux, Windows and Mac OS X.  Coherence provides clients libraries for Java, .Net and C++ applications.

In this serie of articles, I will show how to test and evaluate Coherence on a Mac OS X system.

1. Get the package

You can freely download Coherence from Oracle Technology Network (free membership required)

2. Unzip the package

marsu:~ sst$ unzip coherence-java-3.6.0.0b17229.zip

3. Inspect the package and be sure the scripts are executable

marsu:~ sst$ ls coherence
bin		doc		lib		product.xml

Without surprises :

  • bin – will contains the executable
  • doc – contains the javadoc
  • lib – contains the JAR to be included with your application
marsu:~ sst$ chmod u+x bin/*.sh

4. Start a first cluster node

marsu:coherence sst$ ./bin/cache-server.sh

Many lines will be output on the console.  Be sure to read

Group{Address=224.3.6.0, Port=36000, TTL=4}
MasterMemberSet
(
ThisMember=Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)
OldestMember=Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)
ActualMemberSet=MemberSet(Size=1, BitSetCount=2
Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)
)
RecycleMillis=1200000
RecycleSet=MemberSet(Size=0, BitSetCount=0
)
)
Group{Address=224.3.6.0, Port=36000, TTL=4}
MasterMemberSet  (  ThisMember=Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)  OldestMember=Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)  ActualMemberSet=MemberSet(Size=1, BitSetCount=2    Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)    )  RecycleMillis=1200000  RecycleSet=MemberSet(Size=0, BitSetCount=0    )  )

And … that’s it.  The first cluster node is started.

5. Start a second cluster node

In another terminal, type  :

marsu:~ sst$ cd coherence
marsu:coherence sst$ ./bin/cache-server.sh

In the output, be sure to read

MasterMemberSet
  (
  ThisMember=Member(Id=2, Timestamp=2010-12-10 13:05:16.693, Address=192.168.0.2:8090, MachineId=26626, Location=machine:marsu,process:42023, Role=CoherenceServer)
  OldestMember=Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)
	ActualMemberSet=MemberSet(Size=2, BitSetCount=2
	Member(Id=1, Timestamp=2010-12-10 13:02:01.121, Address=192.168.0.2:8088, MachineId=26626, Location=machine:marsu,process:42007, Role=CoherenceServer)
	Member(Id=2, Timestamp=2010-12-10 13:05:16.693, Address=192.168.0.2:8090, MachineId=26626, Location=machine:marsu,process:42023, Role=CoherenceServer)
   )
RecycleMillis=1200000
RecycleSet=MemberSet(Size=0, BitSetCount=0
)
)

6. Troubleshooting startup issues

By default, Coherence uses multicast to communicate between servers.  In some rare cases, Multicast might fail, preventing the second node to join the cluster.

Be sure to check the documentation and these troubleshooting notes if you run into a problem.

7. Using the cache interractively

Coherence has a command line interface to manipulate objects in the cache,

marsu:coherence sst$ ./bin/coherence.sh ** Starting storage enabled console **
(many lines suppressed)
2010-12-10 13:26:02.066/1.264 Oracle Coherence GE 3.6.0.0 <D5> (thread=Invocation:Management, member=3): Service Management joined the cluster with senior service member 1
Map (?):

Let’s first create a cache :

Map (?): cache currencies
2010-12-10 13:31:30.019/329.217 Oracle Coherence GE 3.6.0.0 <Info> (thread=main, member=3): Loaded cache configuration from "jar:file:/Users/sst/coherence/lib/coherence.jar!/coherence-cache-config.xml"
2010-12-10 13:31:30.151/329.350 Oracle Coherence GE 3.6.0.0 <D5> (thread=DistributedCache, member=3): Service DistributedCache joined the cluster with senior service member 1
<distributed-scheme>
<scheme-name>example-distributed</scheme-name>
<service-name>DistributedCache</service-name>
<backing-map-scheme>
<local-scheme>
<scheme-ref>example-binary-backing-map</scheme-ref>
</local-scheme>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
Map (currencies):
Map (?): cache currencies2010-12-10 13:31:30.019/329.217 Oracle Coherence GE 3.6.0.0 <Info> (thread=main, member=3): Loaded cache configuration from "jar:file:/Users/sst/coherence/lib/coherence.jar!/coherence-cache-config.xml"2010-12-10 13:31:30.151/329.350 Oracle Coherence GE 3.6.0.0 <D5> (thread=DistributedCache, member=3): Service DistributedCache joined the cluster with senior service member 1<distributed-scheme>  <scheme-name>example-distributed</scheme-name>  <service-name>DistributedCache</service-name>  <backing-map-scheme>    <local-scheme>      <scheme-ref>example-binary-backing-map</scheme-ref>    </local-scheme>  </backing-map-scheme>  <autostart>true</autostart></distributed-scheme>
Map (currencies):

Populate the cache :

Map (currencies): put USD "US Dollar"
null

Map (currencies): put EUR "Euro"
null

Map (currencies): put CHF "Swiss Franc"
null

Map (currencies): put GPB "British Pound"
null

Play with the cache :

Map (currencies): size
4

Map (currencies): get CHF
Swiss Franc

Map (currencies): remove CHF
Swiss Franc

Map (currencies): size
3

Map (currencies): list
GPB = British Pound
USD = US Dollar
EUR = Euro

8. Next Step

In the next article, I will show you how to programmatically interact with Coherence from a Java application.

]]>
https://www.stormacq.com/evaluating-coherence-on-mac-os-x/feed/ 0
iPhone applications development https://www.stormacq.com/iphone-applications-development/ https://www.stormacq.com/iphone-applications-development/#respond Thu, 10 Jun 2010 10:20:41 +0000 https://www.stormacq.com/?p=286 Since a couple of months, I am exploring the world of iPhone applications development.  After spending some time to discover the development framework and tools, I am quite impressed by the productivity we can reach.  Cocoa is an extremely powerful framework.

Of course, I was not starting from scratch, I already I some experience with Cocoa through Mac OS X applications development (see here and here for examples)

As of today I published two applications on the App Store.

The first one is very basic and was my learning test bed.  Tip Calculator allows you to quickly add tip and split your restaurant bills.  It gives you geo localized information about local tipping habits.

As I truly believe in knowledge and information sharing, the source code is available on Kenai.com

You can download and install it for free from the App Store.

The second application I developed is a web radio player.  It allows to listen to Maxi80.com, an french based, eighties web radio.

Amongst other features, it allows to view the name of the current song as well as its cover.  It displays the name of the current show and on-air DJ’s.  It allows to send emails to the web radio stations or the DJ.

Source code is also available on kenai.com.

You can download and install it from the App Store.

I do not intent to modify the Tip Calculator anymore, however a couple of points are on my todo list regarding the Maxi80 application, namely :

  • Integrate the newly announced iAd service to get some revenue for the web radio
  • Port the application to the Android platform, more about this later.
]]>
https://www.stormacq.com/iphone-applications-development/feed/ 0