rubymotion-community / ib

IB Outlets for rubymotion
MIT License
253 stars 33 forks source link

Using for both App and Extension #80

Closed pixlwave closed 7 years ago

pixlwave commented 9 years ago

Hi I'm experiencing some issues using IB on both an App, and an Extension within an App. I have set up the following project which mirrors my project layout:

https://github.com/digitalfx/ib-bug

When I try to rake this (or my other project) I recieve an error as below:

   Compile ./resources/Storyboard.storyboard
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.ibtool.errors</key>
    <array>
        <dict>
            <key>description</key>
            <string>Interface Builder could not open the document Storyboard.storyboard" because it does not exist.</string>
        </dict>
    </array>
</dict>
</plist>
rake aborted!

Hopefully, cloning the repository I have attached still replicates the issue at your end. Any ideas what is causing this?

Many thanks

pixlwave commented 9 years ago

I have now tested this by cloning the repository to another machine, and the problem still exists.

pixlwave commented 9 years ago

To expand on this, after cloning I have found that running rake ib in the app dir fixes the issue initially. However, cd IBWidget, rake ib and maybe add a label to the MainInterface.storyboard for the widget. After this cd .., rake clean, rake and the error appears again. However this time, another rake ib does not fix the problem. :cry:

colinta commented 9 years ago

I had time to clone and run as well, and saw the same error.

I was going to try messing with app settings and maybe rename Storyboard to MainStoryboard... Do you know if the storyboard sample app still compiles?

On Jan 22, 2015, at 6:02 AM, digitalfx notifications@github.com wrote:

I have now tested this by cloning the repository to another machine, and the problem still exists.

\ Reply to this email directly or view it on GitHub.

pixlwave commented 9 years ago

As in the ibsample app in the samples folder? Yep just tried and it works fine. All my other projects are working fine as far as I can see.

pixlwave commented 9 years ago

A bit more experimentation and I've found a few more things. This seems to be a known issue for Obj-c users, adding ibtool commands to Xcode build phases.

2 workarounds: If you literally just wait a few minutes, then rake again, it's miraculously fixed. Or running sudo killall ibtoold will fix the issue, until reboot.

I'm currently wondering if this has something to do with ibtool opening multiple storyboards/projects at the same time.

colinta commented 9 years ago

Oh that's crazy! Thanks for looking into it, glad I didn't bang my head against it for an hour :smiley:

pixlwave commented 9 years ago

Yep! I now officially give up, after trying a single IB project and changing project.resource_directories to include both app and extension dirs. Still gives the same error at times :weary:. I guess killing ibtoold will just have to do!

colinta commented 9 years ago

Is there anything that can be done on the ib side of this issue?

pixlwave commented 9 years ago

Not on the ibtool error, no.

I am however wondering whether or not it would be possible to have a setting that allowed rake ib to traverse any projects added with app.target 'dir', :extension for code and resources? Currently my workflow can go along the lines of 1) Write some code 2) cd dir, rake ib 3) Add an outlet or object 4) cd .., rake 5) back to 1 and repeat. All the cd'ing can get a bit tedious at times.

pixlwave commented 9 years ago

However, if it's stuck as it is, it's not a terrible problem. Just a thought :smiley: