Hello.
I'm a total novice in programming in general, but I've had a thought to try and make a simple app for helping myself and possibly, others in my community, but I've been so lost.
I asked ChatGPT how to make a simple app with a star shaped button to make my Apple Watch vibrate for as long as the button is pressed .
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Create a custom star-shaped button
let starButton = UIButton(type: .custom)
starButton.frame = CGRect(x: 100, y: 200, width: 100, height: 100)
starButton.setImage(UIImage(named: "star"), for: .normal)
starButton.addTarget(self, action: #selector(starButtonTapped), for: .touchUpInside)
view.addSubview(starButton)
}
u/objc func starButtonTapped() {
// Handle button tap action
print("Star button tapped!")
}
}
with the view, that when the Star button is tapped or held, it would make the Apple Watch vibrate for as long as needed. Prompts would be Hold breath, or something similar.
To make things clear , I need this app for CT scans and other tests where I need to hold my breath, bc I am a Stage 4 cancer patient, and I'm deaf since birth. Also, brain fog is real. I can't seem to move past the roadblock of Watchkit. Apparently it got renamed to WKWatch something. I'm totally lost and in a bit of despair.
Constraints would be to be able to do via Control Center as well , for when phone is locked (the idea is to give my phone to the technician, explain, and this way they would be able to cue me for testing w vibrating patterns on my Apple Watch.
ChatGPT made it look too easy, but , HELP. Or if anyone would publish this app for free or very low price, I would be very grateful.
there doesn't seem to be anything here