February 7, 2012 0

How to build ‘Universal’ Static Libraries for iOS

You can find so many blog-posts related to “how to build Universal static library iOS”, but most of them are quite weird…
Tutorial level: Medium (must be familiar with the creation of static libraries or frameworks using Xcode) 

 

1. One target.

Those blog-posts suggest to create two targets. One for the iphoneos platform, and one for the iphonesimulator platform. But it quickly becomes a nightmare because you have to build the iphoneos one, then the iphonesimulator one, and finally the aggregation one. NIGHTMARE.

While working on an open-source Grid-View component, I found out how to build and aggregate using only 1 target.

 

2. One library target, two build configurations.

That’s it, we got two basis build configurations which are Debug and Release… why not changing Debug to iphonesimulator and Release to iphoneos?

 

For the build configuration named “iphoneos“, use iphoneos as supported platform, and armv6, armv7 for valid architectures.

For the build configuration named “iphonesimulator“, use iphonesimulator as supported platform, and i386 for valid architectures

 

Do not forget to configure your Copy Headers phase properly.

 

 

3. One aggregate target, One universal library.

In your newly created ‘aggregate’ target (here called NRGridView Universal), add a Run Script phase and copy/paste the script below:

LIB_NAME=${PROJECT_NAME}
BUILD_DIR=build

# Create paths
INSTALL_DIR=${BUILD_DIR}/${LIB_NAME}
DEVICE_DIR=${BUILD_DIR}/iphoneos-iphoneos
SIMULATOR_DIR=${BUILD_DIR}/iphonesimulator-iphonesimulator


# Build our project using iphoneos and iphonesimulator build configurations
xcodebuild -configuration "iphoneos" -target "${LIB_NAME}" -sdk iphoneos
xcodebuild -configuration "iphonesimulator" -target "${LIB_NAME}" -sdk iphonesimulator

# Clean the old install directory.
if [ -d "${INSTALL_DIR}" ]
then
rm -rf "${INSTALL_DIR}"
fi

# Create the install directory
mkdir -p "${INSTALL_DIR}"

# Copy the iphoneos headers into the install directory
cp -R "${DEVICE_DIR}/usr" "${INSTALL_DIR}"

# Use lipo tool to create 1 universal library
lipo -create "${DEVICE_DIR}/lib${LIB_NAME}.a" "${SIMULATOR_DIR}/lib${LIB_NAME}.a" -output "${INSTALL_DIR}/lib${LIB_NAME}.a"

# Remove useless build directories
rm -rf "${DEVICE_DIR}" "${SIMULATOR_DIR}" "${INSTALL_DIR}.build"

									

 

4. Compile.

 Now build your aggregate target, and you’ll find the universal library + header at “location_of_your_xcode_project/build/your_library_name/”

 

5. Conclusion.

It’s now easier to build your own static library. And it also become easier to debug it:
Each time I build my “NRGridViewSampleApp”, the universal static library is re-built. Testing becomes easier :)

 

If you got any suggestions or any tricks, please feel free to comment.
Louka Desroziers. 
Catégories : iOS
June 9, 2011 13

Exciting announcement about Ecoute Mac OS/iOS

Dear users,

I decided to unveil some awesome features coming into Ecoute for Mac OS and iOS.
Let’s get started with Ecoute for iOS.

Ecoute for iOS

What is coming to your mind when you ear that Ecoute will be ported to iOS? Why?
Well, I always use my iPhone when I take my car (means: everyday), so I’m using the iPod app a lot. This app is nice, simple, but it’s missing some features, and the UI became boring whereas every cool iOS apps have their UI Identity.
Ecoute for iOS is going to change the way you listen to your music using your iOS device.
It has a nice User Interface, displaying your artists/albums/playlists on a wooden shelf. BUT WHY THE HELL DID YOU CHOOSE A WOODEN SHELF UI???
Two reasons: firstly, I like wood. Secondly, the shelf-like UI allows us to put artworks. When you quickly scroll through your list of albums, you don’t have to time to read albums’ names, but when you see images, you can recognize them quickly. Every time I need to use the iPod app while driving, I have to read titles… Now, I’m using Ecoute for iOS while driving, and I just need to do a quick look on my iPhone to select the artist or album I want to listen to.

I also wanted to add some cool social features into Ecoute for iOS (share using Twitter/Facebook and also last.fm), and some other features like play next, queue re-ordering, and so on.

 

Ecoute for Mac OS version 2.1

