1

Apple has restricted API to fetch signal strength but there is a way to get this i found here.Is it a correct way to get signal strength. I am developing for iTunes store submission. Will apple reject my app? Solution provided by @Mateusz Mirkowski as follow :

UIApplication *app = [UIApplication sharedApplication];
NSArray *subviews = [[[app valueForKey:@"statusBar"]     valueForKey:@"foregroundView"] subviews];
NSString *dataNetworkItemView = nil;


     for (id subview in subviews) {
   if([subview isKindOfClass:[NSClassFromString(@"UIStatusBarSignalStrengthItemView") class]])
   {
        dataNetworkItemView = subview;
        break;
    }
 }
int signalStrength = [[dataNetworkItemView valueForKey:@"signalStrengthRaw"] intValue];

NSLog(@"signal %d", signalStrength);
Community
  • 1
  • 1
K_Mohit
  • 528
  • 3
  • 17

1 Answers1

1

If you are using anything that Apple does not allow, it will certainly leads to the App rejection.

Rohit Kumar
  • 877
  • 6
  • 20