Teething Problems

Okay so i seem to be having teething problems using examples. Your test app works but I couldn’t see how to implement Lua/Interop in that. So, I start from scratch using your create new app guide and now I have errors and also differences in with what I see to what you show on your guide. 

In your guide you say “Edit ViewController.h and add an import for CoronaCards:”

IE #import “CoronaCards/CoronaCards.h”

But on your example screenshot you also have #import “ViewController.h” which I don’t have so do I also add that too but i thought that would be in the m file? Do I remove import Cocoa? and also in your screenshot you have “@implementation View Controller” in the h file but I have got @interface ViewController : NSViewController

 

 

@end

Being new to this I expected the implementation to be in the m file so how come mine looks different?

 

My error is this:

Code signing error

CodeSign /Users/macbookpro/Library/Developer/Xcode/DerivedData/FirstTestStoryboard-eitzpylrimqkemgodfnpltesovna/Build/Products/Debug/FirstTestStoryboard.app/Contents/Frameworks/CoronaCards.framework/Versions/A

    cd /Users/macbookpro/Documents/XcodeTests/FirstTestStoryboard

    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

    

Signing Identity:     “-”

 

    /usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements,resource-rules /Users/macbookpro/Library/Developer/Xcode/DerivedData/FirstTestStoryboard-eitzpylrimqkemgodfnpltesovna/Build/Products/Debug/FirstTestStoryboard.app/Contents/Frameworks/CoronaCards.framework/Versions/A

 

Warning: usage of --preserve-metadata with option “resource-rules” (deprecated in Mac OS X >= 10.10)!

/Users/macbookpro/Library/Developer/Xcode/DerivedData/FirstTestStoryboard-eitzpylrimqkemgodfnpltesovna/Build/Products/Debug/FirstTestStoryboard.app/Contents/Frameworks/CoronaCards.framework/Versions/A: code object is not signed at all

In subcomponent: /Users/macbookpro/Library/Developer/Xcode/DerivedData/FirstTestStoryboard-eitzpylrimqkemgodfnpltesovna/Build/Products/Debug/FirstTestStoryboard.app/Contents/Frameworks/CoronaCards.framework/Versions/A/Frameworks/ALmixer.framework

Command /usr/bin/codesign failed with exit code 1

So first issue must be typo right. editing the ViewController m file not h? as that looks more like your screenshot

The exact files Xcode will generate for the project depend on the settings in the New Project dialog.  In particular, checking Use Storyboards changes things a lot (and you probably don’t want to do that if you want to run on any OS X other than 10.10).  [EDIT: on rereading things though, it looks like Rob is spot on in his analysis of what happened in this case]

The problem with the code signing step is that it needs the –deep parameter.  See the guide for instructions on how to add that (though note that the flag is _dash dash deep _ not the single dash the docs currently have which has been fixed).

I kept “Use Storyboards” checked as when I didnt there is no storyboard main object to set the class, as in the guide so I couldnt follow the guide exactly as I couldnt find where to set the view object the same way. I prefer to follow things exactly when im learning something new.

I  did use --deep although I originally  put the single dash in then changed it to two dashes after. 

Sorry, there was a typo in the guide.  It should read “Edit ViewController. m and add an import for CoronaCards” and it’s been fixed.

I  did use --deep although I originally  put the single dash in then changed it to two dashes after. 

Hmmm, it seems like Xcode is trying to be too helpful.  Make sure that Code Sign On Copy is unchecked in Embed Frameworks as shown below before trying to build:

We’re looking at changing the way apps get signed to make the process more straightforward so hopefully this wont be an issue in future (the problem is that the CoronaCards framework embeds other frameworks and while this is supported by Apple it apparently isn’t the most trodden path).

To do with the “using storyboard”, If I uncheck it then it creates a nib and I cant follow the guide then. Ill just start again from scratch following the guide again and see if it works. Just in case there are gremlins left.

So first issue must be typo right. editing the ViewController m file not h? as that looks more like your screenshot

The exact files Xcode will generate for the project depend on the settings in the New Project dialog.  In particular, checking Use Storyboards changes things a lot (and you probably don’t want to do that if you want to run on any OS X other than 10.10).  [EDIT: on rereading things though, it looks like Rob is spot on in his analysis of what happened in this case]

The problem with the code signing step is that it needs the –deep parameter.  See the guide for instructions on how to add that (though note that the flag is _dash dash deep _ not the single dash the docs currently have which has been fixed).

I kept “Use Storyboards” checked as when I didnt there is no storyboard main object to set the class, as in the guide so I couldnt follow the guide exactly as I couldnt find where to set the view object the same way. I prefer to follow things exactly when im learning something new.

I  did use --deep although I originally  put the single dash in then changed it to two dashes after. 

Sorry, there was a typo in the guide.  It should read “Edit ViewController. m and add an import for CoronaCards” and it’s been fixed.

I  did use --deep although I originally  put the single dash in then changed it to two dashes after. 

Hmmm, it seems like Xcode is trying to be too helpful.  Make sure that Code Sign On Copy is unchecked in Embed Frameworks as shown below before trying to build:

We’re looking at changing the way apps get signed to make the process more straightforward so hopefully this wont be an issue in future (the problem is that the CoronaCards framework embeds other frameworks and while this is supported by Apple it apparently isn’t the most trodden path).

To do with the “using storyboard”, If I uncheck it then it creates a nib and I cant follow the guide then. Ill just start again from scratch following the guide again and see if it works. Just in case there are gremlins left.