Skip to content

Commit 2b56e4b

Browse files
author
DevelopLab
committed
1. Fix A11 below devices can not load data issue
1 parent 648a32c commit 2b56e4b

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

BatteryHelper/BatteryHelper.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
IOMasterPort(MACH_PORT_NULL, &masterPort);
1212

1313
// 匹配电池服务
14-
matchingDict = IOServiceMatching("AppleSmartBattery");
14+
matchingDict = IOServiceMatching("IOPMPowerSource");
1515
service = IOServiceGetMatchingService(masterPort, matchingDict);
1616

1717
if (service) {

BatteryInfo.xcodeproj/project.pbxproj

+6-4
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
CLANG_ENABLE_MODULES = YES;
356356
CODE_SIGN_IDENTITY = "Apple Development";
357357
CODE_SIGN_STYLE = Automatic;
358-
CURRENT_PROJECT_VERSION = 12;
358+
CURRENT_PROJECT_VERSION = 13;
359359
DEVELOPMENT_TEAM = X2WABLB38D;
360360
FRAMEWORK_SEARCH_PATHS = (
361361
/System/Library/Frameworks,
@@ -367,6 +367,7 @@
367367
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
368368
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
369369
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
370+
INFOPLIST_KEY_UISupportedInterfaceOrientations = "";
370371
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
371372
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
372373
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
@@ -378,7 +379,7 @@
378379
"$(inherited)",
379380
"$(PROJECT_DIR)/BatteryInfo",
380381
);
381-
MARKETING_VERSION = 1.1.6;
382+
MARKETING_VERSION = 1.1.7;
382383
OTHER_CFLAGS = "-Wno-error=unguarded-availability-new";
383384
OTHER_LDFLAGS = "";
384385
PRODUCT_BUNDLE_IDENTIFIER = com.developlab.BatteryInfo;
@@ -404,7 +405,7 @@
404405
CLANG_ENABLE_MODULES = YES;
405406
CODE_SIGN_IDENTITY = "Apple Development";
406407
CODE_SIGN_STYLE = Automatic;
407-
CURRENT_PROJECT_VERSION = 12;
408+
CURRENT_PROJECT_VERSION = 13;
408409
DEVELOPMENT_TEAM = X2WABLB38D;
409410
FRAMEWORK_SEARCH_PATHS = (
410411
/System/Library/Frameworks,
@@ -416,6 +417,7 @@
416417
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
417418
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
418419
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
420+
INFOPLIST_KEY_UISupportedInterfaceOrientations = "";
419421
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
420422
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
421423
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
@@ -427,7 +429,7 @@
427429
"$(inherited)",
428430
"$(PROJECT_DIR)/BatteryInfo",
429431
);
430-
MARKETING_VERSION = 1.1.6;
432+
MARKETING_VERSION = 1.1.7;
431433
OTHER_CFLAGS = "-Wno-error=unguarded-availability-new";
432434
OTHER_LDFLAGS = "";
433435
PRODUCT_BUNDLE_IDENTIFIER = com.developlab.BatteryInfo;

BatteryInfo/BatteryHelper.a

-8 Bytes
Binary file not shown.

BatteryInfo/Localizable.xcstrings

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
}
115115
},
116116
"BatteryDataRecordsCSVName" : {
117+
"comment" : "BatteryDataRecords",
117118
"localizations" : {
118119
"en" : {
119120
"stringUnit" : {

BatteryInfo/ViewController/SettingsViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import UIKit
33

44
class SettingsViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
55

6-
let versionCode = "1.1.6"
6+
let versionCode = "1.1.7"
77

88
private var tableView = UITableView()
99

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include $(THEOS)/makefiles/common.mk
55

66
# 使用 Xcode 项目构建
77
XCODEPROJ_NAME = BatteryInfo
8-
BUILD_VERSION = "1.1.6"
8+
BUILD_VERSION = "1.1.7"
99

1010
# 指定 Theos 使用 xcodeproj 规则
1111
include $(THEOS_MAKE_PATH)/xcodeproj.mk

control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: com.developlab.batteryinfo
22
Name: Battery Info
3-
Version: 1.1.6
3+
Version: 1.1.7
44
Architecture: iphoneos-arm
55
Description: Battery information
66
Maintainer: developlab

0 commit comments

Comments
 (0)