Post not yet marked as solved
it's infuriating that it sometimes only takes 2 minuets and then takes hours on other devices. knowing how long it's going to take would actually give us information to make adjustments.
I'm. asking this one to see how many other developers would also like this feature, and to see if anyone knows of an add-on or such.
Post not yet marked as solved
I'm using this documentation as my base https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation
I'm failing to understand how I would simply adapt the app to load the json remotely
import Foundation
var landmarks: [Landmark] = load("landmarkData.json")
func load<T: Decodable>(_ filename: String) -> T {
let data: Data
guard let file = Bundle.main.url(forResource: filename, withExtension: nil)
else {
fatalError("Couldn't find \(filename) in main bundle.")
}
do {
data = try Data(contentsOf: file)
} catch {
fatalError("Couldn't load \(filename) from main
snippet from Model data.swift
the only example I've found is included below, however it's using an entirely different setup and does not use a detail view.
import SwiftUI
import Combine
struct ContentView: View {
@ObservedObject var fetcher = MovieFetcher()
var body: some View {
VStack {
List(fetcher.movies) { movie in
VStack (alignment: .leading) {
Text(movie.name)
Image(movie.thumbnail)
Text(movie.released)
.font(.system(size: 11))
.foregroundColor(Color.gray)
}
}
}
}
}
public class MovieFetcher: ObservableObject {
@Published var movies = [Movie]()
init(){
load()
}
func load() {
let url = URL(string: "https://wolvideos.web.app/videos.js")!
URLSession.shared.dataTask(with: url) {(data,response,error) in
do {
if let d = data {
let decodedLists = try JSONDecoder().decode([Movie].self, from: d)
DispatchQueue.main.async {
self.movies = decodedLists
}
}else {
print("No Data")
}
} catch {
print ("Error")
}
}.resume()
}
}
struct Movie: Codable, Identifiable {
public var id: Int
public var name: String
public var thumbnail: String
public var released: String
enum CodingKeys: String, CodingKey {
case id = "id"
case name = "name"
case thumbnail = "thumbnail"
case released = "description"
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
If possible can someone explain how and the best way to load a json file and then let the app format it into detail views?
Post not yet marked as solved
I'm sick of Xcode failing to build on my registered device! What the heck is Xcode's problem now?
Unable to install ""
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
-
No code signature found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
User Info: {
DVTRadarComponentKey = 261622;
MobileDeviceErrorCode = "(0xE800801C)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x00000001259a193f DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x00000001259e0124 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x0000000108bbcb43 DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x00000001259dfe65 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4 IDEiOSSupportCore 0x0000000125850d28 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
5 DVTFoundation 0x0000000108ceb2aa DVT_CALLING_CLIENT_BLOCK + 7
6 DVTFoundation 0x0000000108cececc __DVTDispatchAsync_block_invoke + 1191
7 libdispatch.dylib 0x00007fff201cd52d _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff201ce717 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff201d454e _dispatch_lane_serial_drain + 606
10 libdispatch.dylib 0x00007fff201d501b _dispatch_lane_invoke + 375
11 libdispatch.dylib 0x00007fff201deb9b _dispatch_workloop_worker_thread + 819
12 libsystem_pthread.dylib 0x00007fff2034d4f2 _pthread_wqthread + 314
13 libsystem_pthread.dylib 0x00007fff2034c4c3 start_wqthread + 15
);
}
-
System Information
macOS Version 11.0 (Build 20A5374g)
Xcode 12.0.1 (17220)
Post not yet marked as solved
I'm using sidecar as a second display and have "displays as separate windows off" and restarted! Why does apple insist on clipping the windows too locations I did not specify even using Option key still clips the window to one window not spanning both windows! when using a PC this is very simple on MacOS it seems Apple has made it a pain to do something so simple!
Post not yet marked as solved
im having so much trouble trying to figure pout how I can get a SwiftUI button to link to a different SwiftUI file / view that is giving me so much trouble.
First View - https://developer.apple.com/forums/content/attachment/1edea652-6345-4032-8bf1-04b41825c4db
Second View - https://developer.apple.com/forums/content/attachment/85511659-3631-4fdc-b30f-6f0e94e81a2e
'
Attempted solution - https://developer.apple.com/forums/content/attachment/1d83eb4b-6fbe-481b-ad94-e36ad283760f
This is the Code I was attempting to bridge them with but I keep ending up with many different errors. So what am I not getting... there has to be a way to do this if not then what's the point of using SwiftUI?
Post not yet marked as solved
How can I get SwiftUI to load 8 images horizontally but if the third image happens to go off screen it puts it in a Vstack underneath the 1st image with the same padding... and if three can fit on the screen it does the same to the 6th.
I can not find anyway to do this! This should be simple and is easy to achieve using UIkit.
Post not yet marked as solved
I'm sick of this I can't figure out why Apple makes its so hard to get an app uploaded anymore... I have all the stupid icon files in the app and I'm still getting these errors.
App Store Connect Operation Error
ERROR ITMS-90032: "Invalid Image Path - No image found at the path referenced under key 'CFBundleIcons': 'AppIcon74x55'"
App Store Connect Operation Error
ERROR ITMS-90649: "Missing App Icon. The bundle doesn’t contain an iMessage app icon. iMessage app icons must be 81x60 pixels in .png format."
App Store Connect Operation Error
ERROR ITMS-90649: "Missing App Icon. The bundle doesn’t contain an iMessage app icon. iMessage app icons must be 148x110 pixels in .png format."
App Store Connect Operation Error
ERROR ITMS-90649: "Missing App Icon. The bundle doesn’t contain an iMessage app icon. iMessage app icons must be 134x100 pixels in .png format."
App Store Connect Operation Error
ERROR ITMS-90649: "Missing App Icon. The bundle doesn’t contain an iMessage app icon. iMessage app icons must be 180x135 pixels in .png format."
Can anyone please tell me why ecocide is acting like a Microsoft product?
My iPhone keeps randomly freezing. It responds to the volume and power buttons, if im luckly enough to get the screen working and reboot, in some instances it freezes upon booting to the front screen. im unable to put it into DFU mode, this started on the 13.1 update and now continued and become worse in the 13.1 (beta 3) update. Also clearing all apps does nothing and freezes still ocurr. Is anyone else exspirancing this or have any clue whats causing this?
Post not yet marked as solved
So i am having random i assume "Freezes" on iOS 13.1, the touch screen becomes unresponsive and seem's to hang on an input that wasnt the last touch. also siri, the volume and power button remain usable and respond as normal. Anyone else experiencing this? I have not been able to find the source of these freezes yet.
Post not yet marked as solved
Why does my Mac insist on downloading the entire macOS beta only for it not to be able to install. if there is an update it should just install the update right? What's the issue here, and is anyone else having problems? I hope i dont have to wipe and reinstall again.