Open closed app with iBeacon and iOS 7.1 - ibeacon

I read about the new feature released with iOS 7.1
In this version the app opened when was find the iBeacon
I make more test but this feature don't work
Can you help me?
self.beaconRegion = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID
identifier:#"EstimoteSampleRegion"];
self.beaconRegion.notifyOnEntry = TRUE;
self.beaconRegion.notifyOnExit = TRUE;
[self.beaconManager startRangingBeaconsInRegion:self.beaconRegion];

You need to start monitoring, not ranging, to launch an app on iBeacon detection. This is true regardless of whether the app is already in the background or not. Make sure you have implemented the monitoring callback methods, too.
[self.beaconManager startMonitoringBeaconsInRegion:self.beaconRegion];

Related

AXIsProcessTrustedWithOptions doesn't return true even when the app is ticked in accessibility

As this question answered, I use AXIsProcessTrustedWithOptions with no option to test if my app has been enabled in the accessibility panel. If not, prompt the window to let users to enable it. There is button bound to this test call as well, so users don't need to close the UI and reopen it.
But sometimes, even after a user enables the app, AXIsProcessTrustedWithOptions still returns false. When I check the sqlite database, it shows my app as "kTCCServiceAccessibility|com.abc.def|0|1|1||". The first 1 digit indicates it has been allowed apparently. But the api call still returns false. At this point, if I close the UI, the app is unticked in the accessibility panel which causes a loop so users can never pass this step.
Another thing is this app is actually a version 2 of the previous app. But the user did replace the bundle with the v2 one. Not sure if this is related.
Any idea why this would happen?
NSDictionary *options = #{(id)kAXTrustedCheckOptionPrompt: #NO};
BOOL accessibilityEnabled = AXIsProcessTrustedWithOptions((CFDictionaryRef)options);
if (!accessibilityEnabled) {
NSString *urlString = #"x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility";
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:urlString]];
}
Update: In Xcode, Signing & Capabilities, make sure you have selected a Team and Signing Certificate.
Original answer:
I experienced this when developing an app on macOS 10.14.5 in Xcode trying both AXIsProcessTrusted and AXIsProcessTrustedWithOptions .
After wasting a lot of time trying all sorts of things, including different options for AXIsProcessTrustedWithOptions, logging out/in, rebooting, praying, and crying, I eventually shut down my machine and powered it back on in frustration. Then it worked. Hopefully nobody else has this same experience.

Appcelerator Make an app that changes phone's time

I want to make an app in Appcelerator that can change the time of your phone, but I dont know the code to let it change because I am new to Appcelerator.
Thanks!
If it’s possible in the underlying phone SDK (iOS I believe has a public API for this) then yes you could achieve this using the new Hyperloop module, currently in beta and released later this month — this would allow you access the underlying SDK directly via JS in your Ti SDK project.

MultipeerConnectivityFramework in iOS 7

I am an iOS Developer working an application in which I want to list the bluetooth devices names (iPod, iPad, Macbook etc ), for which O am using the MultiPeerConnectivity Framework.
MultiPeerConnectivity Framework uses MCBrowserViewController which is responsible for browsing nearby devices and MCAdvertiserAssistant which advertise the devices for the connectivity. Using MultiPeerConnectivity Framework you have two devices, one should advertise itself and the second one should browse for the devices, than its working fine.
But My Problem is:
How to search for the devices which are not able to use the app (I mean how to search for my Macbook or other bluetooth devices like bluetooth keyboard etc, am not talking about the Android devices). Is it possible through MultiPeerConnectivity Framework ? or any other solution ?
Here is my code
-(void)setupPeerAndSessionWithDisplayName:(NSString *)_displayName
{
self.peerID = [[MCPeerID alloc] initWithDisplayName:_displayName];
self.session = [[MCSession alloc] initWithPeer:self.peerID];
self.session.delegate = self;
}
-(void)setupMCBrowser{
self.browser = [[MCBrowserViewController alloc] initWithServiceType:#"chat-files" session:self.session];
}
-(void)advertiseSelf:(BOOL)shouldAdvertise{
if (shouldAdvertise) {
self.advertiser = [[MCAdvertiserAssistant alloc] initWithServiceType:#"chat-files" discoveryInfo:nil session:self.session];
[self.advertiser start];
}
else{
[self.advertiser stop];
self.advertiser = nil;
}
}
If you are looking to discover other iOS devices, as well as other Macs and also peripherals, then you'll need to combine using Multipeer Connectivity with Core Bluetooth.
MPC is intended for use in discovering other instances of your app. If you want to discover Macs then they will have to be running a Mac app with Multipeer Connectivity advertising with the same serviceType as your app.
If you want to discover peripherals you will need to use Core Bluetooth - there are lots of tutorials available online, and you can also check this SO question as a starting point.

Is there a way to opt-out from WP8 when submiting an Windows Phone app?

I have a Windows Phone app build using the 7.1 SDK that works great on WP7 but does not work at all on WP8 (I am using multicast using UDP and WP8 can join the group but send/receives no message for some reason, other people having the same problem: UDP multicast group on Windows Phone 8).
Is there a way to opt-out from WP8 when I submit my app? I just want the app to be available t WP7 users. I am looking for something like the 256MB opt-out option.
No, there's no way to opt-out for 3rd party apps to opt-out from WP8. A few apps using 1st party APIs on WP7 were opted out from WP8 while they upgraded to WP8, but that's mostly it.
It sounds like you've hit a nasty application comptability bug in your app. Is there a way to get your code to work on WP8? If it's a minor enough change I'd suggest you use a runtime check to apply some WP8 specific code. More on sharing code between WP7 and WP8 can be found in this article # http://www.developer.nokia.com/Resources/Library/Lumia/#!co-development-and-porting-guide.html
if (IsRunningOnWP8)
{
// add some WP8 specific UDP Magic
}
public bool IsRunningOnWP8
{
get
{
return Environment.OSVersion.Version.Major >= 8;
}
}
There is no way to opt-out from having your 7.1 app published and downloadable for Windows Phone 8.
An app targeted to run on Windows Phone 7.1 will run in a quirks mode on Windows Phone 8.0. This means that API's that introduced breaking changes will preserve their old behavior when running 7.1 apps.
There are some caveats, however, which are documented at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206947(v=vs.105).aspx.

how do I check if the device is iPad 3? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Detecting iPad 3 vs iPad 2 device?
Programmatically detect an iPad 3 (HD)?
I am making an iPad app and want to know if the app is running in an iPad 2 or 3 so accordingly I can perform some action.
What would be the best way to find this?
I am currently using
NSString *platform = [[UIDevice currentDevice] platformString];
But it returns "Unknown iPad" when I run on iPad 3.
It's generally best to check for the device features you're interested in rather than looking for a specific model of device. Apple recommends this, and for good reason: if you design for features of the new iPad, your customers won't be happy if Apple releases another device with those features and your app doesn't support them.
If you need to determine whether you're on an iPad, check UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad. If you need to see if you have a Retina display, check [UIScreen mainScreen].scale. Combine the two and you can find out if you're on an iPad with Retina display.
If you need other features specific to the new iPad, look in the API for those features: AV Foundation can tell you about the capabilities of the built-in camera, for example. There's probably some way to check for LTE, too, but I'm not aware of it.

Resources