sxross / MotionModel

Simple Model and Validation Mixins for RubyMotion
MIT License
192 stars 67 forks source link

The `master' repo requires CocoaPods 0.18.1 #45

Closed wejrowski closed 11 years ago

wejrowski commented 11 years ago

I'm running rake in the example app and I keep getting

The `master' repo requires CocoaPods 0.18.1

Should I be able to bundle and run rake inside the test app and it work right?

sxross commented 11 years ago

You should. Check for conflicting gem statements in your Gemfile.

wejrowski commented 11 years ago

Played around with Gemfile and some other requires and the Rakefile.. got it to attempt to work.. not getting another error which I'm in the works of figuring out...

Simulate ./build/iPhoneSimulator-6.1-Development/sqlite3_sample_app.app (main)> 2013-05-18 12:42:31.388 sqlite3_sample_app[14810:c07] ExecSQL: SELECT 1 FROM sqlite_master WHERE type="table" AND name="todos"; ExecSQLResult: [{"1"=>1}] Objective-C stub for message dateWithNaturalLanguageString:locale:' type@@:@@' not precompiled. Make sure you properly link with the framework or library that defines this message. *\ simulator session ended with error: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "The simulated application quit." UserInfo=0x1019006f0 {NSLocalizedDescription=The simulated application quit., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1} rake aborted!

wejrowski commented 11 years ago

BTW are there any simplified RM wrappers for FMDB? All I'm actually looking for is interacting with Sqlite3. SQL statements and arrayed returns. What I was wanting to do with yours is possibly strip it down since I can't find any others.

sxross commented 11 years ago

I'm going to let @aceofspades answer this, as he's very familiar with FMDB and has done the analysis to determine what MotionModel brings to the table when using SQLite as a query and persistence layer.

sxross commented 11 years ago

One more comment: If you could create a project on GitHub that generates the error above, we should have a look at it. dateWithNaturalLanguageString:locale: is one of the APIs I was wanting to stop using anyhow.

DougPuchalski commented 11 years ago

Yes I believe there was an issue with the test app, I'll have to look at that again. Maybe the solution is to remove that API call.

You should be able to use this library at a lower level.

wejrowski commented 11 years ago

So I fixed some dependency errors on the test app, and this is where I'm getting the dateWithNaturalLanguageString:locale error.

https://github.com/wejrowski/MotionModel/tree/sql

Also, random question with FMDB if you have a sec. I got up a test app using the FMDB cocoapod. And Im' trying to simply call some sql statements to play around with it.. should I not be able to just do this?

f = FMDatabase.databaseWithPath(File.join(NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0], 'mydb.db')) f.open f.executeQuery("CREATE TABLE words (word varchar(255));") f.executeUpdate("INSERT INTO words (word) VALUES ('20080806230630');") f.executeQuery("SELECT * FROM words")

Creating the DB seems to work since it returns an instance of FMDatabase. Create table works.. executeUpdate doesn't seem to work. Am I missing something?

wejrowski commented 11 years ago

Answered my executeQuery question.. guess I have to executeUpdate for creating tables!

sxross commented 11 years ago

You're building against a release SDK, right?

Sent from my iPad

On May 18, 2013, at 2:47 PM, Brent notifications@github.com wrote:

So I fixed some dependency errors on the test app, and this is where I'm getting the dateWithNaturalLanguageString:locale error.

https://github.com/wejrowski/MotionModel/tree/sql

Also, random question with FMDB if you have a sec. I got up a test app using the FMDB cocoapod. And Im' trying to simply call some sql statements to play around with it.. should I not be able to just do this?

f = FMDatabase.databaseWithPath(File.join(NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0], 'mydb.db')) f.open f.executeQuery("CREATE TABLE words (word varchar(255));") f.executeUpdate("INSERT INTO words (word) VALUES ('20080806230630');") f.executeQuery("SELECT * FROM words")

Creating the DB seems to work since it returns an instance of FMDatabase. Create table works.. executeUpdate doesn't seem to work. Am I missing something?

— Reply to this email directly or view it on GitHub.

wejrowski commented 11 years ago

Not sure what you mean. I'm using the latest xcode and RM if that's what you're wondering.

sxross commented 11 years ago

Yes. That's the info I was looking for. I'm a bit nervous about that API.

Sent from my iPad

On May 18, 2013, at 5:00 PM, Brent notifications@github.com wrote:

Not sure what you mean. I'm using the latest xcode and RM if that's what you're wondering.

— Reply to this email directly or view it on GitHub.

DougPuchalski commented 11 years ago

I'm getting the same issue with dateWithNaturalLanguageString. Steve, is it time to remove it? Can motion-support handle what you're trying to do here?

sxross commented 11 years ago

I wrote a parser with NSDataDetector (so it should work on OSX as well as iOS) and it's in SugarCube:

https://github.com/rubymotion/sugarcube/blob/master/lib/sugarcube/date_parser.rb

See what you think of that.

Steve

On May 19, 2013, at 8:11 AM, Doug Puchalski notifications@github.com wrote:

I'm getting the same issue with dateWithNaturalLanguageString. Steve, is it time to remove it? Can motion-support handle what you're trying to do here?

— Reply to this email directly or view it on GitHub.

DougPuchalski commented 11 years ago

@sxross Not sure if you were addressing me. I don't think I'm using this so feel free to swap it out if it works for you.

sxross commented 11 years ago

I've changed this in the change_parse_date branch.

sxross commented 11 years ago

@wejrowski did your problem get solved? Was my change_parse_date branch useful to you?

wejrowski commented 11 years ago

Yep, builds this time!.. to a blank screen. I'll have to play around more later.. not sure what the sample app is actually supposed to show...

A couple weeks ago I was playing around with FMDB and finally got that up and running so I may just go that route and run straight sql.