How to test ARKit app? Can ARKit app be tested using recorded video instead of live video? - augmented-reality

Getting started with ARKit development. Imagine that testing an app in development between builds requires imaging an environment to expose the app to a scene and that having to physically hold and/or move camera to capture live scene will be extremely cumbersome each time.
Can an app be tested with recorded video in order to avoid having to capture a realtime scene each time an app has to be tested? If so, how to do so?

Unfortunately, there is no other way to test ARKit apps except running them on your device. I agree, it is a cumbersome process, but for now thats all we have. Hopefully, in the future, Apple will make some sort of AR simulator so that we can test our apps in a faster and easier way.

Yes you can record videos using Reality Composer, then airdrop them to your mac, add them to your Xcode project, edit the scheme to enable ARKit "Replay data" (it may only appear when a device is connected), then select your video in the drop-down list
Edit : screenshot made using Xcode 12.5.1

Related

Play audio file as microphone input using AudioKit - for iOS simulator dictation testing

I am looking for a way of play an audio file and have it as input for the iOS simulator microphone. I am creating a bunch of UI tests for an iOS app that uses dictation (speech-to-text) and I didn't find a way of doing it using applications like SoundFlower, etc as I want to run in the CI and bypassing Apple's security Gatekeeper is not possible as I can't run the machine in recovery mode.
I want to launch the app as an UI test and send some audio to the "device microphone" as a way of triggering a wakeword. Mocking the code here is not an option, or better, not what we want, otherwise we won't test anything.
I was wondering if I can use AudioKit to do this.
I don't think AudioKit will help you with this. I would have thought Soundflower could do it, but you could also try Rogue Amoeba's Loopback if you haven't already.
The iOS simulator does inherit audio from the host Mac, so you could try an old school solution of physically attaching a cable to the microphone input from the output.

TestFlight Testing low Framerates?

I am trying to upload my game to the app store (it is currently on the google play store) but since I use a pc, I had to borrow a mac from a friend to publish my game.
I built the game on my pc, uploaded it to my dropbox and downloaded it onto the mac. I then finished the game on Xcode and used testflight to test my game.
However, the game is running at about 20-30 frames approx, not 60. The low frames are clearly visible and it affects with the gameplay.
I was wondering if this has to do with testflight or if I built it wrong, or if I did some settings wrong on Xcode?
Thanks!
100% that the Xcode/build problem, the test flight does not touch your code in any way.

How can i capture what's being played on an iOS device output audio stream and store it in an object?

Is there a way to programmatically capture what's being played on an iOS device audio output? I want to capture an audio snippet and do some data processing on it.
There is an entire library devoted to this sort of thing that Apple built in for you called AVFoundation.
It's extensive and sprawling, so be prepared to do some work, but you'll be able to sample and manipulate the bit-streams directly with all types of audio.
If you are trying to have your app run in the background and strip audio from another app (like iTunes) or from the phone itself, put on your black hat, hack into the private API's of iOS, and release your stuff over in the jailbroken app-store, because that sort of thing is explicitly designed to not be possible with legal and legitimate apps.

Is automatic screen mirroring broken in or removed from iOS 6+?

I want to do this with my app and device:
Connect VGA, DVI, or HDMI monitor to appropriate 30-pin adapter cable
Connect adapter to iPhone4/iPad2
Mirror iDevice screen content on monitor screen.
This all used to "just work" on iOS 5. There's even proof of it working in a YouTube video of our demo from last year (see http://youtu.be/xjKk1EJ1yAI, to skip to the image jump to 1:40 in the video and hit play). All I did was plug in the iPad and voila there it was...
This now seems to "just not work." Do I have to write a whole bunch of code to make this work with every app I build or is there a setting in the Info.plist file that I should set? Should I build for iOS 5.1 to make it work again, even though the device runs iOS 6+?
I will write the code if I have to, but I'd be a lot happier if it just worked again. The "similar questions" feeature on SO was helpful in letting me know that I'm perhaps out of luck and pointing to some solutions, like Rob Terrell's TVOutManager, but I wasn't able to find an answer to this specific question in that list.
EDIT: I only tried this with an iPhone 4 running iOS 6.0.1 and the VGA adapter. I haven't tried again with an iPad (also with iOS 6.0.1), and the video was using the HDMI adapter. I will try those and update accordingly (but probably not until Monday for those updates).

Saving video screencast of iPhone application

Is there a way to capture video of a screen from your own application? As far as I see there is no way to do it with UIImagePickerController (cameras only), but maybe there is a way to do it with iOS 4 AV Foundation or Core Video?
There seems to be two ways of capturing the content of the application while it's running:
Use the private API UIGetScreenImage() function which seems to be accepted by Apple now;
Use the following thread's captureView method to capture the image.
You'll have to capture it at many times per second (I guess 24 times should be ok for human eye persistence) then you'll have to produce the movie. Perhaps you could use the ffmpeg iphone port.
Alternatively, if you'd like to capture your application's running for a demo, your best bet would be to run your application on the simulator and use a Mac OS X screencast software to capture it. See also SimFinger which "bundle of little tricks to make a screen capture of the iPhone Simulator suck less".
Finally, perhaps the following StackOverflow thread might help you produce better screencasts.
SimFinger and ScreenFlow are great if you can shoot in the simulator.
If you have to shoot on the device (e.g. when accelerometer, GPS, camera, etc. are used) you currently have to resort to the jailbreak world. The app "Display Recorder", available for $5 in the Cydia Store, allows to create an AVI movie of the iPhone's screen content. This works across all apps. There's a YouTube video showing it. The movie files can then be uploaded to YouTube or pulled off the iPhone via the built-in web server.

Resources