Post

Replies

Boosts

Views

Activity

Reply to Need help in fetching app version of an another installed app on iPhone
Guessing that you mean some arbitrary other app not developed by your team: there is no API that can give you that information. Unlike on Android, the iOS platform has no APIs to discover what other apps are even installed [*], much less tell you anything about them. That’s example of how the concept of user privacy can differ between the platforms. [*] There’s actually a small crack in the armor with an API called canOpenURL (link) but it’s intended for a limited sort of cross-app integration, not for open-ended discovery of other apps, and tells you nothing about version numbers.
Topic: App & System Services SubTopic: Core OS Tags:
May ’24
Reply to Alternative to CoreTelephony for Accessing Cellular Network Information in Private iOS App
Can MetricKit support collecting these specific metrics at such frequent intervals? Unfortunately that iOS Network Signal Strength post already calls out MetricKit as an approach that won’t help. Note that MXCellularConditionMetric contains only a single property (see histogrammedCellularConditionTime at link) which is basically a crude bar chart of signal strengths aggregated over the 24-hour reporting period. There’s no API to get at the underlying data points or timestamps, and note this metric deals in signal bars rather than actual dBm units. I'm curious about how such an [internal Apple] app might collect data that is otherwise inaccessible through public APIs. Apple’s built-in apps can use whatever private APIs they want, and in many cases the OS has the means to allow access to such APIs by only specific apps (i.e. theirs or carrier apps) that are entitled to do so. For the specific case of accessing low level telephony data, the restriction was added as a security fix way back in iOS version 8.3 or so. So even if you had the secret header files or documentation, the code wouldn’t actually work without your app having that special entitlement which will never be available. is there any leeway or additional tools available for private/internal applications to gather more detailed cellular metrics? Nothing that would be documented by Apple or suitable for discussion on this forum.
Topic: Programming Languages SubTopic: Swift Tags:
May ’24
Reply to Get rid of the task time displayed by the system
Sounds like hang detection is active and doing its job. See this link for more. Can someone tell if it is possible to get rid of it and how ? Hang detection is a helpful feature so it’s best to leave it enabled. Then the “right way” to get rid of the warning is to update the app using the advice on that linked page, to eliminate the hang that is getting reported.
May ’24
Reply to Xcode does not include pthread library
See this thread for details on why /usr/lib looks a little thin these days. On my machine with Xcode 15.3 installed, the library is found here: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd And with Command Line Tools installed, also found here: /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/lib/libpthread.tbd Note those are .tbd files, not .dylib any more.
May ’24
Reply to Detect iPhone unlock / lock
I need to immediately know when the iPhone is unlocked. Why? Can you detail what app functionality depends on this? There’s no specific notification for unlocking, but take a look at app delegate method applicationProtectedDataDidBecomeAvailable(_:) (link) and corresponding notification protectedDataDidBecomeAvailableNotification (link). I am a newbie in iOS/APP development. Welcome! You’ll find that Apple APIs tend not to just give you random information about the system (“is the device locked?”) but instead support more specific use cases like the delegate and notification given above: “can I access protected data right now?” It should work even if my app is not running. There are various events that can wake or launch your app (see LaunchOptionsKey at link) but unlocking isn’t one of them.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to App rejection for use of alternate icons
Does choosing the alternate app icon in app settings not count as "within the app" ? By “general app settings” do you mean your app’s settings bundle that the user accesses via the system Settings app? Or just a page titled General that is inside your app itself? If in the settings bundle, then how do you actually change the icon? That wouldn’t give you any context from which to call UIApplication.setAlternateIconName() when the user makes a change. Or are you calling setAlternateIconName() at some point after the app launches/resumes after visiting your bundle in system Settings? I guess that could work, but probably doesn’t match their expectation that the icon-changed confirmation alert pops up immediately after the user performs a gesture to trigger the change.
May ’24
Reply to How to disable screen capture or avoid screenshot taking programmatically in iOS
This gets asked a lot. (Search the forum.) Here’s one of the best answers I’ve seen so far: link. I think it’s usually more useful to rethink the requirement to prevent capture in the first place. Why is this particular data ok to view in the app but not ok to view later? Is it not the user’s data for them to handle as they wish?
May ’24