Skip to content

Instantly share code, notes, and snippets.

@bogardon
Created July 13, 2013 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogardon/5992581 to your computer and use it in GitHub Desktop.
Save bogardon/5992581 to your computer and use it in GitHub Desktop.
Rakefile
# -*- coding: utf-8 -*-
$:.unshift(ENV["RUBYMOTION_LIB"] || "/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require 'bundler'
require 'sugarcube-attributedstring'
Bundler.require
Motion::Project::App.setup do |app|
app.xcode_dir = "/Applications/Xcode.app/Contents/Developer"
# Use `rake config' to see complete project settings.
config = YAML.load_file("config/#{app.build_mode}.yml")
app.name = config['app']['name']
app.identifier = config['app']['identifier']
app.provisioning_profile = config['app']['provisioning_profile']
app.entitlements['aps-environment'] = config['app']['aps-environment']
app.entitlements['get-task-allow'] = config['app']['get-task-allow']
app.codesign_certificate = config['app']['codesign_certificate']
app.sdk_version = "6.1"
app.version = "1"
app.short_version = "1.0.0"
if ENV['RUBYMOTION_LIB']
app.motiondir = '../RubyMotion'
end
app.interface_orientations = [:portrait]
app.deployment_target = '6.1'
app.frameworks += %w[
CoreLocation
MapKit
]
app.pods do
pod 'Facebook-iOS-SDK'
pod 'MBProgressHUD'
pod 'GGFullscreenImageViewController'
pod 'TestFlightSDK'
end
# icons
app.icons = ["App_Icon.png", "App_Icon@2x.png"]
app.prerendered_icon = true
# status bar
app.info_plist['UIStatusBarStyle'] = 'UIStatusBarStyleBlackOpaque'
# we require location services n stuff
app.info_plist['UIRequiredDeviceCapabilities'] = ['location-services', 'gps']
app.info_plist['config'] = config
# facebook and url schemes
facebook_app_id = config['facebook']['appId']
app.info_plist['FacebookAppID'] = facebook_app_id
app.info_plist['CFBundleURLTypes'] = [{
'CFBundleURLName' => app.identifier,
'CFBundleURLSchemes' => ["fb#{facebook_app_id}", "veoveo"]
}]
end
@bogardon
Copy link
Author

I get xcodebuild: error: SDK "iphoneos6.1" cannot be located. when I run rake archive:distribution

Note that this happens when xcode-select -p still points to DP3. But I thought setting app.xcode_dir is supposed to circumvent that.

@bogardon
Copy link
Author

If I manually sudo xcode-select -s /Applications/Xcode.app/Contents/Developer and then rake archive:distribution. I get:

xcrun: error: unrecognized option: --show-sdk-path
Usage: xcrun [options] <utility> ... arguments ...

Find and execute the named command line utility from
the installed Xcode.

Then it proceeds as normal for a bit, and then hangs when compiling some random file..

@lrz
Copy link

lrz commented Jul 13, 2013

Are you on Mavericks? It seems that Ruby is broken over there. http://hipbyte.myjetbrains.com/youtrack/issue/RM-188

@bogardon
Copy link
Author

Yeah I'm on mavericks...thing is I have other projects in regular Xcode that I can still compile targeting ios6 sdk as long as I switch before I archive...

And also I use 1.9.3 with rvm

That said..I'm going to try that sdk copy script hahah

@lrz
Copy link

lrz commented Jul 13, 2013

There is definitely something wrong with the Ruby distribution in Mavericks, however it's hard to know what's going on here. In the meantime, I highly recommend going back to 10.8 for stable/serious development (especially if you have to work on submissions). :)

@bogardon
Copy link
Author

Hmm ok. Thanks for the help!

@bogardon
Copy link
Author

So I followed this and changed Current in /System/Library/Frameworks/Ruby.framework/Versions to be a symlink against 1.8 instead of 2.0. The xcrun errors went away, but it still hangs at compile...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment