Post

Replies

Boosts

Views

Activity

Reply to I distributed the version of the app from 1.0.0 to 1.0.1, but there is no update.
If you uploaded v1.0.0 without error and the binary was accepted, then you made some changes and submitted a v1.0.1 build and selected that as the version to be released, then it will have gone through App Review and will now be "Ready For Sale". App Store Connect will show the version that's available as "Ready For Sale". What version is showing? Did you go through all the steps to choose the new binary and submit for review?
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’22
Reply to Will Lock Screen Widgets be Configurable?
If you've not figured this out yet, you just have to tap the Lock Screen widget when you're editing it. So: Add Lock Screen widget from the Add Widgets panel. Tap the new widget you just added. You should see the standard panel for your widget, letting you choose something else from your dynamic intents.
Topic: App & System Services SubTopic: General Tags:
Sep ’22
Reply to Widget is not auto refreshing
Well, are you sure that the timeline entries are being added? Your code has a few if ... else and switch blocks. Remove all that cruft and just add those two entries to the timeline, and see if the widget updates. If it doesn't, then there's something wrong with the timeline. If it does, then your issue is with your other code.
Topic: App & System Services SubTopic: General Tags:
Sep ’22
Reply to iOS 16.0 beta 7 broke Text(Date(), style: .timer) in SwiftUI widgets
Since the RC hasn't fixed this at all, I can only hope they put out a further release candidate before the main public release. None of my widgets work properly now. "How are your Watch complications?" Well, they don't work at all. They kind of work in the Simulator, but on a real device they're fubar'd. Pretty shocking release from Apple, and zero help from their engineers on these forums.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’22
Reply to UIImage (named : ""\(UserDefaults.standard.string(forKey: "value") ?? "")") doesn't match
Firstly, I wouldn't use this: Image_Exo01.image = UIImage (named: "(UserDefaults.standard.string(forKey: "Nom_Exo_1_Jour_1_Programme_1") ?? "")") (specifically: ?? ""). What you're saying there is, try and get a UIImage for this string value, but if that string value doesn't work out, try and get me a UIImage for the image named "". Determine whether the image exists before attempting to fetch it. Secondly, why do you need it as a UIImage? If the image is in your assets can't you use Image("myImage")?
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to MacOS Automator: Select different files from Folder structure and move to folder
You could write a shell script that takes each line from a plain text file, checks if the file exists, then moves/copies it to your chosen location. The plain text file should look something like this: /Users/username/Pictures/Projects/00001.psd /Users/username/Pictures/Projects/00002.psd /Users/username/Pictures/Projects/Updated/00003.psd /Users/username/Pictures/Projects/00004.psd etc. Each file name should be unique, i.e. you can only have one file named 00001.psd. This works for me: Create an empty text file somewhere useful, like in your /Users/username/ directory. Edit the file and put this in it: #!/bin/bash input=$1 dest=$2 while IFS= read -r line do if [ -f "$line" ]; then cp $line "$dest" else echo "$line does not exist." fi done < "$input" Rename the file to something like "move_files.sh" (the .sh extension is important). Launch a Terminal window. You should be in your home folder by default, i.e. /Users/username/. If you aren't already in that location you'll need to cd to it, i.e. cd /wherever/the/file/is/. You may not need to do this, but can't hurt: chmod u+x move_files.sh. That makes it executable. You use the script like this: move_files.sh /Users/username/Downloads/Work/files.txt /Users/username/WorkInProgress/ The first parameter is the location and name of the plain text list of files. The second param is the destination. Be sure to add a trailing slash /. The script is written to copy the files first rather than move them, so if it works for you, you can change the cp command on line 9 to mv. Hope this helps.
Sep ’22
Reply to UIImage (named : ""\(UserDefaults.standard.string(forKey: "value") ?? "")") doesn't match
The text stored in the UserDefaults key will be the name of whatever image you've stored in there, so it'll be your asset image name, I agree, but my point is that your code is going to either return the image name OR it's going to return "" (because you've given the default image name of ""), and that isn't going to give you an image. Check that the key is populated before you try to create an image from it: let image1Name = UserDefaults.standard.string(forKey: "Nom_Exo_1_Jour_1_Programme_1") ? "" let image2Name = UserDefaults.standard.string(forKey: "Nom_Exo_2_Jour_1_Programme_1") ? "" if(image1Name != "") { Image_Exo01.image = UIImage(named: image1Name) } if(image2Name != "") { Image_Exo02.image = UIImage(named: image2Name) } Do the images the user is selecting actually exist in your assets? You misunderstood. I wasn't saying to use an image called "myImage", I was saying that you could use Image() rather than UIImage(), but if you need a UIImage, go for it.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22