Skip to content

sim_info sometimes is unworkable #22

@kenyu-yu

Description

@kenyu-yu

Hi,
my test device : iphone 11 / iOS 14.3
when I called sim_info in flutter to get sim info, sometimes I got the null result. Once I retry again, it is workable to get correct sim info. It is so strange.
here is my source code
=============source code =========================
Future getSimInfo() async {
print("starting getSimInfo");
String allowsVOIP = await SimInfo.getAllowsVOIP;
String carrierName = await SimInfo.getCarrierName;
String isoCountryCode = await SimInfo.getIsoCountryCode;
String mobileCountryCode = await SimInfo.getMobileCountryCode;
String mobileNetworkCode = await SimInfo.getMobileNetworkCode;

print("mobileCountryCode:$mobileCountryCode, mobileNetworkCode:$mobileNetworkCode");

setState(() {
  _allowsVOIP = allowsVOIP;
  _carrierName = carrierName;
  _isoCountryCode = isoCountryCode;
  _mobileCountryCode = mobileCountryCode;
  _mobileNetworkCode = mobileNetworkCode;

});

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions