Xcode 6.3 beta 4 does not show values in debugger for linked frameworks - xcode6

I have an iOS (SpriteKit) project in Xcode 6.3 beta 4 with Swift 1.2 which bases on a custom framework (a second project of mine). Since beta 4 I can inspect the values of properties in the debugger of my main project, but not of the linked framework/module.
I tried to adapt the project properties Strip Debug Symbols During Copy, Strip Linked Product to NO (in Debug-mode), checked that my "Schemes" are set to Debug, and Compiler Optimizations are deactivated. But: no effect.
I have some screenshots but unfortunately I'm not allowed to post images with my reputation.
Any ideas?

Related

Embedded Content Contains Swift Code with Xcode 8 Beta

I am developing a command line macOS application(with Objective-C) which uses other 3rd party Swift libraries. I am retrieving an error says
"dyld: Library not loaded: #rpath/libswiftAppKit.dylib"
Previous answers recommend to set "Embedded Content Contains Swift Code" flag to true. However, this flag is missing with Xcode 8 beta.
I have tried "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", which i believe a new flag for Xcode 8. It doesn't work either :(
Is anyone tried to compile and execute a command line application with Xcode 8 beta that is;
- developed using Objective-C
- having 3rd party swift library dependencies
Update:
I ended up copying everything under "/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx" into the folder where the executable stands. Not a perfect solution but it works.
Check this mentioned in Xcode 8 beta 2 Release Notes:
The new build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES replaces the use of EMBEDDED_CONTENT_CONTAINS_SWIFT. This setting indicates that Xcode should always embed Swift standard libraries in a target for which it has been set, whether or not the target contains Swift code. A typical scenario for using this setting is when a target directly uses or embeds another product which contains Swift code.
Note: EMBEDDED_CONTENT_CONTAINS_SWIFT has been deprecated. (26158130).

How do you conditionally include a framework in an Xcode project?

Is it possible to have a single Xcode project (and ideally a single target) that will conditionally include frameworks when built against a certain version of OS X / Xcode but not include those frameworks when built against another version?
I'd like to begin adding support for El Capitan to an application I'm working on but some of the support I have in mind requires linking against frameworks that are not present in Yosemite. Is there a way to configure an Xcode project so that the same project can be built under 10.11 / Xcode 7 with the frameworks but also built under 10.10 / Xcode 6 without the frameworks (and without throwing an error)?
I'm aware of how to check for the existence of a class or method at runtime, but it's not clear to me how I control the framework linking without creating a second Xcode project, a second source control branch or always building against Xcode 7 (none of which I want to do, yet).
The "other version" would essentially be another target — it's setup this way to do precisely what you're asking about. A basic example would be just a matter of right-clicking on your original target and selecting duplicate from the current targets; then make whatever changes to linking frameworks within the Build Phases section.
Targets
In Build Phases you'll notice I've linked three frameworks to my
original target:
After right-clicking on the original target and creating a duplicate
I'm able to link it differently:
The duplicate version of MyApp uses the same classes and headers as the original with the exception of those that require the excluded frameworks. It's also possible to import different frameworks, change things such as the Deployment Target (e.g. build for different versions of OS X), or perhaps which SDK each might use, etc.
Once you're more familiar with the standard build process you can then create custom build scripts to handle specialized tasks like keeping the target names the same or even creating installer packages — anything is possible.

Xcode 6.1 doesn't recognize Foundation Classes

I'm newbie in Apple developing, but im trying to develop an osx applications. I have yosemite as OS and Xcode 6.1 as IDE. Everything was ok 3 days, but at some random moment, my Xcode showed me this:
Everything covers with an errors.
What i did trying to resolve the problem:
Clean
Clean build folder
Delete derived data (in Organizer menu)
Reinstall Xcode
I even install Xcode 5 (but it don't support swift)
That erros follow me even in NEW project (with just one class AppDelegate.swift) and in any new class with any object like NS*.
What's happen with my Xcode and how i can fix it?
I forget to say, my project building and compiling without any error or warning. All errors disappears when i press button "Build".
UPDATE #1: i made: import Foundation - open it, and i did not find errors classes there. There are a lot of classes, such as NSCache and etc, but there are no NSTextField and etc.. Where are they?
UPDATE #2:
I've found that Xcode see classes which directly contains in Foundation moduel.
Also i got this window:

why CPU is utilizing this much when I run xcode

Below is the screenshot of CPU utilization.
Just curious what are those Interface Builder Cocoa Touch Tool & ibtoold process.
Because of this, to run app, it takes me around 1 min least.
Note: I am using xcode 5
I see that this happens when there are more view controllers. I have around 25 view controllers.
Yes, I had created project in Xcode 4.6 and after updating, opened in Xcode 5.
Attached is the screenshot for the file inspector.
There is a stack overflow question along similar lines but the question involved only a single nib. The project in that case was created for iOS2 and used a new version of Xcode. This led me to examine the latest Interface Builder Release Notes (3.2) which states:
"Interface Builder documents can no longer be saved in the NIB 2.x
file format. NIB 2.x files will automatically be upgraded to NIB 3.x
files upon opening."
So, I would suggest you check the file inspector of your nib files and verify their current version. I suspect that Interface Builder is simply attempting to update 25 nib files to version 3.x. If you have an older Carbon nib files then please see the Xcode Release Notes (v.4.0 - current) as they require using version 3.2 in Xcode 4 and higher.
Xcode 4.6.3 displays versioning of nibs on the file inspector using these menu items:
While Xcode 5.0.1 displays versioning somewhat differently.
The project document should also be in the latest format:
.
The basic premise is that Xcode is converting the project file/nibs on load. If this recurs on every load I would report that as a bug to Apple at http://bugreport.apple.com. I think the information found is pointing to the correct issue. Checking that the files are using the latest version should fix the issue unless there is a bug.
Other things to try:
Load the project on a separate machine/directory (There might be some
corruption on your current one)
Run Console and capture logs as the problem is occurring (you will
need to also capture system logs for Apple anyhow but the Console
might show a useful error message)
References
What is Interface Builder Cocoa Touch Tool, link.
Xcode Release Notes (v. 4.0 - current), link.

Xcode force_load not working for simulator build

I am using Xcode 4 and LLVM 2 for a workspace which has two projects (A and B) in it. The main project (A) links against the binary of the other project (B) which builds a static library.
Project B contains categories so in order for it to link into A properly I set the ObjC and all_load linker flags. This however caused problems because some of our libraries that I use have symbols that should not be loaded so I tried to move over to using force_load specifically on the library file of project B.
-force_load $(TARGET_BUILD_DIR)/libB.a
This makes things work on the device however in the simulator the app crashes because categories from project B are not being linked in.
Any idea why force_load works differently on device and simulator?
Let me know if you need more details.
Try -Wl,-force_load,$(TARGET_BUILD_DIR)/libB.a; IIRC, it's a known issue that Apple LLVM Compiler 2.0 doesn't honor -force-load.