Hi, great that you were able to use Qt Creator for that! A few notes:
QMake has a separate variable for Objective-C/++ sources called OBJECTIVE_SOURCES. Not sure if it makes a difference in Qt Creator though (or if we only care about the file extension). I suppose you can get rid of your INCLUDEPATH and links if you set the Sysroot in your kit to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk Br, Eike > On 28. Feb 2018, at 23:29, Henry Skoglund <fro...@tungware.se> wrote: > > Hi, > > reading some recent posts about reusing Qt Creator for other project flavors > than Qt/C++, on a lark I decided to try it on my 6 year old ObjectiveC++ LOB > app (about 20K SLOC) and it's working great. > > I inserted a .pro file with some HEADERS += and SOURCES += in the directory, > doubleclicked on it and voila, I can use Qt Creator to edit those old .mm > files (I need to rescale the UI for iPhone X and stuff like that). It's a > relief not having to work in Xcode, the current version 9.2 sometimes feels > like waiting for Deep Thought to answer. > > > A few things in case someone else endeavors to do the same: to get > IntelliSense to work with all the NSxxx types (which is great, then Qt > Creator can auto-expand [myString stringByAppendingString:myOtherString] and > other similar API calls for you) you need to get #includes like these up and > running: > > #import <UIKit/UIKit.h> > #import <UserNotifications/UserNotifications.h> > #import <MessageUI/MessageUI.h> > > because Qt Creator will complain: "not found". I think Xcode does some > tweaking with the include paths into /Applications/Xcode to get those > #includes to work, here's what I did: > > inserted this in the pro file: > > INCLUDEPATH = > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks > # (you gotta love Apple for those "simple" directory trees) > > and created these symbolic links inside the XCode.app: > > cd > /Applications/Xcode.app/Contents/Developer/Platform/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks > sudo ln -s CoreData.framework/Headers CoreData > sudo ln -s Foundation.framework/Headers Foundation > sudo ln -s MessageUI.framework/Headers MessageUI > sudo ln -s UIKit.framework/Headers UIKit > sudo ln -s UserNotificaitons.framework/Headers UserNotifications > > Those will probably vanish when Xcode 9.3 or 10.0 arrives, but they're easy > to reapply. > > > The code model still complains about some minor things in XCode's files, > currently I have these 2: > > "expecting a type" for NSComparator in NSArray.h in line 74: > - (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator > NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), > tvos(9.0)); > > "nullability specifier _Nullable" cannot be applied to non-pointer type > 'uuid_t' (aka 'unsigned char [16]') in NSUUID.h line 26: > - (instancetype)initWithUUIDBytes:(const uuid_t _Nullable)bytes; > > but I can click that green "Minimize" button in the top right corner to hide > those errors and carry on working anyway. > > > Finally, got one question: > who's Uncle Bob? (he's listed as one of the Code Model's configurations :-) > > Rgrds Henry > > _______________________________________________ > Qt-creator mailing list > Qt-creator@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qt-creator -- Eike Ziller Principal Software Engineer The Qt Company GmbH Rudower Chaussee 13 D-12489 Berlin eike.zil...@qt.io http://qt.io Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B _______________________________________________ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator