i am using qt 5.3 on mac to develop an iOS application. I want to use UIImagePickerController with objective-c to pick an image from ios gallery and show it in qt. I know how use objective-c code in qt. To use UIImagePickerController, i need to add <UIKit/UIKit.h> in objective-c file (.mm), but i get this error “UIKit/UIKit.h” file not found.
I’ve added this code in .pro : LIBS += framework UIKit.
Can someone tell me how can i use UIImagePickerController in qt?
Related
Try to
#import <UIKit/UIKit.h>
And get error:
UIKit/UIKit.h file not found
What is it and how fix it ?))) Try to import Foundation - all ok )
Originally for macOS you could only use AppKit as an UI framwork, which is quite different from UIKit, so you couldn't reuse iOS code for macOS.
So you have to learn a much different framerwork with NSView base view instead of UIView and a lot of differences.
But then apple supported porting iOS apps to macOS. To do this you need to create an iOS app(if you don't have one) and turn on that option in the settings. Check out more at Running Your iOS Apps on macOS
You would still need to do a lot a work in making your app for macOS comfortable for users, but if you have no background in AppKit, probably it's still easier to go for UIKit
My app is crashing when I try to display another view controller. It does work correctly when the iOS SDK is set to 7.0 and I am targeting iOS 7.0. But I need the app to target iOS 6.0. UIKit is (obviously) declared in the imports. The UITableViewController I am trying to present works perfectly fine as far as I'm aware - I created it for another app, using XCode 4.6.3, targeting 6.0 and it compiled without error (as does this one) but it also displays without crashing.
I could provide code, code which does nothing more than present the table view controller using a modal transition, but I even went to the point of connecting a UIButton to the UITableViewController - it worked on iOS 7, but not 6. It's my belief that when I compile with the iOS 6.1 SDK, it should be using iOS 6.1 frameworks?
UIKeyCommand is only available in iOS 7 and later, according to this. That gives me reason to believe that it is using the iOS 7.0 frameworks even though the iOS 6.1 SDK has been specified.
I've tagged this with the xcode tag as I believe it could possibly be caused by xcode incorrectly searching for the specified SDK's frameworks.
I had the same problem as you and here is what i did to solve it:
I opened the Storyboard as Source Code and searched for the tag : keyCommands , I found a tag similar to
<keyCommands> <keyCommand/> </keyCommands>
and i deleted it.
After that i runned the app in iOS 6 & 7 and it worked with no problem.
Let me know if this works on your app too!
Cheers!
I tried a lot of example but ended up with a crash, without any reason.
I use only windows to compile my swc and creating .ipa file. I have created a cocoa static library in Mac and do use it in creating an .ane file.
You can try with as3gamegears NativeAlert.
http://www.adobe.com/devnet/air/articles/transferring-data-ane-ios-pt1.html
Basics of the air native extension for ios
Was helpfull in my case.
I am trying to install PDFKit framework in Objective-C. I have x-code 4.4.1 but am unable to see the PDFKit Framework in build phases. Is the framework discontinued from iOS 5 ?
I want to use the the framework to view and annotate a pdf.
Can anyone let me know.
I don't think it was ever available in ios. Why don't you search for it in apple's reference manual for ios?
PDFKit is now available on iOS 11. Please refer to this answer on Objective-C implementation
I got a application from my teammate, and it is for both iphone and ipad devices (which it is developed under iPhone SDK 3.2).
I have iPhone SDK 3.1.3 installed in my mac book. When i tried to compile the application for iphone simulator i got the following error.
Interface builder is unable to open documents of type iPad XIB.
The above error is for interface builder created for ipad.
My Question is we can't compile the application on iPhone SDK 3.1.3 which the application developed under iPhone SDK 3.2?
Please shed some light of this?
thanks
mindus
Go to your project settings, and delete the line that says Interface Builder Plugin search path or something similar.
the exact line in project.pbxproj is: IBC_PLUGIN_SEARCH_PATHS = "${PROJECT_DIR}/**";
Short answer
Temporarily remove the iPad xib when working with the 3.1.3 SDK. Put them back when you go back to 3.2 and above.
Longer answer
This cropped up for me when compiling against 3.1.3. You can use conditional compiling to get code user newer features to build successfully (see Matt Gallagher's helpful post on conditional compiling).
There may be a smarter way to tell the compiler not to look at the iPad xibs. For testing on the 3.1.3 simulator I simply made a copy all my iPad xibs and then removed them from the xcode project. When going back to my current development set up, you have to put them back. It's a bit of pain, but not that fiddly.
To fix this:
Press Command-1 to go to the project tree
Select your project
The in the right panel select your project, and then click on "Build Settings"
In search field just below the "Build Settings" enter: "Overriding Plug-In"
Now, the only visible setting left should say "Overriding Plug-In and Framework Directory"
Double-click the value and remove all entries using "-" button
Click somewhere else so settings are saved
That should fix it