update default widget templates

This commit is contained in:
True Zhuanjia
2026-04-08 02:15:07 +08:00
parent b0842ea4dc
commit 94f1c625be
4 changed files with 4 additions and 3 deletions
@@ -205,7 +205,7 @@ static CGRect layoutViewBounds;
NSSet *classes = [NSSet setWithObjects: [NSMutableData class], [NSMutableArray class], nil];
profilesEncoded = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:fileData error:&error];
[self importEncodedProfiles:profilesEncoded];
[self setProfileToSelected:0];
[self setProfileToSelected: GenericUtils.isIPhone ? 1 : 2];
}
}
}
@@ -279,7 +279,8 @@ static CGRect layoutViewBounds;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
// NSString* persistedKey = @"widgetProfileUpdated-20251015";
NSString* persistedKey = @"widgetProfileUpdated-20260322";
// NSString* persistedKey = @"widgetProfileUpdated-20260322";
NSString* persistedKey = @"widgetProfileUpdated-20260408";
BOOL needImportDefaultTemplates = [defaults objectForKey:persistedKey] == nil;
if(profiles.count == 0 || needImportDefaultTemplates){
Binary file not shown.
Binary file not shown.
@@ -1179,7 +1179,7 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
let currentProfile = profilesManager.getSelectedProfile()
// currentProfile.name = "RPG游戏示例 / RPG example (ZZZ in Genshin style)"
currentProfile.name = "Default"
//currentProfile.name = "Default";
// currentProfile.name = "Default";
// profilesManager.replace(targetProfile as! OSCProfile, with: currentProfile)
*/