Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Building Application #288

Open
cgardner opened this issue Jan 19, 2013 · 10 comments
Open

Error Building Application #288

cgardner opened this issue Jan 19, 2013 · 10 comments

Comments

@cgardner
Copy link

I'm trying to build the application on OSX 10.7.5 with XCode 4.5.2 and I keep getting an error. I've tried the instructions in #283 but it isn't working.

The error is:

OSACompile Pomodoro/scripts/getToDoListFromReminders.applescript
cd /Users/cgardner/src/pomodoro/repo
/usr/bin/osacompile -l AppleScript -d -o /Users/cgardner/Library/Developer/Xcode/DerivedData/Pomodoro-ezliufhegysjlzebiegksrzilwrg/Build/Intermediates/ArchiveIntermediates/Pomodoro/InstallationBuildProductsLocation/Applications/Pomodoro.app/Contents/Resources/getToDoListFromReminders.scpt Pomodoro/scripts/getToDoListFromReminders.applescript

Pomodoro/scripts/getToDoListFromReminders.applescript:7: error: Expected “then”, etc. but found class name. (-2741)
Command /usr/bin/osacompile failed with exit code 1

@seggix
Copy link

seggix commented Feb 8, 2013

I'm having a similar error. OSX 10.7.5 with XCode 4.6.

Very confusing. I'm a bit of a novice with building apps, unfortunately, so I'm running around in circles.

OSACompile Pomodoro/scripts/getToDoListFromReminders.applescript
cd "/Users/seggix/Downloads/pomodoro-master 2"
/usr/bin/osacompile -l AppleScript -d -o /Users/seggix/Library/Developer/Xcode/DerivedData/Pomodoro-esredelmrnrmbaeugeioyoednmsw/Build/Products/Release/Pomodoro.app/Contents/Resources/getToDoListFromReminders.scpt Pomodoro/scripts/getToDoListFromReminders.applescript

2013-02-07 17:20:54.256 osacompile[92316:f07] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osacompile: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
Pomodoro/scripts/getToDoListFromReminders.applescript:7: error: Expected “then”, etc. but found class name. (-2741)
Command /usr/bin/osacompile failed with exit code 1

@partlyhuman
Copy link
Contributor

It looks like you can't even compile Applescripts that reference Libraries that aren't installed (Reminders and Messages, introduced in 10.8). I'm not sure what the proper way around this is. When I try to compile on 10.7 I get this too. You can patch around it by just deleting the applescript.

I'd like to open up a conversation about the "right" solution to this. I can see several possibilities.

  • Modify the project to not compile the applescripts but include them in the bundle. Then when they are launched they are compiled on demand. Fixes the problem in that you should be able to build the app regardless of what's in the applescripts. Creates a new problem in that script compilation will fail at runtime. We can catch these errors at runtime, though, so you can still use the app.
  • Modify the project to conditionally compile specific applescripts based on what's available on the platform you're compiling for. It'd be more difficult since you can't #ifdef inside applescripts and the script files are currently part of the pbx file. Not sure but you might be able to do this with a build phase. Creates the new problem that the target applescripts will not be found in the bundle when accessed.

Both fixes don't address the problem that these features won't be available anyway on the specific OS X versions. That'd be a separate, UI issue. Any opinions on how best to support building and running in older OSX while still providing access to new services in 10.8?

@cgardner
Copy link
Author

cgardner commented Feb 9, 2013

Is it possible to include the scripts when building for specific platforms?

@partlyhuman
Copy link
Contributor

It might be, using a custom build phase that modifies which files are going to be compiled. I think including all the applescripts as source without compiling them ahead of time is a better idea. I can't test it on 10.7 until I get back to my desktop in a few days but maybe you can try out this branch and let me know if it allows you to build? https://github.com/partlyhuman/pomodoro/tree/dont-precompile-applescripts

@seggix
Copy link

seggix commented Feb 12, 2013

Good news: Successfully Built!

Bad news: Was not able to export. Got error "The operation couldn’t be completed. (OSStatus error 100021.)"

Tried with targets 10.6 and 10.7. Not sure what the issue is. Is there a known work around to this? Couldn't seem to find any solved issues of this nature.

@partlyhuman
Copy link
Contributor

@seggix, by export do you mean Archive? Are you still using OSX 10.7.5 with XCode 4.6? Is there any additional compiler output immediately before this error message, and if so can you post it here? I will be able to try building on a 10.7 machine tomorrow, I'll report back to this thread.

@seggix
Copy link

seggix commented Feb 12, 2013

Yep, same stats as before.

I do mean export. I'm able to archive to the point where the organizer shows up, and I see the most current archive. I then follow the instructions.

  • Click "Distribute"

  • Click "Export as" and choose "Application" from the drop-down menu

  • Prompted by a page asking me to "Choose an Identity to sign with:" The two drop down options here are:

    1. Don't Re-sign
    2. Refresh Code Signing Identity...

Option 1 results in the error I've posted above, with no additional prompting.

Option 2 brings me to a page where I can enter my username and password to log in to my mac dev center account, but entering my information and clicking "Next" simply says scrolls through: "Connecting... Downloading... Building..", respectively, very briefly in succession, then just refresh's the previous 'Identity' page.

So close! I'm working with the free dev account, does that make any difference?

@filipiz
Copy link

filipiz commented Mar 4, 2013

I'm facing the same issue.
Is there any way to "distribute" without code signing the application.
I don't want to buy a $99 certificate.

@wavded
Copy link

wavded commented Mar 4, 2013

FYI, the solution in #286 fixed it for me

@shokk
Copy link

shokk commented Sep 8, 2013

partlyhuman, your works for me flawlessly after I spent 3 hours trying to get this one to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants