Posts

Post not yet marked as solved
4 Replies
2.4k Views
If I want create pdf to var dokumnetpdf from picker, var dokumnetpdf is empty. How I do that? myCode:  var dokumnetpdf = PDFDocument() func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {         guard let myURL = urls.first else {             return         }         //print("import result : (myURL)")          let url: URL = myURL         //print("PDF link:(myURL)")         pdfname = url.lastPathComponent        // print("PDF name: (pdfname)")        // textfield.text = pdfname         dokumnetpdf = PDFDocument(url: urls.first!)     } Error LoG: import result : file:///private/var/mobile/Library/Mobile%20Documents/comappleCloudDocs/Desktop/rezervacefo.pdf PDF link:file:///private/var/mobile/Library/Mobile%20Documents/comappleCloudDocs/Desktop/rezervacefo.pdf PDF name: rezervacefo.pdf doc:nil AMC/DocumentUploadViewController.swift:68: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value 2022-01-07 11:11:49.159474+0100 AMC[71388:8043348] AMC/DocumentUploadViewController.swift:68: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
2 Replies
612 Views
Can someone help me please? Thanks I have problem with copy file to remote server. file "structure.php" is imported in my Xcode project. My code is bellow: let fileManager = FileManager.default         let fromURL = Bundle.main.bundleURL.appendingPathComponent("structure.php")       let toURL =  URL(fileURLWithPath: "smb://192.168.x.x/web")             do {                 try fileManager.copyItem(at: fromURL, to: toURL)             } catch let error as NSError {                 if error.code == NSFileWriteFileExistsError {                     print("File exists. Trying to replace")                 }             }
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
1 Replies
2.3k Views
Hi, i have some problem after upgrading Xcode from 13 to 14 this my code. In attachment is print screen of fault. Thanks for help.  private lazy var boradManger: BLTNItemManager = {         let item = BLTNPageItem(title: "Notification")         item.image = UIImage(named: "info")         item.image = resizeImage(image: item.image!, targetSize: CGSize(width: 200 , height: 200))         item.actionButtonTitle = "Continue".localizable()         item.alternativeButtonTitle = "Later".localizable()         item.descriptionText = notifikace         item.actionHandler = { _ in             self.dismiss(animated: true, completion: nil)         }         item.alternativeHandler = { _ in             self.dismiss(animated: true, completion: nil)         }         return BLTNItemManager(rootItem: item)     }()
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
2 Replies
926 Views
good day, I need help with see below when the notification is OK, the badge is added. If the application is opened the badge disappears. that is right. when a new notification arrives badge it is not 1 but the value is previous value +1. I need the value to be 0 when the application is opened. it's about resetting the badge value. I don't know if this code Is correct for my functionality. func applicationDidBecomeActive (_ application: UIApplication) { UIApplication.shared.applicationIconBadgeNumber = 0 } the value does not reset but only disappears.
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
0 Replies
807 Views
I used the function below. The IOS feature works but does not work on WatchOS. does not print an error but does not download data. it will not connect to the database either. can you please help me with the modification? func queryDatabaseDrive(){        let query = CKQuery(recordType: "Drive", predicate: NSPredicate(value: true))        database.perform(query,inZoneWith: nil){(records, error) in            guard let records = records else {                return            }           test = records            self.tableRefresh()            print("test (test.count)")        }     }
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
0 Replies
407 Views
Hi could someone help me? See. picture. When the tapping button plus you will show me a new viewcontroller (Second). In Second I will enter data and tapping on the Save button. The data is saved correctly into Variable. Second is a dismissed. How do I refresh table in Main after storing data from Second After Second Dismissed?
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
4 Replies
1.2k Views
Hello, I have problem with delete item from keychain. I use this code in my app. result code is state = 0 . Item in keychain was not deleted.  let query2 = [                           kSecClass: kSecClassGenericPassword,                           kSecAttrService: "xx.xx.xx"                         ] as CFDictionary var state =  SecItemDelete(query2) print("Operation finished with status delete: (state)")
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
0 Replies
544 Views
Hello, I have problem witch import this Framework YOChartImageKit to watch extension. I wold like to use this framework for chart in image. I was install pod and I can't import this framework to Watch Extension for use. Can you help me someone? Thank very much.
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
0 Replies
462 Views
Hello How can I create same chart as activity Ring without use healtkit? I try to use some pod as "YOChartImageKit" But this pod not function on Apple Watch 5 series, where i tested it.
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
1 Replies
1.3k Views
How receive data background if app not Running? Hell, I need recive data from iPhone to my app in Apple Watch background if apple Watch app not running. in extension Delegate I use these func  session(_ session: WCSession, didReceiveMessage message: [String : Any]) and session(_ session: WCSession, didReceiveMessageData messageData: Data, replyHandler: @escaping (Data) -> Void) if app on Apple Watch data not received.
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
0 Replies
577 Views
Hello, I have problem with submision from App Store I use to activity ring in Watch extension in my App. I use activity rings to plot the values that the application has, but my application is not primarily intended for fitness. I enter my values that are obtained from the application in Iphone into the rings activity. how can I use activity rings to allow the app store to upload the app? can I use activitity rings without health kit? Issue with submission Guideline 2.5.1 - Performance - Software Requirements We noticed that your app uses HealthKit, but your app does not appear to include any primary features that require health or fitness data.  The intended use of HealthKit is generally to share health or fitness data with other apps or devices as a part of the app's core functionality.  Next Steps To resolve this issue, please remove any HealthKit functionality from your app, as well as any references to this app’s interactivity with HealthKit from the app or its metadata. This includes removing any HealthKit-related keys in your app's Info.plist as well as removing any calls to HealthKit APIs, including those from 3rd party platforms, from your app.
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
4 Replies
728 Views
Could anyone help me? If push view app crashed only on real Apple Watch, not Crashed in Watch simulator.  override func awake(withContext context: Any?) {         super.awake(withContext: context)   let imageUrlStringQR = "http://192.168.x.x/Image/MainCollection/MainBG.png"         let imageUrlQR = URL(string: imageUrlStringQR)         let imageDataQR = try! Data(contentsOf: imageUrlQR!)         let imageQR2 = UIImage(data: imageDataQR)         QRImage.setImage(imageQR2)     }
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
3 Replies
650 Views
Hello, how can i send data to apple watch if app is not running. I need the application in apple watch to run with data from iphone as (login, password)) I send data to apple watch when I click the Sign In button. I need the data to be stored in apple watch even if the application in apple watch is not running. as soon as I run it, the data that was received from the Iphone must be used.
Posted
by Radim007.
Last updated
.
Post not yet marked as solved
0 Replies
496 Views
How I send remote notification to multiple device If I am not use firebase?
Posted
by Radim007.
Last updated
.