Por alguna razon no logro realizar ninguna peticion al servidor ya que me manda error, pero solo cuando es un dispositivo real, en el emulador si funciona perfectamente. El reporte del error me dice que el error esta al crear la url pero no se porque si en el emulador funciona bien, eh cambiado el codigo, eh usado Alamofire y tambien URLSession pero con ambos me manda error al realizar la peticion. Este es el reporte que me manda app store connect:
Thread 0 name:
Thread 0 Crashed:
0 Compra Todo 0x000000010301d3cc Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value + 0 (DetallesProducto.swift:1751)
1 Compra Todo 0x000000010301d3cc DetallesProducto.tempGetInfoWithCompletion() + 1052 (DetallesProducto.swift:1751)
2 Compra Todo 0x000000010301ce40 DetallesProducto.viewDidLoad() + 4188 (DetallesProducto.swift:200)
3 Compra Todo 0x000000010301d3f0 @objc DetallesProducto.viewDidLoad() + 28 (<compiler-generated>:0)
4 UIKitCore 0x00000001ac2fd65c -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 100 (UIViewController.m:2283)
5 UIKitCore 0x00000001ac3020ec -[UIViewController loadViewIfRequired] + 936 (UIViewController.m:3382)
6 UIKitCore 0x00000001ac3024f4 -[UIViewController view] + 28 (UIViewController.m:3404)
7 UIKitCore 0x00000001ac261d68 -[UINavigationController _startCustomTransition:] + 1180 (UINavigationController.m:1893)
8 UIKitCore 0x00000001ac275c30 -[UINavigationController _startDeferredTransitionIfNeeded:] + 688 (UINavigationController.m:6719)
9 UIKitCore 0x00000001ac276fd0 -[UINavigationController __viewWillLayoutSubviews] + 172 (UINavigationController.m:6988)
10 UIKitCore 0x00000001ac25a530 -[UILayoutContainerView layoutSubviews] + 224 (UILayoutContainerView.m:86)
11 UIKitCore 0x00000001acdf97fc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2144 (UIView.m:17176)
12 QuartzCore 0x00000001af396494 -[CALayer layoutSublayers] + 284 (CALayer.mm:9644)
13 QuartzCore 0x00000001af39c5ec CA::Layer::layout_if_needed(CA::Transaction*) + 468 (CALayer.mm:9518)
14 QuartzCore 0x00000001af3a7128 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 140 (CALayer.mm:2468)
15 QuartzCore 0x00000001af2efb44 CA::Context::commit_transaction(CA::Transaction*, double) + 296 (CAContextInternal.mm:1992)
16 QuartzCore 0x00000001af3194e4 CA::Transaction::commit() + 676 (CATransactionInternal.mm:438)
17 QuartzCore 0x00000001af319ef8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92 (CATransactionInternal.mm:890)
18 CoreFoundation 0x00000001a880ef2c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1758)
19 CoreFoundation 0x00000001a8809e20 __CFRunLoopDoObservers + 420 (CFRunLoop.c:1868)
20 CoreFoundation 0x00000001a880a29c __CFRunLoopRun + 968 (CFRunLoop.c:2910)
21 CoreFoundation 0x00000001a8809ba8 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3192)
22 GraphicsServices 0x00000001b2979344 GSEventRunModal + 160 (GSEvent.c:2246)
23 UIKitCore 0x00000001ac9453e4 UIApplicationMain + 1932 (UIApplication.m:4823)
24 Compra Todo 0x0000000102fb2900 main + 68 (WishModalRemove.swift:15)
25 libdyld.dylib 0x00000001a86918f0 start + 4
url
antes de concatenar?!
directamente porque si falla entonces crashea tu app. Deberías verificar si tiene valores antes de poder utilizar.