Cucumber/iphone article question |
|
12 Aug 2009, 01:23
Jim Clark (4 posts) |
A question for Ian about his Cucumber/iPhone article. I’m anxious to get his example working. However, I’m struggling a bit to piece everything together. I’m fairly new to xcode, obj-c and iphone dev. and like you this is mostly in my spare time. I’ve downloaded your source, loaded in to xcode (using WordPress.xcodeproj) and have successfully built and run the Wordpress app in the simulator. It didn’t appear as if the build settings contained the Bromine settings, so I went to the Bromine site and did the following: I added -DBROMINE_ENABLED=1 to OTHER_CFLAGS, apparently GCC_PREPROCESSOR_DEFINITIONS is the way to go, but adding “BROMINE_ENABLED” didn’t seem to work for me. I added ”/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/libxml2” to header search paths. I think I added the correct libxml2 file to my frameworks group. Verified GCC_C_LANGUAGE_STANDARD is c99 Building now gives me the following errors:
Is there something else I need to do to get the HTTPServer built and incorporated in to the app? I’ve successfully built the HTTPServer project, however, I’m not sure how to tie that in to the WordPress app. Any help you can provide would be greatly appreciated. Thanks, |
|
12 Aug 2009, 17:23
Ian Dees (192 posts) |
Hi, Jim. The original WordPress project file was targeted to iPhone SDK 2.0, and that setting can cause strange results on SDK 2.2.1 development machines. I’ve changed the project frameworks and include paths to use 2.2.1 instead, and it should now build correctly on a fresh 2.2.1 machine, with no extra manual steps needed. The latest code can be downloaded from http://bitbucket.org/undees/cucumber-article. (Bromine doesn’t yet target SDK 3.0 or 3.1, but they’re working on it.) HTTPServer gets built as part of the “Bromine” target in the WordPress app; that extra .xcodeproj directory is just the sample one that came with the library. Sincerely, Ian |
|
13 Aug 2009, 03:10
Jim Clark (4 posts) |
Thanks for the quick reply Ian. I appreciate the help! I started with a fresh clone of the project, but I am having the same build failure as above. I noticed the BROMINE_ENABLED flag and the header search path setting in the project.pbxproj file. But for some reason, my xcode (3.1.3) isn’t picking up the settings. I’ve added them manually but I must be missing something since it’s still not building. Thanks, |
|
14 Aug 2009, 04:14
Ian Dees (192 posts) |
Hi, Jim. Sorry about this. It looks like we’re both using the same version of Xcode. Which SDKs are installed? We may be able to get this working by poking at the project file a bit. Is the If it gets past compilation and still gives linker errors, it’s worth checking to see if the If it’s still failing after these steps, I’d like to try an iChat screen-sharing session. Drop me a line (undees at gmail) and let me know what times are good for you during the next few days. Sincerely, Ian |
|
18 Aug 2009, 03:39
Jim Clark (4 posts) |
Hi Ian, I believe I’m over this hurdle :) This is probably my lack of xcode experience. I originally was just trying to “build and go” on the Wordpress app. Once I did a build on the Bromine target, THEN did the “build and go” on the app, my app deployed and the app was able to receive http request. My debug window reported the following, while this doesn’t look like “success”, I’m making progress.
BTW, the issues w/ the processor directives had to do w/ me setting the directives at the app level vs. target level. Thanks again for the help, |
|
25 Aug 2009, 16:15
Ian Dees (192 posts) |
Hi, Jim. Yup, definitely good news that you’ve got touch event requests in the log now. The reason it can’t find the buttons it’s looking for is probably that it can’t log into the blog. The test script checked into the article’s repository has placeholders for the blog name, user name, and password. They’ll need to be replaced with live WordPress credentials for a new blog (not an existing blog; the test script erases posts!). Good luck! —Ian |
| You must be logged in to comment |
