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
Post
Replies
Boosts
Views
Activity
Found it.
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
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
Thanks very much, OOper and Quinn.
So now can't retire and can't go to the beach :-(
But getting too old for this stuff now, started in 1990 with DOS using C and ThinkC on the Mac.
Regards,
Paul
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
Just tried it and it still has the error. Anyway, thanks for your response.
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.
Hi Eskimo,
Filed a bug about a spelling error? When I put in a bug it completely screws things up - not just a simple spelling 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
On a new machine I install everything fresh and copy the projects from the old computer to the new one. I don't know how I got so many certificates. Can I delete (revoke) most of them? I would like to get rid of those I don't need and simplify life.
Eskimo, thank you very much for your help. But I do I tell the ones I'm not using?
I've just bought a M1 mac-mini and now want to move development to it (I still have another 2 computers that I use occasionally for development but wish to stop using them now as they are quite old, years-2010 and 2012). Any tips, so I dont mess up?
Regards,
Paul
Quinn, thank you again for all your help. It all works on the new M1 Mac-mini (cheapest one).
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.
What a surprise! Apple's bug still exits in 15.1. How do I claim, from Apple, lost revenue and the tarnish of our reputation because of Apple's inability and/or indifference to fix this bug?