How to get the battery temperature details in iOS? - ios

I am getting battery status and others .
UIDevice *myDevice = [UIDevice currentDevice];
[myDevice setBatteryMonitoringEnabled:YES];
float batLeft = [myDevice batteryLevel];
int i=[myDevice batteryState];
int batinfo=(batLeft*100);
NSLog(#"Battry Level is :%d and Battery Status is :%d",batinfo,i);
switch (i)
{
case UIDeviceBatteryStateUnplugged:
{
break;
}
case UIDeviceBatteryStateCharging:
{
break;
}
case UIDeviceBatteryStateFull:
{
break;
}
default:
{
break;
}
}
Now i am trying to get the temperature details is it possible to get the battery temperature from device .

That is not possible and there is no public API to find . but I found the some answers in here May be it helps you , see once. But some private API you can get this details.
sample app you cannot use this if you deploy your app on the Apple Store, but it can be useful when deploying to TestFlight

Brother I gone through the answer for your question and which indicates that you can get and generally it shows the following states
Battery design capacity
Battery current raw capacity (in mAh)
Battery cycle count
Current battery temperature
Current battery voltage
Current battery discharge rate (device power consumption), in mA
Also following shows the results of battery
{
AdapterDetails = {
Amperage = 1000;
Description = "usb host";
FamilyCode = "-536854528";
PMUConfiguration = 1000;
Watts = 5;
};
AdapterInfo = 16384;
Amperage = 1000;
AppleRawCurrentCapacity = 1279;
AppleRawMaxCapacity = 1275;
AtCriticalLevel = 0;
AtWarnLevel = 0;
BatteryData = {
BatterySerialNumber = REDACTED;
ChemID = 355;
CycleCount = 524;
DesignCapacity = 1420;
Flags = 640;
FullAvailableCapacity = 1325;
ManufactureDate = REDACTED;
MaxCapacity = 1273;
MfgData = REDACTED;
QmaxCell0 = 1350;
StateOfCharge = 100;
Voltage = 4194;
};
BatteryInstalled = 1;
BatteryKey = "0003-default";
BootBBCapacity = 52;
BootCapacityEstimate = 2;
BootVoltage = 3518;
CFBundleIdentifier = "com.apple.driver.AppleD1815PMU";
ChargerConfiguration = 990;
CurrentCapacity = 1275;
CycleCount = 524;
DesignCapacity = 1420;
ExternalChargeCapable = 1;
ExternalConnected = 1;
FullyCharged = 1;
IOClass = AppleD1815PMUPowerSource;
IOFunctionParent64000000 = <>;
IOGeneralInterest = "IOCommand is not serializable";
IOInterruptControllers = (
IOInterruptController34000000,
IOInterruptController34000000,
IOInterruptController34000000,
IOInterruptController34000000
);
IOInterruptSpecifiers = (
<03000000>,
<26000000>,
<04000000>,
<24000000>
);
IOMatchCategory = AppleD1815PMUPowerSource;
IOPowerManagement = {
CurrentPowerState = 2;
DevicePowerState = 2;
MaxPowerState = 2;
};
IOProbeScore = 0;
IOProviderClass = AppleD1815PMU;
InstantAmperage = 0;
IsCharging = 0;
Location = 0;
Manufacturer = A;
MaxCapacity = 1275;
Model = "0003-A";
Serial = REDACTED;
Temperature = 2590;
TimeRemaining = 0;
UpdateTime = 1461830702;
Voltage = 4182;
"battery-data" = {
"0003-default" = <...>;
"0004-default" = <...>;
"0005-default" = <...};
"built-in" = 1;
}
Above things are from UIDeviceListener
I run with sample code I got below temparature
in EEPowerInformation.m class I put the breakpoint and check that.It is called and brings all information about battery.
- (void) listenerDataUpdated: (NSNotification *) notification
{
latestPowerDictionary = notification.userInfo;
NSLog(#"The latest Power Dictionary is - %#",latestPowerDictionary);
NSLog(#"The battery Temperature is - %#",[latestPowerDictionary objectForKey:#"Temperature"]);
if (self.delegate != nil)
[self.delegate powerInformationUpdated: self];
}
The Printed Statements are
The latest Power Dictionary is - {
AdapterDetails = {
Amperage = 1000;
Description = "usb host";
FamilyCode = "-536854528";
PMUConfiguration = 970;
Watts = 5;
};
AdapterInfo = 16384;
Amperage = 1000;
AppleChargeRateLimitIndex = 0;
AppleRawBrickIDVoltages = (
(
39,
420
)
);
AppleRawCurrentCapacity = 1084;
AppleRawExternalConnected = 1;
AppleRawMaxCapacity = 1221;
AtCriticalLevel = 0;
AtWarnLevel = 0;
BatteryInstalled = 1;
BatteryKey = "0003-default";
BootBBCapacity = 673;
BootCapacityEstimate = 29;
BootVoltage = 3810;
CFBundleIdentifier = "com.apple.driver.AppleARMPlatform";
ChargerConfiguration = 900;
CurrentCapacity = 1222;
CycleCount = 343;
DesignCapacity = 1430;
ExternalChargeCapable = 1;
ExternalConnected = 1;
FullyCharged = 0;
IOClass = AppleARMPMUCharger;
IOFunctionParent5E000000 = <>;
IOGeneralInterest = "IOCommand is not serializable";
IOMatchCategory = IODefaultMatchCategory;
IONameMatch = charger;
IONameMatched = charger;
IOPowerManagement = {
CapabilityFlags = 32832;
CurrentPowerState = 2;
DevicePowerState = 2;
MaxPowerState = 2;
};
IOProbeScore = 1000;
IOProviderClass = IOService;
InstantAmperage = 198;
IsCharging = 1;
Location = 0;
Manufacturer = A;
MaxCapacity = 1300;
Model = "0003-A";
Temperature = 3120;
TimeRemaining = 67;
UpdateTime = 1470665642;
Voltage = 4188;
"built-in" = 1;
}
Finally the Printed result of battery Temperature is
The battery Temperature is - 3120

if you don't need temperature number then it is useful to use ThermalState api
https://developer.apple.com/documentation/foundation/nsprocessinfothermalstate?language=objc

Related

Realm throws error when trying to add and save object

I'm developing iOS app with Realm library and it works fine.
But when I tried to save one model it throws error like this.
Terminating app due to uncaught exception 'RLMException', reason:
'Target table row index out of range
Here's code.
....
do {
try realm?.write {
let newPatientImage = PatientImage()
newPatientImage.path = imageName
if let flap = flap {
newPatientImage.setStronglyTypedFlap(flap)
}
newPatientImage.hasPhoto = hasPhoto
newPatientImage.flap?.flapLocationRaw = flapLocation.rawValue
newPatientImage.id = newPatientImage.incrementalID()
patient.patientImages.append(newPatientImage)
realm?.add(newPatientImage)
realm?.add(patient, update: true)
}
} catch {
}
...
Here's newPatientImage object.
PatientImage {
id = 22;
hasPhoto = 0;
isPostOp = 0;
path = 4426699712;
date = 2019-04-26 11:32:15 +0000;
flap = RhomboidAFlap {
id = 1;
name = Rhomboid A;
adjustables = List<Adjustable> <0x280b5c120> (
[0] Adjustable {
value = 60;
defaultValue = 60;
name = A;
isDegrees = 1;
},
[1] Adjustable {
value = 60;
defaultValue = 60;
name = B;
isDegrees = 1;
},
[2] Adjustable {
value = 200;
defaultValue = 200;
name = C;
isDegrees = 0;
},
[3] Adjustable {
value = 200;
defaultValue = 200;
name = E;
isDegrees = 0;
}
);
a = 0.6491648060943035;
b = 0;
c = 0;
d = 0.6491648060943035;
tx = -195.6666717529297;
ty = -144.5;
xOffset = -44.99840983089462;
yOffset = 30.7939660691552;
width = 650;
height = 1000;
centerX = 429.5;
centerY = 499.9999999999999;
calibrationSettings = CalibrationSettings {
measurementUnitRaw = px;
conversionRatio = 1;
measuredLength = 0;
startX = 0;
startY = 0;
endX = 0;
endY = 0;
};
flapLocationRaw = ;
};
ohPlastyFlap = (null);
curvelinearFlap = (null);
rhomboidAFlap = RhomboidAFlap {
id = 1;
name = Rhomboid A;
adjustables = List<Adjustable> <0x280b5c120> (
[0] Adjustable {
value = 60;
defaultValue = 60;
name = A;
isDegrees = 1;
},
[1] Adjustable {
value = 60;
defaultValue = 60;
name = B;
isDegrees = 1;
},
[2] Adjustable {
value = 200;
defaultValue = 200;
name = C;
isDegrees = 0;
},
[3] Adjustable {
value = 200;
defaultValue = 200;
name = E;
isDegrees = 0;
}
);
a = 0.6491648060943035;
b = 0;
c = 0;
d = 0.6491648060943035;
tx = -195.6666717529297;
ty = -144.5;
xOffset = -44.99840983089462;
yOffset = 30.7939660691552;
width = 650;
height = 1000;
centerX = 429.5;
centerY = 499.9999999999999;
calibrationSettings = CalibrationSettings {
measurementUnitRaw = px;
conversionRatio = 1;
measuredLength = 0;
startX = 0;
startY = 0;
endX = 0;
endY = 0;
};
flapLocationRaw = ;
};
rhomboidBFlap = (null);
noteFlap = (null);
vyPlastyFlap = (null);
bilobedFlap = (null);
circularZFlap = (null);
atPlastyFlap = (null);
ouPlastyAFlap = (null);
ouPlastyBFlap = (null);
simpleEllipseFlap = (null);
}
And Here's patient object.
Patient {
id = 1;
firstName = Gg;
lastName = ;
email = ;
phone = ;
address1 = ;
address2 = ;
city = ;
state = ;
dateOfBirth = 2019-04-03 21:24:28 +0000;
medicalRedcordNumber = ;
imageUrl = avatar_1;
patientImages = List<PatientImage> <0x2834a5200> (
[0] PatientImage {
id = 1;
hasPhoto = 1;
isPostOp = 0;
path = 4489901936;
date = 2019-04-08 16:21:54 +0000;
flap = (null);
ohPlastyFlap = (null);
curvelinearFlap = (null);
rhomboidAFlap = (null);
rhomboidBFlap = (null);
noteFlap = (null);
vyPlastyFlap = (null);
bilobedFlap = (null);
circularZFlap = (null);
atPlastyFlap = (null);
ouPlastyAFlap = (null);
ouPlastyBFlap = (null);
simpleEllipseFlap = (null);
}
}
Could anyone please help me resolve this issue?
This issue doesn't happen before updating iOS version and Realm version.
Thanks.
You need to manipulate realm in a write transaction like this:
do {
try self.realm.write
{
self.realm.add(entity, update: update)
}
}
catch {}
It was because every Flap classes(like ohPlastyFlap, curvelinearFlap ...) override Flap class and Realm doesn't recognize Flap type.
I fixed it by correctly setting Flap type.
The "patient" object is missing the corresponding initialization, which is still a nil.
Before
patient.patientImages.append(newPatientImage)
try creating for "patient".

i have json response but its optional can any one tell me how to unwrap optional json

please tell me how to unwrap this josn response because of optional json i am not able to parse in label
i have tried my best but i am new to swift so i can't get it to unwrap the optional json
response::
Optional(<__NSArrayM 0x600000848340>(
{
contributors = "";
coordinates = "";
"created_at" = "Thu Jul 12 11:49:57 +0000 2018";
entities = {
hashtags = (
);
media = (
{
"display_url" = "pic.twitter.com/IJtq6aLM7K";
"expanded_url" = "";
id = 1017375504448479232;
"id_str" = 1017375504448479232;
indices = (
12,
35
);
"media_url" = "";
"media_url_https" = "";
sizes = {
large = {
h = 1820;
resize = fit;
w = 2048;
};
medium = {
h = 1067;
resize = fit;
w = 1200;
};
small = {
h = 604;
resize = fit;
w = 680;
};
thumb = {
h = 150;
resize = crop;
w = 150;
};
};
type = photo;
url = "";
}
);
symbols = (
);
urls = (
);
"user_mentions" = (
);
};
"extended_entities" = {
media = (
{
"display_url" = "pic.twitter.com/IJtq6aLM7K";
"expanded_url" = "";
id = 1017375504448479232;
"id_str" = 1017375504448479232;
indices = (
12,
35
);
"media_url" = "";
"media_url_https" = "";
sizes = {
large = {
h = 1820;
resize = fit;
w = 2048;
};
medium = {
h = 1067;
resize = fit;
w = 1200;
};
small = {
h = 604;
resize = fit;
w = 680;
};
thumb = {
h = 150;
resize = crop;
w = 150;
};
};
type = photo;
url = "";
}
);
};
"favorite_count" = 0;
favorited = 0;
geo = "";
id = 1017375507174719488;
"id_str" = 1017375507174719488;
"in_reply_to_screen_name" = "";
"in_reply_to_status_id" = "";
"in_reply_to_status_id_str" = "";
"in_reply_to_user_id" = "";
"in_reply_to_user_id_str" = "";
"is_quote_status" = 0;
lang = fr;
place = "";
"possibly_sensitive" = 0;
"retweet_count" = 0;
retweeted = 0;
source = "";
text = "Tweet Tweet ";
truncated = 0;
user = {
"contributors_enabled" = 0;
"created_at" = "Tue Mar 27 05:14:33 +0000 2018";
"default_profile" = 1;
"default_profile_image" = 0;
description = "";
entities = {
description = {
urls = (
);
};
};
"favourites_count" = 3;
"follow_request_sent" = 0;
"followers_count" = 1;
following = 0;
"friends_count" = 0;
"geo_enabled" = 1;
"has_extended_profile" = 0;
id = 978500498897563648;
"id_str" = 978500498897563648;
"is_translation_enabled" = 0;
"is_translator" = 0;
lang = en;
"listed_count" = 0;
location = "";
name = Mike;
notifications = 0;
"profile_background_color" = F5F8FA;
"profile_background_image_url" = "";
"profile_background_image_url_https" = "";
"profile_background_tile" = 0;
"profile_image_url" = "";
"profile_image_url_https" = "";
"profile_link_color" = 1DA1F2;
"profile_sidebar_border_color" = C0DEED;
"profile_sidebar_fill_color" = DDEEF6;
"profile_text_color" = 333333;
"profile_use_background_image" = 1;
protected = 0;
"screen_name" = Mike50430315;
"statuses_count" = 13;
"time_zone" = "";
"translator_type" = none;
url = "";
"utc_offset" = "";
verified = 0;
};
}
because of this i am getting nil value in all like name text retweet please tell me how to solve this
var timeline = (FHSTwitterEngine.shared().getTimelineForUser(FHSTwitterEngine.shared().authenticatedUsername, isID: true, count: 10), terminator: "")
from this line i am getting whole response
and then i have on array i create and store in to array like below
var serviceData = [AnyObject]()
let timelinedata = [timeline] as [AnyObject]
serviceData = (timelinedata)
print(serviceData)
In general, anything optional can be unwrapped like so:
let optionalValue: String? = "Hello, this is optional!"
if let noLongerOptional = optionalValue {
print("\(noLongerOptional) no its not! ahah")
}
Edit: more specific example...
Assuming you have a variable 'myJson' which hold your optional value... and you did:
print("\(myJson)")
You can solve this by:
if let validJson = myJson {
print("\(validJson)")
}
Edit 2: ... FHSTwitter... (updated.... this is getting long)
let twitterEngine = FHSTwitterEngine.sharedEngine()
let twitterUser = twitterEngine.authenticatedID
let timeline = twitterEngine.getTimelineForUser(twitterUser, isID: true, count: 10)
According to FHSTwitterEngine docs... getTimelineForUser() will return either a NSError or an array of Tweets.
so...
if let error = timeline as? Error {
print("Oops, looks like something went wrong: \(error)")
} else {
if let tweets = timeline as? [Any] {
for tweet in tweets {
print("This is a tweet: \(tweet)")
}
}
}
If you have any more trouble using FHSTwitterEngine, I suggest you play with: https://github.com/natesymer/FHSTwitterEngine/tree/master/FHSTwitterEngineDemoSwift/Demo-Swift
Or open a support ticket with the FHSTwitterEngine developer(s) at: https://github.com/natesymer/FHSTwitterEngine/issues
Good Luck!

Upload image in imageview inside collectionView using sdwebimage

I have to show image in imageView using SDWebImage
Here is my code:
NSString *string2 = [[dataArray objectAtIndex:indexPath.row ]valueForKey:#"logo"];
[imagev sd_setImageWithURL:[NSURL URLWithString:#"http://dev-demo.info.bh-in-15.webhostbox.net/dv/nationalblack/upload/post/"]
placeholderImage:[UIImage imageNamed:string2]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
imagev.image = image;
}];
I am not getting any image inside ImageView
data I am getting from the server is
data array (
{
address = brisbane;
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = delhi;
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464935578;
email = "gautam.kumar#eyeforweb.com";
expirydays = 366;
expirymail = 0;
"fb_address" = "";
id = 78;
"inst_address" = "";
isexpired = 0;
isfeatured = 0;
lat = "-33.7961";
"link_address" = "";
lng = "151.146";
logo = "";
longdesc = "xyz ";
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 13;
"pt_address" = "";
sevendaysmail = 0;
shortdesc = hello123;
state = "New South Wales";
status = 1;
tags = "";
"tb_address" = "";
title = aayush;
transcationid1 = "";
"tw_address" = "";
userid = 5;
username = "Gautam Kumar";
"var_name" = 56;
"web_address" = "";
},
{
address = "Address 1";
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = ABD;
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464158696;
email = "gautam.kumar#eyeforweb.com";
expirydays = 357;
expirymail = 0;
"fb_address" = "";
id = 75;
"inst_address" = "";
isexpired = 0;
isfeatured = 0;
lat = "-37.488";
"link_address" = "";
lng = "144.592";
logo = "appflowchart_4c1.gif";
longdesc = "This is short Description.";
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = "";
sevendaysmail = 0;
shortdesc = "This is short Description.";
state = Gisborne;
status = 1;
tags = "";
"tb_address" = "";
title = Business1;
transcationid1 = "";
"tw_address" = "";
userid = 5;
username = "Gautam Kumar";
"var_name" = 0;
"web_address" = "";
},
{
address = "Paschim Vihar ,Delhi";
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = "New Delhi";
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464065014;
email = "gautam.kumar#eyeforweb.com";
expirydays = 356;
expirymail = 0;
"fb_address" = Facebook;
id = 72;
"inst_address" = Instagram;
isexpired = 0;
isfeatured = 0;
lat = "-37.488";
"link_address" = linked;
lng = "144.592";
logo = "Screenshot_(1)_61b.png";
longdesc = sdfsdfdsf;
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = Pinsta;
sevendaysmail = 0;
shortdesc = fffsdf;
state = Gisborne;
status = 1;
tags = "";
"tb_address" = Tumbler;
title = "First business";
transcationid1 = "";
"tw_address" = Twitter;
userid = 5;
username = "Gautam Kumar";
"var_name" = 2;
"web_address" = Website;
},
{
address = Laxminagar;
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = "New Delhi1";
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1463651418;
email = "gautam.kumar#eyeforweb.com";
expirydays = 7;
expirymail = 0;
"fb_address" = Facebook;
id = 61;
"inst_address" = Instagram;
isexpired = 0;
isfeatured = 0;
lat = "28.6433";
"link_address" = linked;
lng = "77.0363";
logo = "Screenshot_(1)_0ba.png";
longdesc = asxasxasx;
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = Pinsta;
sevendaysmail = 0;
shortdesc = xasxasx;
state = Victoria;
status = 1;
tags = "";
"tb_address" = Tumbler;
title = "Testing by Gautam";
transcationid1 = 1111111111111;
"tw_address" = Twitter;
userid = 5;
username = "Gautam Kumar";
"var_name" = 2;
"web_address" = Website;
}
)
Aayush Katiyar,
From iOS 8 onwards you are not supposed to use http you should make use of secure channels https. In case you dont have one consider adding these to your plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
All your image download api is making use of http:// I guess that might be the issue here
Finally change the way you load the image as
[imagev sd_setImageWithURL:[NSURL URLWithString: [NSString stringWithFormat:#"%#/%#",#"http://dev-demo.info.bh-in-15.webhostbox.net/dv/nationalblack/upload/post/", string2]]
placeholderImage:[UIImage imageNamed:#"Some_Placeholder_Image"]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
imagev.image = image;
}];
Just use like this,
[cell.myImageView sd_setImageWithURL:finalImageUrl];
finalImageUrl is your final url for download image.
No need to use method with completion handlerl. it is for different task.

iOS Strange log NETAWDManager

With iOS 9 i see in my iPhone console strange logs
These logs appears when the app connected to remote service,and maybe when the connection is slow, i use NSURLSession.
Someone has an idea about the meaning of this log, should I care of this:
-[NETAWDManager reportStats:metricID:] server 0x13cd19d70, container 0x13ce9dfe0, metrid 2686983, successfully reported:
<AWDLibnetcoreTCPConnectionReport: 0x13ce7af10> {
cellularFallbackReport = {
dataUsageSnapshotsAtNetworkEvents = (
{
bytesIn = 0;
bytesOut = 410;
}
);
"fallbackTimer_msecs" = 0;
fellback = 0;
networkEvents = (
"NETWORK_EVENT_DATA_STALL_AT_APP_LAYER"
);
"timeToNetworkEvents_msecs" = (
3325
);
};
clientIdentifier = "com.mydomain.myapp";
connectionStatisticsReport = {
DNSAnswersCached = 1;
"DNSResolvedTime_msecs" = 3;
RTTvariance = 169;
"appDataStallTimer_msecs" = 3;
appReportingDataStallCount = 1;
"bestRTT_msecs" = 359;
betterRouteEventCount = 0;
bytesDuplicate = 0;
bytesIn = 37000;
bytesOut = 410;
bytesOutOfOrder = 0;
bytesRetransmitted = 0;
cellularFallback = 0;
cellularRRCConnected = 0;
connected = 1;
connectedInterfaceType = "INTERFACE_TYPE_WIFI";
"connectionEstablishmentTime_msecs" = 308;
connectionReuseCount = 0;
"currentRTT_msecs" = 79;
"flowDuration_msecs" = 30750;
interfaceType = "INTERFACE_TYPE_WIFI";
kernelReportedStalls = 0;
kernelReportingConnectionStalled = 0;
kernelReportingReadStalled = 0;
kernelReportingWriteStalled = 0;
packetsDuplicate = 0;
packetsIn = 26;
packetsOut = 1;
packetsOutOfOrder = 0;
packetsRetransmitted = 0;
"smoothedRTT_msecs" = 275;
synRetransmissionCount = 0;
tcpFastOpen = 0;
"timeToConnectionEstablishment_msecs" = 315;
"timeToConnectionStart_msecs" = 7;
"timeToDNSResolved_msecs" = 7;
"timeToDNSStart_msecs" = 4;
trafficClass = 0;
};
delegated = 0;
reportReason = "REPORT_REASON_DATA_STALL_AT_APP_LAYER";
}
Based on the identifier cellularFallbackReport, this message may be related WiFi Assist. It's a new feature in iOS 9 that detects slow WiFi connections and automatically falls back to the phone's cellular radio.
This would be consistent with your observation that the log message occurs when you have a slow connection.
If you're able to reproduce the message reliably, try disabling WiFi Assist in settings and see if it disappears:
If that's really what it is, should you care about it? Probably not. The messages indicate the iOS system is dealing with network problems automatically on behalf of your app, and there's not much you can do about it.

Wifi Signal strength in IOS8

My App used to measure the Wifi Signal strength . For that I have used a private API in iOS7
libHandle = dlopen("/System/Library/SystemConfiguration/IPConfiguration.bundle/IPConfiguration", RTLD_LAZY);
But now it seems that Apple has removed it to some other Location in iOS8. As i am not able to find these methods .
apple80211Open = dlsym(libHandle, "Apple80211Open");
apple80211Bind = dlsym(libHandle, "Apple80211BindToInterface");
apple80211Close = dlsym(libHandle, "Apple80211Close");
apple80211GetInfoCopy = dlsym(libHandle, "Apple80211GetInfoCopy");
So do Any one has any idea where it may have been removed/replaced.
Is there any other way of measuring the Wifi Strength. (value something like : - 47)
Earlier apple80211GetInfoCopy used to return
"AUTH_TYPE" = {
"AUTH_LOWER" = 1;
"AUTH_UPPER" = 8;
};
BSSID = "74:XX:XX:60:1b:XX”; // Value changed for security.
CHANNEL = {
CHANNEL = 149;
"CHANNEL_FLAGS" = 20;
};
NOISE = {
"NOISE_CTL_AGR" = "-85";
"NOISE_UNIT" = 0;
};
"OP_MODE" = 1;
POWER = (
1
);
POWERSAVE = 1;
RATE = 135;
RSSI = {
"RSSI_CTL_AGR" = "-47";
"RSSI_UNIT" = "-1";
};
SSID = <6d506f72 74616c20 4343>;
"SSID_STR" = “Wifi XX; //Value Changed for Security
STATE = 4;
Where RSSI_CTL_AGR is what i need to fetch .
PS:The App is not for APPStore . Its for adhoc distribution.

Resources