As others said, you have to press the save button multiple times until the new address is saved. I do not understand why Apple does not fix these issues. Is not the first time that I face something like this.
Post
Replies
Boosts
Views
Activity
I was able to skip code signing following this Stack overflow answer - https://stackoverflow.com/questions/31039513/how-can-i-skip-code-signing-for-development-builds-in-xcode
The loop will finish when arrayOfItems is finished. But it is a dynamic array in the sense that sometimes n could be 100 or 1000. I think I could approach the problem like this but it is not efficient and is difficult to read:
In this example, assume arrayOfItems is an array of String items not Integers, so in the loop I will use .indices to obtain the index.
swift
import Foundation
let arrayOfItems = (0...100)
let arrayOfFive = ["Item1", "Item2", "Item3", "Item4", "Item5"]
for index in arrayOfItems {
if (0...4).contains(index) {
print(index)
print(arrayOfFive[index])
} else if (5...9).contains(index) {
print(index)
print(arrayOfFive[index - 5])
} else if (10...19).contains(index) {
if (10...14).contains(index) {
print(index)
print(arrayOfFive[index - 10])
} else {
print(index)
print(arrayOfFive[index - 15])
}
}
}
// Using this approach I will have to create if statements every tens. So, it's not generic for any n numbers
Thanks for your response. It's very annoying when this huge warning shows up in the console.
It works perfectly, thank you very much.
I've got a coffee and know I see things clear. I just have to make the data Hashable
import SwiftUI
struct CompanyFinancialReportResponse: Codable {
var results: [CompanyFinancialReportResult]
}
struct CompanyFinancialReportResult: Hashable, Codable {
var tag: String
var valueNum: Float
var valueId: String
var endtime: String
}
Thank you so much OOPer, it works perfectly. I'm new at programming and I'm trying to learn it. Doing my best :D