0
static NSString *carrierPListSymLinkPath = @"/var/mobile/Library/Preferences/com.apple.carrier.plist";

static NSString *operatorPListSymLinkPath = @"/var/mobile/Library/Preferences/com.apple.operator.plist";

- (BOOL)isRoaming
{

    NSFileManager *fm = [NSFileManager defaultManager];

    NSError *error;

    NSString *carrierPListPath = [fm destinationOfSymbolicLinkAtPath:carrierPListSymLinkPath error:&error];
    NSString *operatorPListPath = [fm destinationOfSymbolicLinkAtPath:operatorPListSymLinkPath error:&error];
    return ([operatorPListPath isEqualToString:carrierPListPath]);

}

Here I am trying to read carrier.plist and operator.plist. It working fine.

Now my question is Apple will accept this code or not for app store release, I don't know.

Can anyone help me?

Thanks.

Mats
  • 8,528
  • 1
  • 29
  • 35
Babuli
  • 157
  • 1
  • 8
  • Is your device jailbroken? And what is the Use Case for knowing the roaming status? because Apple takes user privacy seriously. – Black Frog Dec 19 '14 at 15:43
  • Also, your should read the answers and comments to this question: [Retreiving Carrier Name from iPhone Programmatically](http://stackoverflow.com/questions/853467/retreiving-carrier-name-from-iphone-programmatically) – Black Frog Dec 19 '14 at 15:48
  • This question appears to be off-topic because it asking if my app with get rejected by Apple App Store. – Black Frog Dec 19 '14 at 15:50
  • No my device is not jailbroken.If I will know the roaming status I will decide whether to download from server or not in order to avoid high cost in roaming. – Babuli Dec 22 '14 at 06:10
  • Apple will not reject it...I have several Apps with this code inside in Apple store... – davidOhara Jun 09 '15 at 15:12

0 Answers0