QLPreviewController can not preview any file on iOS11 - ios

My old app is having a problem with QLPreviewController on iOS11 that it suddenly can not preview any file while it worked just fine on iOS10, when I try to skip step to check if can preview the file I got below message:
Unsupported preview item type in
-previewItemViewControllerClassWithStyle:; for preview item - [FileName] #PreviewItem.
I tried to create a test app to preview a same file and it worked, quite strange. I have spent a day on this and still not find out the root cause yet. Does anyone know the answer? Thanks.

Related

The file “MyApp” couldn’t be opened because you don’t have permission to view it error (Xcode 11)

I am currently developing an app using Xcode 11 and I am confused by the root of error message I am receiving when I try to build my app to run in the simulator. I have tried for hours to resolve this, using different tutorials I found on Stack Overflow but really haven't had any luck due to the fact most of the time these issues were reported for Xcode 11. The last time I had the software open, it ran totally fine so I'm very confused what changed since I last saved the project. If you can please help give some, that would be greatly appreciated. I have also attached an image of the error.
What I Have Already Tried
Cleaned the build folder
Manually cleaned the Derived Data folder
Raised the permissions of the executable within Finder
Check to make sure that the compiler is set to default in build options
Checked the info.plist and updated the executable file to ${EXECUTABLE_NAME}
Changed my derived data folder to another location
Deleted manually added folders
Restarted Xcode
Restarted my computer
Image of error as it appears on Xcode:
It appears that it's an iOS app, correct? With everything else you mentioned trying, there might be an issue with the simulator, so you could try running in a different simulator or resetting the current one to default settings. I've attached a screenshot and you can find this under the "Hardware" menu in the simulator. Note that it will delete all installed apps in the simulator.
I realized my issue was with a swift file that I made that was corrupted. The file was linked to a view controller and the view controller works fine but the class file was fully corrupted and would even make Xcode crash if I tried to open the file.
Tips for people who have the same issue:
Read through all the errors and find the specific file thats causing the issue. Usually the issue stems from dependency files but if you're lucky like me then its a simple fix

Getting an error trying to unwind from a segue [duplicate]

At build and run (in simulator and on my iPhone) im now getting the following from xcode and the app never launches... however if i stop the build in xcode and then open the app it seems fine?
UPDATE: Yes the breakpoint of course was causing the app to pause (i had forgot to remove it before posting)
The issue is with importing and using a custom font. If i remove the imported TTF and where i added its reference in my plist things are fine. At least I now know its the font thats the issue
Try this:
Then run it again...

errors uploading app. Error ITMS 9000

Im trying to submit my app to the app store, but am receiving the following errors (see image)
I originally was going to make this an iPad and iPhone app, but eventually decided to just go with iPhone. It appears that my project is still making a reference to my iPad nib file, which i thought id deleted.
I can't find any reference to it in my .plist file (screenshot attached).
Can anybody suggest why I'm getting this error still, and how i go about fixing it.
I found the solution to by problem - in the project navigator, all my files were sitting in a folder named "iPad" and for whatever reason, iTunes Connect didn't like this.

Xcode does not run the app on simulator. (App exited unexpectedly)

I'm developing for iPad (iOS 7), using Xcode 5.0.2.
Yesterday morning I was playing around with the app (my first app) and every time I ran it, it was displayed in the emulator perfectly. But after some 5/6 runs Xcode just stopped launching my app in the simulator. I started to receive this message:
MagazineManager exited unexpectedly - lost connection
Image:
I've been researching since yesterday morning for a solution with no luck. I even uninstalled and reinstalled Xcode, cleared the cache, delete folders... all that drama thinking it could be some sort of cache problem.
Then, going online I've tried lots of "solutions", none worked.
I've tried all listed here: Xcode suddenly stopped running project on hardware: "Could not launch xxx.app: .. No such file.."
and here:https://discussions.apple.com/message/23431537#23431537
and in more places.
After all my "try this, try that" I'm stuck with the same problem. I can only see a black screen at the simulator (image below) and that message at Xcode!
In my extensive research I've read that people are still able to debug using their iPad's. The problem is that I got the new iPad air, that's only getting here dec, 20th!! So I don't have a place to test my app[s].
Thanks!
UPDATE
Just got this message in the debugger console:
013-12-09 20:23:25.902 sim[607:303] /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin/sim: Did not find an executable file at the path: '/Users//Library/Developer/Xcode/DerivedData/MagMan-bvhhiijesvrvuteunbmpsxcqgsst/Build/Products/Debug-iphonesimulator/MagMan.app'
My problem was the debugger. Actually, it still is.
The way I solved, and have been doing for every new project, was to disable the debugger and then run the project. That way I'm able to use the app on the simulator but without the debugging functionality.
I don't know what the problem is, what is causing this debugger issue in my case, but for now that's the best I could come up with. Thanks to the friends that replied to my question and helped my research I was able to test it and disable it.
This is how I disabled the debugger:
Project > Edit scheme
Set Debugger to None
If anyone knows a solution for this, feel free to answer this question and I'll make sure to update the selected answer accordingly.
Again, thanks for all your time and patience, specially #Popeye and #HotLicks that spent a lot of their time trying to help me.
Sometimes the simulator can be a bit flaky and just needs resetting. In the navigation bar at the top of the screen when the simulator is visible try:
iOS Simulator --> Reset Content and Settings...
This should reset all the settings and remove the content so all data, images, apps etc will be removed, its like it has never run before.
UPDATE
The answer on XCode5 can't install app on iOS simulator indicates the following
I found a "Fix" for this. After trying everything and getting the same error on "My App", I opened and tried to run "My App 2". "My App 2" ran fine, so I went back to "My App", tried again and this time everything worked fine. Crazy
If that doesn't work leave a comment and I will have another look.
Delete the app and restart your iPad it will work

iOS 6: Icons and launch application

I've got a problem with my iPhone when I'm trying to run my application. I've got this message:
"Could not launch “iNiveau PRO.app”
No such file or directory (/Users/jerrycor3/Library/Developer/Xcode/DerivedData/iNiveau_PRO-gcxzxwcnetxnjubgctsnwjdsltcr/Build/Products/Debug-iphoneos/iNiveau PRO.app/iNiveau PRO)"
I tried all the solutions I have found on the internet, like quit XCode, move to trash the derived data folder, delete the application from my iPhone, restart it, etc... But nothing worked :/
I've got this problem yesterday when I tried to add an icon to my app. So I think there is a connection with this but I don't know what. I also tried to change amv7 to amv6 in the required system setting.
I don't know what's wrong...
Thank you and merry Christmas ! =)

Resources