Can't we use Instruments with a real-device attached, instead of using iOS simulator ?? - xcode6

Am currently using Xcode6.4 , and I am actually trying out the Instruments (time profiler) for the first time...
The Instrument is working fine if I choose simulator and somethig wierd is happenning when I connect to a real-device(iOSv8.3)...(i.e)the application hangs.
My question is that is there a way to use instruments with a real device connected ??
Pls do share if u came across the same probs and found a solution ...
Thanks in advance..

Yes you can.
Here is Apple documentation that talks about it a bit. Note this paragraph:
In order to use Instruments to profile an iOS device, your
device must be provisioned for development before data can be
collected from it. See Provisioning Your iOS Device for Development.

Related

Detecting Proximity of Paired Bluetooth LE devices (i.e. iPhone, Apple Watch) from Mac

From macOS, I'd like to detect the presence/proximity of already paired (via iCloud) Bluetooth LE devices such as a user's iPhone or Apple Watch. Is there a way to do this without running a custom-built app on the user's iPhone/Watch?
I can easily get a list of devices using CoreBluetooth, and seemingly also get RSSI signal strength from this device list, but I don't see a way to correlate the random UUID with a known device, as described in this question.
I've looked at some possible solutions including turning an iPhone into an iBeacon and the MultipeerConnectivity framework, but it looks like both of these require an app to be running on all devices (Mac, iPhone, and Watch). An example app that does not appear to require an app running on the iPhone/Watch is here.
Please note that I am working within a sandboxed environment. Thank you in advance for any suggestions.

MediaPlayer randomly stops on Android 4.4 (19)

My app is streaming audio fine on all devices except Nexus 5. On Nexus 5, the MediaPlayer randomly stops playing. Not sure if the changes with respect to Loudness (http://developer.android.com/about/versions/android-4.4.html#Multimedia) in 4.4 has broken something.
Is anyone else noticing this issue? Seems to be happening to some users, but I'm unable to reproduce on my own Nexus 5.
UPDATE: So I was able to reproduce the issue on my Nexus 5. It seems to actually be happening near the end of the clip. With about 1 - 5 seconds left in the clip, the OnCompletionListener.onCompletion() method is called by MediaPlayer. This is only happening on the Nexus 5 and it's happening on some clips at random. I'm able to reproduce it almost 30% of the time. Note that, when the clip finishes early, if I try to go back and play the clip again it finishes playing the clip entirely the second time. I know Android 4.4 just got released, but hopefully someone out there can help! Thanks.
UPDATE: I've filed a bug against Android: https://code.google.com/p/android/issues/detail?id=62304
Alright, I've found the solution. I'm not sure if this is the issue you're all facing now, but it fixes mine. Basically, Android 4.4+ introduces many new power management features and one of them includes shutting the CPU down while the screen is off. Quote from Android docs:
Because the Android system tries to conserve battery while the device
is sleeping, the system tries to shut off any of the phone's features
that are not necessary, including the CPU and the WiFi hardware.
However, if your service is playing or streaming music, you want to
prevent the system from interfering with your playback.
Hence, without a CPU wake lock the MediaPlayer loses its ability to stream properly, causing it to stop playback before the clip is complete. The solution for this is simple: add a PARTIAL_WAKE_LOCK to the MediaPlayer. As documented on Android:
mMediaPlayer = new MediaPlayer();
// ... other initialization here ...
mMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);
I guess a bunch of us failed to see this in the docs. I don't remember seeing this, so maybe it was just added. Anyway, hopefully this fixes the issue for everyone!
Run into almost the same problem recently: MediaPlayer works perfectly on Android 4.3 and below, but fails to play the same videos on Android 4.4.
Decided to switch to vitamio library and now my app works on 4.4 as well. vitamio API is identical to the MediaPlayer's one, so the migration was quite easy.
But this solution still has some drawbacks:
You have to buy a license if you are not an individual developer
The app size will be increased ~11 megabytes
This problem is possible related to bug: http://code.google.com/p/android/issues/detail?id=63032
The problem associated with the above bug is fixed in 4.4.1/4.4.2. The change log entry that is suspected to be the issue has the following information:
https://android.googlesource.com/platform/frameworks/av/+/7fa0152
Restore NuPlayer error and EOS handling This was erroneously removed
by commit a73c954

Why is Bluetooth Low Energy not connecting on some devices?

I'm quite new to Objective-C programming and I have a problem with my app.
It connects to a device (an electronic board) through a Bluetooth Low Energy interface. My iPad is acting as a Central Manager, and the device it gets the data from acts as a Peripheral.
I use the CoreBluetooth framework.
It connects perfectly when I run the app on my iPad (iOS 7.02), but on any other device it hardly ever succeeds. I tried it in four other devices, all of them with the same iOS (7.02) and they hardly ever connect successfully to the electronic board (they managed to connect in a couple of chances).
I'm lost and don't know where to open a path to find the solution to that problem.
I don't know which other information could be useful to solve that problem.
Well there is the obvious, but worth mentioning. You bluetooth is on and you've scanned and picked up the Smart Device with your Smart Ready device. Given a yes to all of the above it just won't connect?
Have you ensured that it's not auto connecting to one of your other devices that you've previously connected with? Unless you've made some extraneous adjustments to your smart device's firmware it will only connect to one device at a time.

