How can I get UDID using liblockdown.dylib? - xcode

I try to get the UDID without using the UIDevice class but directly from implementing the dynamic library liblockdown.dylib on iOs 4.2. I don't find any documentation. All I need is to get the kLockdownUniqueDeviceIDKey, what should I do ?

I don't know about iOS 4, but I know that the UDID can also be retrieved on iOS 5, 6 and 7 using the libMobileGestalt.dylib. More information about this library can be found on the iPhone Development Wiki.

Here is the header for the liblockdown.dylib

here implementation:
https://github.com/theiostream/lockdown-uiduid/blob/master/main.mm
This code work on iOS 6.1.3 but it does not work on iOS 7b2 :(

Related

Xamarin iOS - Implementing Sign in with Apple

I am following the implementation instructions here to add Sign in with Apple to an existing Xamarin iOS mobile application: https://learn.microsoft.com/en-us/xamarin/ios/platform/ios13/sign-in
If I simply add the following line to AppDelegate.FinishedLaunching():
var appleIdProvider = new ASAuthorizationAppleIdProvider();
I receive the following exception: System.Exception: Could not create an native instance of the type 'AuthenticationServices.ASAuthorizationAppleIdProvider': the native class hasn't been loaded. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
I seem to be the only person on the planet that has run into this (and not been able to figure it out themself), as this exact messaging gets zero results on Google. Am I missing a certain reference?
I'm not sure where to even start looking in order to fix this. I downloaded the "official" code sample at https://github.com/xamarin/ios-samples/tree/main/ios13/AddingTheSignInWithAppleFlowToYourApp, and I am unable to find any differences in the project, or in any references.
Thanks in advance!
I figured it out. The simulator I was using was iOS 12.5 - ASAuthorizationAppleIdProvider wasn't introduced until iOS 13.

Working with appcelerator titanium ti.coremotion on ios 8+

I am trying to develop a stepcounter using the ti.coremotion module.
I am trying to implement http://docs.appcelerator.com/platform/latest/#!/api/Modules.CoreMotion on devices with ios 8 and 9, but as it says in the doc, this only works for ios 7. I am stuck now. I tried running it on a device with ios8 and it said "Device does not supports step counting".
I tried searching it on google and got this: https://github.com/benbahrenburg/Ti.CoreMotion
which says it is for ios 7+ but works with sdk 3.2 only. What I am working with is sdk 4.1 and I need it as 3.2 will not work for other things.
Any help is appreciated.
I just build an app with SDK 5.0.2.GA to my iPhone 6S running iOS 9.1 and this sample code and it worked fine:
var CoreMotion = require("ti.coremotion");
// This code checks to see if the device can gather step counting data
if (CoreMotion.isStepCountingAvailable()) {
// If it can, it starts the step counter and outputs the data to the console
CoreMotion.startStepCountingUpdates({stepCounts: 1}, function(e){
Ti.API.error(JSON.stringify(e.numberOfSteps));
});
} else {
Ti.API.error('This device does not support counting steps.');
}
What device are you testing on? Does it work for you on a device running iOS 9?
If you have reproducible code/steps/environment then please create a JIRA ticket: http://jira.appcelerator.org

How to trigger vibration on Apple Watch OS 2?

I have been working with Apple Watch OS 2 for a while, but have not succeeded in triggering vibration on Apple Watch standalone app in Swift, using Xcode Version 7.0 beta 6 (7A192o).
All tutorials using vibration on iPhone in Swift look like:
import AudioToolbox
...
AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate))
But I cannot import the AudioToolbox library.
I get the error:
Could not build Objective-C module "AudioToolbox"
Has anyone already found the way to do it?
You can generate haptic & auditory feedback, using:
WKInterfaceDevice.currentDevice().playHaptic(.Click)
'Click' is one of the 'cases' (types of vibration/beeps) that you can choose, cfr:
enum WKHapticType : Int {
case Notification
case DirectionUp
case DirectionDown
case Success
case Failure
case Retry
case Start
case Stop
case Click
}
This only works on the device, not in the simulator.
In Swift 3:
WKInterfaceDevice.current().play(.success)
I'm not a expert in WatchKit but I know that with Watch OS 2 you can use:
WKInterfaceDevice().playHaptic(.Notification)
The function playHaptic called on a WKInterfaceDevice instance engage the haptic engine in Apple Watch.
See more in the Apple documentation.
The Correct format is
WKInterfaceDevice.currentDevice().playHaptic(.Notification)
You can easily play the notification sound on watch
Function :
WKInterfaceDevice().playHaptic(.Notification)
Here you have :
Documentation
WKInterfaceDevice.current().play(.failure)
in Swift 3

Removing iphone4 & 4s from supported devices in app

Is there a way to support only iphone5 and above in your app?
Is it an xcode settings thing? When I submitted our app it says you need screenshots for iphone 4 since your binary supports it.
I am using spritekit and building with ios 8.1 . Any help or suggestions would be appreciated.
thanks
you cannot remove support for a device that Apple still supports on the App Store. You need to build your app to be compatible with all iPhones that Apple wants to support on the App Store.

Xamarin.Forms.Labs Mediapicker not working on iOS 8

Apparently Mediapicker functionality was changed in iOS 8, resulting in Xamarin.Forms.Lab's mediapicker solution failing. Does anyone know of a workaround for this or, lacking that, and alternate multiplatform solution for accessing the camera and media library for Android and iOS in Xamarin?
Error on my part. This is working just fine - the problem was that calling mediapicker functionality from DisplayActionSheet was causing problems.

Resources