Running not the same app I'm debugging? - iphone

Weird stuff happening. I'm developing an iOS app under iOS 4.2 using Xcode 3. I have the same app in two different folders and they have different xib files (because of two different languages of resources). When I'm firing up to study console logs I'm getting the other one app on device - not the one I have opened at the time... sometimes it even gets weirder: I'm starting app A, but I see on my iPhone (4S btw) intro from version A and menu from B... Meanwhile both were succesfully installed onto device, so I can manually use them separately - but not while running from Xcode.
edit: these two apps have different bundle id and names

two things:
Clean before building (Shift-Cmd-K)
The reason the other version opens on your iPhone when you build your app is that they are both sharing the same Bundle Identifier (CFBundleIdentifier) in info.plist

Related

Xcode wont allow 2 projects on my phone at a time.?

I've been working on a few apps and now when I run them on my iPhone, Xcode will only let one app be on my phone at a time, and if I load up another app in xcode, and try to run it, it kind of over writes the first app instead of haveing two apps on.
Have I done something wrong or is this the new Xcode and iOS6 to stop piracy?
No, the apps probably have the same bundle identifier. I'd check your project settings to make sure each app has a unique bundle identifier.

iPhone Dev, 3G Testing Device Launch Failures After App Rename and Upgrade to XCode 4

I have an iPhone app in the app store that I wanted to rename and make universal. I have done all the work for the rename (renamed the PRODUCT_NAME, not the binary identifier) and adding iPad support. Everything was running great on my iPad 2 (4.3.3) and my iPhone 4G (4.3.3). Before I packaged it up, I ran a test on my iPhone 3G (3.0).
I cannot get my app to launch properly on the 3G. When the app launches, the launch screen is displayed as it should be. The screen then goes to black with the status bar on the very top, like it has loaded a black nib or something. There are no error codes whatsoever -- nothing in the console, nothing in a pop up. The application does not even reach the "applicationDidFinishLaunchingWithOptions" method of my appDelegate. The application doesn't crash, either. It just sits there like it's waiting on input from a user, but like I said the application hasn't even finished launching.
The only things that have changed since the last time I tested on the old 3G (which was the last time I updated my app) are the application rename and the upgrade to XCode 4 w/base SDK 4.3.
In my XCode Scheme drop down, it does say: iPhone (3.0, Overriding Base SDK to 4.3). I don't know if that is inadvertently causing this hangup? I am running Xcode 4 with base SDK 4.3. The target deployment is 3.0.
Has anyone encountered anything like this? I would appreciate all insight and advice to the situation. So far I have deleted the application from my device, clean/build Xcode, delete Xcode build folder, delete and reinstall all provisioning profiles, reboot of device and XCode numerous times.
Thanks,
Brandie
As far as I have been able to determine the BEST solution (not the easiest) is to make a new project with the new project name and copy your files. Changing the PRODUCT_NAME gave me wierd results and I said "forget it, let's do it by the book".
If there is an easier solution, I have yet to find it and, frankly, given it takes me about 30 minutes (I've changed the name of an app 4 times - mostly because of name length), it causes me the least amount of grief.

Running blackberry app into multiple emulators at the same time

I am developing a blackberry application and I'm trying to get to devices to communicate. I am trying out the SocketDemo app and it shed light into the socket process (which is no different from any other platform so far).
Only problem is I can't test the app since I can't get the app into two different emulators. How do I accomplish this?
If you do not need to hook the second simulator into the debugger (for breakpoint setting, etc), then getting your application to run simultaneously on two simulators can be done fairly easily.
Build your application, and run it from the JDE; standard procedure.
Then, outside the JDE, start another simulator (it cannot be the same one), and, when that's up and running, choose FILE->LOAD JAVA APPLICATION from the second simulator's window menu. Select the .COD of the application you just built. The application will then be installed onto the second simulator, and will either start automatically, or you can start it by clicking on its icon (depending on how your project is set up).
With two simulators on the same machine, with applications that need to communicate through the network, it may be needed to change the ports in the .BAT file that launches the second simulator, before starting it -- otherwise, the second simulator may not be able to bind to the same ports on the machine.
Indeed, with some simulator models, you will not be able to do this unless the second simulator is from a different simulator package (different directory), because the process grabs a lock when it runs.
If you are using a built-in simulator package that only contains one simulator, you can download a second simulator, ideally a different model, from RIM's developer site: http://www.blackberry.com/developers/downloads/simulators/
Have you tried installing different JDE's and trying to run emulators from them?

How to get multiple targets into one binary for app store submission?

I have split my iPhone app into two targets one for the ipad and one for the iphone. When I upload to the appstore I can only have one binary. But I have two targets?
I think I am missing a step. Thanks in advance for any help.
A "target" encompasses all of the instructions that Xcode uses to build your app.
You can have two targets inside of one binary, although this is not always done. This is how Universal Binaries are made. The two apps are bundled together inside of one binary. If you open up a Mac app "bundle" you will notice a few meta files, like icons and such, and there will be the actual compiled binary code. An iOS Universal Binary has both apps inside of it.
(If you watch your compilation carefully, you'll notice that Xcode actually builds your app twice. It does one build for iPhone/iPod and one for iPad.)
Provided that your Xcode project is set up properly, you will get the intended results.
The binary will be fine, the "targets" refer to what runs when it is run on an iPhone vs iPad. If the project is setup correctly for universal it should work fine.

2 iPhone apps messed up when deploy to iPhone

I have 2 iPhone apps and want to deploy to iphone and somehow the second app rewrote the first app on my iPhone.
The second app project was copied from the first app and I made some changes including renaming the app name etc.
I believe there might be some files messed up due to the shared path. Can anyone shed some light on this issue?
You need to make sure that the two application's bundle identifiers are different, otherwise they will be treated as different versions of the same app.
Look for the CFBundleIdentifier (Bundle Identifier) key in your application's Info plist. Make sure this is different for each application.