Post

Replies

Boosts

Views

Activity

Reply to AVCaptureDevice requestAccessForMediaType
Hi,MacOS 10.15.2<key>NSMicrophoneUsageDescription</key> <string>Record audio!</string>This works in a swift project:AVCaptureDevice.requestAccess(for: .audio) { granted in if granted { //self.setupCaptureSession() } }This doesn't work in an ObjectiveC project: (Thread 6: signal SIGABRT)[AVCaptureDevice requestAccessForMediaType:AVMediaTypeAudio completionHandler:^(BOOL granted) { if (granted) { // [self setupCaptureSession]; } }];What am I not doing correcty or forgot to include?Thanks, paul
Jan ’20
Reply to Read binary file in swift
Hi Quinn, The data is too big to read all into memory. I usually read my header which shows version and store offsets 'UInt64' to the data in the file (as 'pages') then close the file. When required, open the file again and jump to the data required as per the offsets read earlier. I really need to easily read chars, and ints of various sizes and big chunks as they may be png or mp3s. The char is read then a switch statement is used to read the data 'defined' by the char. The data is 'trusted?' as I wrote another app, on Windows Csharp, to create and assemble it, everything (png, mp3 etc) is created my me - it's educational software for high schools for Windows and Mac. I'm trying to convert my Objective-C app to Swift after converting my Windows version from Cplusplus to Csharp. (I'm worried that Microsoft will kill Cplusplus so went to Csharp and now worried that Apple will kill Objective-C so thinking of going to Swift. Or maybe I should just retire and go to the beach?) Thanks for your help. Paul
Jul ’20
Reply to Read binary file in swift
Hi, Managed to read a char... :-) // char var ch : UInt8 = 0 var data = fileHandle?.readData(ofLength: MemoryLayout.size(ofValue:ch)) data?.copyBytes(to: &ch, count: MemoryLayout.size(ofValue:ch)) var id = Character(UnicodeScalar(ch)) But this is no-go...	:-( // UInt16 var num : UInt16 = 0 data = fileHandle?.readData(ofLength: MemoryLayout.size(ofValue:UInt16())) data?.copyBytes(to: &num, count: MemoryLayout.size(ofValue:num)) Cannot convert value of type 'UnsafeMutablePointer<UInt16>' to expected argument type 'UnsafeMutablePointer<UInt8>' Paul
Jul ’20
Reply to certificates
OK, so after a bit of DuckDuckGo-ing it seems that the only certificates I need are:- Mac Development Developer ID Application I no longer do iOS and I have no intention, and never will, of selling through the Apple Apps Store. So does that mean that I can delete all the other stuff I've acquired over the years? Thanks, Paul
May ’21
Reply to App Store Connect Operation Error
Early this year I decided I would move development from my 2012 MacBook Pro to an intel Mac mini. Out of curiosity, I tried it on my old MacBook which was worked fine the last time almost a year ago. Now it doesn't work and I get a connection error with "You must first sign the relevant contracts online. (1048)". But as far as I can see it's all signed from last year. OFFS Apple, why is this always so annoying and difficult. Is there a way to completely remove all certificates etc and start again? Any help appreciated.
May ’21
Reply to App Store Connect Operation Error
Hi, Still having trouble. Just wondering... (I've moved development back and forth from 3 or 4 computers over the last few years.) How many certificates do I need? I have:- 5 Developer ID Application macOS, all current. 2 Mac Installer Distribution macOS, all current. 1 Distribution for ALL, current. 3 Development for ALL, all current for 3 computers. Can I delete most certificates and only keep 1 each for:- 1 Developer ID Application macOS. 1 Mac Installer Distribution. 1 Distribution ALL. 1 Development for the current computer I'm using now. If I do that will xcode work it out without too much messing about? Any help appreciated. Thanks Paul
Jun ’21
Reply to How liable is Apple?
More info... Apple's bug first appeared in iOS 14, iOS 8,9,10,11,12,13 had no problem. My data for the App was created on macOS 10.9 (or earlier, don't remember) and I've noticed reconstructing the data was no problem on subsequent flavours of macOS until Big Sur which now has the same bug as in iOS14 - it shows exactly the same problem when rendering a PDF. The PDF displays without problem in Safari, Adobe, Microsoft Edge, IE, and Firefox, Opera, Brave, Chrome on Linux and Windows. Obviously it's something Apple did.
Oct ’21