Post

Replies

Boosts

Views

Activity

allowsContentScaling is not working for QuickLook AR model
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.
0
0
1.2k
Feb ’23
Changing camera permission Setting for the app ios swift
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.
1
0
2.8k
Nov ’22
Xcode Warning for iOS 16 : Please switch to an asynchronous networking API such as URLSession
"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.
2
0
6.6k
Sep ’22
CameraTrackingState is not detecting: ARKit
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?
0
0
888
Sep ’22
[dateFormat dateFromString:dateStr] is giving nil
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.
3
1
1.4k
Sep ’22
ARScreen camera tracking state issue
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?
0
0
879
Sep ’22
allowsContentScaling is not working for QuickLook AR model
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.
Replies
0
Boosts
0
Views
1.2k
Activity
Feb ’23
Changing camera permission Setting for the app ios swift
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.
Replies
1
Boosts
0
Views
2.8k
Activity
Nov ’22
Xcode Warning for iOS 16 : Please switch to an asynchronous networking API such as URLSession
"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.
Replies
2
Boosts
0
Views
6.6k
Activity
Sep ’22
CameraTrackingState is not detecting: ARKit
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?
Replies
0
Boosts
0
Views
888
Activity
Sep ’22
[dateFormat dateFromString:dateStr] is giving nil
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.
Replies
3
Boosts
1
Views
1.4k
Activity
Sep ’22
ARScreen camera tracking state issue
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?
Replies
0
Boosts
0
Views
879
Activity
Sep ’22