Posts

Post not yet marked as solved
0 Replies
629 Views
Hi Apple support, I'm using AVMultiCamPip as a project starting base and I have the following setup(sample[1]). It connects without headphones but generate a runtime error(sample[1]) with headphones. I'm running on iPhone Xs with iOS 14.3 The source code I'm using is the sample AVMultiCamPip code. How should I config the external headphone mic to prevent the runtime error to occur? sample[1] 2021-01-23 11:10:54.216702-0500 AVMultiCamPiP[3760:649414] Metal GPU Frame Capture Enabled 2021-01-23 11:10:54.218037-0500 AVMultiCamPiP[3760:649414] Metal API Validation Enabled (lldb) po (notification.object as! AVCaptureMultiCamSession).connections ▿ 6 elements &#9;- 0 : <AVCaptureConnection: 0x282092f80 (AVCaptureDeviceInput: 0x282081280 Back Camera) -> (AVCaptureVideoDataOutput: 0x2820f7840) [type:vide][enabled:1][active:1]> &#9;- 1 : <AVCaptureConnection: 0x282082ba0 (AVCaptureDeviceInput: 0x282081280 Back Camera) -> (AVCaptureVideoPreviewLayer: 0x2820e8060) [type:vide][enabled:1][active:1]> &#9;- 2 : <AVCaptureConnection: 0x282085220 (AVCaptureDeviceInput: 0x282081920 Front Camera) -> (AVCaptureVideoDataOutput: 0x2820f7a80) [type:vide][enabled:1][active:1]> &#9;- 3 : <AVCaptureConnection: 0x2820939e0 (AVCaptureDeviceInput: 0x282081920 Front Camera) -> (AVCaptureVideoPreviewLayer: 0x2820e8200) [type:vide][enabled:1][active:1]> &#9;- 4 : <AVCaptureConnection: 0x28208d460 (AVCaptureDeviceInput: 0x2820843e0 Headphones) -> (AVCaptureAudioDataOutput: 0x2820f7ba0) [type:soun][enabled:1][active:1]> &#9;- 5 : <AVCaptureConnection: 0x28208e480 (AVCaptureDeviceInput: 0x2820843e0 Headphones) -> (AVCaptureAudioDataOutput: 0x2820f7d20) [type:soun][enabled:1][active:1]> (lldb) po (notification.object as! AVCaptureMultiCamSession).hardwareCost 0.58957714 (lldb) po (notification.object as! AVCaptureMultiCamSession).systemPressureCost 0.81041515 (lldb) po (notification.object as! AVCaptureMultiCamSession).outputs ▿ 4 elements &#9;- 0 : <AVCaptureVideoDataOutput: 0x2820f7840> &#9;- 1 : <AVCaptureVideoDataOutput: 0x2820f7a80> &#9;- 2 : <AVCaptureAudioDataOutput: 0x2820f7ba0> &#9;- 3 : <AVCaptureAudioDataOutput: 0x2820f7d20> (lldb) po (notification.object as! AVCaptureMultiCamSession).inputs ▿ 3 elements &#9;- 0 : <AVCaptureDeviceInput: 0x282081280 [Back Camera]> &#9;- 1 : <AVCaptureDeviceInput: 0x282081920 [Front Camera]> &#9;- 2 : <AVCaptureDeviceInput: 0x2820843e0 [Headphones]> (lldb) po notification.userInfo ▿ Optional<Dictionary<AnyHashable, Any>> &#9;▿ some : 1 element &#9;&#9;▿ 0 : 2 elements &#9;&#9;&#9;▿ key : AnyHashable("AVCaptureSessionErrorKey") &#9;&#9;&#9;&#9;- value : "AVCaptureSessionErrorKey" &#9;&#9;&#9;- value : Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x282e81200 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}} (lldb)
Posted
by John-Doe.
Last updated
.
Post not yet marked as solved
0 Replies
578 Views
Hey fourm,I'm writing a Keyboard Extension that displays two rows of images and for optomizion I converted them into HEIC format. It saved me loads of space! It has no problem with loading the images in the App. However, the images are blank when loaded form an instance of UIInputViewController.Here's the intereting part, there's a hasFullAccess properity on UIInputViewController. The images are blank(all white pixel image) when hasFullAccess is false. The images load correctly with content when hasFullAccess is true. The user controls hasFullAccess properity.All images are in HEIC format. Anyone know what is the log below refering to? What is it trying to tell me? It's not my App's log output.Log output: figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 875704422 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 1111970369 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 875704422 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 1111970369 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 875704422 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 1111970369 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 875704422 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 1111970369 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 875704422 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 1111970369 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 875704422 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 1111970369 ) figPhotoContainer = dict( ApplyTransform = false OutputPixelFormat = 875704422 )
Posted
by John-Doe.
Last updated
.
Post not yet marked as solved
0 Replies
548 Views
Hi forum,I submitted an app for review last week Monday. It has been close to two weeks and no update what so ever from Apple. It's still in 'waiting for review.' Anyone have experience with this and is there a magic box I need to tick? I paid 99 bucks per year for this 'amazing' review speed. Is Apple App review department under funded? Any input on this situation is highly appreciated!
Posted
by John-Doe.
Last updated
.
Post not yet marked as solved
0 Replies
430 Views
Hi,Currently, I'm testing the inApp purchase part of the app, where a user can press on restore. And It will restore the user's perviously purchased non-consumable item if it exists.However, I'm getting SKPaymentTransactionStateRestored transactions for a brand new user that are created in iTunes connect.Here are the stepslaunch the app and clear app's purchased statesign out from iCloud in settingsverified app's inApp purchase is not purchasedrestart the iPhone, in case it's not fully signed outlaunch the app, press restore. Got an error, "User need to be signed to iCloud"Created a new account in iTunes connect. Sign in to iCloud without any inApp purchase accountPrese on restoreActually:Got 'SKPaymentTransactionStateRestored' with the item idExpected:No transactions
Posted
by John-Doe.
Last updated
.
Post not yet marked as solved
0 Replies
517 Views
Hi Apple support,I'm writing a video exporting app. I created an AVAssetWriterInputPixelBufferAdaptor with these options NSDictionary *options = @{(NSString *)kCVPixelBufferWidthKey: @(ceil(size.width / 16) * 16), (NSString *)kCVPixelBufferHeightKey: @(ceil(size.height / 16) * 16), (NSString *)kCVPixelBufferCGImageCompatibilityKey: @(YES), (NSString *)kCVPixelBufferCGBitmapContextCompatibilityKey: @(YES), (NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA) };next, I programmticly created each frame from a CGImage and draw into a CGContextRef backed by CVPixelBufferRef. And append it to the AVAssetWriterInputPixelBufferAdaptor CGContextRef context = CGBitmapContextCreate(pxdata, width, height, bPerComponent, b64PerRow, colorSpace, kCGBitmapByteOrder32Little | info); NSParameterAssert(context);For reason unknown to me and it seem and only on iPhone Xs. I need to align the bytesPerRow to some multiple of 64. Otherwise, it will create stripy pattern in the output video. However, I don't need to do this for iPhone 8 or 6!!! I have not tested on iPhone X.ONLY on iPhone Xs as far as I can tell. long b64PerRow = (bytesPerRow/64 + 1) * 64;iPhone 6 &amp; 8: size_t bytesPerRow = CGImageGetBytesPerRow(image);How do I know when to align to multiple of 64?iPhone Xs without alignment: https://i.imgur.com/ICA5I9p.jpgiPhone 6 without alignment: https://i.imgur.com/RE3XwO0.png
Posted
by John-Doe.
Last updated
.
Post not yet marked as solved
0 Replies
819 Views
Hey fellow developers!Just got my iPhone Xs, I'm super excited!!! However, there's something on my mind! My code doesn't work anymore without any changes.- [✅] iPhone 6- [✅] iPhone 8- [╳] iPhone XSThe flow as the following, I created an `AVAssetWriterInputPixelBufferAdaptor` with the following options. NSDictionary *options = @{(NSString *)kCVPixelBufferWidthKey: @(size.width), (NSString *)kCVPixelBufferHeightKey: @(size.height), (NSString *)kCVPixelBufferCGImageCompatibilityKey: @(YES), (NSString *)kCVPixelBufferCGBitmapContextCompatibilityKey: @(YES), (NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA) };And write to the CVPixelBufferRef like this- (void) writeFrameAt: (NSInteger) frameIndex forFrame: (UIImage *) frame atFPS: (int) fps toApaptor: (AVAssetWriterInputPixelBufferAdaptor *) adp { CGImageRef image = [frame CGImage]; CVPixelBufferRef pxbuffer = NULL; CVPixelBufferPoolCreatePixelBuffer(NULL, adp.pixelBufferPool, &amp;pxbuffer); CVPixelBufferLockBaseAddress(pxbuffer, 0); void *pxdata = CVPixelBufferGetBaseAddress(pxbuffer); NSParameterAssert(pxdata != NULL); CGFloat height = CGImageGetHeight(image); CGFloat width = CGImageGetWidth(image); CGFloat bytesPerRow = CGImageGetBytesPerRow(image); CGFloat bPerComponent = CGImageGetBitsPerComponent(image); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGBitmapInfo info = CGImageGetBitmapInfo(image); CGContextRef context = CGBitmapContextCreate(pxdata, width, height, bPerComponent, bytesPerRow, colorSpace, info); NSParameterAssert(context); CGContextDrawImage(context, CGRectMake(0, 0, width, height), image); CGColorSpaceRelease(colorSpace); CGContextRelease(context); CVPixelBufferUnlockBaseAddress(pxbuffer, 0); BOOL result = [adp appendPixelBuffer:pxbuffer withPresentationTime:CMTimeMake(frameIndex, fps)]; NSParameterAssert(result); CFRelease(pxbuffer); }Video from iPhone 6/8 looks like this:https://i.imgur.com/RE3XwO0.pngVideo from iPhone Xs looks like this: https://i.imgur.com/ICA5I9p.jpgAnyone can shine some light on this problem?Thanks!!!
Posted
by John-Doe.
Last updated
.
Post not yet marked as solved
2 Replies
1.4k Views
After watching wwdc2017/216, I have an idea for an App! An apple pie eating competition training app!The rules:- Need to finish an apple pie under 2 minutes- The most number pies finished wins, the time between each "pie eating session" does not count.The App:- When the user starts the timer and put the wrist down.- 2 minutes from the first action, the user will be notified. No other activities performed.- Will perform an +1 in the cloud database after 2 minutes, with or without user input.What I looked into so far- Frontmost App State (https://developer.apple.com/documentation/watchkit/wkextension) - Wakes from the background to receive notifications. It seems to be only local notifications.- Remote notification is a non-starter :/- NSProcessInfo.performExpiringActivity - Not enough time and the incorrect purpose for this task.- Keeping the app running as a workout app for 2 minutes? (SMH)- Any other suggestions are welcome 🙂How do I get a reliably timed notification to run custom code without keeping the app active? (Can be short timespan)Could I achieve this without writing it as a workout app? All I care is the timed session and getting notified at the correct time.
Posted
by John-Doe.
Last updated
.