Looks like Apple changes not mentioned anywhere. Just follow the steps and it should work again:
Menubar → Product → Destination → Destination Architectures → Show Both
Run the project on a device you desire, but with Rosetta. (i.e., iPhone 14 Pro Max (Rosetta)
Post
Replies
Boosts
Views
Activity
Changed the variables to [String] in the TimelineEntry and I achieved what I want.
I updated my struct and entry line like this:
var newsList: [String] = [] // First, appending the fetched data here
var imageList: [String] = []
struct NewsEntry: TimelineEntry {
var date: Date
let configuration: ConfigurationIntent
let header: [String]
let imageUrl: [String]
}
for index in 0 ..< 5 {
newsList.append(data[index].title!)
imageList.append(data[index].imageUrlDetail!)
}
// Then using passing the arrays to TimelineEntry as [String]
for hourOffset in 0 ..< 5 {
let entryDate = Calendar.current.date(byAdding: .minute, value: hourOffset, to: currentDate)!
let entry = NewsEntry(date: entryDate, configuration: configuration, header: newsList, imageUrl: imageList)
entries.append(entry)
}
The only problem right now is I don't know if I'm using it correctly because I get crash with "Index out of range" on entry.imageUrl[index]. This is the LazyVGrid my updated View function:
LazyVGrid(columns: columns) {
ForEach((0..<4)) { index in
ZStack (alignment: .bottomLeading) {
if let url = URL(string: entry.imageUrl[index]), let imageData = try? Data(contentsOf: url),
let uiImage = UIImage(data: imageData) { // Thread 1: Fatal error: Index out of range
Image(uiImage: uiImage)
.centerCropped()
.frame(maxHeight: 150, alignment: .center)
.cornerRadius(10)
.overlay(RoundedRectangle(cornerRadius: 10)
.stroke(Color.gray, lineWidth: 1))
.shadow(radius: 10)
} else {
Image("ph_background")
.centerCropped()
.frame(maxHeight: 150, alignment: .center)
.cornerRadius(10)
.overlay(RoundedRectangle(cornerRadius: 10)
.stroke(Color.gray, lineWidth: 1))
.shadow(radius: 10)
}
Text(entry.header[index])
.font(.system(size: 12))
.foregroundColor(.white)
.fontWeight(.light)
// .frame(maxHeight: 50)
.background(Rectangle().fill(Color.black).blur(radius: 20))
.padding(.bottom, 5)
.padding(.leading, 5)
.padding(.trailing, 5)
.padding(.top, 5)
}
}
.frame(height: 160)
}
App Store Connect -> Choose the application you want to change pricing
And change the pricing from the dropdown menu then press Save button.
Don't forget that your application's rankings will reset after pricing change.
I think Spotify does update its UI changes without actually updating the application all the time.
I think you can achieve this with backend services easily. You can set up your new views including UI changes and check if a variable from the service is true or false. If true, use the UI with changes, else use the old one.
I don't know about guidelines tho. It sounds easily abusable.
An account with Administrator rights would be dangerous to give 3rd party people because Administrator accounts have permission like withdrawing the income money etc.
You (or even themselves) can create an account and then you can give App Manager rights to the account, it'd be enough if their job is gonna be only to do the upload process.
They might need your rights while setting the certificates, but other than that, App Manager rights should be alright.
Did you submit and publish your latest build/version with new screenshots? You need to submit your application again for any screenshot change.
‘awakeFromNib()’ is the equal of ‘viewDidLoad()’ for custom cells (aka XIBs) and I register the cells in where it should be. I already tried debugging and see if the method being called, it actually does run the register steps, but somehow the cells are not registered in the end.
I don't think this is the correct forum to ask it, but here is the article was written by Apple.
Installing Apple Beta Software
I have found the answer by using delegates. Now I can hide/unhide (edit, overall) the view's properties. This was the problem answered by Sh_Khan:
Problem is here
DetailViewController().setupPodcastPlayer(link: url)
This DetailViewController() is a new instance not the presented one , hook the real shown one and change it's attribute as needed through delegate or a notification if you need to
I have declared a delegate in PodcastViewCell:
swift
var delegate: PodcastViewCellDelegate?
and its protocol for passing data :
swift
protocol PodcastViewCellDelegate {
func podcastButtonClicked(podcastUrl: String)
}
In the View Controller, I want to edit element from, added this :
swift
extension DetailViewController: PodcastViewCellDelegate {
func podcastButtonClicked(podcastUrl: String) {
setupPodcastPlayer(link: podcastUrl)
podcastPlayerView.isHidden = false
}
}
Now my player works as expected and I can hide/unhide my UIView!
Thank you for all of your efforts again! Hope to see you in another thread 😅
I think so. If it didn't connect correctly, I wouldn't hide or unhide the view in viewDidLoad right? I see the view controller's name is correct under Referencing Outlets when I right click the view but still tried removing and then adding the connection again but no use.
I can easily hide/unhide the podcastPlayerView in viewWillAppear, or a function calling in the viewWillAppear. But after the load, if any function tries to hide/unhide the view, the application crashes. It's like the view gets destroyed after load. Searched for a force loading method but couldn't find anything working for me. One of them was adding this to viewDidLoad() but I still can't reach the podcastPlayerView
swift
view.addSubview(podcastPlayerView)
The comments on lines 50 and 16 are for that purpose.
Named podcastView as podcastPlayerView
My view controller for podcasts table, now it plays the podcast too.
swift
class DetailViewController: BaseViewController {
@IBOutlet weak var collectionView: UICollectionView!
@IBOutlet weak var podcastPlayerView: UIView!
var podcastLink: String = ""
static var itemId = "0"
var player: AVPlayer?
var playerItem: AVPlayerItem?
var timeObserverToken: Any?
var played = false
override func viewDidLoad() {
super.viewDidLoad()
"self.podcastPlayerView.isHidden = false" "-------- Unhiding process successful in this step"
}
override func viewWillDisappear(_ animated: Bool) {
showPodcastButton = false
player?.pause()
player?.replaceCurrentItem(with: nil)
player = nil
}
func setupPodcastPlayer(link: String) {
player?.pause()
player?.replaceCurrentItem(with: nil)
player = nil
if !played {
if link != "" {
playerItem = AVPlayerItem( url:NSURL( string:link )! as URL )
player = AVPlayer(playerItem:playerItem)
player!.rate = 1.0;
player!.play()
played = true
didPlayedOnce = true
podcastPlay()
} else {
"link empty"
}
} else {
player?.replaceCurrentItem(with: nil)
played = false
}
}
func podcastPlay() {
self.podcastPlayerView.isHidden = false "---- If I try to unhide here, app crashes."
"Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value"
}
}
The "Play Button" action from PodcastViewCell, where I call ViewController's player function. This only passes the cell's podcast link.
swift
@IBAction func playPodcast(_ sender: Any) {
NotificationCenter.default.addObserver(self, selector: #selector(playerItemDidReachEnd), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: nil)
if let itemOffset = DetailViewController.allItems?.itemListv2.firstIndex(where: {$0.itemId == itemAuthor?.itemId}) {
podcastLink = DetailViewController.allItems?.itemListv2[itemOffset].podcastsound
}
let url = podcastLink ?? " "
requestAuthorDetailViewController.setupPodcastPlayer(link: url)
}
I am able to hide/unhide the view in general when I try to do it on most functions. But I get the error when I try to do it on one specific function: the function I call from nib file. I don’t know what is the issue but I think this usually happens if I try to change an element’s properties before loading it. But all of the other elements are loaded when I call the function, like play button or podcast title label.
I've achieved to play my player outside of the xib, in my view controller as you suggested earlier. Thanks for the idea again!
Then I created a container view for the playerViewCell nib on my storyboard for the player and marked it as hidden. When I try to unhide it with swift
podcastView.isHidden = false
I always get
debugger
"Unexpectedly found nil while implicitly unwrapping an Optional value"
I don't know why it isn't loaded even tho the controller's other elements (like play button, etc.) on the screen.
(Even tried to use dummy UIView and just unhide it but still got the same error.)