Post

Replies

Boosts

Views

Activity

id_token not unique across platforms?
We've implementing SIWA on iOS and a web application using Sign in with Apple JS. I've setup a service ID tied to the application ID and can succesfully get callbacks on both platforms. I'm noticing that the user id provided by the iOS app is different than the id provided by the web application.We were expecting these to be different so we can store on our end and identify the user without having to use their email.
1
0
713
Oct ’19
Disable peripherals on macOS programmatically
I know with Disk Arbitration framework, I can use DARegisterDiskMountApprovalCallback to prevent external disks from mounting. The disks includes thumb drive, external hard disk, etc., but there are many types of peripherals out there, like a usb wireless receiver or a USB ethernet adapter. Is there any other framework for us to use to enable/disable peripherals based on their I/O Registry properties? Thanks!
4
0
1.5k
Oct ’19
Files App to FTP
Trying to conenct to an FTP server from Files App (with server address and login credentials known to be correct) with no success.Files App will not accept ftp:// as prefix to server address; no prefix and smb:// produce error (implying address or login is incorrect when all known to be OK).I have another app which connects fine to my ftp server but I wanted to keep all my links in one place (the Files App).Any suggestions for a fix appreciated...
9
1
10k
Nov ’19
Verifying JWS E256 signature using the server’s public key Apple sign-in
https://developer.apple.com/documentation/signinwithapplerestapi/verifying_a_userAs per the above link, to verify an IDToken signature, Apple's public key needs to be used.I am able to fetch Apple's public key, but I am unable to verify the signature of IDToken via the public key. I am trying to implement this in Java.. What exactly is meant by "JWS E256 signature"? Which algorithm?Also, once public key is fetched (sample PK posted below), which algorithm to use to form the public key? { "keys": [ { "kty": "RSA", "kid": "AIDOPK1", "use": "sig", "alg": "RS256", "n": "someValue", "e": "someValue" } ] }
3
0
7.9k
Nov ’19
BGProcessingTask starts only if connected to power even if requiresExternalPower is NO
I setup a BGProcessingTask that do some work with the db and at the end sends an email. I've notice that, even if I set requiresExternalPower to false the task runs only when the device is connected to the power cable. I've tested setting the repeating time every 10 minutes. If the power cable is disconnected the task isn't launhed anuymore. After I attach the cable, waiting some minutes it restarts.
7
0
2.2k
Dec ’19
Emulating NFC Tag using iPhone Device
I'm trying to transfer data from one device to another using NFC. I'm trying to figure out if this is possible, I downloaded apple's sample project about CoreNFC, I was able to read NFC Tags (it wasn't a real NFC Tag, rather it was an NFC Tag emulated with an android device). Can I use my iPhone to emulate an NFC Tag to transfer data to another iPhone or Android device?
16
4
27k
Feb ’20
Siri custom intent and watchOS
Hi there,We're working on a companion watchOS app for our main Application. The main app has already Siri Extension support and it works quite well: we are able to disambiguate our requests and let the INIntent open the main app once we've a correctly identified request.We saw that watchOS also has support for Siri and Siri extensions in a stand-alone way. Our idea was to port most of the work done with iOS onto watchOS.- Let's assume that the working iOS siri extension is called: SiriExtension. It handles quite well the siri interaction from the iPhone and it allows to open our main app into the specified task and/or do some work in the background. No issues here.- Let's assume, also, that the watchOS siri extension we are working on is called: SiriWatchExtension. It should replicate the work done by its counterpart on iOS, but on watchOS and without a direct interaction with the iOS device: just like a stand-alone app.What's unclear to us is how watchOS and Siri extensions works in respect to the counter part on iOS. Specifically:- We all know that, if we exclude some specific special apps, the main interaction with Siri is done with INIntents donations and Shortcut (pretty much like SoupChef example).- We couldn't see a clear way to add Shortcuts from the watchOS app. Seems that the Shortcuts from iOS are "magically" available also on watchOS, but that is somewhat "unidirectional". - The shortcut that we invoke from the watchOS is triggering the IntentHandler from iOS, not the one we built into watchOS. Is this an intended behaviour? Are we missing something?- Is there a way to donate an intent from watchOS to Shortcut and let this intent trigger just only when we're talking with our watch device?- Also, is there a way to complete an action into the watch app other then the iOS app?Many thanks for the patience, and sorry again for the very long post.--c.
2
0
1.2k
Feb ’20
(How) can I use AVAudioRecorder with(in) CarPlay?
Hi!Currently I'm experimenting with building an iOS app that allows a motorist (app user) to do the following;Activate the app by using Siri Shortcut;Open up a specific ViewController within the app;Start a record session automatically and record speech from the user by using the AVAudioRecorder;Stop record session automatically when the users stopped speaking;Upload the recording.Now, I found out that when the user has its iPhone connected to CarPlay, Siri doesn't allow users to open an app that doesn't have CarPlay support. Following this finding I have two questions:Is there a workaround to activate/open an app with Siri, while it doesn't have CarPlay support?Is there a way to use AVAudioRecorder in order to achieve the goal to let the user record his speech, within CarPlay?Thanks!Luc.
1
0
627
Mar ’20
CTTelephonyNetworkInfo Crash in iOS 13.3.1, iPhone 8 Plus
Here is the crash message, can anyone help me to sovle it?# Version: 7.1.0 (200.2003091736)# Issue ID: 0c524b3dc585196cbe7ed564a4d841f3# Session ID: 30ad28258bdf47d4873df879a4e534cf_DNE_0_v2# Date: 2020-03-14T08:36:00Z# OS Version: 13.3.1 (17D50)# Device: iPhone 8 Plus# RAM Free: 1.5%# Disk Free: 22.3%#0. Crashed: com.apple.main-thread0 CoreFoundation 0x1adf9e444 -[__NSDictionaryM objectForKeyedSubscript:] + 1441 CoreTelephony 0x1b2862640 -[CTTelephonyNetworkInfo updateRat:descriptor:] + 1402 CoreTelephony 0x1b2862534 -[CTTelephonyNetworkInfo queryRatForDescriptor:] + 3923 CoreTelephony 0x1b28622f0 -[CTTelephonyNetworkInfo queryRat] + 2364 CoreTelephony 0x1b285ff90 -[CTTelephonyNetworkInfo initWithClient:] + 9285 CoreTelephony 0x1b285fb90 -[CTTelephonyNetworkInfo init] + 92Here is a part of core codes:CTTelephonyNetworkInfo *telephonyNetworkInfo = [[CTTelephonyNetworkInfo alloc] init];CTCarrier *carrier = telephonyNetworkInfo.subscriberCellularProvider;NSString *serviceCarrierName = carrier.carrierName;I use telephonyNetworkInfo, which is a temporary variable, to get the carrier's name. When I need a new carrier's name, I will use CTTelephonyNetworkInfo class to initialize a new one again. Is there a problem?
16
0
7.3k
Mar ’20
Hoe to create a ringtones on iPhone
Hello. I would like some advice on how to create ringtones from My Music Library. I would like to use iOS but might be willing to try using the Mac if that will work better. I know absolutely nothing about Audio editing and find it very intimidating. Not all of the ringtones I want to make are at the beginning of songs.I tried the free version of Ringtone Maker, and even got to the song I wanted, but I couldn't tell where I was in the track, as it told me where I was by a minute and second but wasn't playing through the headphones or speaker, so I was lost. Do I have to get this information from some other App beforehand? Any help would be much appreciated, preferably in layman's terms. Thanks.
1
0
1.6k
Mar ’20
Mac Catalyst can't schedule local notifications
Here is a list of things that Mac Catalyst do not appear to be able to do. Does anyone else experience this ?- MultiPeer connectivity on Mac Catalyst will not connect to an ios device. catalyst ask to join , Then accept on ipad I get this message on Ipad and catatlyst stalls out . [MCNearbyServiceBrowser] Browser got invite response with nil connectionData.- Playing Sounds ( AVAudioPlayer ) on Mac Catalyst does not play audio.- Scheduling local notifications on Mac Catalyst does not work.- Selection of a UICollectionView Cell does not select on Mac Catalystlet selectedItems = colVw.indexPathsForSelectedItems // Works fine on ipad but always empty for MacCatalyst
3
0
1.3k
Mar ’20
Not able to writeValue to a Bluetooth Peripheral when announced properties state writing+reading is available
I am trying to send a simple JSON to a connected Bluetooth peripheral but getting some problems in the process.The properties read from the peripheral in the didDiscoverCharacteristicsFor method are the following:po characteristic.properties ▿ CBCharacteristicProperties - rawValue : 10Which as this is a mask and if I am not mistaken this states that I can read (2) and write (8) from/to the device.I am writing the data as soon as I discover a new characteristic that matches the requirements in the following wayfunc peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService,error: Error?) { for characteristic in service.characteristics! { let characteristic = characteristic as CBCharacteristic print(characteristic.uuid) if characteristic.uuid.isEqual(RX_UUID) { // Received only support for writing with response, writing without response is not allowed if characteristic.properties.contains(CBCharacteristicProperties.write) { self.writeJsonStringToPeripheral(peripheral: peripheral, characteristic: characteristic, writeType: .withResponse) } else if characteristic.properties.contains(CBCharacteristicProperties.writeWithoutResponse) { self.writeJsonStringToPeripheral(peripheral: peripheral, characteristic: characteristic, writeType: .withoutResponse) } } } } func writeJsonStringToPeripheral(peripheral: CBPeripheral, characteristic: CBCharacteristic, writeType: CBCharacteristicWriteType) { do { let msgDictionary = ["SSID": self.wiFiCredentials.SSID, "Password": self.wiFiCredentials.Password] let jsonData = try JSONSerialization.data(withJSONObject: msgDictionary, options: []) //let data = "".data(using: .utf8) peripheral.writeValue(jsonData, for: characteristic, type: writeType) } catch let error as NSError { debugPrint("Error in auth message JSON: \(error.description)") This snippet calls the function at line 10 indicating the possibility of writing with a response and after callign it the didWriteValueFor delegate method is called.func peripheral(_ peripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) { if let error = error { print(error) } else { print("Value writen sucessfully.") } }Printing the following error.Error Domain=CBATTErrorDomain Code=3 "Writing is not permitted." UserInfo={NSLocalizedDescription=Writing is not permitted.}I've made myself sure that the device is connected and I can also see it in the Settings.app. I am a bit lost and I don't know what could be going on here.On the other side if I force the writing to be withoutResponse I get another console log2020-03-25 22:23:50.286662+0100 Cloudy[2595:1232291] [CoreBluetooth] WARNING: Characteristic does not specify the "Write Without Response" property - ignoring response-less writeAfter sending the specified JSON to the device it should start a sequence to connect to the specified WiFi SSID. I am sure the hardware works because I can set those values using the console on the device itself and the process works so there must be something I am missing here that causes this to fail.This test has been done using an iPhone 6S running ios 13.3.1.
2
0
2.3k
Mar ’20
Application will not be launched because it failed to report an incoming call too many times (or repeatedly crashed.)
Hi,I am developing iOS app which receives VoIP Push Notifications and next calls CallKit | Apple Developer Documentation to bring Incoming Call UI panel. From time to time however the app fails to start, with error as below logged into the device console:default 10:29:04.933753+0200 callservicesd Application will not be launched because it failed to report an incoming call too many times (or repeatedly crashed.) default 10:29:04.933836+0200 callservicesd VoIP push for app dropped on the floorMy question is: does anyone know if statistics about application crashes and/or "failed to report an incoming call" are stored locally on the device? Or perhaps collected on Apple servers and used for all instances of my app on all devices out there?In case of the first scenario - does anyone know how to reset this stats on the device, so the Push Notification will be starting the app again?In case the second scenario - is there any way to flag device to Apple server as "development" and have it excluded from the stats? So it doesn't affect "production" app instances out there?Any help and suggestions very much appreciated.Regards,Chris
3
0
2.1k
Apr ’20
Read from smb server connected in 'Files' App
Hey,This is my code. I have the url of the smb server which I have connected in the 'Files' app. It finds the file on the server, but I always says that it has no permission to read it. On my server I have allowed everyone to read and write. Do I need to write something in my code that my app knows that it has permission to read ?let url: URL = URL(fileURLWithPath: "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/xVUdQwTestApp/testaufbau.csv") do { let fileURLs = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: nil) Admin.fileContent = try String(contentsOf: fileURLs[0], encoding: .utf8) print("ADMIN: \(Admin.fileContent)") } catch { print(error) }Thank you for all the helpRegards,Tell Tobler
7
0
2.4k
Apr ’20
NWListener on NWConnection port
I'm struggling to use NWListener and NWConnection on the same port.I have a simple task requires that I send out a UDP datagram to the broadcast address, and expect to receive replies on the port which sent the datagram. In Blue Sockets, I can create a socket, send out the broadcast message and listen and accept connections on the same socket.In wireshark the exchange looks like:10.0.0.123 255.255.255.255 UDP 71 62003 -> 9000 Len=29 10.0.0.202 10.0.0.123 UDP 1060 9000 -> 62003 Len=101However after hours of experimentation in a swift playground, I am not able to create an NWListener and an NWConnection on the same socket.Here are the salient pieces of code:let udpListener = try! NWListener(using: .udp) ... setup and start listener let broadcast: NWEndpoint.Host = "255.255.255.255" let portUDP: NWEndpoint.Port = 9000 let localPort : NWEndpoint.Port = udpListener!.port! let localEndpoint = NWEndpoint.hostPort(host: "10.0.0.123", port: localPort) let parameters = NWParameters.udp parameters.requiredLocalEndpoint = localEndpoint let connection = NWConnection(host: broadcast, port: portUDP, using: parameters)However creating the NWConnection on the same port as the NWListener gives an error that the port is in use. I've tried the reverse, createing the connection on a known port, closing it and starting a listener immediately affterwards on that same port, but that also results in an error.How can I implement this very simple protocol using the Network API ? Are there some options I need to set ?Thanks for any help.Guy
2
0
2.4k
May ’20