amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 10 forks source link

Sql Lite + Cocoa Pod + High Sierra + OSX #42

Closed amirrajan closed 6 years ago

amirrajan commented 6 years ago

No worky: https://github.com/eamonn-webster/TestMotionSQLite3

victorcechinel commented 6 years ago

See repo: https://github.com/solanoluz/motion-sqlite3

Gem file:

gem 'motion-sqlite3', git: 'git@github.com:solanoluz/motion-sqlite3.git'
gem 'motion-cocoapods', '1.8.1'

Add this code on Rakefile:

Motion::Project::App.setup do |app|
   # Last line
   app.libs << '/usr/lib/libsqlite3.dylib'
   app.include 'sqlite3.h'
end
amirrajan commented 6 years ago

@victorcechinel did you get this working on High Sierra? I'm still getting an error.

amirrajan commented 6 years ago

https://gist.github.com/amirrajan/5c2b9185bf431403309f2fc61cb163b1

amirrajan commented 6 years ago

This line needs to be fixed /cc @victorcechinel @kastiglione for HighSierra: https://github.com/amirrajan/motion.h/blob/master/lib/motion.h.rb#L71

@kastiglione, do you accept pull requests? Make me a collaborator and give me access to push motion.h?

amirrajan commented 6 years ago

Will open issue on motion.h or fork and deploy a new version.

kastiglione commented 6 years ago

I'm happy to add collaborators, also happy to hand off the project. If you fork I'll be sure to point the original repo to yours.

amirrajan commented 6 years ago

@kastiglione I’d be happy to take over. Mind adding me as a collaborator to your repo (and give me push rights for the gem)?

ben5516 commented 6 years ago

@amirrajan What error were you getting with High Sierra? On my own app, I'm getting:

can't open BridgeSupport full file at path `build/sqlite3.bridgesupport': Error Domain=NSXMLParserErrorDomain Code=4 "zero length data" UserInfo={NSLocalizedDescription=zero length data}

but when I clone and build https://github.com/eamonn-webster/TestMotionSQLite3, it actually compiles and launches in the simulator, but I get this error:

uninitialized constant SQLite3::Database::SQLITE_OK (NameError)
kastiglione commented 6 years ago

@amirrajan I added you as collaborator. I'll do the gem rights later today.

kastiglione commented 6 years ago

@amirrajan How do I add gem push rights, via gemspec?

amirrajan commented 6 years ago

I think through rubygems.org maybe?

ben5516 commented 6 years ago

@amirrajan @kastiglione Were you ever able to get the gem pushed?

Lax commented 6 years ago

@kastiglione Use gem owner <gem> -a <email> command. gem help owner for detail.

amirrajan commented 6 years ago

@ben5516 this week hopefully.

kastiglione commented 6 years ago

@ben5516 I looked to add @amirrajan as a gem owner via rubygems.org, but didn't see where to do that. Seems that's the only thing to do before @amirrajan can push an update.

kastiglione commented 6 years ago

oh I just saw @Lax's comment. I'll do that.

kastiglione commented 6 years ago

@amirrajan I have added you as an owner.

ben5516 commented 6 years ago

Thanks @kastiglione

amirrajan commented 6 years ago

@ben5516 , updated. Mind confirming?

gem uninstall motion.h #uninstall 0.0.4
gem install motion.h #install 0.0.5
rake clean:all #navigate to your app and clean all
rm -rf ~/Library/RubyMotion #blow away any cached bridge support files
rake default #build and see if it works
ben5516 commented 6 years ago

@amirrajan

Worked for me!