Okay I am completely noob on C++ or Objective C++.
Here is my question.
There is .plist file that has a key say XYZ and the value can be on or off.
Now I have this method ...BOOL isEnabled().
I want to check the value for that in that plist and return BOOL based on on or off.
How do I do that?
NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist"];
BOOL Location = [[plistDict objectForKey:@"airplaneMode"] boolValue];
return Location;
This code is for Location Toggle for iPhone/SBSettings. Here for Location toggle the values are stored as 1 and 0 but for Airplane mode for which I modifying this code the values are on/off.
How do I convert on /off to BOOL?
Thank you