Rendering Video using XCDYouTubeKit and swift - ios

Please bear with me as I have been trying to program in iOs using swift for a week now and at the moment I am stuck on an error. I need some insight with what is wrong with what I am doing.
Screenshot of Storyboard and .swift file
Screenshot of my error

I am gonna guess you have resolved it. Usually that error comes when you deleted an IBOutlet from the interface side of code but you still have it left behind in the the storyboard. Delete the "test" IBOutlet from the storyboard and that should fix it.

Related

exc_bad_instruction(code=exc_i386_Invop subcode=0x0) xcode

I am using xcode with the language swift. I continue to get this error on all of my code. exc_bad_instruction(code=exc_i386_Invop subcode=0x0) xcode. I have seen other questions and none make sense. I'm not sure if it is because of the second view but here is the code.
enter image description here
It has two views so I don't know if thats the problem. I need help!
Seems like the iboutlet is not connected in storyboard, because of which it is not getting initialised, no memory allocated to this object. Kindly check your storyboard connections.

swift 3.0 folding-cell library table not showing

I am using https://github.com/Ramotion/folding-cell library into my Swift 3.0 projects. It works nice without any editing or changing on storyboard/auto layout changing.
I faced some issues when tried to:
Add few IBOUTLET (in DemoCell.swift)
Add Data to them (in DemoCell's didSet() method)
Now the view is blank. But i can scroll the tableview(it is just not showing), can click and can see folded cell perfectly.
I tried to add constrains as it given in documentation. I get fatal crash.
I am using Xcode 8, swift 3.0. This is happen always even when i download the fresh source code and add new uilabel or anything change on storyboard.
Does anybody tried this library recently ?
Blank Screenshot:
When click in the cell, Other cell is hidden.But clickable.
Foreground view:
It was an issue with the library. Now its solved.
Thread: https://github.com/Ramotion/folding-cell/issues/69#event-819438913

WatchKit Extension - Unable to find image named “XXX” on Watch

Ii'm just trying to set text into a WKInterfaceLabel but its telling me no image find with this name.
Here is the code
#property (weak, nonatomic) IBOutlet WKInterfaceLabel *testTextBox;
_testTextBox.text = [NSString stringWithFormat:#"%#", testString];
It is not related with this code. You must check all WKIntefaceImage's names. if you have wrong one than this error appears like this. If you recheck all WKIntefaceImage's names you will see there is have a wrong one.
click on the image file, you'll see "Target Membership" options on the right pane. Select all of them, Clean the build and try again.
If anyOne still got the same issue:
Might by You copy cell in InterfaceBuilder with some old outlet or action connections.
So just remove old outlet connections and reconnect the new one.
I made the same issue, just try it!
For me the above fixes, individually, didn't work.
Make sure your images end in "#2x" (before the extension .png/.jpg)
Drop them into the blue Assets folder/catalog.
Delete the app from your simulator or device (this solved it for both of them for me)
It looks like once you gum things up with bad naming it doesn't recover. Removing the app, fixing the naming and reimporting into the catalog fixed my issues.
Coding for the watch is still tough, and I rely on tips like this to get through the 'gotchas'.
🍀
Clean the project and Delete your app in simulator, error will be gone.

IBOutlets not showing on XCode 6.1 (6A1052d)

This is quite a major problem: the Outlets are not appearing in IB.
To reproduce:
1) I declare a variable to be IBOutlet, for example in my view controller's .h file
#property (nonatomic, strong) IBOutlet UILabel* testlabel;
2) I open the storyboard, click on the viewcontroller.
- If this is a new project, there is no "Outlets" list.
- If this is an old project with outlets already defined, the "Outlets" list contains the previous outlets, but not the one I've added.
Has anyone had the same problem. This is really important, as I can't basically proceed unless I stop using Outlets. I can't find any info about it on the release notes.
EDIT I'm adding a video on youtube showing the problem, in case I haven't explained it properly. If I'm forgetting something obvious, I'm happy to be laughed at :) That said, I've always been following these same actions and Outlets have always been in the list.
EDIT 2 For clarity, I've removed the ivar declaration as it seemed to get most of the attention.
Outlets on Youtube
EDIT 3 Ok I seem to be hitting a problem seen previously on this question and this other question. Basically, if I open the custom class drop-down, I see only some "standard" classes, such as UIViewController. If I select any of these, I get the Outlets. For example, for UIViewController I always have that view->View. However, my project's classes are not in the drop-down. Entering the name manually seems to work, but in fact it's not. There must be some indexing issue (except I've already deleted everything from
~/Library/Developer/Xcode/DerivedData/
without success. If you wish to try, I've put my code on GitHub. This doesn't show the Outlets for me, but it does for a number of other people - so it's not a "bug" with the code strictly speaking. It's more an XCode issue. Any help would be welcome!
EDIT 4 I think here's the problem, pretty much: look on the right. The drop-down menu doesn't show the "ViewController.h" class. If I enter it manually, it seems to recognise it but in fact I suspect it doesn't. In previous times, I was always seeing the full list of my project's classes in the drop-down menu.
I've found a "solution", or workaround. Deleting the XCode data is not enough, and it's not enough to just restart it. The following sequence makes the Outlets magically re-appear and work properly:
Clean project
Close XCode
Delete all contents of ~/Library/Developer/Xcode/DerivedData/
Restart MacOs
By doing this, when you re-open XCode and it reindexes, it will show the outlets as expected.
just declare the IBOutlet like this:
#property (nonatomic, strong) IBOutlet UILabel* testlabel
Maybe a very dumb one, but have you tried Clean Project Folder, then deleting DerivedData (while Storyboard is not open), immediately quit Xcode, and opening up Xcode again, then building your project?
I ran into a similar problem, but it was due to a bug in Xcode (8.2) where Interface Builder doesn't show outlets in the Connection Inspector if those outlets have been declared with a _Nullable type annotation for Swift compatibility.
Using nullable inside #property's parentheses appears to work around the problem.
(I know the original poster's problem did not use type annotations or Xcode 8 so was slightly different, but the question summary matched my internet search so I mention this for future searchers.)

Storyboard crashes Xcode when opened

Whenever I attempt to open up my storyboard, Xcode crashes with the following error report
The funny thing is, the app works fine in the simulator and builds without errors. What is causing this crash? I see two possible crashes:
Exception reason: UITableView dataSource is not set
, but that shouldn't make the storyboard crash right?
Details: Failed to compute auto layout status IBLayoutConstraint, IBUIButton, IBUIDatePicker, IBUITextField, IBUIView, IBUIViewController, and IBUIViewControllerAutolayoutGuide.
Which doesn't give much information at all.
I have been using a storyboard with Xcode 5 for some time, so the question does not appear to be related to moving from Xcode 4 to 5. I can open the storyboard as XML and I can open my iPhone storyboard just fine.
If you are using git, I would recommend reverting to a time before this problem started.
If you are not using git, and you are absolutely sure you did not edit the xml for the storyboard then I would say:
1)find the storyboard file using the finder.
2)copy it to your desktop.
3)go back to Xcode and delete the storyboard from your project, select "move to trash". 4)re-import the storyboard file into your project.
Ive had similar problems with Xcode 5 and either reverting using git or the steps above usually get me back up and running.
Exception reason: UITableView dataSource is not set
Details: Failed to compute auto layout status IBLayoutConstraint, IBUIButton, IBUIDatePicker, IBUITextField, IBUIView, IBUIViewController, and IBUIViewControllerAutolayoutGuide.
The errors described above lead me to think that one if not all viewcontroller(s) for the items listed above lost their connectivity to viewcontroller.h / viewcontroller.m files. I would make sure you have everything wired up correctly, and you can check this by making sure the items in your viewcontroller have a circle in the gutter (next to the line numbers) that is filled in (solid) if the circle is not filled in then it means your items are not wired up to your viewcontroller. I would post a picture of your .h / .m file of your viewcontroller so we can further investigate.
I ended up copying each view controller scene (in XML) into a new storyboard. Some view controllers could not be copied without the storyboard crashing so I had to recreate about 4 of them, but by and large I got the majority of my work back.
What you need to do is reopen the project again in Xcode 5 and then go to the storyboard. Then at the right side choose for "Identity and type" and then set "opens in" to Xcode 4.6 to be able to open it in Xcode 4.6. And disable auto layout, somehow when you open it in xcode 5 it asks you to update it, I think you did that without a thought, happened to me as well :)

Resources