J'ai un cas où [[NSBundle mainBundle] infoDictionary]
ne contient que ceci:Cocoa/ObjC: obtenir CFBundleIdentifier du processus actuel
17.09.11 18:28:26,936 [0x0-0x5a98a93].com.valvesoftware.steam: 2011-09-17 18:28:26.935 steam[85587:707] infodict: {
17.09.11 18:28:26,936 [0x0-0x5a98a93].com.valvesoftware.steam: CFBundleExecutablePath = "/Applications/Spiele/Steam.app/Contents/MacOS/osx32/steam";
17.09.11 18:28:26,936 [0x0-0x5a98a93].com.valvesoftware.steam: NSBundleInitialPath = "/Applications/Spiele/Steam.app/Contents/MacOS/osx32";
17.09.11 18:28:26,936 [0x0-0x5a98a93].com.valvesoftware.steam: NSBundleResolvedPath = "/Applications/Spiele/Steam.app/Contents/MacOS/osx32";
17.09.11 18:28:26,936 [0x0-0x5a98a93].com.valvesoftware.steam: }
Mais je veux obtenir le CFBundleIdentifier.
Existe-t-il un autre moyen (plus général) d'obtenir l'identificateur CFBundleIdentifier du processus en cours?
Vous êtes toujours bien mieux que moi :) – Yuji
Est-ce que '[[NSBundle mainBundle] bundleIdentifier]' fonctionne? Ce serait la solution la plus simple ... – MrMage
@MrMage: Non, cela retourne 'nil'. – Albert