Search Results

Search found 4899 results on 196 pages for 'ios newbie'.

Page 26/196 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • How should a developer reject impossible requirements?

    - by sugar
    Here's the problem I'm facing: Quote From Project Manager: Hey Sugar, I'm assigning you the task of developing a framework that could be used for many different iOS applications. Here are the requirements: It should be able to detect the thickness of the thumb or fingers being used to manipulate the UI. With this information, all elements of the UI should be arranged & sized automatically. For a larger thumb, elements should be arranged nearer the center of the screen. For a smaller thumb, elements should be arranged nearer the corners of the screen. For a larger thumb, all fonts should be smaller. (We're assuming an adult in this case.) For a smaller thumb, all fonts should be larger. (We're assuming a younger person in this case.) Summary: This framework is required for creating user-friendly user interfaces programmatically. The framework should be developed in such a way that we can use for as many projects as needed, so it must also be very developer-friendly. I am the developer given this task, so my questions are as follows: How can I explain that these requirements are a little ridiculous? How can I explain that it would be better to concentrate on developing actual projects? How can I explain that even if this were possible, I wouldn't recommended developing such a thing? How do I say NO to this project politely, gently, and respectfully? How can I explain that even for a developer with 3 years of experience, this might not be possible?

    Read the article

  • Which one is better offline method for large scale application

    - by Manish Pansiniya
    We've a big data management website used by several property. Some of our customers have downtime (they can't access net for an hour or two). We want our site to support offline data viewing and inventory management (typical data search and add/remove) and when the user goes online we can sync the changes back to our central database. Customers use several platforms like Windows, iOS, etc. We've been looking into several different options, here are the major choices - Develop offline web app supported in HTML5. Develop a 'fallback' mechanism and interact with data from the app cache as explained in here (http://www.htmlgoodies.com/html5/tutorials/introduction-to-offline-web- applications-using-) Develop a desktop based cross platform solution. I remember the old MONO which has been popular. Here's a post (What do you suggest for cross platform apps, including web cross-platform-apps-including-web) and another one (Technology choice for cross platform development (desktop and phone)? platform-development-desktop-and-phone?rq=1) I realize the the desktop solution might be hard to maintain and result in some compatibility issues and demand test environments. Can HTML5 handle moderate to high level complexity and data flow? Or would it be better to rely on a desktop based app for better scalability & performance?

    Read the article

  • Collision with CCSprite

    - by Coder404
    I'm making an iOS app based off the code from here In the .m file of the tutorial is this: -(void)update:(ccTime)dt { NSMutableArray *projectilesToDelete = [[NSMutableArray alloc] init]; for (CCSprite *projectile in _projectiles) { CGRect projectileRect = CGRectMake( projectile.position.x - (projectile.contentSize.width/2), projectile.position.y - (projectile.contentSize.height/2), projectile.contentSize.width, projectile.contentSize.height); NSMutableArray *targetsToDelete = [[NSMutableArray alloc] init]; for (CCSprite *target in _targets) { CGRect targetRect = CGRectMake( target.position.x - (target.contentSize.width/2), target.position.y - (target.contentSize.height/2), target.contentSize.width, target.contentSize.height); if (CGRectIntersectsRect(projectileRect, targetRect)) { [targetsToDelete addObject:target]; } } for (CCSprite *target in targetsToDelete) { [_targets removeObject:target]; [self removeChild:target cleanup:YES]; } if (targetsToDelete.count > 0) { [projectilesToDelete addObject:projectile]; } [targetsToDelete release]; } for (CCSprite *projectile in projectilesToDelete) { [_projectiles removeObject:projectile]; [self removeChild:projectile cleanup:YES]; } [projectilesToDelete release]; } I am trying to take away the projectiles and have the app know when the CCSprite "Player" and the targets collide. Could someone help me with this? Thanks

    Read the article

  • Updating large icon in iTunes Connect

    - by Shaggy Frog
    Just wanted to see if I understand properly how/when one can change the "Large icon" for their iOS app in iTunes Connect. Questions are in bold below. To start, first the facts (as I gather) from version 6.6 of the iTC guide (March 2, 2011): The Large Icon is a "locked" piece of version information "You will only be permitted to edit Locked version information when your app is in an Editable state" The "Editable" states are: Prepare For Upload Waiting For Upload Waiting For Review Waiting For Export Compliance Upload Received Rejected Developer Rejected Invalid Binary Missing Screenshot Am I missing anything up until this point? If not, then am I correct to say that the only time I can change an app's Large Icon is when I update the application? Here's a more specific use case: My app is currently on sale, version 2.0 I have version 2.1 ready, and I want the update to coincide with a sale, so I also put a "SALE" banner on top of my large icon (what most devs are doing) I have to upload this "SALE" Large Icon when I upload the binary. If I wait until it's been reviewed, it's too late, and I'll have developer-reject the binary so I can fix it. Is this correct? Say I want the sale to last a week. So at the end of that week, I'll want to switch my Large Icon back to the pre-"SALE" version. Will I necessarily have to upload a new binary at that time? (Also posted on the Developer Forums, but it's getting no love there...)

    Read the article

  • What is the correct and most efficient approach of streaming vertex data?

    - by Martijn Courteaux
    Usually, I do this in my current OpenGL ES project (for iOS): Initialization: Create two VBO's and one IndexBuffer (since I will use the same indices), same size. Create two VAO's and configure them, both bound to the same Index Buffer. Each frame: Choose a VBO/VAO couple. (Different from the previous frame, so I'm alternating.) Bind that VBO Upload new data using glBufferSubData(GL_ARRAY_BUFFER, ...). Bind the VAO Render my stuff using glDrawElements(GL_***, ...); Unbind the VAO However, someone told me to avoid uploading data (step 3) and render immediately the new data (step 5). I should avoid this, because the glDrawElements call will stall until the buffer is effectively uploaded to VRAM. So he suggested to draw all my geometry I uploaded the previous frame and upload in the current frame what will be drawn in the next frame. Thus, everything is rendered with the delay of one frame. Is this true or am I using the good approach to work with streaming vertex data? (I do know that the pipeline will stall the other way around. Ie: when you draw and immediately try to change the buffer data. But I'm not doing that, since I implemented double buffering.)

    Read the article

  • Strange and erratic transformations when using OpenGL VBOs to render scene

    - by janoside
    I have an existing iOS game with fairly simple scenes (all textured quads) and I'm using Apple's "Texture2D" class. I'm trying to convert this class to use VBOs since the vertices of my objects basically never change so I may as well not re-create them for every object every frame. I have the scene rendering using VBOs but the sizes and orientations of all rendered objects are strange and erratic - though locations seem generally correct. I've been toying with this code for a few days now, and I've found something odd: if I re-create all of my VBOs each frame, everything looks correct, even though I'm almost certain my vertices are not changing. Other notes I'm basing my work on this tutorial, and therefore am also using "IBOs" I create my buffers before rendering begins My buffers include vertex and texture data I'm using OpenGL ES 1.1 Fearing some strange effect of the current matrix GL state at the time of buffer creation I've also tried wrapping my buffer-setup code in a "pushMatrix-loadIdentity-popMatrix" block which (as expected) had no effect I'm aware that various articles have been published demonstrating that VBOs may not help performance, but I want to understand this problem and at least have the option to use them. I realize this is a shot in the dark, but has anyone else experienced this type of strange behavior? What might I be doing to result in this behavior? It's rather difficult for me to isolate the problem since I'm working in an existing, moderately complex project, so suggestions about how to approach the problem are also quite welcome.

    Read the article

  • Is this technique for stat tracking without a database workable?

    - by baptzmoffire
    If I wanted to create a chess game, for iOS, that tracked both player moves (for retracing the progression of a game and for player stats), what would be the simplest route to take? To clarify, I want to track not only the moves a player has made in a particular game, but how often that player has made that move in past games. For example I want to be able to track: How many times a given player has opened by moving the king pawn up two squares (e4) as white, on move number one. What is the percentage of time the player responds to white's e4 opening move, with moving his own king pawn to e5? What percentage of time does he respond by moving his queenside bishop pawn to c5? And so on. If it's not clear, the stat tracking system should also be able to report how many times this player, as black, move his queen to h1, on move number 30. I'm using Parse.com for my back-end as a server (BaaS) service. If I were to create a class that writes strings that identify move number, player color, moved piece, algebraic notation of the square (e.g. "d8") to a file, locally in the file system saves the file to Parse, and deletes the temporary file from file system upon opening the same game in my tableview (a la a "With Friends" game), download this file from Parse, parse through it and retrieve all stats/history, assign all relevant values to variables Is this plan viable, or is there an easier way?

    Read the article

  • Ad Service That Lets You Choose Your Ad, and Then Some [on hold]

    - by user3634450
    I'm trying to build an app for both Android and/or iOS where part of the gameplay actually involves ads as a texture. I need to be able to choose which ads I would like to use. I need to be able to be able to identify the ads (which if I can choose which ads show up in the app shouldn't be that hard). I need to be able to swap in and out new ads on what could possibly be a daily basis (and don't want to have to update the app to do it). And as if that wasn't too needy a list, I need to be able to load 50 ads from the pool of ads I deem fit, all to each and every user of the app at least every couple of days. I don't care if the ads pay, I'm not looking for clicks, but I don't want to have to make 50 fake ads every couple of days, from an "artistic" level I don't want the content to feel phony or fake, and I don't really have a way to load content to each user via some internet source (if anyone could name one that would be great). I'm not sure what kind of ad provider would like or even approve of this, in fact just what I've described might be against Google Play's or iTunes' content developer policies, but if anyone could give me any advice to steer me in the right direction it would be greatly appreciated, thank you.

    Read the article

  • Offset Forward vector of object based on Rotation

    - by Taylor
    I'm using the Bullet 3D physics engine in a iOS application running openGL ES 1.1 Currently I'm accepting info from the gyroscope to allow the user to "look around" a 3d world that follows a bouncing ball (note: it only takes in the yaw to look around 360 degrees). Im also accepting information from the accelerometer based on the tilt to push the ball. As of right now, to move forward, the user tilts the devise forward (using the accelerometer); to move to the right, the user tilts the devise to the right and so on. The forward vector is currently along it's local Z-axis. The problem is that I want to change the ball bounce based on where the user has changed the view. If I change the view, the ball bounces in the fixed direction. I want to change the forward facing direction so that when a user changes the view (say to the look at the right of the world, the user rotates the device), tilting the devise forward will result in a forward force in that direction. Basically, I want the forward vector to take the rotation into consideration. Sorry if I didn't explain the issue well enough, its kind of confusing to write down.

    Read the article

  • Are there any significant advantages to using a native language for mobile app development?

    - by Karl Daniel
    Forgive me if this question has already been answered but I couldn't quite find the answer I was looking for. What I wanted to know was, is there any significant advantage to using a native language when developing and deploying apps to a mobile environment? The reason I ask is for a long while now I've been using Objective-C, Apple's native language for iOS, to build my apps. However I've been wondering whether or not there is any real benefit to doing this, over using a non-native language like JavaScript and then deploying it through a service like 'Phone Gap'? I do stress 'significant' advantages as native languages are always more likely to have the upper hand when it comes to speed and access to the latest APIs. However in general I don't see using a non-native language or a service like 'Phone Gap' causing and major slow down to my apps or restricting my development. Additionally having the ability to deploy to multiple services is also very handy indeed. This is why I put the question, are there any significant advantages to using a native language for mobile app development?

    Read the article

  • Weird UIView transforms in Retina iPhone

    - by ggambett
    I'm having a problem I don't understand. I'm developing an OpenGL app for iOS. Because at some points I want to force the orientation of the view programatically, and Apple for whatever reason doesn't make it easy (or even possible), I'm doing it by hand. I return always NO in shouldAutoRotateToInterfaceOrientation, and when I want to change the orientation (to portrait, for example), I do something like this in the UIView: [self setTransform:CGAffineTransformMake(1, 0, 0, 1, 0, 0)]; [self setBounds:CGRectMake(0, 0, 768, 1024)]; This works fine. In order to support Retina devices, I started checking [UIScreen mainScreen].scale, and setting self.contentScaleFactor accordingly. I also modified the code above to account for the new dimensions, like this: [self setTransform:CGAffineTransformMake(1, 0, 0, 1, 0, 0)]; [self setBounds:CGRectMake(0, 0, 2*768, 2*1024)]; Same rotation, different size. The weird result with this is that I get a "screen" with the right size, but offsetted half a screen to the bottom and the left. To correct for this, I need to do the following: [self setTransform:CGAffineTransformMake(1, 0, 0, 1, 0, 0)]; [self setBounds:CGRectMake(-768, -1024, 2*768 - 768, 2*1024 - 1024)]; This works, but it's ugly, I also need to make similar corrections when I get touch coordinates, and worst of all, I don't understand what's going on or why the above "correction" works. Can anyone shed some light on this issue?

    Read the article

  • How to prevent one account from unlocking products on other devices using Apple StoreKit?

    - by reapz
    We are currently wrapping up a free-to-play game on iOS in which you can purchase non-consumable products. We have been discussing this case internally and are not quite sure what the best practices are as this is our first title. For example, if a user downloads our app, and makes some purchases. These can be restored should the app ever be deleted and reinstalled as long as the user uses the same Apple ID. What is to stop him from making a fake Apple account, purchasing items and then posting this account on the web allowing everyone to get the items for free? That is obviously a worst case situation. But a smaller case would be a user unlocking items for his friends. We do not want this to be an always online game but have considered doing a check on startup if there is internet available. If the currently logged in account doesn't own the products do we lock them again? Probably not because people may simply sign into the device with different Game Center logins at which point we don't want to constantly lock and unlock items. At some point we will be adding multiplayer at which point we can definately do a check with the currently logged in account. This is because A, they will be online when attempting multiplayer, and B, they will want to use their own account for multiplayer. Unfortunately we aren't quite ready for this yet. Has anyone tackled this issue. Are we overthinking here?

    Read the article

  • What is the best way to store meshes or 3d models in a class

    - by Robse
    I am wondering, how I should store my mesh into memory after loading it from whatever file. I have Questions floating in my head: Should a mesh could have sub meshes or does the 3d model just store a list of meshes all on the same level Is there one material assigned to one mesh 1:1? What do I have to consider, if I want to store skeletal animations? Btw it's a OpenGL|ES2 iOS game using GLKit. I came up with some basic struct types: (But I think they are way to simple and I need to add padding or change the vector3 to vector4.) typedef union _N3DShortVector2 { struct { short x, y; }; struct { short s, t; }; short v[2]; } N3DShortVector2; typedef union _N3DShortVector3 { struct { short x, y, z; }; struct { short r, g, b; }; struct { short s, t, p; }; short v[3]; } N3DShortVector3; typedef GLKVector3 N3DFloatVector3; typedef struct _N3DMeshRecordSV3 { N3DShortVector3 v1, v2, v3; } N3DMeshRecordSV3; typedef struct _N3DMeshRecordSV3FN3ST2 { N3DShortVector3 v1, v2, v3; N3DFloatVector3 n1, n2, n3; N3DShortVector2 t1, t2, t3; } N3DMeshRecordSV3FN3ST2;

    Read the article

  • Need ideas on how to give my levels structure

    - by akuritsu
    I am making an iOS game for a project at school. It is going to be a tiny bit like Fruit Ninja, as in it will have different things on the screen, and when you hit them, they die, and you get points. The trouble is that unlike Fruit Ninja, my game will have different types of sprites, all doing different things (moving different places, doing different things, etc). The one thing that is bad about having all of these sprites that do different things is that it is hard for them to look neat on the screen all together. I was planning on having a couple of different gamemodes: Time Trial You have 120 seconds to kill as many sprites as possible. Survival You have three lives, every time you try to hit a sprite and miss, you lose a life. ???? Whatever I think of. I am a rookie to game design in general, and I don't know the best way to make my game look good, and play well. I could have all of these sprites on the screen at the same time, or I could have them come in waves, for example 10 of sprite_a come on, and once they are killed, 10 of sprite_b come on, etc... Please give me your opinion about which one I should code. If you have any other suggestions for either a third gamemode, or a completely different way to make the levels, feel free to tell me.

    Read the article

  • MVC design patterns

    - by insane-36
    I have an application and it does not use a very good structure. However it seems to me that I have tried to stick to mvc design pattern but a senior engineer claims that I have no design patterns and code are mesh. How I have structured the code : I have couple of nsmanagedobject model classes which represents model in my case and a reskit library which encapsulates the nsurlconnection and url request. I fetch the request from the view controller itself and then when the request get completed I create predicate and then populate it in tableview. Wherever I need custom view either I create it in nib or create in a custom subclass of UIView. I have use delegation pattern and notification to communication to view controller, views and block callback with restkit. But, the senior engineer is very new to ios. He has been doing it for 2 months now but he is a good java programmer. So, what is mvc pattern ? Is core data model not working as a model objects, view controller as controller and views. I dont seem to find any other places or any other cases to create my own model object since the most of the models are used as NSManagedObject subclass.

    Read the article

  • colliding btRigidBody objects behave strangely when moving slowly

    - by Piku
    I'm trying to use Bullet Physics in my iOS game. The engine appears to be correctly compiled in that the demos work fine. In my game I have the player's ship and some enemy ships. They're defined as btRigidBody objects and btCollisionObjects and I'm using btSphereShapes for collision. At 'fast' speeds, collisions appear to happen sensibly - things collide and nothing goes 'weird'. If the speeds are very slow though and the player's ship touches a non-moving object the collision happens, but then the player's ship moves at incredible speed over the next few frames and appears a long distance from where it collided - completely out of proportion to the speed it was moving before impact. To move the things around I'm using setLinearVelocity() each frame, ticking the physics engine, then using getMotionState() to update the rendering code I have. Part of the issue might be I don't quite understand how to set the correct mass or what the best speeds are to use for anything. I'm mostly sticking numbers in and seeing what happens. Should I be using Bullet in this way, and are there any guidelines for deciding on the mass of objects? (am I right in assuming that in collisions heavier objects will force lighter objects to move more)

    Read the article

  • Game with changing logic

    - by rsprat
    I'm planing to develop a puzzle like mobile game (android/ios) with a different logic for each puzzle. Say, for example one puzzle could be a Rubik's cube and another one a ball maze. Many more new puzzles will appear during the life of the game, and I want the users to be able to play those new puzzles. The standard way for managing this would be through application updates. Each time a new puzzle or bunch of puzzles appear, create a new update for the app that the user can download. However, I would like to do it in a more transparent way. When a new puzzle appears, the basic info of the puzzle would be displayed in the app menu, and the user would be able to play it by just clicking it. What comes to my mind is that the app would automatically download a .dll or .jar and inject it in the application at runtime. Is that even possible? Are there any restrictions from the OS? Is there a better way for solving it? Thanks alot

    Read the article

  • The model to sell apps on App Store is better with a paid only version?

    - by ????
    Rob Napier, the author of iOS 5 Programming Pushing the Limits, mentioned there are several models of selling apps on the App Store: Write an app and sell it Publish a free and a full version Ad supported by third party or by iAd In App purchase Surprisingly, the author said that the most workable model is (1) in terms of sales. I would think that (2) with fairly limiting ability for the free version can bring more sales, as people without trying, might not plunge down $0.99 or $1.99 for something they haven't tried? I for one, might not have purchased Angry Birds if I didn't try their free version first. Also, I think it also depends on the situation: if the app is about alarm clock, and there are already 5 alarm clocks in App Store that are free, then your app that is $0.99 might not be that eagerly purchased. If yours is also free, and users really like it out of all the other ones, then they may think, $0.99 is nothing to get a good alarm clock, and gladly pay you the $0.99 in exchange for a full version of the alarm clock, something that they can't get with the free version. (such as the full version can let you choose a song from your Music Library for the alarm). Could (1) work only if the user definitely want it and have no substitute? How might it work the best?

    Read the article

  • Real-Time Multi-User Gaming Platform

    - by Victor Engel
    I asked this question at Stack Overflow but was told it's more appropriate here, so I'm posting it again here. I'm considering developing a real-time multi-user game, and I want to gather some information about possibilities before I do some real development. I've thought about how best to ask the question, and for simplicity, the best way that occurred to me was to make an analogy to the field (or playground) game darebase. In the field game of darebase, there are two or more bases. To start, there is one team on each base. The game is a fancy game of tag. When two people meet out in the field, the person who left his base most recently timewise captures the other person. They then return to that person's base. Play continues until everyone is part of the same team. So, analogizing this to an online computer game, let's suppose there are an indefinite number of bases. When a person starts up the game, he has a team that is located at, for example, his current GPS coordinates. It could be a virtual world, but for sake of argument, let's suppose the virtual world corresponds to the player's actual GPS coordinates. The game software then consults the database to see where the closest other base is that is online, and the two teams play their game of virtual tag. Note that the user of the other base could have a different base than the one run by the current user as the closest base to him, in which case, he would be in two simultaneous battles, one with each base. When they go offline, the state of their players is saved on a server somewhere. Game logic calls for the players to have some automaton-logic of some sort, so they can fend for themselves in a limited way using basic rules, until their user goes online again. The user doesn't control the players' movements directly, but issues general directives that influence the players' movement logic. I think this analogy is good enough to frame my question. What sort of platforms are available to develop this sort of game? I've been looking at smartfoxserver, but I'm not convinced yet that it is the best option or even that it will work at all. One possibility, of course, would be to roll out my own web server, but I'd rather not do that if there is an existing service out there already that I could tap into. I will be developing for iOS devices at first. So any suggestions would be greatly appreciated. I think I need to establish the architecture first before proceeding with this project. Note that darbase is not the game I intend to implement, but, upon reflection, that might not be a bad idea either.

    Read the article

  • Rendering Texture Quad to Screen or FBO (OpenGL ES)

    - by Usman.3D
    I need to render the texture on the iOS device's screen or a render-to-texture frame buffer object. But it does not show any texture. It's all black. (I am loading texture with image myself for testing purpose) //Load texture data UIImage *image=[UIImage imageNamed:@"textureImage.png"]; GLuint width = FRAME_WIDTH; GLuint height = FRAME_HEIGHT; //Create context void *imageData = malloc(height * width * 4); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmapContextCreate(imageData, width, height, 8, 4 * width, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGColorSpaceRelease(colorSpace); //Prepare image CGContextClearRect(context, CGRectMake(0, 0, width, height)); CGContextDrawImage(context, CGRectMake(0, 0, width, height), image.CGImage); glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, imageData); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); Simple Texture Quad drawing code mentioned here //Bind Texture, Bind render-to-texture FBO and then draw the quad const float quadPositions[] = { 1.0, 1.0, 0.0, -1.0, 1.0, 0.0, -1.0, -1.0, 0.0, -1.0, -1.0, 0.0, 1.0, -1.0, 0.0, 1.0, 1.0, 0.0 }; const float quadTexcoords[] = { 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0 }; // stop using VBO glBindBuffer(GL_ARRAY_BUFFER, 0); // setup buffer offsets glVertexAttribPointer(ATTRIB_VERTEX, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), quadPositions); glVertexAttribPointer(ATTRIB_TEXCOORD0, 2, GL_FLOAT, GL_FALSE, 2*sizeof(float), quadTexcoords); // ensure the proper arrays are enabled glEnableVertexAttribArray(ATTRIB_VERTEX); glEnableVertexAttribArray(ATTRIB_TEXCOORD0); //Bind Texture and render-to-texture FBO. glBindTexture(GL_TEXTURE_2D, GLid); //Actually wanted to render it to render-to-texture FBO, but now testing directly on default FBO. //glBindFramebuffer(GL_FRAMEBUFFER, textureFBO[pixelBuffernum]); // draw glDrawArrays(GL_TRIANGLES, 0, 2*3); What am I doing wrong in this code? P.S. I'm not familiar with shaders yet, so it is difficult for me to make use of them right now.

    Read the article

  • Strategy for avoiding duplicate object ids for data shared across devices using iCloud

    - by rmaddy
    I have a data intensive iOS app that is not using CoreData nor does it support iCloud synching (yet). All of my objects are created with unique keys. I use a simple long long initialized with the current time. Then as I need a new key I increment the value by 1. This has all worked well for a few years with the app running isolated on a single device. Now I want to add support for automatic data sync across devices using iCloud. As my app is written, there is the possibility that two objects created on two different devices could end up with the same key. I need to avoid this possibility. I'm looking for ideas for solving this issue. I have a few requirements that the solution must meet: 1) The key needs to remain a single integral data type. Converting all existing keys to a compound key or to a string or other type would affect the entire code base and likely result in more bugs than it's worth. 2) The solution can't depend on an Internet connection. A user must be able to run the app and add data even with no Internet connection. The data should still resolve properly later when the data syncs through iCloud once a connection is available. I'll accept one exception to this rule. If no other option is available, I may be open to requiring an Internet connection the first time the app's data is initialized. One idea I have been toying around with in my head is logically splitting the integer key into two parts. The high 4 or 5 bits could be used as some sort of device id while the rest represents the actual key. The fuzzy part is figuring out how to come up with non-conflicting device ids that fit in a few bits. This should be viable since I don't need to deal will millions of devices. I just need to deal with the few devices that would be shared by a given iCloud account. I'm open to suggestions. Thanks.

    Read the article

  • Instanced drawing with OpenGL ES 2.0

    - by Mårten Wikström
    In short: Is it possible to use the gl_InstanceID built-in variable in OpenGL ES 2.0? And, if so, how? Some more info: I want to draw multiple instances of an object using glDrawArraysInstanced and gl_InstanceID, and I want my application to run on multiple platforms, including iOS. The specification clearly says that these features require ES 3.0. According to the iOS Device Compatibility Reference ES 3.0 is only available on a few devices (those based on the A7 GPU; so iPhone 5s, but not on iPhone 5 or earlier). So my first assumption was that I needed to avoid using instanced drawing on older iOS devices. However, further down in the compatibility reference document it says that the EXT_draw_instanced extension is supported for all SGX Series 5 processors (that includes iPhone 5 and 4s). This makes me think that I could indeed use instanced drawing on older iOS devices too, by looking up and using the appropriate extension function (EXT or ARB) for glDrawArraysInstanced. I'm currently just running some test code using SDL and GLEW on Windows so I haven't tested anything on iOS yet. However, in my current setup I'm having trouble using the gl_InstanceID built-in variable in a vertex shader. I'm getting the following error message: 'gl_InstanceID' : variable is not available in current GLSL version Enabling the "draw_instanced" extension in GLSL has no effect: #extension GL_ARB_draw_instanced : enable #extension GL_EXT_draw_instanced : enable The error goes away when I specifically declare that I need ES 3.0 (GLSL 300 ES): #version 300 es Although that seem to work fine on my Windows desktop machine in an ES 2.0 context I doubt that this would work on an iPhone 5. So, shall I abandon the idea of being able to use instanced drawing on older iOS devices?

    Read the article

  • Static IP on FEDORA12 from Virtualbox

    - by Diego Castro
    I'm trying to get my FEDORA12 to have an STATIC IP - inside virtualbox - inside Ubuntu Let me rephrase that. I have an Ubuntu 9.04 system with vitualbox and a FEDORA12 vm there and I would like to put the fedora with an STATIC IP (amahi needs it), but I'm getting stuck... I'm using NAT (if that's any help) I tryid a few tutorials, but no go. I'm kind of new to the *nix world but I'm old school on M$ Edit: Screenshots UBUNTU 9.04 (host that has the vm) hxxp://pic.imagefap.com/images/full/43/154/1548751086.jpg FEDORA hxxp://pic.imagefap.com/images/full/43/205/2050216515.jpg hxxp://pic.imagefap.com/images/full/43/118/1182276176.jpg (sory cant post pics... not enough rep)

    Read the article

  • Static IP on FEDORA12 from Virtualbox

    - by Krazy_Kaos
    I'm trying to get my FEDORA12 to have an STATIC IP - inside virtualbox - inside Ubuntu Let me rephrase that. I have an Ubuntu 9.04 system with vitualbox and a FEDORA12 vm there and I would like to put the fedora with an STATIC IP (amahi needs it), but I'm getting stuck... I'm using NAT (if that's any help) I tryid a few tutorials, but no go. I'm kind of new to the *nix world but I'm old school on M$ Edit: Screenshots UBUNTU 9.04 (host that has the vm) FEDORA (sory cant post pics... not enough rep) INFO: GUEST WITH STATIC: IFCONFIG: eth0 Link encap:Ethernet HWaddr 08:00:27:35:CC:DE inet addr:192.168.1.55 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe35:ccde/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7 errors:0 dropped:0 overruns:0 frame:0 TX packets:2764 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:574 (574.0 b) TX bytes:127121 (124.1 KiB) Interrupt:11 Base address:0xc020 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1856 errors:0 dropped:0 overruns:0 frame:0 TX packets:1856 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:181587 (177.3 KiB) TX bytes:181587 (177.3 KiB) NETSTAT -NR: Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 GUEST WITH DHCP: IFCONFIG: eth0 Link encap:Ethernet HWaddr 08:00:27:35:CC:DE inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe35:ccde/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:105 errors:0 dropped:0 overruns:0 frame:0 TX packets:2966 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:49787 (48.6 KiB) TX bytes:149969 (146.4 KiB) Interrupt:11 Base address:0xc020 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1903 errors:0 dropped:0 overruns:0 frame:0 TX packets:1903 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:185931 (181.5 KiB) TX bytes:185931 (181.5 KiB) NETSTAT -NR: Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 PS.: I'm still trying to workout the sudoer file to be able to exec the iptables command

    Read the article

  • Static IP on FEDORA12

    - by Diego Castro
    I'm trying to get my FEDORA12 to have an STATIC IP - inside virtualbox - inside Ubuntu Let me rephrase that. I have an Ubuntu 9.04 system with vitualbox and a FEDORA12 vm there and I would like to put the fedora with an STATIC IP (amahi needs it), but I'm getting stuck... I'm using NAT (if that's any help) I tryid a few tutorials, but no go. I'm kind of new to the *nix world but I'm old school on M$

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >