Post

Replies

Boosts

Views

Activity

iOS Shortcuts Error Codes/Status
I’ve two automations set. Send a notification when battery rises above 80% Set Always ON display off on apple watch (via Shortcuts Automation, everyday at 12 a) For these aforementioned shortcuts I get the following errors frequently, on my Lock Screen, Wha is INCExtensionErrorDomain error 1307 and Remote execution timed out error? And how can these errors be mitigated?
0
0
120
1w
Multiple pending APNS notifications delivered at once when the app enters foreground
I am working on a VoIP based PTT app. Uses 'voip' apns notification type to get to know about new incoming PTT call.  When the app is in foreground, the app gets to know about incoming VoIP PTT call through incoming push notification. After receiving notification, the app receives audio from the server. This works properly, as expected. The app faces issues in receiving apns notifications only when the app is in background. Issue: My app is in background and iPhone locked, the server sends apns notification to the target iPhone about a new incoming VoIP call. Server received 200 success response code from APNS. But the app in background did not receive the notification. Second time, the server sends notification about second VoIP call. App did not receive notification. Third time, server sends notification about 3rd incoming call. This list goes on. Everytime server sends a notification to the target phone, success response is received from APNS. 
 Now, bring the app to foreground, the app receives all the pending notifications at once. This scenario happens only in a few phones. Those customers are missing PTT calls.
