xcode - Using run script to compare values from info.plist -
Text after "
Let me assume two values in my Info.plist file that string1, string 2
I want to do Is a run script which compares two values and calls a build error if the values are not the same.
I'm facing some syntax problems for the new script, here's what I've done so far
set $ string to $ 1 Set $ string to $ (/ usr / libexec / PlistBuddy -c "print string1" "$ {PROJECT_DIR} / $ {INFOPLIST_FILE}") $ (/ usr / libexec / PlistBuddy -c "print string2" "$ {PROJECT_DIR} } / $ {INFOPLIST_FILE} ") echo string1 Echo string2 if string 1 = string 2 then resonates" no errors "and" create error in xcode build error "echo Fie appreciate. Thanks
Error if you are facing incorrect syntax because else loop and variable value setting command execution string1 = $ to variable to # basic value settings (/ usr / libexec / plistbuddy -c "print string1" "$ {PROJECT_DIR} / $ {INFOPLIST_FILE}") string2 = $ (/ Usr / libexec / PlistBuddy -c "print string2" "$ {PROJECT_DIR} / $ {INFOPLIST_FILE}") #Below is basic if the string compares, [with shell in script writing and loop "$ string1" = "$ String2"] So "echo" echo echo Land and resonating the "equal". Hope this will be helpful.
Comments
Post a Comment