If I want to write an iPad app, do I have to buy an iPad?

To program for the iPhone, you need an iPhone. That's because you have to compile the final version of the app on the iPhone hardware.
Do you also need an iPad when you program for the iPad? Or will an iPhone also do the job?
You do not need to have an iPhone to be able to compile your program for the device, and you do not need to have an iPad to compile your program for that device either. It's good to be able to test it on an actual device before you submit it, but it is not necessary. All compilation happens on the computer, not on the iPhone or iPad.
You should have one. Those of us who released iPad apps on iPad release day can certainly tell you that there are differences between the Simulator and the device. I had two minor but ugly errors which went out with our first release of Reiner Knizia's Money for the iPad, one of which had to do with different case comparison on the two devices. I would have never seen them if I didn't have a device to check.
I would imagine that for testing alone you would need an iPad. Although I've never developed on either one, basic quality control says that you really should test any app on the actual hardware it is intended to run on.
I'd say Yes, you need an iPad. Reasons, precise and real memory warnings, device wifi's real speed latency, 3g. And here's the tricky one: Some libs/features just don't work on the simulator but they work on the device and viceversa.
But I mean, you can always be googlish and search for these later cases I mention, and just be sure that you are doing things right. Otherwise, get yourself an iPad, you don't lose anything.
-edit: I didn't read the question correctly... the short answer: You don't need an iPad to compile the final .app file, but take my advice.
YES. (Unless you have no respect for your users and don't care about the quality of your app)
No. You don't even have to get a developer license from Apple. You can just download XCode and the official iOS4 SDK and develop the application in the simulator.
However, there's small caveat - the simulator does not always behave like the real device. So at some point you want to have a device to test your app on.
It would certainly help to have one, but not necessary at first. Get some experience programming for your iPhone, and once you feel ready, start working on something for the iPad. The simulator works great for most tasks. However, I wouldn't release any finished product to the app store unless it had been thoroughly tested on hardware.
There are cases where it is necessary to have hardware. For example, I was doing some testing involving dragging your finger across the screen. I needed to step through the debugger while doing this. Using the simulator was impossible, since I couldn't lift my mouse pointer from the iPad screen and interact with the debugger at the same time. Having hardware allowed me to interact with the device, while working in XCode at the same time.
Not having the target device for your software is a recipe for poor user experience. Touch interfaces cannot be accurately duplicated with a mouse. There are also very specific problems with relying on the iPad simulator:
1) The actual iPad has a slower processor than the desktop simulator. Stuff that looks fast in your simulator can be slow on an actual iPad
2) The iPad simulator is not fully correct, especially in simulating web browser experience. Real iPads have weird painting issues, CSS sanity differences, caching oddnesses, and then just more crashes than the simulator.
3) Orientation changes need to be performed on a real iPad! The simulator can just misleading. Ditto for network fetch latencies, which can affect the user experience significantly especially on a 3G link. If you don't have a real iPad you'll never notice that you need load masks, "waiting for content" watermarks etc.

Is it possible to send OSC commands to an iPad via the Camera Connection Kit?

I'm building a small controller device that I'd like to partner with a computer. I've settled on using OSC out from my custom built hardware and am pretty satisfied with what I can get from WOscLib. Two goals I'd like to achieve are portability and a very nice ratio between battery:computing power, and this has lured me towards using iPhoneOS to accomplish my goals.
I think the iPad would suit my needs perfectly, except that using wifi to broadcast OSC out from my device requires that device to be connected to a third device with a wifi chip, and this would destroy the goal of portability, whilst also introducing potential latency and stability headaches. My question is pretty simple: Can I push OSC commands FROM my controller TO an iPad via USB and the Camera Connection Kit? If I could accomplish this, the two major goals of my project would be fulfilled very nicely.
This seems like it should be a simple little question, but researching this obsessively over the past few weeks has left me more almost more uncertain than if I had done no research at all. I'd really like some more confidence before I go down this route, and it seems like it should be possible. Any insight would be very, very appreciated.
The simple answer is that you can't :-(
In order to interface your custom hw you'll have to
obtain a license from apple.
no third device is required. you can click "create network" on your wifi menu in osx and then you ipad can connect directly to that. many apps now use osc over wifi on the ipad. some are done in java. im not sure about objective c.
You could connect a USB ethernet device to the iPad Camera Connection Kit and send OSC over ethernet from your custom controller.
Somewhere along the line since this question was asked, USB ethernet devices became officially supported over the CCK.