Can you please provide us suggestions to solve this issue ? My app uses unrestricted-voip entitlement
0
0
126
1w
Sticker Pack Not Appearing in iMessage
Description: I have developed an iOS app that includes a sticker pack feature. However, when adding stickers to iMessage, they are not appearing as expected. Despite following the standard procedures, the stickers are not visible in the iMessage app. The issue persists even after ensuring compatibility with the latest iOS version. Attached is an image that highlights the problem. Any guidance or suggestions to resolve this issue would be greatly appreciated. Thank you!
2
1
84
1w
Background URL Sessions upload slowly even in foreground
I am working on an app which is capturing photos and uploading them to a server. I have followed the URLSession configuration to properly support background transfers. However, I am now noticing that my photos are uploading way slower, even when the user has the app open and is interacting with the app. This is undesirable because the changes need to be reflected in real time to the server when the user is active in the app. Previously, when I was just using URLSession.shared.uploadTask with a completion handler, the photos uploaded right away in a matter of 1-2 seconds. Now it is taking 3-4 minutes per photo to upload. The photos are roughly 3mb in size each. I have tried setting the isDiscretionary property explicitly to false to no avail. Sometimes the users are without internet connection, which is why I wanted to use the background session (so that the uploads can be automatically retried by the system when the user connects back to the internet) So, in summary, I want the functionality of the background uploading (and to let the system retry when the user transitions from offline to online) however I also need realtime uploading when the user is interacting with the app. What is the preferred way to solve this problem?
1
0
103
1w
NFC TAG IPHONE
I have a client who asked me to create an app that reads nfc data, but this data needs to come from a built in iPhone nfc tag, so the app will read through nfc the SECOND device info. my question is, does the iPhone has a built in nfc tag? if so, can it share any device info?
1
0
121
1w
Intermittent App Package Installation failure.
I work on a macOS application that functions as a daemon. To test it, I: Compile executables. Use pkgbuild and productbuild to build an application bundle. Use codesign and notarytool to sign and notarize the app. Install the app with /usr/sbin/installer -target LocalSystem -pkg .... This often overwrites the previous version of the app. Sometimes, the installation fails at the postinstall stage, when it can not find the application's install directory. We explicitly check for this error in our script: if ! [ -d "$APP_INSTALL_DIR"/Contents ]; then echo "directory ${APP_INSTALL_DIR}/Contents is missing" exit 1 fi This is unexpected! Even worse, some of our customers have occasionally seen the same issue! We use a postinstall script in order to install files into the /Library/LaunchDaemons and /Library/ LaunchAgents directories, and start the agent with launchctl bootstrap. Our preinstall script makes sure that the previous version of our application is fully uninstalled (so there is no confusion), and we wonder if that is part of the problem. While researching this error, I ran across a discussion of a similar issue on Stackoverflow: <https:// stackoverflow.com/questions/19283889>. One of the commenters there wrote: It appears that the OS X installer uses information about already installed packages and application bundles in order to decide where and if to install new packages. As a result, sometimes my installer did not install any files whatsoever, and sometimes it just overwrote the .app bundle in my build tree. Not necessarily the one used to build the installer, but any .app bundle that OS X had found. In order to get the installer to install the files properly I had to do two things: Tell OS X to forget about the installed package. sudo pkgutil --forget <package id> Not sure if this is needed for you nor in my case, but it is probably a good idea anyway. Delete all existing .app bundles for the app. If I didn't do this, the existing app bundle was overwritten on install instead of the app being placed in /Applications. Maybe there is a way to prevent this while building the installer package, but I haven't found it. On the other hand, the man page for pkgutil says not to use --forget from an installer: Discard all receipt data about package-id, but do not touch the installed files. DO NOT use this command from an installer package script to fix broken package design. What is the correct approach to fix this problem?
0
0
89
1w
Getting the Wi-Fi router BSSID from a Daemon.
Our macOS application (running as a LaunchDaemon) has been able to report the current Wi-Fi SSID and BSSID (if connected) using the airport command. Since airport has been removed from macOS, we have not been able to collect BSSID information. First, I demonstrate that the BSSID exists: I can option-click the Wi-Fi status menu icon and see the following: Wi-Fi Interface Name: en0 Address: a8:8f:d9:52:10:7d * * * Enable Wi-Fi Logging Create Diagnostics Report... Open Wireless Diagnostics... * * * Known Network polymorphic IP Address: 192.168.86.50 Router: 192.168.86.1 Security: WPA2 Personal BSSID: 88:3d:24:ba:36:81 Channel: 149 (5 GHz, 80 MHZ) Country Code: US RSSI: -60 dBm Noise: -89 dBm Tx Rate: 520 Mbps PHY Mode: 802.11ac MCS Index: 5 NSS: 2 * * * Other Networks * * * Wi-Fi Settings... This says to me that: The WiFi router I am connected to has SSID = polymorphic. The WiFi router I am connected to has BSSID = 88:3d:24:ba:36:81. My computer's Wi-Fi hardware has MAC address = a8:8f:d9:52:10:7d. My computer's Wi-Fi interface name = en0. To get this information now (from within an application), I have attempted to run: /usr/sbin/networksetup -listallhardwareports The output of that command includes the following Hardware Port: Wi-Fi Device: en0 Ethernet Address: a8:8f:d9:52:10:7d To get the SSID, I can then execute: $ /usr/sbin/networksetup -getairportnetwork en0 Current Wi-Fi Network: polymorphic But I still can't get the router's BSSID. So I try $/usr/sbin/networksetup -getinfo 'Wi-Fi' DHCP Configuration IP address: 192.168.86.50 Subnet mask: 255.255.255.0 Router: 192.168.86.1 Client ID: IPv6: Automatic IPv6 IP address: none IPv6 Router: none Wi-Fi ID: a8:8f:d9:52:10:7d Still no new information. $ /usr/sbin/networksetup -getmacaddress en0 Ethernet Address: a8:8f:d9:52:10:7d (Device: en0) This is not helpful either. Let's try another approach: $ /usr/sbin/netstat -nr -f inet | grep ^default default 192.168.86.1 UGScg en0 This tells me that my router's IP address is 192.168.86.1. The arp tool should be able to translate $ /usr/sbin/arp -a -n | grep "(192.168.86.1)" ? (192.168.86.1) at 88:3d:24:ba:36:7f on en0 ifscope [ethernet] This tells me that the router's MAC address is "88:3d:24:ba:36:7f", but it is not the same value as the router's BSSID, which we know to be 88:3d:24:ba:36:81! Another approach. I wrote the following Swift program: import CoreWLAN let c : CWWiFiClient = CWWiFiClient.shared() if let ifs : [CWInterface] = c.interfaces() { for i in ifs { print( i.interfaceName ?? "<nil>", i.powerOn(), i.ssid() ?? "<nil>", i.bssid() ?? "<nil>") } } When executing it with swift, I got: en0 true polymorphic <nil> So for some reason, the CoreWLAN API is hiding the BSSID, but not the SSID. When I use swiftc to compile before executing, I get: en0 true <nil> <nil> Why is the CoreWLAN API now hiding the SSID as well? I even tried an Objective-C program: // Link with: // -framework Foundation // -framework CoreWLAN #include <stdio.h> #include <CoreWLAN/CoreWLAN.h> void printWifi() { NSArray<CWInterface*>* ifs = [[CWWiFiClient sharedWiFiClient] interfaces]; for (CWInterface* i in ifs) { printf("%s %s %s %s\n", [i.interfaceName UTF8String], [i powerOn] ? "true" : "false", [[i ssid] UTF8String], [[i bssid] UTF8String]); } } int main() { printWifi(); return 0; } It prints out: en0 true (null) (null) Based on https://developer.apple.com/forums/thread/131636, I tried // Link with: // -framework Foundation // -framework CoreWLAN // -framework CoreLocation #include <stdio.h> #include <CoreWLAN/CoreWLAN.h> #include <CoreLocation/CoreLocation.h> void printWifi() { NSArray<CWInterface*>* ifs = [[CWWiFiClient sharedWiFiClient] interfaces]; for (CWInterface* i in ifs) { printf("%s %s %s %s\n", [i.interfaceName UTF8String], [i powerOn] ? "true" : "false", [[i ssid] UTF8String], [[i bssid] UTF8String]); } } CLLocationManager* startCoreLocation() { CLLocationManager* mgr = [[CLLocationManager alloc] init]; [mgr requestAlwaysAuthorization]; [mgr startUpdatingLocation]; return mgr; } int main() { CLLocationManager* locMgr = startCoreLocation(); printWifi(); return 0; } That change did not seem to make a difference. After more work, I found that I can not even figure out CLLocationManager authorization. So I attempted to create a minimal program that can get that: https://github.com/HalCanary/location. I am not sure how to proceed here. What is wrong with my location code? Will our application need to get the com.apple.security.personal-information.location entitlement in order to get the BSSID?
3
0
156
1w
Assertion failure during deinit due to... DispatchSourceTimer?
I have var idleScanTimer = DispatchSource.makeTimerSource() as a class ivar. When the object is started, I have self.idleScanTimer.schedule(deadline: .now(), repeating: Double(5.0*60)) (and it sets an event handler, that checks some times.) When the object is stopped, it calls self.idleScanTimer.cancel(). At some point, the object containing it is deallocated, and ... sometimes, I think, not always, it crashes: Crashed Thread: 61 Dispatch queue: NEFlow queue [...] Application Specific Information: BUG IN CLIENT OF LIBDISPATCH: Release of an inactive object [...] Thread 61 Crashed:: Dispatch queue: NEFlow queue 0 libdispatch.dylib 0x7ff81c1232cd _dispatch_queue_xref_dispose.cold.2 + 24 1 libdispatch.dylib 0x7ff81c0f84f6 _dispatch_queue_xref_dispose + 55 2 libdispatch.dylib 0x7ff81c0f2dec -[OS_dispatch_source _xref_dispose] + 17 3 com.kithrup.simpleprovider 0x101df5fa7 MyClass.deinit + 87 4 com.kithrup.simpleprovider 0x101dfbdbb MyClass.__deallocating_deinit + 11 5 libswiftCore.dylib 0x7ff829a63460 _swift_release_dealloc + 16 6 com.kithrup.simpleprovider 0x101e122f4 0x101de7000 + 176884 7 libswiftCore.dylib 0x7ff829a63460 _swift_release_dealloc + 16 8 libsystem_blocks.dylib 0x7ff81bfdc654 _Block_release + 130 9 libsystem_blocks.dylib 0x7ff81bfdc654 _Block_release + 130 10 libdispatch.dylib 0x7ff81c0f3317 _dispatch_client_callout + 8 11 libdispatch.dylib 0x7ff81c0f9317 _dispatch_lane_serial_drain + 672 12 libdispatch.dylib 0x7ff81c0f9dfd _dispatch_lane_invoke + 366 13 libdispatch.dylib 0x7ff81c103eee _dispatch_workloop_worker_thread + 753 14 libsystem_pthread.dylib 0x7ff81c2a7fd0 _pthread_wqthread + 326 15 libsystem_pthread.dylib 0x7ff81c2a6f57 start_wqthread + 15 I tried changing it to an optional and having the deinit call .cancel() and set it to nil, but it still crashes. I can't figure out how to get it deallocated in a small, standalone test program.
4
0
157
1w
Unexpected iOS App foregrounding
I am seeing some unexpected behavior, in particular, is seems that iOS is periodically foregrounding my test app with no user intervention. I am curious why this is. I wrote a simple test app to see how long the app would run to collect location while in the background with only "While in Use" location permission. The app will start location updates when foregrounded and continue in the background. While backgrounded, I see the blue arrow in the dynamic island as expected. What is unexpected is that every few days, I see the UI of the app displayed in the foreground, without having foregrounded it myself (and no, I did not tap the blue arrow). This is using the legacy CoreLocation apis on iOS 17.5.1. My question is how/why does this happen?
4
0
136
1w
Clarification on Offering Non-Consumable In-App Purchases for Subscribers Only
Hello everyone, I have an iOS application that includes subscription-based content. I would like to offer two non-consumable in-app purchases that unlock additional features, but only for users who have an active subscription. Here’s a detailed description of my plan: Subscription Requirement: Users need to have an active subscription to be able to purchase these non-consumable items. Feature Unlocks: These non-consumable purchases will unlock specific features usable forever as long as the user has an active subscription (even if he unsubscribes and re-subscribes, he will not have to reacquire these features). My questions are: Is it compliant with Apple’s App Store guidelines to offer non-consumable in-app purchases that are available only to subscribers? Are there specific considerations or best practices I should follow to ensure a smooth review process with Apple? I want to make sure that I implement this correctly and transparently for my users while staying compliant with Apple’s policies. Any guidance or shared experiences would be greatly appreciated. Thank you!
0
0
80
1w
Efficient raw packet processing on live network traffic
Hi, I'm responsible for extending my company's Firewall application with MacOS support. The easiest and fastest way requires a simple API similar to netmap/nfq in Unix/Linux systems or NDIS/WinDivert in Windows platform where All network traffic passing NIC's or WiFi adapter should beforwarded to our FW application, FW application should process the raw packets with its own connection tracking mechanism, modify them if needed, generate new ones if needed, FW application should inject forwarded or new packets to continue their ways. In other words, the required API should stand between NIC/WiFi driver and networking stack and allow packet manipulation. My questions follow: I can't decide on which method to focus further, throughout three alternatives; kext - It can satisfy the requirements, but deprecated, difficult to progress and have no guarantee to be applicable in future versions of MacOS, am I right ? networkingdriverkit - It can satisfy the requirements, am I right ? networkextension - can it satisfy the requirements? Also there is a serious performance problem as mentioned in https://developer.apple.com/forums/thread/757071. Can anyone help me to decide on the most proper method for? Thanks.
1
0
148
1w
Apple Pay SDK Payload Decryption Sometimes Fails on Occation
Good day, A few months ago, we started noticing that we are getting occasional ApplePay SDK Data decryption errors when we attempt to decrypt the SDK Data payload that comes back from the ApplePay SDK. We are using the C# BouncyCastle Dotnet package to handle the EllipticCurve decryption. We find on average that about 2% of all our deposits are failing because the library fails to decrypt the ApplePay SDK Data payload with the error: "Mac check in GCM failed". It appears like ApplePay is maybe sending faulty payloads to us on occasion? Unless there is an issue with the BouncyCastle library? This is causing only a few transactions to fail per day, but we still need a solution for this. Is anyone having the same issue or is there a contact from Apple I can get in touch with directly to share examples to assist with troubleshooting this? Kind regards, Reon Fourie
0
0
80
1w
Not able to make payment to apple using test cards.
Im trying to do the payment using authorize.net through react native framework. I have registered the merchant ID in application and replaced merchant identifier in below code. Below i have posted my code that I'm trying to do the payment and I'm using the cards that are provided in this link. I can able to add one card and at the end step its trying for payment and its failing.Please help me out .Thanks.
1
0
94
1w
Configure autostart of a sandboxed Java app
I have developed a backup application in Java. In it, users can configure whether they want it to autostart or not. If they do, a plist file is being written to ~/Library/LaunchAgents so that my app starts at login. This works perfectly so far. I've not submitted it to the Mac App Store. But for that, it needed to be sandboxed. And with that, I had to add a "com.apple.security.temporary-exception.files.home-relative-path.read-write=/Library/LaunchAgents/" to my entitlements so that the plist file could still be written to ~/Library/LaunchAgents. However, they do not approve this. Is there another solution to launch my application at login? Must work with sandbox-mode Must work from Java/Shell/... (I found "SMAppService", but this seems only available in Swift/Objective-C)
1
0
150
1w
Connectivity lost after sleep with cellular networks
Hi, I'm using network extension on my VPN app. I'm override the sleep method and send some data to my server when the method call. I noticed that the server requests are succeeded when I'm connecting with a WiFi networks and failed when I'm connecting with cellular networks. Does the OS blocks immediately the connectivity when I'm on the cellular networks and the device enter to sleep?
1
0
127
1w
How to archive an app with NotificationServiceExtension?
I was able to successfully archive my main app that has a NotificationServiceExtension. However, once I installed the app via Testflight, I was able to receive a notification, but the push notification modifications I did were not applied. When I just ran it via Xcode, the push notification modifications worked. Do I need to archive the NotificationServiceExtension instead of my main app?
1
0
95
1w
Issue while accessing file from another PC on local network using document picker with SMB.
We are trying to access and copy some files [e.g., video file] from another PC on local network using SMB protocol. We found some third party libraries like AMSMB2 for this.  But we want to try to use Apple inbuilt features like File management mentioned in - https://developer.apple.com/videos/play/wwdc2019/719/ We could able to select file from SMB server using document picker in app manually. Also we got its url in debug which gets generated under "Shared" section in files app. The URL I get from document picker is -> /private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/testuser/iOS/SMB_ShareFolder Now we want to avoid manual selection of file to user.We want directly open "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/testuser/iOS/SMB_ShareFolder" path as soon as document picker opens. So that user can directly select file. But it is not working. It opens normal files app and all folders. Getting below error -  Access Shared URL directly using documentPicker "Error - CFURLResourceIsReachable failed because it was passed a URL which has no scheme" Sharing the code which I tried to open this shared folder directly :  let url = URL (string: "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/asd0QUsers/Pranjali/iOS/SMB_ShareFolder")  let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [UTType.folder])     documentPicker.delegate = self     documentPicker.allowsMultipleSelection = false     documentPicker.modalPresentationStyle = .custom     documentPicker.definesPresentationContext = true     documentPicker.directoryURL = url!       documentPicker.transitioningDelegate = customTransitioningDelegate    present(documentPicker, animated: true, completion: nil) I get error in console - CFURLResourceIsReachable failed because it was passed a URL which has no scheme 2024-07-05 17:49:38.501059+0530 VideoImportPOC[1327:336989] [DocumentManager] revealDocumentAtURL encountered an error: Error Domain=NSCocoaErrorDomain Code=262 "The file couldn’t be opened because the specified URL type isn’t supported." Can you please provide inputs if it is possible to access files directly in this way? or any other suggestions.
1
0
144
1w
Does Remote Notification (content-available) not work in iOS's Not running and Suspended state??
Hello, I would like to implement the function of unsubscribe FCM topics that I was subscribing to when I received a specific push from the server. It was implemented through "willPresent" when the app was running, but I don't know how to do it when the app is not running. I activated the 'Background fetch' and 'Remote Notifications' options for now. const message = { notification: { title: 'FCM Topic UnSubscribe', body: 'TestTestTest', }, data: { payload: JSON.stringify(payloadJson) }, apns: { payload: { aps: { sound: 'default', 'mutable-content': 1, 'content-available': 1 } } }, topic: 'unsubscribe_topic', }; Test node code Payload contains the type of topic you want to unsubscribe from. And I added a function to receive push from didReceiveRemoteNotification and handle logic. But this doesn't work. Does Remote Notification (content-available) not work in iOS's Not running and Suspended state?? I'm also using the Notification Service Extension, is this related to it?
1
0
157
1w