Hi,
ich benutze folgendes kleines Script als BuildPhase um bei jedem Build den Wert im CFBundleVersion der info.plist um einen hochzuzählen. Das hat immer super funktioniert aber seit dem Update auf code4.6 heute macht er aus dem CFBundleVersion Type immer eine NSNumber wenn er reinschreibt. Es muss aber ein NSString sein, denn sonst bekomme ich nicht nur ein blödes Warning, ich kann es auch nicht in den Store hochladen.
Hat jemand eine Idee warum aus dem pist Eintrag ein NSNumber wird obwohl im Script doch eigentlich ein "as string" steht?
Alles anzeigen
Oder liegt es sogar am Mavericks das ich heute auch neu installiert habe?
Gruß
Claus
ich benutze folgendes kleines Script als BuildPhase um bei jedem Build den Wert im CFBundleVersion der info.plist um einen hochzuzählen. Das hat immer super funktioniert aber seit dem Update auf code4.6 heute macht er aus dem CFBundleVersion Type immer eine NSNumber wenn er reinschreibt. Es muss aber ein NSString sein, denn sonst bekomme ich nicht nur ein blödes Warning, ich kann es auch nicht in den Store hochladen.
Hat jemand eine Idee warum aus dem pist Eintrag ein NSNumber wird obwohl im Script doch eigentlich ein "as string" steht?
Quellcode
- -- we need the location to self
- tell application "Finder"
- set myLocation to container of (path to me)
- set infoFiles to every file of myLocation whose name ends with "-Info.plist"
- if ((count of infoFiles) is not 1) then
- return someError
- end if
- end tell
- -- we append the file name
- set propertyListLocation to (first item of infoFiles) as text
- tell application "System Events"
- -- read info.plist
- set datei to property list file propertyListLocation
- -- fetch the build number item
- set buildNumber to every property list item of datei whose name is "CFBundleVersion"
- -- check exists
- if ((count of buildNumber) is 1) then
- -- get it
- set buildItem to item 1 of buildNumber
- -- increment the number and write it back
- set value of buildItem to ((((value of buildItem) as integer) + 1) as string)
- return true
- end if
- return someError
- end tell
Oder liegt es sogar am Mavericks das ich heute auch neu installiert habe?
Gruß
Claus
2 Stunden Try & Error erspart 10 Minuten Handbuchlesen.
Pre-Kaffee-Posts sind mit Vorsicht zu geniessen
Pre-Kaffee-Posts sind mit Vorsicht zu geniessen