Post

Replies

Boosts

Views

Activity

import pdf from url
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
4
0
3.1k
Feb ’23
FileManager Copy file to remote server.
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")                 }             }
2
0
811
Dec ’22
is ambiguous for type lookup in this context
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)     }()
1
0
3.8k
Sep ’22
Badge UIApplication
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.
2
0
1.2k
May ’22
Get data From iCloud database on Apple Watch
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)")        }     }
0
0
1.2k
May ’22
Refresh UIViewController with TableView
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?
0
0
541
Mar ’22
Keychain delete not work
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)")
4
0
1.7k
Feb ’22
How receive data background if app not Running?
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.
1
0
1.7k
Feb ’22
Deploy app with HealthKit
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.
0
0
789
Feb ’22
Image in WatchKit
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)     }
4
0
944
Feb ’22
WCSessionDelegate
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.
3
0
867
Feb ’22
import pdf from url
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
Replies
4
Boosts
0
Views
3.1k
Activity
Feb ’23
FileManager Copy file to remote server.
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")                 }             }
Replies
2
Boosts
0
Views
811
Activity
Dec ’22
is ambiguous for type lookup in this context
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)     }()
Replies
1
Boosts
0
Views
3.8k
Activity
Sep ’22
Badge UIApplication
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.
Replies
2
Boosts
0
Views
1.2k
Activity
May ’22
Get data From iCloud database on Apple Watch
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)")        }     }
Replies
0
Boosts
0
Views
1.2k
Activity
May ’22
Refresh UIViewController with TableView
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?
Replies
0
Boosts
0
Views
541
Activity
Mar ’22
Keychain delete not work
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)")
Replies
4
Boosts
0
Views
1.7k
Activity
Feb ’22
Can't import pod to Watch Extension.
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.
Replies
0
Boosts
0
Views
664
Activity
Feb ’22
Activity Ring
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.
Replies
0
Boosts
0
Views
579
Activity
Feb ’22
How receive data background if app not Running?
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.
Replies
1
Boosts
0
Views
1.7k
Activity
Feb ’22
Deploy app with HealthKit
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.
Replies
0
Boosts
0
Views
789
Activity
Feb ’22
Image in WatchKit
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)     }
Replies
4
Boosts
0
Views
944
Activity
Feb ’22
WCSessionDelegate
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.
Replies
3
Boosts
0
Views
867
Activity
Feb ’22
Notification multiple device
How I send remote notification to multiple device If I am not use firebase?
Replies
0
Boosts
0
Views
612
Activity
Feb ’22
Upload pdf remote synology NAS
Hi how i can upload pdf file to NAS synology
Replies
2
Boosts
0
Views
983
Activity
Jan ’22