I am trying to run this sample project from Apple that uses ARGeoTrackingConfiguration: https://developer.apple.com/documentation/arkit/content_anchors/tracking_geographic_locations_in_ar
This sample app is supposed to show an AR camera feed in the top part of the screen, and a map view in the lower part. However, I am not seeing the camera feed, it's just black.
I suspect this is something that changed in iOS 15.4, since my colleague was able to run the app successfully on a phone with iOS 15.3.1.
Some other details:
I am seeing this issue on an iPhone 12 Pro Max and an iPhone 13 mini.
Both these devices can support geotracking and are connected to the internet.
I am in a location that has geotracking support, according to these docs: https://developer.apple.com/documentation/arkit/argeotrackingconfiguration
I updated to iOS 15.4.1 but the issue is still occurring.
I tried updating to the iOS 15.5 beta 1 and the issue is still occurring.
Has anyone else noticed this issue? Am I doing something wrong? Is there a workaround?
I filed a radar ticket as well, just in case.
EDIT: I filed a TSI request for this issue, and I got back a response saying that there is no workaround for the issue. However, it looks like the bug has been fixed in iOS 15.5 beta 2.
// Class originalClass = NSClassFromString(#"NSXPCDecoder");
// Class swizzledClass = NSClassFromString(#"SwizzledDecoder");
// SEL originalSelector = #selector(_validateAllowedClass:forKey:allowingInvocations:);
// SEL swizzledSelector = #selector(__validateAllowedClass:forKey:allowingInvocations:);
#interface SwizzledDecoder : NSObject
- (void)__validateAllowedClass:(Class)arg1 forKey:(id)arg2 allowingInvocations:(bool)arg3;
#end
#implementation SwizzledDecoder
- (void)__validateAllowedClass:(Class)arg1 forKey:(id)arg2 allowingInvocations:(bool)arg3 {
if ([arg2 isEqualToString: #"collaborationData"]) {
return;
}
return [self __validateAllowedClass: arg1 forKey: arg2 allowingInvocations: arg3];
}
#end
https://developer.apple.com/forums/thread/703735?answerId=711909022#711909022
I could think of a few options to "fix" this using Private (Apple) APIs. This approach is not super terrible and at least would unblock you from testing on a 15.4.x device (I confirmed this works on Xcode 13.3.1 and iOS 15.4.1).
As far as whether or not Apple would approve #YOLO #FIDLAR code like this in an App Store review? I can't help you there.
The real fix (we can hope for) is the next version of Xcode ships with an SDK that builds and compiles with a retroactive fix for 15.4.x.
This issue has been fixed in iOS 15.5
Related
I recently published an iOS app, the app has around 1000 downloads now and I just had my first crash (I use Firebase Crashlytics).
I'm not sure I understand correctly this crash report, here is a screenshot : (iPhone Xr iOS 13.1.3, the (Manquant) in the screenshot means (Missing))
Here is my code in UICheckBox.swift line 16 : (I use UICheckBox_swift library)
Any idea how I can protect my app from this crash event ? Is this a system bug that I can't do anything about ?
Thanks
edit: Here is my FDColors class :
try this
self.layer.borderColor = (FDColors.gray707070).cgColor
and make sure FDColors.gray707070 is UIColor
Has anyone else encountered this? Specifically with an iPhone 6 running iOS 10.0 I'm getting consistent reports of the following crashing:
if #available(iOS 10.0, *) {
UISelectionFeedbackGenerator()
}
Where it's not even being used, just created and it causes an EXC_BAD_ACCESS crash. The docs say it just fails silently if the device doesn't support it. Oddly enough if I change the check to iOS 10.0.1 it works fine.
Am I doing something wrong?
I saw a few seemingly random crashes in production when calling this function as well. When reviewing some old logs, I found that this was only occurring on iOS 10.0.0. As users updated past that, I stopped seeing the crash. I imagine it was some sort of internal UIKit bug that was fixed in iOS 10.0.1.
I'm using the built in string method uppercaseString, like this:
let capitalLetters = myString.uppercaseString
The documentation tells this for availability:
iOS (8.3 and later)
However, Xcode is not giving a compiler error, with the if #available recommendation, i.e:
if #available(iOS 8.3, *) {
} else {
}
My question is simple. Can I use this method in an app targeting 8.0? I cannot test it on a device with this version because I don't have one. And the simulator I have is 8.4.
From Apple's documentation:
var uppercaseString: String { get }
Available in iOS 2.0 and later.
https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/index.html#//apple_ref/occ/instm/NSString/uppercaseString
Sometimes xcode shows you wrong availability versions (since swift came out). If sometimes you aren't sure about the availability - check it online.
PS: You can download simulators for which version you want
I have 2 projects working with google maps sdk, they are currently in the Appstore.
Things to have in mind:
Gmaps sdk version 1.9.0 installed via cocoapods
Xcode version 6.4
Deployment target 7.1
Device: iPhone 4s with 8.3.0
Today I've opened Xcode as usual with the first project, tried to compile and debug on the iPhone and I sometimes get a EXC_BAD_ACCESS (code=1...) crash on the app and sometime get EXC_BAD_ACCESS (code=EXC_ARM_DA_ALING...), no stack trace in here, but always on main.m:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([TGPAppDelegate class]));
Seeing the first thread I've discovered that this is error is related to google maps:
Tried the following:
Updating the pod (didn't work)
Replaced my code with the sample code on gmaps sdk page (didn't work)*
I have read something about auto layout, disabled (didn't work)
The weird part is that I also:
Tried in an iPhone 6 with 8.4 (DID work)
Tried in an iPhone 6 with 8.3 (DID work)
Both project are in an early beta state, so I don't if the are any real user have this problem but I'm worried that some users wont be able to use the apps because of this.
I couldn't find too much information over the internet and I don't even know where to look, is there any reported known error regarding this?, anyone else with the same issue?
Here is the sample code I'm using:
-(void)viewDidLoad {
[super viewDidLoad];
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:37.80948
longitude:5.965699
zoom:2];
GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];
self.view = mapView;
}
EDIT 1:
Doing more tests, found out that the problem appears only when debugging (attaching the debugger when running the app), if you run the app from the iPhone and after that you attach the debugger to the process, everything runs ok, I mean, if the map tries to render when the debugger is attached then you will get the exc_bad_access, it's a debugger error then?, I'm confused
EDIT 2:
This in answered in here , thanks Dave
The answer to this is not mine, this in answered in here , thanks Dave, I' m just quoting him so anyone can see the answer.
I've found the root of the problem and have a workaround:
The problem seems to be triggered by OpenGL ES Frame Capture in XCode;
I'm guessing this problem started when Apple added Metal to the mix as
of XCode 6.4/iOS 8.3, perhaps somehow adversely affecting the entire
frame capture debugging system.
The workaround:
EDIT: I've found the root of the problem and have a workaround:
The problem seems to be triggered by OpenGL ES Frame Capture in XCode;
I'm guessing this problem started when Apple added Metal to the mix as
of XCode 6.4/iOS 8.3, perhaps somehow adversely affecting the entire
frame capture debugging system.
The workaround:
In XCode, go to Product > Scheme > Edit Scheme...
Select the "Run" Tab on the left.
Select the "Options" sub-tab on the top.
Change "GPU Frame Capture" from "Automatically Enabled" or "OpenGL ES" to either "Metal" or "Disabled".
This disables OpenGL ES frame capture, which isn't great, but allows
you to continue debugging your builds.
Not sure if this issue is Apple's or Google's but I'll be posting bug
reports to both. Happy coding!
Same problem here with MKMapView.
Solution is rollback to (run side-by-side) Xcode 6.3.2.
http://adcdownload.apple.com/Developer_Tools/Xcode_6.3.2/Xcode_6.3.2.dmg
Also switch Command Line Tools to 6.3.2 in Preference -> Locations
i had the exact same problem:
iphone 4 -> iOs 7 (working)
xcode simulator (working)
iphone 5s -> iOs 8.3 (NOT working EXC_BAD_ACCESS)
SOLUTION: i updated my iphone to iOs 8.4 and the problem is gone, maps are loading.
hope it helps
When I try to run project on real device (iPhone 5 and 5S with iOS 8.1) I get following compiler errors:
// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:26:42: No visible #interface for 'UIImage' declares the selector 'initWithData:'
animatedImage = [[UIImage alloc] initWithData:data];
// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:47:34: No known class method for selector 'animatedImageWithImages:duration:'
animatedImage = [UIImage animatedImageWithImages:images duration:duration];
// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:155:21: No known class method for selector 'animatedImageWithImages:duration:'
return [UIImage animatedImageWithImages:scaledImages duration:self.duration];
My project was working normally until this morning. I changed nothing, just tried to debug on real device. The strangest part of that is I can run/debug on emulator (on any iPhone device with iOS 8) without any error.
When I downgrade deployment target from 8.1 to 8, XCode can successfully build and run the project for emulator and real device.
I tried completely removing SDWebImage and adding it back but didn't solve the problem.
I am using XCode 6.1 (Swift) and iOS 8.1 SDK on my project.
What might be causing the problem that suddenly appeared?
As has been said on other questions, the new "ModuleCache" directory within DerivedData has been responsible for many of these problems.
Here's the path:
/Users/[user]/Library/Developer/Xcode/DerivedData/ModuleCache
Simply delete the module cache, or the entire derived data directory as many have been doing on a daily basis for the last few iOS SDK iterations.
I came here looking for a different answer to a similar problem since this solution isn't fixing my current problem, but I figured I would share this as it will fix many of these.