Ecoute for Mac OS is nice, but Lion is coming and Ecoute must change.
We are going to Lion-ish Ecoute for the next version, and we will add the support of fullscreen for Lion and also a queue re-ordering feature.
No major changes.. but it will change everything again anyway :)

 

Now, what could we do with Ecoute for both Mac OS and iOS?
iCloud is the answer.

Apple has introduced iCloud. It’s free, and powerful, but requires OS X Lion and/or iOS 5.
Ecoute
for Mac OS and iOS will sync their current playlist together using iCloud. What’s the goal? Well, let’s imagine you are at home, listening to some music using Ecoute for Mac OS. You have to leave your house, but you want to keep listening to your music.. damn, you’re loosing your time because you have to launch the iPod app from your iOS device, and select what you were listening to.. but even the playing queue may not be same as the one you had on your Mac.
Ecoute will then synchronize your playing queue, and once you’ll launch Ecoute for iOS, the playing queue will be restored on it. Magical.

 

Ecoute for OS X 2.1 should be released during this summer, and Ecoute for iOS should be released with iOS 5.

 

Stay tuned.
Louka Desroziers.

 


Catégories : Ecoute
June 7, 2011 0

Ecoute for iOS is delayed

Dear readers,

Today, Apple announced iOS 5. It has great new features and I’m already loving it.
I took a look into the newest API for all the music stuff, and find some things very useful that I may use for Ecoute iOS.
That’s why I decided to re-shedule the release of Ecoute for iOS.

But don’t worry, it’s because I want it to be perfect! What I can say is that it will be independent to the iPod player, and will add some awesome features like “play next” and “queue re-ordering” ;)

Stay tuned for this fall.
Louka Desroziers.

Catégories : Ecoute
April 30, 2011 7

[Ecoute iOS Player] Final thoughts

Dear users,

 

I played a lot with the iPod Player and AVPlayer APIs.

(Un)Fortunately, the best choice seems to be the AVPlayer one.

 

Here’s the updated list of Advantages / Disadvantages of each player.

 

AVPlayer

  • Advantages

  1. Ecoute’s icon replaces the iPod’s icon in the audio multitask bar
  2. Possibility to implement a ‘play next’ feature
  3. Possibility to implement a ‘shake to shuffle’ feature
  4. Possibility to manipulate the current playing queue
  5. If there’s any bug with the Player, I can fix it
  • Disadvantages

  1. The audio multitask bar does not display the current playing track name
  2. Tracks metadata such as played count and  last played date won’t be synced with the iPod app (and thus won’t be synchronized with iTunes)

 

iPod Player

  • Advantages

  1. The current playing track name is displayed in the audio multitask bar
  2. Tracks metadata (play count, last played date) are synced with the iPod, and thus with iTunes.
  3. What is currently playing in Ecoute also displays as playing in the iPod app
  • Disadvantages

  1. Ecoute’s icon won’t be displayed in the audio multitask bar (the iPod app icon will be used instead)
  2. The ‘play next’ feature won’t be implemented into Ecoute…
  3. … as well as the ‘shake to shuffle’ feature
  4. If there’s any bug with the iPod player API (and there’s already a lot of bugs with it..), I won’t be able to fix it and we’ll have to wait for an iOS update.

 

The vote results have been reset. You can vote again below, but I doubt that the iPod player will be used due to the lack of features and the quantity of bugs.

If you’d like to vote for the iPod Player, please drop a comment.

 

Which kind of player should be implemented into Ecoute?

View Results

Loading ... Loading ...
Catégories : Ecoute
April 23, 2011 4

[Ecoute iOS Player] It’s time to vote

Dear readers,

I’m currently facing a dilemma concerning Ecoute for iOS.

There’s two possible playing mode. I’ll try to list advantages and disadvantages of each.

 

AVPlayer

  • Advantages

  1. Ecoute’s icon replaces the iPod’s icon in the audio multitask bar
  2. Possibility to implement a ‘play next’ feature
  • Disadvantages

  1. The audio multitask bar does not display the current playing track name
  2. I have to re-write all the player stuff (The final user doesn’t care about that, but it means that the official release date may be re-scheduled later)
  3. Tracks metadata such as played count and  last played date won’t be synced with the iPod app (and thus won’t be synchronized with iTunes)

 

iPod Player

  • Advantages

  1. The current playing track name is displayed in the audio multitask bar
  2. Tracks metadata (play count, last played date) are synced with the iPod, and thus with iTunes.
  3. What is currently playing in Ecoute also displays as playing in the iPod app
  • Disadvantages

  1. Ecoute’s icon won’t be displayed in the audio multitask bar (the iPod app icon will be used instead)
  2. The ‘play next’ feature won’t be implemented into Ecoute

 

