Skip to main content
-2 votes
0 answers
74 views

Property Wrapper for User Defaults [closed]

I'm trying to practice creating this Property wrapper for my UserDefaults. I try to handle also a default value struct ContentView: View { var body: some View { VStack(spacing: 20) { ...
depreston's user avatar
  • 347
0 votes
2 answers
68 views

Unable to reset user default text within a set cell:

This is my code: class WeatherFeatures: UIViewController, UITextViewDelegate, WeatherManagerDelegate { let date1ForTableView = UserDefaults.standard let low1ForTableView = UserDefaults....
Train Lover's user avatar
0 votes
1 answer
61 views

UserDefaults suites ("standard" and "custom") overlapping - the keys appear in both?

I'm currently working on a Swift project where I register default values to two different UserDefaults suites: the standard suite and a custom suite. However, I'm seeing an unexpected (potentially ...
markb's user avatar
  • 1,369
0 votes
0 answers
30 views

Persist app state across reinstalls/multiple devices

So I’m trying to setup an existing app to work with iCloud syncing. The syncing part seems to be working for the most part. When the app is first installed it sets up some data locally. Throughout the ...
Ceri Turner's user avatar
0 votes
1 answer
222 views

Understanding the relationship between suiteName and App Groups

Background I'm developing a macOS applications that consists of a plugin and main application. I would like for both targets to be able to share the same settings. I want to manipulate my settings ...
Konrad's user avatar
  • 18.8k
0 votes
1 answer
149 views

API available to Swift that provides the Apple ID associated with the current macOS user?

Is there any API available to Swift that provides the name (which should be an email address, AFAIK) of the Apple ID associated with the current macOS user? The following command line seems to provide ...
XDR's user avatar
  • 4,560
1 vote
1 answer
132 views

Is it possible to throw an exception with subscript?

I have written code below in Swift 5.10 to store and retrieve Codable data from UserDefaults by giving key value in the subscript, but there is some compile time error: Expected '->' for subscript ...
Manthan Gevariya's user avatar
0 votes
0 answers
79 views

Swift String Parser semicolon issues

i want to create an app that allows the user to edit user defaults which makes it free to silence the annoying update warnings but I have ran into an issue. The code should take a string and print a ...
Karl Ehrlich's user avatar
0 votes
0 answers
161 views

Using Jamf to security write new configuration to managed application

I've learned that it's possible to inject new configuration to MDM managed application using MDM so that the managed app configuration changes that are pushed down from an MDM server appear in ...
Zohar81's user avatar
  • 5,204
0 votes
0 answers
59 views

How to update userdefaults in another viewController once it is saved in a different viewController without overwriting the first one

This is my User struct. struct User: Codable { let uid: String? let name: String? var profileImageUrl: String? var bookmarkedRecipes: [String]? // This could be an array of recipe IDs....
asduskun's user avatar
0 votes
0 answers
218 views

Does the UserDefault api guarantee privacy?

This seems like an obvious behaviour for data privacy/security, but does the ios framework ensure that the UserDefault databases that the client app and its sdks access are restricted to only the ...
infoMining's user avatar
0 votes
1 answer
87 views

Can NSUserDefaults work across different code bases?

I am trying to share data between an objective c iOS appliation and a c# xamarin forms application using app groups. I am setting up the initial data in the objective c project and passing the data ...
redrock68's user avatar
0 votes
0 answers
68 views

How to bind @Published variable value to @propertyWrapper in SwiftUI

I want to make variable user @Published, but then i get error: 'nil' is not compatible with expected argument type 'Published<UserLoginOutput.Response.Data? import Foundation protocol ...
Aidar's user avatar
  • 9
3 votes
2 answers
2k views

iOS 17 - UserDefaults getting cleared on relaunching the app

works good on iOS 16 and prior, but on iOS 17, User Defaults gets cleared. I don't use Data Protection Entitlement. I use app groups, and tried both UserDefaults.standard and UserDefaults(suiteName:&...
batrinu vlad's user avatar
1 vote
1 answer
465 views

Overriding UserDefaults with XCUIApplication.launchArguments ignores all future updates to that key, so how do I test it?

I can successfully override the UserDefaults value by setting it with XCUIApplication.launchArguments. But based on this link and the behavior I've noticed, once I override the UserDefaults value all ...
Kay's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
252