My VoIP app is installed on an iPad, but can't accept incoming calls by VoIP push.
But it works after I force-restart this iPad. I have some customers who encountered the same cases, fixed by force-restart too.
So my question is
What happened on the APNs connection after force-restart?
At what case, the APNs connection will be off?
Post
Replies
Boosts
Views
Activity
We found some Firebase crashes in QLPreviewController on iOS18.1 +.
It shows cash info in QLPreviewController that we haven't changed for some years.
Please help with this.
Thanks in advance.
// stack info from Firebase
Fatal Exception: NSInvalidArgumentException
*** -[NSURL URLByAppendingPathComponent:]: component, components, or pathExtension cannot be nil.
0
CoreFoundation
__exceptionPreprocess
1
libobjc.A.dylib
objc_exception_throw
2
Foundation
-[NSURL(NSURLPathUtilities) URLByAppendingPathComponent:]
3
QuickLookUICore
+[NSURL(_QL_Utilities) _QLTemporaryFileURLWithType:filename:]
4
QuickLookUICore
+[NSURL(_QL_Utilities) _QLTemporaryFileURLWithType:uuid:]
5
QuickLook
-[QLPreviewController(ScreenshotsSupport) screenshotService:generatePDFRepresentationWithCompletion:]
6
ScreenshotServices
__82+[SSScreenshotMetadataHarvester _grabPDFRepresentationForIdentifier:withCallback:]_block_invoke_3
7
libdispatch.dylib
_dispatch_call_block_and_release
8
libdispatch.dylib
_dispatch_client_callout
9
libdispatch.dylib
_dispatch_main_queue_drain
10
libdispatch.dylib
_dispatch_main_queue_callback_4CF
11
CoreFoundation
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
12
CoreFoundation
__CFRunLoopRun
13
CoreFoundation
CFRunLoopRunSpecific
14
GraphicsServices
GSEventRunModal
15
UIKitCore
-[UIApplication _run]
16
UIKitCore
UIApplicationMain
17
Glip
main.swift - Line 13
main + 13
I have a crash on 19 [UITextField inputAssistantItem] + 68
It is running on a Simulator, is this related?
Details:
========= code in app ================================
numberTextField = CursorInCenterTextField()
numberTextField.listener = self
numberTextField.delegate = self
numberTextField.textAlignment = .left
numberTextField.adjustsFontSizeToFitWidth = true
numberTextField.isUserInteractionEnabled = true
numberTextField.inputView = UIView()
numberTextField.inputAssistantItem.leadingBarButtonGroups = []
numberTextField.inputAssistantItem.trailingBarButtonGroups = []
numberTextField.font = UIFont.systemFont(ofSize: 24.0, weight: .medium)
numberTextField.autocorrectionType = .no
numberTextField.returnKeyType = .search
========= crash stack from ips file ========================
Incident Identifier: 50AF117D-546E-409E-8915-6E4607C83BC0
CrashReporter Key: 4AB5D894-3E17-F998-4B64-F931D05DC65D
Hardware Model: Macmini9,1
Process: Glip [47003]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/83049BCF-16F7-481C-BE83-58727242A065/data/Containers/Bundle/Application/82E219BC-96B5-4A0F-AB20-D068A88C792F/Glip.app/Glip
Identifier: com.glip.mobile.rc
Version: 25.1.10 (132)
Code Type: X86-64 (Native(?))
Role: Foreground
Parent Process: launchd_sim [38628]
Coalition: com.apple.CoreSimulator.SimDevice.83049BCF-16F7-481C-BE83-58727242A065 [1342]
Date/Time: 2024-12-04 22:47:10.4249 +0800
Launch Time: 2024-12-04 22:47:02.4577 +0800
OS Version: macOS 14.5 (23F79)
Release Type: User
Baseband Version: None
Report Version: 104(?)
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000001b3531d10
Exception Codes: 0x0000000000000001, 0x00000001b3531d10
Exception Note: EXC_CORPSE_NOTIFY(?)
VM Region Info: 0x1b3531d10 is not in any region. Bytes after previous region: 3427601 Bytes before following region: 176880
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
Rosetta Generic 1b31ec000-1b31ed000 [ 4K] rw-/rwx SM=PRV
---> GAP OF 0x370000 BYTES
Rosetta Generic 1b355d000-1b355e000 [ 4K] rw-/rwx SM=PRV
Termination Reason: SIGNAL;[11] Segmentation fault: 11
Terminating Process: exc handler [47003]
Triggered by Thread: 0
Kernel Triage:
None
Thread 0 name: com.apple.main-thread
Thread 0 Crashed:
0 None 0x11e1e0144 0x0 + 4800250180
1 CoreUI 0x14fa08817 -[CUIStructuredThemeStore renditionWithKey:usingKeySignature:] + 406
2 CoreUI 0x14fa3e8ac -[CUICatalog _storageRefForRendition:representsODRContent:] + 94
3 CoreUI 0x14fa3b244 -[CUICatalog namedVectorGlyphWithName:scaleFactor:deviceIdiom:layoutDirection:glyphContinuousSize:glyphContinuousWeight:glyphPointSize:appearanceName:locale:] + 1909
4 CoreUI 0x14fa3b3a5 -[CUICatalog namedVectorGlyphWithName:scaleFactor:deviceIdiom:layoutDirection:glyphSize:glyphWeight:glyphPointSize:appearanceName:locale:] + 74
5 UIKitCore 0x167c4f99c __78-[_UIAssetManager imageNamed:configuration:cachingOptions:attachCatalogImage:]_block_invoke_2 + 201
6 UIKitCore 0x167c51fce __88-[_UIAssetManager _performLookUpObjectForTraitCollection:outNamedLookup:objectAccessor:]_block_invoke + 79
7 UIKitCore 0x16713340e -[UITraitCollection _enumerateThemeAppearanceNamesForLookup:] + 215
8 UIKitCore 0x167c51f3d -[_UIAssetManager _performLookUpObjectForTraitCollection:outNamedLookup:objectAccessor:] + 172
9 UIKitCore 0x167c520c0 -[_UIAssetManager _lookUpObjectForTraitCollection:objectAccessor:] + 40
10 UIKitCore 0x167c4f709 __78-[_UIAssetManager imageNamed:configuration:cachingOptions:attachCatalogImage:]_block_invoke + 849
11 UIKitCore 0x167c4f137 -[_UIAssetManager imageNamed:configuration:cachingOptions:attachCatalogImage:] + 291
12 UIKitCore 0x167c5001d -[_UIAssetManager imageNamed:configuration:] + 224
13 UIKitCore 0x1670c1b87 +[UIImage _systemImageNamed:withConfiguration:allowPrivate:] + 297
14 UIKitCore 0x167ae8cc0 +[UIAssistantBarButtonItemProvider configuredSymbolImageWithName:size:keyboardLanguageCode:] + 585
15 UIKitCore 0x167ae747e +[UIAssistantBarButtonItemProvider barButtonItemForAssistantItemStyle:target:forcePlainButton:] + 2850
16 UIKitCore 0x167ae90f1 +[UIAssistantBarButtonItemProvider defaultSystemLeadingBarButtonGroupsForItem:] + 206
17 UIKitCore 0x167ae9935 +[UIAssistantBarButtonItemProvider systemDefaultAssistantItem] + 55
18 UIKitCore 0x167719194 -[UIResponder(UIResponderInputViewAdditions) inputAssistantItem] + 67
19 UIKitCore 0x167b67898 -[UITextField inputAssistantItem] + 68
20 Glip 0x105915dbc BaseDialPadViewController.setupTopContainerViewConstraintAndSubViews() + 780
21 Glip 0x105917869 BaseDialPadViewController.setupContentViewForM1X() + 2681
22 Glip 0x105915781 BaseDialPadViewController.setupUI() + 193
........
// Here addObserver for routeChangeNotification
func testAudioRoute() {
// My app is an VoIP app, so I need to set "playAndRecord" and "allowBluetooth"
try? AVAudioSession.sharedInstance().setCategory(.playAndRecord, options: [.duckOthers, .allowBluetooth, .allowBluetoothA2DP])
NotificationCenter.default.addObserver(self, selector: #selector(currentRouteChanged(noti:)), name: AVAudioSession.routeChangeNotification, object: nil)
}
// Print the "availableInputs" once got a notification
@objc func currentRouteChanged(noti: Notification) {
let availableInputs = AVAudioSession.sharedInstance().availableInputs?.compactMap({ $0.portType }) ?? []
let currentRouteInputs = AVAudioSession.sharedInstance().currentRoute.inputs.compactMap({ $0.portType })
let currentRouteOutputs = AVAudioSession.sharedInstance().currentRoute.outputs.compactMap({ $0.portType })
print("willtest: \navailableInputs=\(availableInputs), \ncurrentRouteInputs=\(currentRouteInputs), \ncurrentRouteOutputs=\(currentRouteOutputs)")
/*
When BT (Airpods pro 2) CONNECTTED: it will print like below when notification comes, this is correct.
----------------------------------------------------------
willtest:
availableInputs=[__C.AVAudioSessionPort(_rawValue: MicrophoneBuiltIn), __C.AVAudioSessionPort(_rawValue: BluetoothHFP)],
currentRouteInputs=[],
currentRouteOutputs=[__C.AVAudioSessionPort(_rawValue: BluetoothA2DPOutput)]
----------------------------------------------------------
When BT (Airpods pro 2) DISCONNECTTED: it will print like below when notification comes, this is wrong.
----------------------------------------------------------
availableInputs=[__C.AVAudioSessionPort(_rawValue: MicrophoneBuiltIn), __C.AVAudioSessionPort(_rawValue: BluetoothHFP)],
currentRouteInputs=[],
currentRouteOutputs=[__C.AVAudioSessionPort(_rawValue: Speaker)]
*/
}
So my question here is:
Why does the "availableInputs" still contain the "C.AVAudioSessionPort(_rawValue: BluetoothHFP)" item even though I have already disconnected the BT device? (Put AirPods in the case.)
BTW, if I tap the "Manual" button once I disconnected the BT, it also prints the "wrong" value for "availableInputs", and it will become normal after about 3~4 seconds.
Case-ID: 10075936
PLATFORM AND VERSION
iOS
Development environment: Xcode Xcode15, macOS macOS 14.5
Run-time configuration: iOS iOS18.0.1
DESCRIPTION OF PROBLEM
Our customer experienced an one-way audio issue when switching from the built-in microphone to AirPods Pro (model: A2084, version: 6F21) during a VoIP call. The issue occurred when the customer's voice could not be heard by the other party, but the customer could hear the other party's voice.
STEPS TO REPRODUCE
Here are the details:
After the issue occurred, subsequent VoIP calls experienced the same issue when using AirPods Pro, but the issue did not occur when using the built-in microphone. The issue could only be resolved by restarting the system, and killing the app did not work.
Log and code analysis:
In WebRTC, it listens for AVAudioSessionRouteChangeNotification. In the above scenario, when webrtc receives the route change notification, it will print the audio session configuration information. At this point, the input channel count was 0, which was abnormal:
[Webrtc] (RTCLogging.mm:33): (audio_device_ios.mm:535 HandleValidRouteChange): RTC_OBJC_TYPE(RTCAudioSession):
{
category: AVAudioSessionCategoryPlayAndRecord
categoryOptions: 128
mode: AVAudioSessionModeVoiceChat
isActive: 1
sampleRate: 48000.00
IOBufferDuration: 0.020000
outputNumberOfChannels: 2
inputNumberOfChannels: 0
outputLatency: 0.021500
inputLatency: 0.005000
outputVolume: 0.600000
isPreferredSpeaker: 0
isCallkit: 0
}
If app tries to call API, setPreferredInputNumberOfChannels at this point, it will fail with an error code of -50:
setConfiguration:active:shouldSetActive:error:]): Failed to set preferred input number of channels(1): The operation couldn’t be completed. (OSStatus error -50.)
Our questions:
When AVAudioSession is active, the category and mode are as expected. Why is the input channel count 0?
Assuming that the AVAudioSession state is abnormal at this point, why does killing the app not resolve the issue, and why does the system need to be restarted to resolve the issue?
Is it possible that the category and mode of the AVAudioSession fetched by the app is currently wrong? Does it need to be reset again each time the callkit is started if the category and mode fetched are the same as the values to be set?
I have an app that was transferred from another account, but now the notifications are not working with the account's Team ID, Key ID, and .p8 file.
Here are the details:
On 9/14, the app was transferred to my RingCentral account. We tested the notification features, and everything worked well (both VoIP and normal push notifications). At that time, the server was still using the old Team ID, Key ID, and .p8 file configuration.
On 9/24, we noticed that the notification features had stopped working. We then switched to using RingCentral's Team ID, Key ID, and .p8 file, and the notifications started working again.
This raises some questions about the app transfer and notification configuration process:
3.1 After an app is transferred, do we need to immediately switch to the new account’s configuration (in this case, the RingCentral account: Team ID, Key ID, and .p8 file)?
3.2 How long does the old configuration (ld account) remain valid for notifications after an app is transferred (in this case, the Unify Office app: Team ID, Key ID, and .p8 file)?
Thanks in advance for your help!
I found one crash in my organizer Crasher report, which happened on over 180 devices for 2 weeks, and it was also caught by the Firebase report, it shows it only crashed on iOS16 and iPhone devices when switching from foreground to background.
But I can't replicate this crash locally and the crash stack has no info about my app class, but just some system framework.
Has anyone seen a similar crash? or any suggestion to fix this from Apple dev?
crashlog.crash