Posts

Post not yet marked as solved
1 Replies
155 Views
I'm not sure how to pull off a viewer/editor with SwiftData + SwiftUI that supports Cancel I want the user to be able to: Tap + to bring up a sheet/form to create a new Item. The navigation bar shows Cancel and Create. Create is only enabled when the fields are mostly valid. Tap Create to do a deeper validation and add. Tap Cancel to not make any changes. Tap an item to view it. Tap Edit when viewing to edit. The navigation bar shows Cancel and Done. Done is only enabled when the fields are mostly valid. Tap Done to do a deeper validation and save changes. Tap Cancel to not make any changes. I think is a fairly common pattern. It's used by Contacts, for instance. I've got parts of this working. Creating is easy: I just insert it only after the user taps Create and it's validated. But Edit/Cancel/Done seems harder. If I disable autosaving the changes to the model, the changes are applied to other parts of SwiftUI immediately. And I haven't figured out how to cancel the changes. Should I be operating on a copy of the object instead? How do I copy it in a way that doesn't impact SwiftData? I'm happy to take any tips you might have, but if you want to look at the code and suggest something that way I put my test case up here: https://github.com/tewha/ItemEditor My hope is I can get this sample working, get the changes into my app, and keep the sample up for others to discover (though I feel this would also be a great concept for sample code).
Posted
by Tewha7.
Last updated
.
Post marked as solved
4 Replies
5.5k Views
We're trying to direct the user to subscription management.Apple documentation here:Letting Users Manage SubscriptionsSuggests opening this URL:https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptionsThis works fine on the Mac, but on iOS 10 I just get a white screen with the Carrier/Battery bar. This is true even if I just Paste that URL into Safari. What am I doing wrong?
Posted
by Tewha7.
Last updated
.
Post not yet marked as solved
0 Replies
479 Views
Is there any way to make Monterey Software Update a little more aggressive about detecting betas? I've posted a few bug reports since October 6th and apparently they're obsolete, or at least should have been checked with the latest beta. But despite using this laptop every day, I didn't see a new beta until I manually checked today. All those bug reports were just a waste of my and Apple's time…
Posted
by Tewha7.
Last updated
.
Post marked as solved
2 Replies
1.3k Views
You can use the new project assistant in Xcode 12 (12A8189n) to create a iOS app project using SwiftUI, a SwiftUI App life cycle and Core Data. The resulting app seems fully functional on its back end, and SwiftUI previews work in the IDE… but when I run it to either simulator or device, it's just an empty white canvas. There's no items in the list (which I wouldn't necessarily expect), no Add button and no Edit button. I'm sure this is because this is unfinished and just a beta, but is there something I can do to make the project work? I'm not looking to ship something right now, but being able to play with these tools would be great.
Posted
by Tewha7.
Last updated
.
Post not yet marked as solved
1 Replies
3.2k Views
I get that it's compromised, but there are still services I need to access that need MD5 as a checksum. To me, a deprecated warning is different than an insecure warning. If CC_MD5 had a warning that it was insecure, I could ignore that for the tasks I need it for. I'd go through my code and rename my generic MD5 wrapper to be task specific and call it a day. But deprecated to me means I probably need to look for alternatives… not to MD5, since I need it, but to CC_MD5. Can I have some clarification?
Posted
by Tewha7.
Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
A coworker can't run any apps in the iOS 13 simulator (including a new app I created from scratch). This is true across multiple simulated devices (including, again, one I just created from scratch).Anyone have any ideas? He's reinstalled Xcode 11 already but doesn't want to reinstall macOS unless we know it'll work. He's running macOS 10.14.6.What we've tried:New simulator (still can't run).New project (still can't run).Multiple restarts (Xcode and Mac).Delete all of ~/Library/Developer/CoreSimulator.Reinstall Xcode 11.Here's the error message:Our log looks like this:DetailsThis app could not be installed at this time.Domain: IXUserPresentableErrorDomainCode: 1Failure Reason: Could not install at this time.Recovery Suggestion: Failed to transfer ownership of path /Users/jeff/Library/Developer/CoreSimulator/Devices/5FF441EB-2A7B-4C89-AF3E-C057B266F068/data/Containers/Shared/SystemGroup/systemgroup.com.apple.installcoordinationd/Library/InstallCoordination/PromiseStaging/0A4061C5-8A07-43E7-BAC7-2B64FAB200B0/SteveTestAppPleaseDelete.app to installd--Failed to transfer ownership of path /Users/jeff/Library/Developer/CoreSimulator/Devices/5FF441EB-2A7B-4C89-AF3E-C057B266F068/data/Containers/Shared/SystemGroup/systemgroup.com.apple.installcoordinationd/Library/InstallCoordination/PromiseStaging/0A4061C5-8A07-43E7-BAC7-2B64FAB200B0/SteveTestAppPleaseDelete.app to installdDomain: MIInstallerErrorDomainCode: 103User Info: { FunctionName = "-[MIInstaller _takeOwnershipOfInstallableContainingSymlink:error:]"; SourceFileLine = 162;}--Couldn’t communicate with a helper application.Domain: NSCocoaErrorDomainCode: 4099Recovery Suggestion: Try your operation again. If that fails, quit and relaunch the application and try again.User Info: { NSDebugDescription = "The connection to service on pid 0 named com.apple.MobileInstallationHelperService was invalidated.";}--
Posted
by Tewha7.
Last updated
.
Post marked as solved
7 Replies
5.2k Views
I've got this code:TextField($searchText, placeholder:Text("Search"))It's generating this error:'init(_:placeholder:onEditingChanged:onCommit:)' is deprecatedAs near as I can tell, there's no alternative. I'm not really an expert on reading Swift code yet, but to me it looks like all the inits have been deprecated. Is this a deprecation that was introduced in error? If not, what's the alternative?
Posted
by Tewha7.
Last updated
.
Post marked as solved
1 Replies
2.9k Views
Can anyone tell me when this works? I've tried to use it so many times, and I think it's actually worked for me maybe twice.Latest public releases of everything… macOS 10.14.4 (18E226) and Xcode 10.2.1 (10E1001).
Posted
by Tewha7.
Last updated
.