xcode4

Making a sprite move randomly across the screen

╄→尐↘猪︶ㄣ 提交于 2019-12-11 05:36:23
问题 I'm making a 2d Game, in which I need instances of a sprite to fly randomly across the screen. They will spawn in randomly just beyond the boundaries of the iPhone screen, then move within the screen. When they hit the edges, they will appear back on the other side. All I need to know is how to get the sprite to move randomly. 回答1: Add this method to your layer class - it takes in a sprite and then moves it randomly around the screen for ever: -(void)moveRandom:(CCSprite*)s { CGPoint

boost::asio::ssl linking errors in Xcode 4

烂漫一生 提交于 2019-12-11 05:31:36
问题 I have a simple project in Xcode—it doesn't actually do anything yet, just includes boost::asio::ssl : // main.cpp #include <iostream> #include <string> #include <boost/asio.hpp> #include <boost/asio/ssl.hpp> using namespace std ; int main (int argc, const char * argv [] ) { return 0 ; } I have it linked with libssl.dylib and libboost_system.dylib , and get this when building: Undefined symbols for architecture x86_64: "_CONF_modules_unload", referenced from: boost::asio::ssl::detail::openssl

xcdatamodel is not entirely under source control in subversion xcode4

吃可爱长大的小学妹 提交于 2019-12-11 05:21:49
问题 I have a project in xcode under svn source control. It happens that the xcdatamodel is not entirely being put under version control by xcode. Xcode show a question mark '?' status icon, while on the svn repository I can only see the empty xcdatamodel directory. At first I would like to stay within xcode4 perimeter to understand why this could have happened, and how can I solve the situation with Xcode4 itself. Then, if not possible, from the terminal window which svn command should I do on

Apple Mach O Linker warning

烂漫一生 提交于 2019-12-11 04:47:31
问题 I am getting this annoying warning Apple Mach-O Linker Warning Alignment lost in merging tentative definition _searchFlag i have declared the search flag in the constant.h file like this BOOL searchFlag I am stuck up on this issue from the past 2 days and i have tried all the possible solutions from google but none of them seems to be working. My app supports both armv6 and v7 arch for which i have added the settings but this dosent seems to be the problem, its just this bool flag that is

Confused about the size of my App?

北城以北 提交于 2019-12-11 04:09:23
问题 I'm a bit confused about the size of my App! The folder and all the contents comes out at 25.9MB... After archiving in Xcode it says 'Estimated App Store Size: 49.8MB... Anybody know why this is? Thanks 回答1: I had this same as an issue with xcode 4.3, since my app it said that it will be 45.8 and the actual size was 31.5 回答2: Are you compiling for armv6 and armv7 (if you want to support iPhone 3G et. al you are doing this)? In this case the .xcarchive you submit will contain two binaries,

NSString Release

不羁的心 提交于 2019-12-11 04:07:35
问题 I have this code of string and I have problems trying to free up memory, I have understood that only those who release it initializes and is not autorelease but I had problems with the string "end", and as nSum release. NSString *urlBase = [[NSString alloc] initWithFormat:@"http://service.svc/"]; NSString *op = [[NSString alloc] initWithFormat:@"op1"]; NSString * final = [urlBase stringByAppendingFormat:op]; NSString * nSum = sumTextfield.text; final = [final stringByAppendingFormat:nSum]; /

As soon as I add a project to XCode 4.0.2 it crashes

只愿长相守 提交于 2019-12-11 03:54:48
问题 It gives this error: ASSERTION FAILURE in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-269/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/PBXContainerItemProxy.m:268 Details: Assertion failed: _containerPortal == [self container] || ([_containerPortal isKindOfClass:[PBXFileReference class]] && [(PBXFileReference *)_containerPortal container] == [self container]) Object: <PBXContainerItemProxy: 0x2017db420> Method: -_containerPortal Thread: <NSThread: 0x200020700>{name

How to compile xcode4 project to use as framework in second project?

穿精又带淫゛_ 提交于 2019-12-11 03:43:59
问题 If I have project in xcode4 for the iphone, How can I use it as framework for other project ? thanks. 回答1: Have a look at Creating a Framework chapter in XCode docs. The main thing is to add the framework file to your project and setting up the header file include path. Take care about debug and release builds. It is a little bit annoying and confusing if you have to switch between them from time to time. To get this more transparent I installed a build post-action (menu Product/Edit Scheme)

XCode hangs when archiving

怎甘沉沦 提交于 2019-12-11 03:16:01
问题 When I try to archive one certain project, Xcode fails to respond. If left alone he manages to open the Organiser after a long period. The archive is there. If removed manually from library/developer/xcode/archives Xcode responds again. It happens just with this project, all others archiving just fine. As if Xcode has major problems with the project. We are using Xcode 4.2.1 but tried 4.3 too (same result). Any idea what might be wrong? 回答1: I had similar problems I found that a symbolic link

XCode 4 with Git/Github, can't commit images

天大地大妈咪最大 提交于 2019-12-11 02:27:42
问题 Source codes files are getting committed but images are not. Error message error:pathscpec '' did not match any file(s) known to git. 回答1: The XCode release notes mention that there is a problem commiting binary files right now. They suggest that after you get that error you should go to the command line and do "git commit". 来源: https://stackoverflow.com/questions/5529307/xcode-4-with-git-github-cant-commit-images