I am new in swift and I'm trying to make an example of creating tables, I followed the following tutorial
Swift NSTableView sample code
but I have many errors.If someone can help me because I do not understand because they come.
and only print
Linkage libraries dependency in Embedded Binaries can cause that problem, try to remove all of it from your General settings. Try to build again.
Related
I have been porting an app from Objective C to Swift. In Objective C I get autocomplete in the Xcode debug pane as shown. However, the Swift version does not. I may be missing something simple but after working around this for a few months I give up. Attached are relevant screenshots (top is Objective C).
I realize this may not be a language specific feature but how do you get debug autocomplete functionality in Swift like Objective C?
Try the control+Space combination forcefully at locations. Sometimes it helps.
There's also this link I found. maybe it could help:
XCode 6 isn't autocompleting in swift
Answer is late, but I want to see my answer more people for this situation.
This is not Xcode Problem. Erasing Derived data is just temporary work.
I guess you are included by one of them
Your application is support Above iOS 7 (not iOS 8)
Use Cocoapod or 3rd party app
Autocomplete is not working when you develop with swift above iOS7. Swift did't recommend to use static lib, but iOS7 support only static lib not dynamic lib.
(see this post https://blog.cocoapods.org/CocoaPods-0.36/,
http://corinnekrych.blogspot.kr/2015/04/how-well-does-swift-plays-on-ios7.html)
Change your project to iOS 8
Cocoapod will need use_frameworks! if you want to support dynamic lib.
If you use dynamic link, You don't have to write header in Bridge_header. Import it in Swift file like Import UIKit
One more trick is just clean your Project will make Swift Auto complete, but after rebuild, you can't use auto complete.
After updating with Xcode 6.3, I found something strange things with my projects.
Below codes causes parse issue that says "Could not build module 'AgendaFramework'", the AgendaFramework is my custom embedded framework for ios8:
#import MyEmbededFramework;
The error marker looks like this:
The issues is raised during indexing not building. Whole building can be performed successfully without any error or warning. I can build, archive, run on device, deploy, submit to App Store.
However the error marker shows up when I edit the classes that belongs to the extension. The the extension(widget) explicitly linked to the embedded framework. (I know that I don't have to do it when I use #import statement.)
In this state, I could not receive any valid content assistant, very annoying.
After I replace the import statement with old style, the problem was disappeared:
#import <AgendaFramework/AgendaFramework.h>
I have several other projects that have very similar topology with the project which causes this issue, But they are okay. Only one project causes this issue. I compared every detail build settings, I could not find any clue.
I tried:
Delete derived data
Full Clean
Reboot
Any clues are welcomed. Thanks!
It looks like turning on:
Allow Non-modular Includes In Framework Modules solved this issue for me.
Hi this is due to the fact that file which you are making it public in framework header must be public also.
Sometimes this issue can be solved by adding the framework to the same folder as the .xcodeproj file, no subfolders or anything.
Credits to Jonny who points it out as a comment in the question.
Solution that worked for me: diligence in framework header file orientation to system style imports... like #import <CoreXLib/CoreThreads.h> the story:
In my case my framework that I built came from the combination of several code bases as it became apparent that I could reuse some of the general design patterns across that code easer via Framework vs the fragile Xcode project pathnames.
As I built my framework "CoreXLib", I reorganized it into the Cocoa Framework typical of Xcode. I changed my imports from:
#import "CoreTypeAliases.h" // project local style
to
#import <CoreXLib/CoreTypeAliases.h> // system or framework style
appropriately. Several projects that used the CoreXLib.framework which includes the public headers in the lego-folder worked... so I thought I was good to go...
Unfortunately some of the headers that were public did not get fully updated. The classes in the framework built just fine in the local style. All projects using it worked up to this point and then I ran into one that didn't... and the error noted by #jeeeyul
So after finding this thread and finding #kwz 's solution, and not having it do anything in my case, I decided to polish the code up while I was trying to figure this problem out. In the polishing, I found that some of the #imports did not get changed like they should have in the Xcode search and replaces. Time for some hand-jamming...
After fixing all of those references in all of my CoreXLib project headers (not just the public ones, self defense), I dove back into the problem... I took the newly complied CoreXLib.framework over to the errant project that embedded it... and the problem had vanished! I checked the Allow Non-modular Includes... in both the framework project and the project that linked the framework in and both were "No". Flipping both to "Yes" and to "No" made no difference in several tests. The only other change was the #import "..." to #import <CoreXLib/...> modifications.
So sometimes polishing the apple 🍎 knocks the bugs🐞🐞off...
set YES in Build Active Architecture Only in build settings.
It worked for me.
Today I solved this problem by those steps,:
Chose the schema "MyEmbededFramework"
Press [Command + B] to build
From the build phase panel, add "MyEmbededFramework.framework" to Link Binary With Libraries
Try to build your project, the problem may disappear now.
you can try this, it's work for me. delete DerivedData dir that about your project.step by step
Turn off module's in build settings. That may work
I’m following the instructions for Importing Custom Frameworks into Playground, but I still keep getting "No such module” error.
I have tried adding everything in the workspace; a project with just Framework target, project of Cocoa Application with the framework, and just the Framework. I also tried creating a playground in the Application where I imported the framework, I can even import it in other swift file without any problem; but I can’t seem to be able to import it in playground.
Can someone please tell me what I might be doing wrong?
Try building your framework target using a simulator! I had only built mine using the generic device which doesn't work for playgrounds!
Did you ever get it to work? I figured out my issue. The code I was trying to import wasn't in a Framework Target. I had to add a new target to my project of type Cocoa Framework. Then include my source files in that framework, and then finally build that target. Then it worked.
I would like to echo what Reid said:
Try building your framework target using a simulator! I had only built mine using the generic device which doesn't work for playgrounds!
If you've updated to Xcode 12, you also need to make the "Build Active Scheme" box is checked. Select your playground and go to the inspector. The checkbox will be under "Playground Settings"
I've spent for this more than 4 hours. But i've solved it for XCode 10.
You're unable to add any framework into the Playground if there's no target for it the Workspace where the Playground is. So as you using downloaded framework (so am i) — you're doomed to fail with it.
The workable manual could be found here (God bless this guy): https://www.pardel.dev/blog/3rd-party-frameworks-in-xcode-playgrounds
tldr: the easiest way is to:
Download 3rd party framework sources.
Open *.xcodeproj
Add Playground to the Project.
Build project for any iOS simulator by cmd+b (have no idea how to use any macOS frameworks yet).
And it should work (at least it does for me).
I solved my problem with a different solution than Michael Welch's. I had my Xcode derived data setting different than original. Go to Preferences > Locations > Derived Data > Advanced and select Unique. This solved the framework not appearing in playground problem for me.
I am looking for testflight bindings for the newest update of xamarin. Has anyone done these yet?
I am trying to make them by myself however this is not area I normally step in to.
Okay I got it to work, it was simpler than I thought.
I used the bindings from Mono touch bindings
I followed xamarins suggestions here Update bindings updated the makefile and updated the code to use the correct references.
Then I just ran the makefile and got my dll :)
we've got a major project written in Kobold2D by Steffen Itterheim, (which is itself a wrapper for Cocos 2.1), and since upgrading to XCode 6.1/OS X 10.10, the new iOS 8 framework seems to render many parts of the Kobold-library and the Cocos implementation unusable, or it seems to need a rewrite.
Has anyone updated a Kobold2D project successfully to iOS8 yet?
Are there simple ways to upgrade it, or is it necessary to rewrite the entire library?
If there are no simple ways to upgrade, has anyone migrated a project from Kobold to cocos 3 yet?
Any hints would be much appreciated!
Averett
PS. I have seen this question: How to convert Kobold2D into a new Cocos2D 3.x project? - but the answer is not very helpful, as this solution would omit iOS 8.
We actually have created a script to make the necessary changes to Kobold2D. You can find it in this post:
https://www.makegameswith.us/gamernews/406/xcode-6-fixes-for-kobold2d
Basically all you need to do is run
curl https://s3.amazonaws.com/mgwu-misc/xcode6_kobold_patch.sh | sh
in the terminal, when you are in the root folder of your project.
I have just compiled my Kobold2D 2.1 project using XCode 6.0.1. It breaks initially at several lines, but it's easy to fix. I only found a couple of errors:
Multiple methods named 'setPosition:' found
Example:
[_target setPosition: newPos];
Fix: cast the object to CCNode
[(CCNode*)_target setPosition: newPos];
Do this for all errors found
You also need to import "ccNode.h" at the top of the file.
Use of undeclared identifier 'MPMovieControlModeHidden'
I found that the #ifdef__ #endif enclosing the offending line was commented out. Uncomment them to fix the problem.