iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts

Post

Replies

Boosts

Views

Activity

Page Freeze Caused by Gesture
When pushing a page in the navigation, changing the state of interactivePopGestureRecognizer causes the page to freeze. Just like this: #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. CGFloat red = (arc4random_uniform(256) / 255.0); CGFloat green = (arc4random_uniform(256) / 255.0); CGFloat blue = (arc4random_uniform(256) / 255.0); CGFloat alpha = 1.0; // self.view.backgroundColor = [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(0, 0, 100, 44); btn.backgroundColor = [UIColor redColor]; btn.center = self.view.center; [btn setTitle:@"push click" forState:UIControlStateNormal]; [btn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btn]; } - (void)click:(id)sender { [self.navigationController pushViewController:[ViewController new] animated:YES]; } - (void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; self.navigationController.interactivePopGestureRecognizer.enabled = NO; } - (void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; self.navigationController.interactivePopGestureRecognizer.enabled = YES; } @end
0
0
302
Feb ’25
Live caller id lookup - Which secret key is used for PIR database HE encryption on test env
Hi, I'm trying to setup PIR service for live caller id lookup (in python but based on swift example: https://github.com/apple/live-caller-id-lookup-example). The swift example provides utilities for database setup and encryption, but I can't find any specification about which key is used for database encryption and how the ios system knows about this key in order to be able to construct the PIR requests. So my question is how does the PIR service communicate the secret key to ios system or vice versa? (specific to the test environment, before onboarding)
0
0
263
Feb ’25
[Error] 18.2.1 HealthKit steps
From the date the app was updated, the step count data retrieved from HealthKit was strange. On the other hand, step count data from the date before the update is imported normally. After deleting and reinstalling the app, the problem did not occur. Is there anyone who has experienced something like this or knows the cause?
2
0
668
Feb ’25
After unholding CallKit, the audio does not restore.
In my application, I use CallKit and have supportsHolding = true set. During my phone call, another call comes in (e.g., GSM). I accept the incoming call and put the current call on hold. If I end the active call myself, everything is fine, and CallKit calls the method provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession). However, if the other party ends the call, the second call remains on hold. In the application, the user clicks on unhold, and I notify CallKit that the hold has ended. But in this case, the didActivate method is not called at all. If I try to activate the audio myself after unhold, I receive the error: Domain=NSOSStatusErrorDomain Code=561017449 "Session activation failed" UserInfo={NSLocalizedDescription=Session activation failed} AVAudioSessionErrorInsufficientPriority == NSOSStatusErrorDomain Code: 561017449 What needs to be done for CallKit to activate my audio?
3
1
1.4k
Feb ’25
Using Flutter with CallKit
When using CallKit in my flutter app audio(both mic and speaker) stop working. When not using call kit to answer calls the app work fine. I am using the flutter flutter_callkit_incoming to use callkit and flutter_webrtc for the telephony. Flutter_callkit_incoming has some boilerplate code code include sections to uncomment when using webrtc and I have seen multiple fixes to suggest to make sure the to configure sharedAudioSession before the callkit is sent. Neither of this approaches seemed to have worked.
2
0
388
Feb ’25
Resolving URL from bookmark data doesn't automatically mount SMB volume on iOS
On macOS, the Finder allows to connect to a server and store the login credentials. When creating a bookmark to a file on a server and resolving it again, the server is mounted automatically (unless I provide the option URL.BookmarkResolutionOptions.withoutMounting). I just tried connecting to my Mac from my iPad via SMB in the Files app and storing a bookmark to a file on the server, but disconnecting the server and trying to resolve the bookmark throws the error (I translated the English text from Italian): Error Domain=NSFileProviderErrorDomain Code=-2001 "No file provider was found with the identifier "com.apple.SMBClientProvider.FileProvider"'" UserInfo={NSLocalizedDescription=No file provider was found with the identifier "com.apple.SMBClientProvider.FileProvider"., NSUnderlyingError=0x302a1a340 {Error Domain=NSFileProviderErrorDomain Code=-2013 "(null) "}} Every time I disconnect and reconnect to the server, selecting the same file returns a different path. The first time I got /private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/WtFD3Ausername/path/to/file.txt The next time WtFD3A changed to EqHc2g and so on. Is it not possible to automatically mount a server when resolving a bookmark on iOS? The following code allows to reproduce the issue: struct ContentView: View { @State private var isPresentingFilePicker = false @AppStorage("bookmarkData") private var bookmarkData: Data? @State private var url: URL? @State private var stale = false @State private var error: Error? var body: some View { VStack { Button("Open") { isPresentingFilePicker = true } if let url = url { Text(url.path) } else if bookmarkData != nil { Text("couldn't resolve bookmark data") } else { Text("no bookmark data") } if stale { Text("bookmark is stale") } if let error = error { Text("\(error)") .foregroundStyle(.red) } } .padding() .fileImporter(isPresented: $isPresentingFilePicker, allowedContentTypes: [.data]) { result in do { let url = try result.get() if url.startAccessingSecurityScopedResource() { bookmarkData = try url.bookmarkData() } } catch { self.error = error } } .onChange(of: bookmarkData, initial: true) { _, bookmarkData in if let bookmarkData = bookmarkData { do { url = try URL(resolvingBookmarkData: bookmarkData, bookmarkDataIsStale: &stale) } catch { self.error = error } } } } }
2
0
367
Feb ’25
Notification when mounting volume on iOS
On macOS, we have didMountNotification but there doesn't seem to be an equivalent for iOS. Is there a way to be notified when a volume is mounted on iOS? I would like to use it in my iOS app I'm currently porting from macOS, which starts a synchronization from the volume (which has been previously selected in a NSOpenPanel) as soon as it's mounted.
3
0
333
Feb ’25
How Can I Enable NFC Functionality in an Apple Wallet Pass?
Hello, I am working on an Apple Wallet pass with NFC functionality but have been facing issues with getting it to work. The pass gets added to Wallet, but the NFC feature does not seem to activate. Could someone provide a detailed, step-by-step process to properly enable NFC in an Apple Wallet pass? Here is what I have done so far: 1. Set up a Pass Type ID and Certificates: I have registered a Pass Type ID in my Apple Developer account. I have generated and installed the required certificates (Pass Type ID certificate and WWDR certificate). 2. Adding the NFC Field: Added the following nfc field to my pass.json file: { "formatVersion": 1, "passTypeIdentifier": "pass.com.example.mypass", "serialNumber": "123456", "teamIdentifier": "TEAMID12345", "webServiceURL": "https://example.com/api/passes", "authenticationToken": "my_secure_token", "nfc": { "message": "Tap to unlock door", "encryptionPublicKey": "MY_ENCRYPTION_PUBLIC_KEY", "payload": "encrypted_nfc_payload" }, "organizationName": "My Company", "description": "NFC-Enabled Access Pass", "logoText": "My NFC Pass", "foregroundColor": "rgb(255, 255, 255)", "backgroundColor": "rgb(0, 0, 0)", "barcode": { "format": "PKBarcodeFormatQR", "message": "https://example.com", "messageEncoding": "iso-8859-1" } } 3. Tested the Pass: The pass is added to Wallet, but NFC functionality is not working. When the nfc field is removed, the pass works fine without NFC. Questions: 1. Could you provide a comprehensive list of required steps to enable NFC in an Apple Wallet pass, including any specific details on encryption, payload, and public key formatting? 2. Are there any additional configurations or settings that I might be missing? 3. Is there any official documentation or specific tools recommended for testing NFC-enabled passes? Any guidance or solutions to enable NFC in this pass would be greatly appreciated. Thank You
1
0
860
Feb ’25
Content blocker not removing content
I have a content blocker that generally works correctly, but I need to block an element that has certain text in it. For example, <span id="theId">Some text</span> is easy enough to block because I can locate the id and block that, but what if there is no id, or the id is completely random? What if it's just <span>Some text</span>? How do I block that? Let's say this is my only content blocker rule: [ { "action": { "type": "css-display-none", "selector": ":has-text(/Some text/i)" }, "trigger": { "url-filter": ".*" } } ] No errors are seen when the rule is loaded, so it's syntactically correct, it just doesn't block the HTML. I gather this is because :has-text() works on attributes, not contents, so it works on alt, href, aria-label etc. but not on the contents of the element itself. How do I block Some text in my example above? Thanks!
2
1
591
Feb ’25
[iOS, SwiftUI] UiRefreshControl.tintColor is not the same as given one
Hello! I'm trying to set a UiRefreshControl.tintColor: .onAppear { UIRefreshControl.appearance().tintColor = UIColor.systemBlue } But instead of I get The color in the second picture is a high contrast version of the first one. I can't understand why it works this way. I also tried the following. UIRefreshControl.appearance().tintColor = UIColor(red: 0, green: 0.478, blue: 1, alpha: 1) // doesn't work UIRefreshControl.appearance().tintColor = UIColor(named: "RefreshControlColor") // doesn't work, here set "High contrast" on and indicated Universal.systemBlueColor Perhaps I missed something?
0
0
169
Feb ’25
Issue Integrating C++ SDK
Hello Apple Team, I'm trying to import the Audodesk FBX SDK to my Objective-C iOS Project. The SDK is written in C++, but has support for iOS and the iOS simulator architectures. I've added the path to the include folder in the Header Search Path I've also added the paths to libfbxsdk.a in the Library Search Paths Finally, I've added the libfbxsdk.a file to the Link Binary with Libraries. However, when I build the project, I get the following error: building for 'iOS', but linking in object file (/Users/Lond/Documents/v2/Autodesk/iOS/2020.3.7/lib/ios/debug/libfbxsdk.a[28](fbxalloc.cxx.o)) built for 'macOS' In the terminal, if I type the command: 
lipo -info libfbxsdk.a I get the message Non-fat file: libfbxsdk.a is architecture: arm64 confirming that I'm using the library for the correct architecture.   Do I need to add any other confifuration option? (Like the other linker flag or something else) I'm quite new to C++, and integrating a C++ SDK into iOS is not easy.   I'm using Mac Os Sonoma 14.6.1 Tested on Xcode 15.4 and 16.2 Target Device: iPhone 13 Pro (iOS 17.6.1) iOS FBX SDK version: 2020.3.7 Link to the SDK if needed: https://aps.autodesk.com/developer/overview/fbx-sdk   Any help would be greatly appreciated Thank you
4
0
609
Feb ’25
iOS Settings URL for SOFTWARE_UPDATE_LINK Not Working on iOS 18
Hello, I have been using the App-prefs:General&amp;path=SOFTWARE_UPDATE_LINK URL in my application to navigate to system settings, and it worked as expected. However, after updating to iOS 18, it no longer works, and I haven't been able to find a replacement. Is there any alternative solution or a different URL that works? I also tried prefs:root=General&amp;path=SOFTWARE_UPDATE_LINK, but it didn’t work either.
1
0
401
Feb ’25
AVQueuePlayer Error: LoudnessManager.mm:709 unable to open stream for LoudnessManager plist
Getting this error in iPhone Portrait Mode with notch. Currrently using AVQueuePlayer to play more than 30 mp3 files one by one. All constraint properties are correct but error occures only in Apple iPhone Portrait Mode with notch series. But same code works on same iPhone in Landscape mode. **But I get this error: ** LoudnessManager.mm:709 unable to open stream for LoudnessManager plist Type: Error | Timestamp: 2025-02-07 | Process: | Library: AudioToolbox | Subsystem: com.apple.coreaudio | Category: aqme | TID: 0x42754 LoudnessManager.mm:709 unable to open stream for LoudnessManager plist LoudnessManager.mm:709 unable to open stream for LoudnessManager plist Timestamp: 2025-02-07 | Library: AudioToolbox | Subsystem: com.apple.coreaudio | Category: aqme
0
1
877
Feb ’25
Not able to build an app after including framework/Static lib in the app
I have an app, which is depended on custom SDK. Custom SDK has dependencies, included all dependencies in Podspec and custom framework/static lib ios.vendored_frameworks. here I sample of my pod spec Pod::Spec.new do |s| s.name = "SDK" s.version = "1.0.1" s.summary = "SDK" s.source = { :git => "https://github.com/ABC/SDK.git", :tag => "v"+s.version.to_s } s.platform = :ios s.ios.deployment_target = '16.0' s.swift_version = '4.2' s.static_framework = true s.frameworks = 'Security' s.frameworks = 'CoreLocation' s.requires_arc = true s.module_name = 'SDK' s.library = 'z' s.default_subspec = 'Shared' s.subspec 'Shared' do |shared| shared.ios.vendored_frameworks = 'SDKLib.xcframework' shared.dependency 'CocoaAsyncSocket', '~> 7.4' shared.dependency 'CocoaHTTPServer' shared.dependency 'SocketRocket', '~> 0.6' shared.dependency 'QNNetDiag' shared.dependency 'SAMKeychain' shared.dependency 'AFNetworking/Reachability', '~> 4.0' shared.dependency 'AFNetworking/Serialization', '~> 4.0' shared.dependency 'AFNetworking/Security', '~> 4.0' shared.dependency 'AFNetworking/NSURLSession', '~> 4.0' shared.dependency 'CocoaMQTT' shared.dependency 'Starscream', '~> 4.0.8' shared.dependency 'TrustKit' shared.dependency 'Firebase/Analytics' end end below error I am getting while linking lib
1
0
341
Feb ’25
disappointing responses from the apple developer team
I'm trying to reach apple developer team since last one month regarding my apple developer account enrolment process I have mailed to apple developer mail but not getting any response, after that I tried to reach them via support form but still I'm did not get any message or mail from the apple regarding my issue.
2
0
377
Feb ’25
URLSessionWebSocketTask. on/off wifi, reconnect but get error URLError.notConnectedToInternet. Reproduce on iOS 18
We use URLSessionWebSocketTask for web socket connection. When get error we reconnect - recreate new URLSessionWebSocketTask. Test case: off wifi on iOS device; get error(s) URLError.notConnectedToInternet. When on wifi correct create new task with connect. This working on iOS 12, 14, 15, 16, 17. But on iOS 18 we get error URLError.notConnectedToInternet without correct connection. class WebSocketManager { ... func openConnection() { webSocketTask?.cancel(with: .goingAway, reason: nil) webSocketTask = urlSession?.webSocketTask(with: urlRequest) webSocketTask?.resume() listen() } func closeConnection() { webSocketTask?.cancel(with: .goingAway, reason: nil) webSocketTask = nil } private func listen() { webSocketTask?.receive { [weak self] result in guard let self else { return } switch result { case .failure(let error): delegate?.webSocketManager(self, error: error) case .success(let message): switch message { case .string(let text): delegate?.webSocketManager(self, message: .text(text)) case .data(let data): delegate?.webSocketManager(self, message: .data(data)) @unknown default: fatalError() } listen() } } } } Delegate: func webSocketManager(_ webSocketManager: WebSocketManagerType, error: Error) { webSocketManager.openConnection() }
2
0
281
Feb ’25
Intune Auto-Update Issue Following Xamarin Project Migration
We're currently facing an issue with Intune not automatically updating/downloading the updated build/app to end-user ios devices. It's worth noting that we've recently migrated the Xamarin project to a .NET-style SDK in this version. Previously, the app used to update automatically without any problems. We'd appreciate it if you could help us understand what might be causing this issue.
1
0
512
Feb ’25
Simulator crash Exception Type: EXC_CRASH (SIGKILL) WatchDog: 0x8BADF00D
Hello, My app often crashes when I use simulators. I would like some help with reading the crash report that is generated. Especially with the part below Thread 0 Crashed. Based on other posts I understand that the 0x8BADF00D in the crash report is a WatchDog crash that basically says that WatchDog terminated the app because the main thread was blocked for a significant time. Many processes can block the main thread so it's hard to find out what it is in our specific case. Can someone help me reading through the crash report? Short_crash_report.txt Background information The application is Xamarin Native and I use Rider as an IDE. When I use Visual Studio, the simulators run just fine. No crash occurs while using my app on a device. The crash happens on multiple simulators with different OS versions. I already deleted XCode cache, erased content and settings of several simulators and deleted iOS DeviceSupport files.
1
0
509
Feb ’25