The ‘play next’ feature is: “oooh, I’m currently listening to a song which is really nice! I’d like to ear the ‘live’ version I also have into my library. Let’s play it after this one”.

In other words, the play next feature allows you to decide what should be played after the current song you are listening to. It can be an artist, or an album.. whatever you’d like to hear next is inserted into the current queue.

 

AVPlayer / iPod Player  Audio Multitask bar



It’s time for you to vote, and choose what you would prefer…

Which kind of player should be implemented into Ecoute?

View Results

Loading ... Loading ...

 


Sincerely yours,

Louka Desroziers.

PS: Feel free to post a comment in order to justify your vote. Would be very interesting for me.

Catégories : Ecoute | PixiApps
April 17, 2011 2

“Hide icon from Dock”

Dear users,

 

I plan to remove the “Hide icon from Dock” option.

There’s 3 reasons:

  • Apple never done that as an option in their apps’ preferences, and I want to follow their guidelines once for all.
  • This option is buggy with the Mac App Store (looks like this bug comes from Apple, and I doubt they will fix it)
  • I’m receiving too many mails about that. People who can’t activate it (MAS version), and people who lost Ecoute menus, and didn’t know there was a ‘menubar icon’ instead.

 

So, if you really like this feature, you’ll have to do it by hand once Ecoute 2.0.8 will be released.

Fortunately, there’s an app for that: DockDodger

Catégories : Ecoute | PixiApps
April 7, 2011 0

Ecoute drops Mac OS X Leopard support

Dear users,

 

I chose not to support Mac OS X Leopard anymore since Ecoute v2.0.7.
The main reason is that it’s kind difficult to support both Leopard and Snow Leopard (And the upcoming Lion) in just one app. There’s so many differences between Leopard and Snow Leopard behaviors, especially with drawing stuff.

I also plan to add many features in Ecoute 2.1 (especially a fullscreen mode for Lion), and that would be a nightmare to support both Leopard, Snow Leopard, and Lion.

 

Hope 10.5 users will understand my point of view. But do not worry, the latest version compatible with Leopard is still there : http://www.pixiapps.com/ecoute/Ecoute_2.0.6.zip

At the same time, I removed the ability to buy the app from Paypal. You can still download the trial version, and purchase it using Paypal after the 15 days-trial, but you won’t be able to do it directly from our website. The Mac App Store should progressively be our main selling point.

I brought back the ability to purchase a license from Paypal, independently to the Mac App Store. The ability to purchase a license from Paypal should be restored later today.

 

Edit: I just want to clarify the situation about Mac OS X Leopard support dropped. As some of you may already know, I’m not working on PixiApps’ projects everyday. I’ve got a full-time work (iOS Engineer ; not @ PixiApps), family, friends…

I’m doing my best for PixiApps: I sometimes work very late on our projects once I’m back home.

Sincerely yours,

Louka Desroziers

Catégories : Ecoute
March 18, 2011 1

Ecoute for Japan

Dear readers,

Due to the recent events in Japan,

Starting now, Friday 18th March 2011 14:00 GMT+1, Ecoute is available for only $5 through Paypal only.

This promo will end on Sunday 20th March 2011 20:00 GMT+1.

 

All the money will be sent to the International Red Cross in order to give some hope to Japanese families who have suffered from earthquakes and tsunami.

All my love goes to them, and I hope everything will be alright soon.

 

Sincerely yours,

Louka Desroziers – Developer

The promo is now over. $130 have been sent to the International Red Cross. Better than nothing at all!

Catégories : PixiApps
March 17, 2011 1

Ecoute for iOS

Dear readers,

As some of you may already know thanks to the Ecoute’s Twitter , we are currently working on Ecoute for iOS.
There’s no really interests in making Ecoute for the iDevices, but I thought it would be great to bring something new to the iPod app.

The current UI of the iPod app is quite basic, that’s why we will essentially focus on the User Interface for Ecoute on iOS.

We will also craft some sharing features (Twitter/Facebook).

We have already done the landscape part: some kind of CoverFlow.

Stay tuned!

Louka Desroziers – Developer

Catégories : PixiApps
March 17, 2011 2

Grand Opening

Hi everyone,

 

After many months, I finally decided to open a little blog in order to keep you updated about our upcoming releases.

I also plan to use that blog in order to give some advices in Objective-C/Cocoa programming, and some snippets.

 

Sincerely yours,

Louka Desroziers – Developer

Catégories : PixiApps