Post

Replies

Boosts

Views

Activity

Universal Links to multiple apps (iOS 15)
Hi! We have two apps, both use the Universal Links mechanism, apps should be opened when user read NFC tag. The tag content is a URL link to our domain. After updating to iOS 15, users faced the problem that they constantly see the application selection dialog when reading the nfc tag. How to fix it? Previously, the selection dialog was displayed once and the value was stored. Our aasa file on domain: { "applinks": { "apps": [], "details": [ { "appIDs": ["*.*.app1"], "paths": ["*"] }, { "appIDs": ["*.*.app2"], "paths": ["*"] } ] }, "appclips": { "apps": [ "*.*.app2.Clip" ] } }
1
0
1.2k
Oct ’21
Settings.bundle in tvOS 15.0 seems to no longer work.
I have an App that builds for iOS, iPadOS, macOS and Apple TV, which was last released to all the App Stores in April. Preferences/settings are handled by the App itself except for the Apple TV variant, where I use a Settings bundle. This worked fine until tvOS 15.0, where it appears that tvOS is not updating the value of the App’s settings from NSUserDefaults when the Settings App opens. I have been working on this problem off and on for the last week and am at wits end. I’ve searched WWDC videos looking for a clue, there must be some simple change I cannot see. I’ve made clean projects for iOS and tvOS, and using the identical OBJ-C code and Settings plist entries, the iOS version works perfectly, the tvOS version fails in the simulator and on the device. I am not trying to synchronize Settings across devices, just persist across restarts on a single device. My code stores data correctly in NSUserDefaults, it simply seems that tvOS Settings App is not reading values from there for display, nor writing changes that the user makes from Settings back to user defaults. None of the types in the test projects work: TexField, Switch, Title. The test code is so simple I hesitate to include it, but the code and the NSUserDefaults key identifiers do match. This code will preset my App’s version number for Settings to display in iOS 15 but not tvOS 15. It used to work in tvOS 14: <key>DefaultValue</key> <string>DefaultVersionValue</string> <key>Type</key> <string>PSTitleValueSpecifier</string> <key>Title</key> <string>Version</string> <key>Key</key> <string>VersionKey</string> </dict> ```   NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];    [ud registerDefaults:@{      @"TextFieldKey" : @"TextFieldValue",      @"VersionKey" : @"VersionValue"    }];        [ud setObject:@"3.14" forKey:@"VersionKey"]; Any idea? Many thanks.
4
0
1k
Oct ’21
iOS 15 - UI Test keeps asking pin code for "Enable UI Automation"
We got the newly issue that our Test devices keeps us asking for the pin code to "Enable UI Automation". Then it works for some hours or days, but after some time it starts again. "Enable UI Automation" is already enabled in "Settings" - "Developer" menu. The devices are located remotely and we can't access them directly, so this is a big issue for us right now. Is there any way to avoid this?
14
4
5.8k
Oct ’21
Xcode 13.1 iOS 15.0 simulator missing location privacy settings
When I run an app that uses location services on the Xcode 13.1 simulator for iOS 15 the location privacy settings are missing. If you go to the settings on the simulator under privacy the section for location services is missing. The exact same thing on a physical iPhone running iOS 15.0 does show the location settings under privacy in the settings app. Where did the settings for location privacy go? In order to test using the simulator a developer needs to be able to turn those settings on and off, like turning off precise location to see how an app responds.
12
6
16k
Oct ’21
Mouse scrolling stops working in macOS Monterey
Hi all I have MacBook Pro M1. Yesterday I upgraded my Mac with new macOS Monterey 12.0.1. Since that upgrade my Apple mouse sometimes stops scrolling. It happens when I leave Mac, it goes to sleep mode and when I come back and try to scroll it doesn't work To fix it I turn my mouse off and the turn on. Who has the same problem let me know in comments please
324
6
117k
Oct ’21
TextKit2: Relation between NSRange and NSTextRange
The way NSTextView is built it's inevitable to use NSTextStorage with TextKit2, however the NSAttributedString uses NSRange vs the TextKit2 family uses NSTextRange for text location, etc. What I struggle with is the relation between these two. I didn't find a convenient translation between these two. Is NSAttributedStrint NSRange length=1 equal to NSTextRange offset 1? I think it's not (at least it's not necessarily true for every NSTextContentManager. So my question is, given a NSTextRange, what is the corresponding NSRange in NSTextContentStorage.attributedString
4
0
1.8k
Nov ’21
The bank identification code you selected does not match the corresponding part of your IBAN.
I'm stuck in "Add bank account" step when filling User informations in Agreements, Tax, and Banking for Paid Apps. When I try to save, i get the error The bank identification code you selected does not match the corresponding part of your IBAN. I checked many times, all of my informations are valid (Valid IBAN, Account number same as given by my bank). I even tried to take every part of my IBAN as account number because I was desperate, nothing changed. I'm with Qonto bank. What am I doing wrong ?
2
1
2.3k
Nov ’21
Truedepth Camera on iPhone13 products - lower accuracy of depth data?
Hi, just experienced using the Apple demo app for Truedepth images on different devices that there are significant differences in the provided data quality. Data derived on iPhones before iPhone 13 lineup provide quite smooth surfaces - like you may know from one of the many different 3D scanner apps displaying data from the front facing Truedepth camera. Data derived on e.g. iPhone13 Pro has now some kind of wavy overlaying structures and has - visually perceived - very low accuracy compared to older iPhones. iPhone 12pro: data as pointcloud, object about 25cm from phone: iPhone 13pro: data as pointcloud, same setup Tried it out on different iPhone 13 devices, same result, all running on latest iOS. Images captured with the same code. Capturing by using some of the standard 3D scanner apps for the Truedepth camera are providing similar lower quality images or point clouds.   Is this due to degraded hardware (smaller sized Truedepth camera) on new iPhone release or a software issue from within iOS, e.g. driver part of the Truedepth camera?   Are there any foreseen improvements or solutions already announced by Apple?   Best Holger
10
2
6.9k
Nov ’21
MediaRecorder onstop callback doesn't get called in iOS15
Hi, I'm using MediaRecorder for screen recording of canvas , along with audio. simplified code to implement screen recorder //intialise stream const canvas = document.querySelector('.main-canvas'); const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); for (let track of canvas.captureStream().getTracks()) { stream.addTrack(track); } recorder = new MediaRecorder(stream); chunks = []; recorder.ondataavailable = ({ data }) => { if (data) chunks.push(data); }; recorder.start(); recorder.onstop = () => { const videoBlob = new Blob(chunks, { type: 'video/mp4' }); chunks = [] //stop mic access after use try{ for (let track of stream.getTracks()) { track?.stop(); } }catch(e){} return videoBlob; } so when i call recorder.stop() , the recorder.onstop method is not getting called sometimes randomly. And also in case when recorder.onstop is not called , recorder.ondataavailable is not called even a single time,So it returns empty Blob output. This only occurs in iOS 15 device's , it occurs randomly 40% of the times. Is there any workaround for this, or what is cause of this issue? Thanks in advance
6
2
2.4k
Nov ’21
ProRes encoding on M1 Max fails for high bit depth buffers
I have code that has worked for many years for writing ProRes files, and it is now failing on the new M1 Max MacBook. Specifically, if I construct buffers with the pixel type "kCVPixelFormatType_64ARGB", after a few frames of writing, the pixel buffer pool becomes nil. This code works just fine on non Max processors (Intel and base M1 natively). Here's a sample main that demonstrates the problem. Am I doing something wrong here? //  main.m //  TestProresWriting // #import <Foundation/Foundation.h> #import <AVFoundation/AVFoundation.h> int main(int argc, const char * argv[]) {     @autoreleasepool {         int timescale = 24;         int width = 1920;         int height = 1080;         NSURL *url = [NSURL URLWithString:@"file:///Users/diftil/TempData/testfile.mov"];         NSLog(@"Output file = %@", [url absoluteURL]);         NSFileManager *fileManager = [NSFileManager defaultManager];         NSError *error = nil;         [fileManager removeItemAtURL:url error:&error];         // Set up the writer         AVAssetWriter *trackWriter = [[AVAssetWriter alloc] initWithURL:url                                                    fileType:AVFileTypeQuickTimeMovie                                                         error:&error];         // Set up the track         NSDictionary *videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:                                        AVVideoCodecTypeAppleProRes4444, AVVideoCodecKey,                                        [NSNumber numberWithInt:width], AVVideoWidthKey,                                        [NSNumber numberWithInt:height], AVVideoHeightKey,                                        nil];                  AVAssetWriterInput *track = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo                                                         outputSettings:videoSettings];         // Set up the adapter         NSDictionary *attributes = [NSDictionary                                     dictionaryWithObjects:                                     [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:kCVPixelFormatType_64ARGB], // This pixel type causes problems on M1 Max, but works on everything else                                      [NSNumber numberWithUnsignedInt:width],[NSNumber numberWithUnsignedInt:height],                                      nil]                                     forKeys:                                     [NSArray arrayWithObjects:(NSString *)kCVPixelBufferPixelFormatTypeKey,                                      (NSString*)kCVPixelBufferWidthKey, (NSString*)kCVPixelBufferHeightKey,                                      nil]];         /*         NSDictionary *attributes = [NSDictionary                                     dictionaryWithObjects:                                     [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:kCVPixelFormatType_32ARGB], // This pixel type works on M1 Max                                      [NSNumber numberWithUnsignedInt:width],[NSNumber numberWithUnsignedInt:height],                                      nil]                                     forKeys:                                     [NSArray arrayWithObjects:(NSString *)kCVPixelBufferPixelFormatTypeKey,                                      (NSString*)kCVPixelBufferWidthKey, (NSString*)kCVPixelBufferHeightKey,                                      nil]];         */         AVAssetWriterInputPixelBufferAdaptor *pixelBufferAdaptor = [AVAssetWriterInputPixelBufferAdaptor                             assetWriterInputPixelBufferAdaptorWithAssetWriterInput:track                             sourcePixelBufferAttributes:attributes];         // Add the track and start writing         [trackWriter addInput:track];         [trackWriter startWriting];         CMTime startTime = CMTimeMake(0, timescale);         [trackWriter startSessionAtSourceTime:startTime];         while(!track.readyForMoreMediaData);         int frameTime = 0;         CVPixelBufferRef frameBuffer = NULL;         for (int i = 0; i < 100; i++)         {             NSLog(@"Frame %@", [NSString stringWithFormat:@"%d", i]);             CVPixelBufferPoolRef PixelBufferPool = pixelBufferAdaptor.pixelBufferPool;             if (PixelBufferPool == nil)             {                 NSLog(@"PixelBufferPool is invalid.");                 exit(1);             }             CVReturn ret = CVPixelBufferPoolCreatePixelBuffer(nil, PixelBufferPool, &frameBuffer);             if (ret != kCVReturnSuccess)             {                 NSLog(@"Error creating framebuffer from pool");                 exit(1);             }             CVPixelBufferLockBaseAddress(frameBuffer, 0);             // This is where we would put image data into the buffer.  Nothing right now.             CVPixelBufferUnlockBaseAddress(frameBuffer, 0);             while(!track.readyForMoreMediaData);             CMTime presentationTime = CMTimeMake(frameTime+(i*timescale), timescale);             BOOL result = [pixelBufferAdaptor appendPixelBuffer:frameBuffer                                            withPresentationTime:presentationTime];             if (result == NO)             {                 NSLog(@"Error appending to track.");                 exit(1);             }             CVPixelBufferRelease(frameBuffer);         }         // Close everything         if ( trackWriter.status == AVAssetWriterStatusWriting)             [track markAsFinished];         NSLog(@"Completed.");     }     return 0; }
21
0
6.1k
Nov ’21
[WatchOS] Error while trying to insertRouteData into HKWorkoutRouteBuilder
I've ran into an error with the insertRouteData function of the HKWorkoutRouteBuilder that I can't seem to find any information on. The error is "Unable to find location series 1A193D3B-AFF5-41D8-A967-B1BE08D9F543 during data insert.". It seems to only happen when trying to insert very long routes, in the most recent case it was a 5 hour bike ride with 5900 samples. I save all the route data in a sqlite table as backup and after checking out the data there isn't any red flags as to why it would not insert correctly. Has anyone seen this before and could offer some insight or point me in the right direction to find the source of the error?
1
0
939
Nov ’21
tvOS App Icon Errors
I made a minor change the UI of my tvOS App, and am now getting errors related to the App Icon. I have confirmed that all the background images DO match the requirements but App Store Connect won't let me upload: App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '400x240'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '800x480'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '1280x768'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '2560x1536'. App Store Connect Operation Error Invalid Image Asset. The App Store Icon must only contain an image with size (1280pt × 768pt @1x). Refer to https://developer.apple.com/tvos/human-interface-guidelines/icons-and-images/app-icon for more information Have the standards changed? Or is there another issue I should be looking at? Thanks!
2
0
1.6k
Nov ’21
Diskmanagement.disenter error 49218
Hello everyone, I'm having a little issue with mounting my external hard drive lately. I've tried quite a few methods in hope of getting it to work again, but so far, no luck. I hope someone can help me solve this issue, or those who have the same problem may also share your insights. My external hard drive was working fine about a week ago. But one day, I ejected the hard drive and the icon disappeared, so I thought it was safe to unplug it. When I did, it said the hard drive was not properly removed. It still works fine when I use it the next day, but the same thing happened. It said the drive was not properly removed after I ejected the drive, waited for the icon to disappear, and then unplugged the drive. After that, it never works again, and the attached images are the info I got when I tried to mount or run first aid on this drive. Please help & thank you in advance! Computer: 27" iMac - MacOS Monterey External Hard Drive: WD_Black 4TB. APFS encrypted
68
10
65k
Nov ’21
How to make an M1-only (native-only) app?
I moved my Intel-based project to my new M1 machine (Pro Max), and it builds and runs fine, but only as a Intel/Rosetta app. I read that xCode builds a hardware-specific app for testing and debugging, but the app it's building for me is running as an Intel app (regardless of whether I'm running it under xCode or launching it stand-alone). Under Architectures, it says: Standard Architectures (Apple Silicon, Intel) - $(ARCHS_STANDARD) What should I put there to force it to make an M1-only app? (I'm making an app just for my own use, not for distribution.)
8
1
7.7k
Nov ’21
Crash when requesting location authorisation on app startup
I'm trying to diagnose a crash we're seeing in an app that's on TestFlight at the moment. We have the background location permission and are woken by various events, e.g. the significant location change event. I believe the app is being woken in the background and within a few seconds (about 7s in the example below) the app crashes. The crash appears to be when we are confirming what location authorisation the app currently has. As far as we know this is only happening for a single user. Any thoughts on what could be happening? Other forum posts led me to believe it was related to leaking background tasks but I didn't think that was likely after only 7s (and there's no actual mention of background tasks in the crash). Other threads in the crash log have core data relate tasks going on and while we've done a lot of work on our multi-threaded core data I could imagine that being a cause, but surely that would show as a crash on the threads involved rather than thread 0? Any help appreciated, crash log below. John AppVariant: 1:iPhone9,3:15 Beta: YES Code Type: ARM-64 (Native) Role: Non UI Parent Process: launchd [1] Date/Time: 2021-12-13 10:31:18.0065 +0000 Launch Time: 2021-12-13 10:31:11.4169 +0000 OS Version: iPhone OS 15.1 (19B74) Release Type: User Baseband Version: 6.00.00 Report Version: 104 Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001bdd7cb10 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001bdd7d134 mach_msg + 72 (mach_msg.c:119) 2 libdispatch.dylib 0x0000000183f9c734 _dispatch_mach_send_and_wait_for_reply + 504 (mach.c:815) 3 libdispatch.dylib 0x0000000183f9caec dispatch_mach_send_with_result_and_wait_for_reply$VARIANT$mp + 52 (mach.c:2019) 4 libxpc.dylib 0x00000001de30f458 xpc_connection_send_message_with_reply_sync + 236 (connection.c:974) 5 Foundation 0x0000000185a0387c __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 12 (NSXPCConnection.m:223) 6 Foundation 0x0000000185a09194 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2368 (NSXPCConnection.m:1649) 7 Foundation 0x0000000185a49f8c -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:arg3:] + 148 (NSXPCConnection.m:1294) 8 Foundation 0x00000001859ece6c _NSXPCDistantObjectSimpleMessageSend3 + 80 (NSXPCDistantObject.m:282) 9 CoreLocation 0x000000018b0bba0c -[CLLocationInternalClient getAuthorizationStatus:forBundleID:orBundlePath:] + 140 (LocationInternal.m:786) 10 CoreLocation 0x000000018b0ba1fc CLInternalGetAuthorizationStatus + 268 (LocationInternal.m:2063) 11 CoreLocation 0x000000018b0df1c4 +[CLLocationManager _authorizationStatusForBundleIdentifier:bundle:] + 80 (CLClient.mm:1391)
8
5
3.9k
Dec ’21
URLSession.uploadTask withFile When can file be deleted
Since I am uploading in the background, I need to save the request body off in a file. The documentation says this gets copied to a temporary storage area and uploaded from there. When can I delete the temporary file I generated? Deleting it just after the call to session.uploadTask(with: request, fromFile: filePath) seems to be a race condition where I will occasionally get a sharing violation deleting the file. Do I have to keep my temporary file around until DidCompleteWithError or DidReceiveData is called? I ask because I'm uploading an existing photo, so I have to generate a multi-part form file with the photo embedded, then iOS makes a copy of that file. This results in having the photo in storage on the device three times. We are uploading photos from an Event so there will be several hundred, so Im worried about device storage running out. Todd
5
0
936
Dec ’21
CFNetwork crash in CFURLRequestSetMainDocumentURL
I have received two strange crash reports from an iPad11,7 running iPadOS 15.1 and an iPad11,2 running iPadOS 15.2. On both occasions, the crashed thread calls CFURLRequestSetMainDocumentURL, which in turn calls _dispatch_source_set_runloop_timer_4CF in libdispatch, after which the application crashes with SIGSEGV and SEGV_MAPERR. The crashed thread's call stack is displayed below. Full crash logs are attached as well. What could this be? Exception Type: SIGSEGV Exception Codes: SEGV_MAPERR at 0x21d Crashed Thread: 20 Thread 20 Crashed: 0 libdispatch.dylib 0x00000001829e1784 _dispatch_source_set_runloop_timer_4CF + 36 1 CFNetwork 0x00000001834fc824 CFURLRequestSetMainDocumentURL + 2240 2 CFNetwork 0x00000001836b89a8 _CFNetworkErrorGetLocalizedDescription + 693652 3 CFNetwork 0x00000001834fdb1c CFURLRequestSetMainDocumentURL + 7096 4 CFNetwork 0x00000001834f3c34 CFURLRequestSetURL + 9668 5 libdispatch.dylib 0x00000001829ca914 _dispatch_call_block_and_release + 28 6 libdispatch.dylib 0x00000001829cc660 _dispatch_client_callout + 16 7 libdispatch.dylib 0x00000001829d3de4 _dispatch_lane_serial_drain + 668 8 libdispatch.dylib 0x00000001829d498c _dispatch_lane_invoke + 440 9 libdispatch.dylib 0x00000001829d5c74 _dispatch_workloop_invoke + 1792 10 libdispatch.dylib 0x00000001829df1a8 _dispatch_workloop_worker_thread + 652 11 libsystem_pthread.dylib 0x00000001f1eea0f4 _pthread_wqthread + 284 12 libsystem_pthread.dylib 0x00000001f1ee9e94 start_wqthread + 4 second_crashlog.txt report-2517628380750009999-e4d7ea06-6f22-4b7e-b129-045599e1dee5.txt
9
1
4.3k
Dec ’21
PCI dext: scatter-gather DMA to application buffer
Hello, I am porting a PCI driver written with IOKit to the new PCIDriverKit framework. I am able to perform DMA with a contiguous buffer allocated inside the dext (with IOBufferMemoryDescriptor::Create). But I would also like to perform DMA to and from a buffer allocated by an application. What I exactly want to do is: Allocate an aligned buffer in the app (with e.g. posix_memalign) Send the pointer to this buffer to the dext In the dext, retrieve the list of pages descriptors to be able to perform DMA without copy into (or from) this buffer. In IOKit, we can use methods such IOMemoryDescriptor::withAddressRange and IODMACommand::gen64IOVMSegments to map and retrieve the scatter gather list but I cannot find any information on how to do this in a dext with the PCIDriverKit framework. Can anybody help me on how to do that?
4
0
2.2k
Dec ’21