Post

Replies

Boosts

Views

Activity

Reply to How to use different content in same timeline?
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) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’21
Reply to Updating an app with new features without uploading it to App Store(but still having it updated on all phones where the app is installed on)
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.
Aug ’21
Reply to apple testflight question
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.
Aug ’21
Reply to Building Error after updating to Xcode 14.3, now can't build even with 14.2
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)
Replies
Boosts
Views
Activity
Apr ’23
Reply to How to use different content in same timeline?
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) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Is it possible to change paid to free app
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.
Topic: Business & Education SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Updating an app with new features without uploading it to App Store(but still having it updated on all phones where the app is installed on)
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.
Replies
Boosts
Views
Activity
Aug ’21
Reply to apple testflight question
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.
Replies
Boosts
Views
Activity
Aug ’21
Reply to Wrong images in App Store
Did you submit and publish your latest build/version with new screenshots? You need to submit your application again for any screenshot change.
Replies
Boosts
Views
Activity
Aug ’21
Reply to Unable to Dequeue Registered CollectionViewCells
‘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.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’21