Posts

Post not yet marked as solved
1 Replies
492 Views
try Tips.resetDatastore() try Tips.configure( [ // Reset which tips have been shown and what parameters have been tracked, useful during testing and for this sample project .datastoreLocation(.applicationDefault), // When should the tips be presented? If you use .immediate, they'll all be presented whenever a screen with a tip appears. // You can adjust this on per tip level as well .displayFrequency(.immediate) ] ) struct UserTip: Tip { static let hoverEvent: Event = Event(id: "hoverEvent") @Parameter var isHovering: Bool = false static var tipCountKey = "UserTipCount" var title: Text var message: Text? var image: Image? var tipShownLimit: Int var options: [Option] { // Show this tip 5 times. [ Tips.MaxDisplayCount(5), Tips.IgnoresDisplayFrequency(true) ] } var rules: [Rule] { #Rule($isHovering) { $0 == true } } } struct ShowPopoverTip: View { @State private var tip = UserTip( title: Text("the title"), message: Text("the message here"), image: Image(systemName: "volleyball.fill"), tipShownLimit: 10 ) var body: some View { Button(action: { }) { Text("Hover over me") } .popoverTip(tip) .onAppear { } .onHover { hovering in if hovering { tip.isHovering = true print("tip.status: \(tip.status)") print("tip.isHovering: \(tip.isHovering)") print("tip.shouldDisplay: \(tip.shouldDisplay)") }else{ tip.isHovering = false print("tip.isHovering: \(tip.isHovering)") } } } } The popover only works once, even though I have set it to Tips.MaxDisplayCount(5) Either the Tip is getting invalidated or popovers only show once. debug output: tip.isHovering: true tip.shouldDisplay: false tip.isHovering: false tip.status: pending tip.isHovering: true tip.shouldDisplay: false tip.isHovering: false btw, if I remove the Tips.resetDatastore(), it still shows once each time I launch the app.
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
2 Replies
319 Views
static let hoverEvent: Event = Event(id: "hoverEvent") /// Parameters-Rules @Parameter static var isHovering: Bool = false static var tipCountKey = "UserTipCount" var title: Text var message: Text? var image: Image? var tipShownLimit: Int @ObservedObject var buttonState: ButtonState var rules: [Rule] { #Rule(Self.hoverEvent) { $0.donations.count < tipShownLimit } } } error: Event Rules require a count comparison. If I replace tipShownLimit like this: var rules: [Rule] { #Rule(Self.hoverEvent) { $0.donations.count < 3 } } it compiles fine. the error is: Event Rules require a count comparison.
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
0 Replies
451 Views
I successfully downloaded the beta and it ran fine with a new project for visionOS, just the Hello World. So, today I thought I would see if I could run my 20-year-old iPad app, which I haven't touched since then. I tried to get it running, but I was getting errors that I couldn't figure out. Eventually, I got an internal error asking me to submit a report, which I did. I looked at the logs and tried to figure out how to get it running, making changes here and there. Eventually I broke Xcode, so I uninstalled it using CleanMyMacX and redownloaded it and tried to reinstall it. This time it didn't ask for permission to access the Downloads folder. I created a new project, but keep getting an error about failing to get RealityKit. I uninstalled it again and am downloading again. Does anyone know what I might be doing wrong?
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
1 Replies
1.7k Views
I am writing a web server and testing with Safari. The server is written in Go. I have a page which allows the user to upload an image. The image displays properly in Safari. The image data is in a base64 string. This is on an input tag in the HTML. The save button submits this image along with other inputs. If the string length is over about 500K, when the request arrives at the server, the image string has been truncated which then produces an error EOF when attempting to decode the image. I have used the web inspector to see if I can find an issue there, but everything appears normal. If I select an image of less than around 500K, it is shown fine in the browser and the data string is fine when it arrives at the server. The image upload is accomplished by an input button of type "file" which onchange() executes this javascript code: function processFile(imageInput) { const reader = new FileReader() reader.addEventListener("load", () => { uploaded_image = reader.result; let displayImage = document.querySelector("#display_image"); displayImage.style.backgroundImage = `url(${uploaded_image})`; document.querySelector("#display_image_data").value = uploaded_image; document.querySelector("#display_image_size").innerHTML = uploaded_image.length.toString(); }); reader.readAsDataURL(imageInput.files[0]); } The display_image_data element is <input id = "display_image_data" name = "photoBytesString" hidden>
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
2 Replies
647 Views
I use cloudkit notifications to keep my 3 macs in synch when changes occur in cloudkit. Yesterday, 2 of the 3 macs did not receive notifications while 1 did receive. All Macs are running the latest Catalina, 10.15.3. Today, with no code changes, 1 of the 3 macs is not receiving notifications, even after rebooting. But one is receiving that didn't receive yesterday.didRegisterForRemoteNotificationsWithDeviceToken is successful on all 3 Macs.OK, just rebooted the failing Mac again and it is now receiving notifications. Now I am just concerned about the robustness of using the notifications.
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
4 Replies
665 Views
I have an app which uses in-app purchases. I created 3 subscriptions of the type: non-renewing subscription. However, after purchasing a 1-month subscription, I purchase again and it says already purchased so this is free. Why is that?
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
3 Replies
750 Views
I have implemented in-app purchases; however, in attempting to test it, I keep getting this error when making a purchase:Your Apple ID has been locked for security reasons.I have created 5 different testers and get this error on all of them. I have tried doing the unlock, changing passwords, but I still get the same error.
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
1 Replies
530 Views
Entity: ContactRecord@property (nonatomic) int64_t contactType;enum contactType{ contactTypeCustomer = 0, contactTypeVendor = 1, contactTypeRestaurantTableSupplier = 2, contactTypeReclaimedWoodSupplier = 3, contactTypeHardwoodFlooringSupplier = 4};enum contactType contactType = (enum contactType)[[CoreDataManager sharedManager]contactTypeFromString:contactTypeString];self.currentContactRecord.contactType = contactType;
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
21 Replies
4.0k Views
Just launched xcode 1Version 11.0 (11A420a) and built and ran my app. The popup buttons show up as just the title, no box around it and no icon on the right to indicate a dropdown. The popup still works, just the UI is messed up.Also, NSToolbar items with icons are messed up. Either the icon is empy or a weird image shows up. They work fine in xcode 10.
Posted
by rschluet.
Last updated
.
Post not yet marked as solved
2 Replies
822 Views
I have a few Macs running my app using cloudkit. My Macbook Pro is the only one where I am running the latest Catalina beta, 10.15 Beta (19A526h). It is able to access the cloud database fine, but does not receive any cloudkit notifications. I think this may be due to cataling as the other Macs get their notifications fine.
Posted
by rschluet.
Last updated
.
Post marked as solved
6 Replies
2.3k Views
I have a Mac OS X app which has around 15 tables. These have worked fine for multiple years. I am in development mode for this container. I recently added a new table, adding it automatically as I created records from the app. I have created about 10 sample records in it, some from a different machine than my dev Mac. For 2 of these records, in an attempt to save, I get this error:&lt;CKError 0x600000d7b5d0: "Permission Failure" (10/2007); server message = "WRITE operation not permitted";From the dashboard on my dev Mac, I can retrieve the record, changed it, and save from there.
Posted
by rschluet.
Last updated
.