User is able to pinch zoom in and out the AR model.
I have tried 2 ways:
Added "#allowsContentScaling=0" at the path of .usdz.
let item = ARQuickLookPreviewItem(fileAt: (fileLocationURL! as URL)
item.allowsContentScaling = false
Both above cases are not working.
Kindly suggest what other way I can use to restrict the scaling of the AR model in QuickLookPreviewController.
Thanks in advance.
Post
Replies
Boosts
Views
Activity
Changing camera permission from setting is Terminating my app and launching it from beginning. Thus forcing user to go through each screen every everytime.
Message from debugger: Terminated due to signal 9
Is there any possible way so I can restore app state after changing camera settings?
User can start from the same page after changing permissions.
Thanks in Advance.
In Xcode version 14.0.1, there is a warning message while uploading app to the TestFlight i.e Distribution completed with warnings:
Any help regarding warning? Did apple solved this issue?
"Synchronous URL loading of https://xyz.png should not occur on this application's main thread as it may lead to UI unresponsiveness. Please switch to an asynchronous networking API such as URLSession."
Xcode shows above warning message when running my code on device with iOS version 16.
While showing Virtualobject on the screen,
func getMatrials(scene:[SCNNode]){
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5 ) { for child in scene {
material.diffuse.contents = "https//xyz.png"
//setting here materials with the png images from url.
}
}}
Above code works fine till the iOS v15.6. But showing warning in iOS 16 and leading to delay in showing model on the screen due to main.asynafter(deadline).
I tried to fix the issue for iOS 16 with below code:
let url1 = URL(string: "https//xyz.png")
DispatchQueue.global().async {
let data1 = try? Data(contentsOf: url1!)
DispatchQueue.main.async {
material.diffuse.contents = UIImage(data: data1!)
}
But the model loading delay with more time is still there.
Any one could suggest a solution to me or where I am wrong.
After upgrading iPhone to the iOS version 16, ARKit having issue with ARKit ARSession CameraTrackingState.
TrackingState is going to .notAvailable and .limited(initializing) state and never returning to tracking state .normal. Screen camera keep showing loading. And when I am turning camera on and off , it shows the AR model on the screen. Tested Device: iPhone 12 Pro Max with iOS version 16.0.
Whereas for iOS 15.6, TrackingState is going to .notAvailable and .limited(initializing) state and .limited(relocalising ) and then .normal. Relocalization state is also handled whenever it going to the interruption.
func sessionShouldAttemptRelocalization(_ session: ARSession) -> Bool {
let configuration = ARWorldTrackingConfiguration()
configuration.planeDetection = [.horizontal,.vertical]
session.run(configuration, options: [.resetTracking, .removeExistingAnchors])
return true
}
Please suggest some solution as I am not able to debug this. Is there any upgrade or issue with iOS version 16?
After upgrading iPhone to the iOS version 16, ARKit having issue with ARScreen CameraTrackingState. TrackingState is going to .notAvailable and .limited(initializing) state and never returning to tracking state .normal.
Whereas for iOS 15.6, TrackingState is going to .notAvailable and .limited(initializing) state and .limited(relocalising ) and then .normal.
Relocalization state is also handled whenever it going to the interruption.
func sessionShouldAttemptRelocalization(_ session: ARSession) -> Bool {
let configuration = ARWorldTrackingConfiguration()
configuration.planeDetection = [.horizontal,.vertical]
session.run(configuration, options: [.resetTracking, .removeExistingAnchors])
return true
}
Require help regarding this. Is there any upgrade or issue with iOS version 16?
NSDateFormatter is giving different values in different devices.
Code:
(NSString *)GetBuildDate {
NSString *buildDate;
// Get build date and time, format to 'yyMMddHHmm'
NSString *dateStr = [NSString stringWithFormat:@"%@", [NSString stringWithUTF8String:DATE]];
// Convert to date
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"MMM dd yyyy"];
[dateFormat setTimeZone:[NSTimeZone timeZoneWithName:@"GMT"]];
NSDate *date = [dateFormat dateFromString:dateStr];
// Set output format and convert to string
[dateFormat setDateFormat:@"dd MMM yyyy"];
buildDate = [dateFormat stringFromDate:date];
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"dd"];
NSString *myDayString = [df stringFromDate:date];
[df setDateFormat:@"MM"];
NSString *myMonthString = [df stringFromDate:date];
NSString *myMonth = [NSString stringWithFormat:@"%@ %@",myDayString,[[df monthSymbols] objectAtIndex:([myMonthString intValue]-1)]] ;
[df setDateFormat:@"yyyy"];
return [NSString stringWithFormat:@"%@ %@",myMonth,[df stringFromDate:date]];
}
Device having issue:
On iPhone XR, iOS v15.6.1 , when iPhone language is selected English, its show the date correctly. Whereas when user changes the iPhone language in settings to Chinese(specifically) dateFromString returns nil. Which is later crashing for [[df monthSymbols] objectAtIndex:([myMonthString intValue]-1)].
In most of the other devices there is no such issue with the NSDateFormatter having same iPhone settings.
DTServiceHub 20-9-22, 8-59 AM.crash
Would like to get more clarity why there is difference on different devices. How changing the language setting changing value for the date.
Incident Identifier: 19BAE5CC-D5C6-46F7-96F5-F590CFE003CE
CrashReporter Key: cb5748cf8bb6a20219bd8b51b5af502a09603217
Hardware Model: iPad5,1
Process: Concession [1697]
Path: /private/var/containers/Bundle/Application/FC6D3B1D-8BA0-47A1-A696-890F478F1D73/Concession.app/Concession
Identifier: xxxx
Version: 3.3.44 (3.3.44)
Code Type: ARM-64 (Native)
Role: unknown
Parent Process: launchd [1]
Coalition: xxxxx[371]
Date/Time: 2021-11-21 01:36:19.9189 +0530
Launch Time: 2021-11-21 01:36:19.8383 +0530
OS Version: iPhone OS 15.1 (19B74)
Release Type: User
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x00000001e91e55a0
Exception Codes: 0x0000000000000002, 0x00000001e91e55a0
VM Region Info: 0x1e91e55a0 is in 0x1e91e3ee0-0x1e9200000; bytes after start: 5824 bytes before end: 109151
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
__DATA_CONST 1e91e0518-1e91e3ee0 [ 14K] r--/rw- SM=COW ...ebCredentials
---> __DATA_CONST 1e91e3ee0-1e9200000 [ 112K] r--/rw- SM=COW ...afariServices
__DATA_CONST 1e9200000-1e9254000 [ 336K] r--/rw- SM=COW ...afariServices
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 10 Bus error: 10
Terminating Process: exc handler [1697]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 Concession 0x100a5ba58 patchSymbolPointerTableEntry + 136
1 Concession 0x100a5ba48 patchSymbolPointerTableEntry + 120
2 Concession 0x100a5b5e4 HookLibraryAddCallback + 204
3 dyld 0x101162ec8 invocation function for block in dyld4::APIs::_dyld_register_func_for_add_image(void ()(mach_header const, long)) + 164
4 dyld 0x10115c2d4 dyld4::RuntimeState::withLoadersReadLock(void () block_pointer) + 60
5 dyld 0x1011823d0 dyld4::APIs::_dyld_register_func_for_add_image(void ()(mach_header const, long)) + 124
6 Concession 0x100a5b508 HookCore_Init + 44
7 dyld 0x1011600e8 invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 152
8 dyld 0x10118f588 invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 160
9 dyld 0x10115dee0 invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 524
10 dyld 0x10115d230 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 160
11 dyld 0x10115c560 dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const + 164
12 dyld 0x10118f13c dyld3::MachOAnalyzer::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, unsigned char const*, bool&) block_pointer) const + 120
13 dyld 0x101168e20 dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const + 324
14 dyld 0x101165c34 dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const + 144
15 dyld 0x10115dc00 dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const + 40
16 dyld 0x101161a60 dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 204
17 dyld 0x1011675c4 dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 120
18 dyld 0x10118402c dyld4::APIs::runAllInitializersForMain() + 244
19 dyld 0x1011718bc dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2412
20 dyld 0x101170170 start + 412
Thread 1:
0 libsystem_pthread.dylib 0x1da2d19e8 start_wqthread + 0
No thread state (register information) available
Binary Images:
0x10069c000 - 0x100bebfff Concession arm64 <8ccaa60b7a0c302da1d6389937513f02> /private/var/containers/Bundle/Application/FC6D3B1D-8BA0-47A1-A696-890F478F1D73/Concession.app/Concession
0x101158000 - 0x1011abfff dyld arm64 <5e7ef5771cc5369aa04d28fbba883086> /usr/lib/dyld
0x1da2cd000 - 0x1da2e0fff libsystem_pthread.dylib arm64 <ce7eb78851553c3888d812f1419fa5fa> /usr/lib/system/libsystem_pthread.dylib
0x0 - 0xffffffffffffffff ??? unknown-arch <00000000000000000000000000000000> ???
Error Formulating Crash Report:
thread_get_state(PAGEIN) returned 0x10000003: (ipc/send) invalid destination port
thread_get_state(EXCEPTION) returned 0x10000003: (ipc/send) invalid destination port
thread_get_state(FLAVOR) returned 0x10000003: (ipc/send) invalid destination port
EOF