When I'm trying to run my application on iOS 8 device or simulator it crashes with messages in console:
cwd:/dir=/Users/alexedunov/Library/Developer/CoreSimulator/Devices/B0F6F815-1209-48D8-8485- 5B5EB35686B9/data/Containers/Data/Application/65B6100A-22C8-43B3-A6E2-506571B92E66/Documents
cwd:/Users/alexedunov/Library/Developer/CoreSimulator/Devices/B0F6F815-1209-48D8-8485- 5B5EB35686B9/data/Containers/Data/Application/65B6100A-22C8-43B3-A6E2-506571B92E66/Documents
2014-09-18 22:57:39.581 BankApp[3943:45325] Wrong directory.
Run application from /var/mobile/Applications/<App id>/<App name>.app
I didn't find any solution to fix it.
My OS X version is Mac OS Yosemite beta 10.10.
XCode 6.0 (6A313)
I have the same problem. It resolves by removing CryptoPro (http://www.cryptopro.ru/) from project. Probably, in CryptoPro performs find some files in application`s Documents folder using incorrect path ([[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject] recommended). I will try to update CryptoPro to latest version, and I hope that helps.
Is your project contains CryproPro?
I catched the same error when running "Np Cades Browser". I figure out that it's because of iOS version. On iOS 10 error persists.
You need iOS 7 to make this work. Don't know about above versions. I assume paths different on different OS.
Related
I have a very strange problem with UIDocumentBrowserViewController when testing on iOS 13. The importHandler(newDocumentURL, .move) seems to crash without any reason :
[DocumentManager] Cannot create urlWrapper for url file:///.../tmp/23720D22-BC1D-4E7B-A7AE-A1C8B0293F9E.txt.
error Error Domain=NSPOSIXErrorDomain Code=22 "couldn't issue sandbox extension com.apple.app-sandbox.read-write for '/.../tmp/23720D22-BC1D-4E7B-A7AE-A1C8B0293F9E.txt':
Invalid argument" UserInfo={NSDescription=couldn't issue sandbox extension com.apple.app-sandbox.read-write for '/.../tmp/23720D22-BC1D-4E7B-A7AE-A1C8B0293F9E.txt': Invalid argument}.
Here is a two step process to reproduce :
Create a new Xcode project "Document Based App"
Type in this code in the documentBrowser(_: , didRequestDocumentCreationWithHandler:)
let newDocumentURL: URL? =
URL(fileURLWithPath: NSTemporaryDirectory())
.appendingPathComponent(UUID().uuidString)
.appendingPathExtension("txt")
// Set the URL for the new document here. Optionally, you can present a template chooser before calling the importHandler.
// Make sure the importHandler is always called, even if the user cancels the creation request.
if newDocumentURL != nil {
print(newDocumentURL!)
try! "My file content".write(to: newDocumentURL!, atomically: true, encoding: .utf8)
importHandler(newDocumentURL, .move)
} else {
importHandler(nil, .none)
}
Launch it on an iOS 13 simulator, create a new document, and the error is printed out and nothing else happens.
If you execute the same code on iOS 12, it perfectly works, the file is moved and is opened by the app.
The problem occurs on iOS 13 beta 7, wether it's compiled by Xcode 11 beta 7 or Xcode 10.3
Any idea?
EDIT: The problem still occurs when you create the file in the document directory instead of the temporary directory :
FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
EDIT 2: The problem still exists with Xcode 11 GM (11A419c)
EDIT 3: The problem persists only the simulator. On device with iOS 13 GM, UIDocumentBrowserViewController works as expected.
EDIT 4: Problem still present on simulators with official Xcode 11 release 11A420a (aka GM Seed 2.)
EDIT 5: Problem only occurs on Mojave and seems to be absent on Catalina
I've verified that the bug exists with Xcode 11.1 GM running on Mac OS Mojave.
The issue does not occur when running on Catalina Beta 9. (FWIW I ran Catalina Beta 9 in a Parallels virtual machine because I don't know if it is stable enough to upgrade to for production work.)
Looking for workarounds, will post if I find any (but note this is not my area of expertise, just proceeded on a hunch that turned out to be correct.)
You may want to update the Radar you filed to indicate that this is probably specific to Mojave.
I've developed an iOS app that uses the url(forPublishingUbiquitousItemAt:expiration:) method of Apple's FileManager class. Starting with the first Beta of iOS 13 this function stopped working and now it throws an error, stating "This code has been removed. You should switch off of this SPI". But I can't find anything related to this function neither in the release notes of iOS nor in the documentation for this function, and it even states there that it would be supported on Mac Catalyst 13.0+.
This also has nothing to do with Xcode 10 and 11, as it occurs when the app is built using either one of those versions.
Does anyone of you know more about that? It would be great to get new information on that.
Thanks,
Fabian.
This is fixed in iOS 13 beta 6. Updated today and this error magically disappeared!
Had my mind blown when I saw this error message.
Need to check whether device is jailbroken using cordova. I tried the cordova-plugin-jailbreak-detection plugin, but still can open the same in JAILBROKEN Device. then i got .m files from https://github.com/Shmoopi/AntiPiracy. it was working fine till XCode 8. In XCode 9, getting "System keyword is unavailable" error
Any latest plugin/class files to check Jailbroken compatible for latest XCode ?
system call is not available for ios, remove + (int)systemCheck and it should work for you. Also in + (void)killApplication method comment system call
The isJailbroken method performs various check and if the score is >= 3 then it marks it as Jail broken. Now as the system call is not available then we can live without the score of + (int)systemCheck and proceed without it.
I get this error in the debugger everytime core data is used (so if I make 3 calls I get the warning 3 times).
CoreData: annotation: Failed to load optimized model at path '/var/containers/Bundle/Application/0B6C2326-D8D5-47B3-8C68-7693C16A0806/liveDemo.app/liveDemo.momd/liveDemo.omo'
It does not cause any instant problem, but whilst they add up, it gradually slows down the app until it crashes with a NSException (it's irrelevant what the user does at the time, it will just lag more and more then come to a crash at whatever point in the app).
I have tested the app on 3 devices (iPhone 7+ - iOS 11, iPhone 7 - iOS 11, iPad Aid - iOS 10.3) and it ONLY occurs on the iPad. However when I started the project one of the phones had a version of iOS 10 installed and it did not cause any issues so although I can't fully exclude it, it seems unlikely it's the OS version to blame.
Steps tried
Uninstall and install app, so the device clears core data file, also tried restarting with and without the app installed - FAILED
Remove and rewrite the Scheme in Xcode - FAILED
Recreate the NSManagedObjectSubclass of the datamodel - FAILED
Has anyone encountered anything similar with recent versions of Xcode and managed to fix it? This is a 2 year old similar problem, but none of the answers have helped.
So, after a few days I have managed to solve it. I'm not familiar enough with the insides of Xcode, but all I had to do was rewrite the CoreData Model. Best to make a back up before trying this!
Take a screenshot of current attributes and delete the CoreDataModel ( .xcdatamodeld file)
Add a new file to project (Data Model template)
Write old attributes
Recompile and build
My assumption would be that the problem was caused after migrating a project started in Xcode 8 (written in Swift 3) to Xcode 9 (upgraded to Swift 4). It had no problem with devices running iOS 11 (same upgrade level as Xcode 9), but found it to consistently cause lag and eventually crashes in older iOS versions.
I don't understand why simply modifying file properties did not fix it, but I'm happy to have fixed it and move on.
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