I am obtaining the IP address in the Wi-Fi connection of an iPhone using the following source code. Howerver, I obtained completely different results on different models (iPhone XR, iPhone 13) with the same OS (iOS16.4.1).
Do you happen to know the cause of this?
【Code】
class Wifi {
enum connectionStatusItem {
case unknown
case onlineWifi
}
class func connectionStatus() -> connectionStatusItem {
var valid = false
//Get list of all interfaces on the iPhone
var ifa : UnsafeMutablePointer<ifaddrs>? = nil
if getifaddrs(&ifa) == 0 {
var p = ifa
//For each interface
while p != nil {
defer {
p = p?.pointee.ifa_next
}
let ifp = p?.pointee
let fam = ifp?.ifa_addr.pointee.sa_family
//Check for IPv4 or IPv6 interface
if fam == UInt8(AF_INET) || fam == UInt8(AF_INET6) {
//Check Wi-Fi interface
//<-------------- 'if' statement not executing on iPhone13(iOS16.3.1) and iPhone13(iOS16.4.1)
if String(cString: (ifp?.ifa_name)!) == "en0" {
//Convert interface address to a human readable string
var addr = ifp?.ifa_addr.pointee
var host = [CChar](repeating: 0, count: Int(NI_MAXHOST))
getnameinfo(&addr!,
socklen_t((addr?.sa_len)!),
&host,
socklen_t(host.count),
nil,
socklen_t(0),
NI_NUMERICHOST
)
var hosts: String?
hosts = String(cString: host)
valid = hosts != nil
}
}
}
freeifaddrs(ifa)
}
let ret : connectionStatusItem = valid ? .onlineWifi : .unknown
return ret
}
}
【Results】
success iPhone13【iOS 16.1.1】
success iPhone13【iOS 16.2.1】
failure iPhone13【iOS 16.3.1】 <------------------------- ✖
success iPhone13【iOS 16.4】
failure iPhone13【iOS 16.4.1】 <------------------------- ✖
success iPhoneXR【iOS 16.4.1】
success iPhone13【iOS 16.4.1(a)】
Post
Replies
Boosts
Views
Activity
I'm developing an iOS app for video playback using the external library vlc-ios,
Prior to iOS17, I was able to achieve streaming playback of mp4 files hosted on
a server using the vlc-ios librarys's HTTP POST method. However, after iOS17,
this streaming playback no longer functions. Upon inspecting the logs, there
were no traces of vlc-ios receiving data from iPhone device.
Does anyone know the cause of this issue?
Additionally, the occurrence condition is when the environment is iOS17
and the sim's 5G communication is enabled.
Hello,
I am currently developing a macOS application using macOS 10.15.7 and Xcode 11.1. My application is distributed directly to users via a server, not through the App Store. I recently came across the following announcement:
"Starting November 1, 2023, the Apple notary service no longer accepts uploads from altool or Xcode 13 or earlier. If you notarize your Mac software with the Apple notary service using the altool command-line utility or Xcode 13 or earlier, you need to transition to the notarytool command-line utility or upgrade to Xcode 14 or later."
Given this change, I understand that I need to use notarytool or upgrade to Xcode 14 or later for notarization. However, upgrading my current development environment is not feasible at the moment.
I would like to know if it is possible to build my application on my current environment (macOS 10.15.7 and Xcode 11.1) and then transfer the built application to a separate machine running macOS 11.0 or later with Xcode 14 or later installed, to perform the notarization using notarytool.
Could you please confirm if this approach is acceptable and if there are any specific steps or considerations I should be aware of when using notarytool on a separate machine for notarizing my application?
Thank you for your assistance.
Best regards,
WJohn
Dear Apple Support Team,
I hope this message finds you well.
I am writing to report an issue I have encountered with Wi-Fi connectivity on my iPhone 16 series running iOS 18.0. The problem occurs as follows:
When attempting to connect my iPhone 16 series (iOS 18.0) to a Wi-Fi network, the connection always fails.
After this failed attempt, any other iPhone (not from the 16 series) running iOS 18.0 also fails to connect to the same Wi-Fi network.
However, if I restart the Wi-Fi router, the non-iPhone 16 series devices can successfully connect to the Wi-Fi network.
To further investigate, I used Wireshark to monitor the network traffic. I observed that the iPhone sends a DHCP Discover message, but the Wi-Fi router does not respond with a DHCP Offer message.
Based on these observations, it appears that the issue is triggered by the iPhone 16 series running iOS 18.0, which causes the Wi-Fi router to malfunction and prevents other devices from connecting.
Additionally, I have tried all the steps listed on the following site, but the issue persists: https://support.apple.com/en-us/111786
Could you please investigate this issue and provide guidance on how to resolve it? If this is a known bug, is there a planned update to address it?
Thank you for your assistance. I look forward to your prompt response.
Best regards,
WJohn