Fake carrier string in 4.3.2 iPhone simulator - iphone

I'm trying to change the fake carrier name in the iPhone simulator as illustrated in the link:
http://www.cocoadevnation.com/2009/11/15/change-iphone-simulator-carrier-string/
The problem is I can do it on the 4.0 iOS simulator but on successive iOS versions (say at least 4.3) apparently this trick is not working any more.
Any of you know how to make it work?

Actually the problem does have a solution -- it's just changed. The information for the carrier is now read from the Springboard.strings file, located at
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator60.sdk/System/Library/CoreServices/SpringBoard.app/English.lproj/SpringBoard.strings
Note the simulator version part of this path will differ according to the version of XCode you are using -- I'm using 4.5. Note also that the default configuration for this file is binary but you can convert to XCode-editable-form with
plutil -convert xml1 Springboard.strings
Once you've done that, edit and change the value for the key SIMULATOR_CARRIER_STRING to what you want to use. You can use this same technique for non-EN languages--just edit the appropriate .../<lang.lproj>/Springboard.strings file.

I wrote a Python script based on krausefx's answer from another thread on the same topic.
It allows you to change the carrier name for certain or all languages with just a short call from the command line. You can also restore all of them to the default. I hope you enjoy it.
PS: It's iOS 7 only but could easily be changed to work with iOS 6.

For anyone interested, I found out that starting from the iOS 4.2 version, the iPhone simulator does not honor SBFakeCarrier nor SBFakeTime and SBFakeTime preferences.
So the problem has no solution.

Related

Newbie: Errors in an iPhone app

I'm really newbie in iOS and I have to handle a complicated situation. I was given an iPhone app developed by someone and I have to make it work. The guy who developed it has told me that it worked, but sometimes crashed in an iPhone. I've never developed using iOS and I don't really know how this app works.
Well, when I open the app with Xcode, the first problem that I detect is some errors with the references. The app uses the project CorePlot-CocoaTouch.xcodeproj. I've added again this project and solved the references (I've followed some other posts like this one: http://www.jaysonjc.com/programming/pie-chart-drawing-in-iphone-using-core-plot-library.html).
I want to test it with the simulator (I don't have an iPhone yet). I have a doubt here...should I use iOS Device, or iOS Simulator as Base SDK? Firstly I chose iOS Simulator, but it appeared a problem with Cocoa.framework (it turned into red).
Anyway, using iOS Device as Base SDK, I build the project and it says "Build failed (59 errors, 3 warnings)". I check out the errors, and most of them are "Expected specifier-qualifier-list before ..."
Can anyone help me? This is more or less the situation, but I can provide more specific details if they're needed.
I'm sorry if I'm talking about something really basic, but I've been trying to solve it for 2 weeks and I give up. I've tried to talk to the guy, but he's not really helpful..
Thanks for the replies!
By the way, I didn't say it and I don't know if it's relevant or what it means. The guy has a directory called "Libraries" where it's stored the CorePlot. The files there are the same than if you download the CorePlot project from other source. The only exception is a folder called "SDKBuild", which contains files like "build.sh", "iphoneos-SDKSettings.plist" or "iphonesimulator-SDKSettings.plist". I'm really newbie, so it's probably obvious, but I have no idea...
just try to add CocoaTouch framework to your project.
and for base SDK use "latest iOS".
Right click on the project name in 'group & files' set on the left of xcode. Choose add -> Existing Frameworks.
Find Cocoa.framwork and click add. Do this to all red colored framework.
Choose IOS Simulator as base SDK.
Try run it..
If you want to run the app on simulator, you have to build with iOS simulator. The base SDK basically sets the OS version (this will be the same regardless of whether you are running the app on simulator or device). You should be chaining the build settings to device only if the device is connected and if you have installed the appropriate provisioning profiles.

Core Location Simulator on Xcode 4.2 Not Working -Any Clues?

I checked all the other variants of this, and don't see the answer here. It seems a lot of folks are thinking of Xcode 4.1, and the issues therein.
First of all, I am very happy with Xcode 4.2. It fixes the huge plethora of problems I was having, and, once again, makes the simulator a useful tool. I am very glad for this, because it is a MUCH faster workflow than using the devices.
Now, 4.2 introduces something in their Edit Scheme dialog (Go to the "Run" page, then "Options"). This is called "Core Location [checkbox] Allow Location Simulation". It allows you to pick from a list of pre-defined locations.
This seems to obviate the horrendous hack that I had introduced when I first encountered the issue in Lion.
However, it no workee. I'd like to find out what I am doing wrong. Has anyone gotten this working?
Remember: THIS BEGINS IN 4.2, WHICH JUST CAME OUT YESTERDAY. So the rules from 4.0 and 4.1 don't apply. It is a new capability.
Thanks!
First, I created the GPX file as mentioned in this question.
In addition to updating the Run Scheme to select the Allow Location Simulation option and specifying the Default Location as you mentioned, you also need to make sure that your Scheme is set to iPhone 5.0 Simulator. This made the trick for me, when I debug my project, the app asks me if I want to allow it to use my current location, and I can see the Debug -> Location menu in the iPhone Simulator.
There's a thread on this bug in the Apple developer forums. One suggestion is to reset the simulator.

iOS. Two versions of the same program are mixing when i compile first version after the second one

I use xCode 4.0.2, an iPhone 3 (device) with jailbreak (iOS 4.2.1), mac os 10.6.8 (not an apple computer).
I have 2 versions of my software: 0_10 and 0_11 (the second one was received by copying the folder of the first one, then I changed the folder name and make some additional code for it).
Through some time i have found out that i cannot put the text into a textfield in the second version (i still dont know why). If I fully delete the first version and then install the second one then textField in second version doesnt work. If I hadn't done this before my second version shows some signs of the first one (and even textField can work).
So the question is how to evade this version mixing? Maybe is anybody know how to automate the full deleting of the program from a device without of doing this manually?
if this is just for testing purposes then just change the bundle identifier in one of the project's info.plist file. This will install the different versions as two separate apps, although i have no experience with jail broken devices so I'm not sure if there will be any conflicts.

Will old source code run with SDK 4.2?

I've been working on creating my own iPhone app with source code my company gave me. This code was created with iPhone SDK 3.0. I've worked on it for over a year (I'm a designer so my coding is mostly copy and paste) and to test the app on my iPhone it says I must update my SDK to 4.2. I'm wondering will this break my app? I probably don't have the skills in xcode to upgrade my code if I am required to rewrite parts.
Thanks,
Chris
If none of the code has been deprecated, changed or even removed, chances are good it still runs fine. Most projects run, and if you have used external code (and hopefully noted where you got it from) there might be an update available for that piece of code.
Just set the deployment target to iOS 3.0 in your project settings
here some little explanation: link

iPhone Or Mac Header File?

Just a small question...
How is it that you tell the difference between an iPhone header file which you can use in conjunction with iPhone development, or a mac specific header file.
Many thanks,
Stu
Many are the same, but not all are included in both. It all depends on which SDK you are building against as to which you have available to you. Please see the iPhone Reference Guide and the Mac OS X Reference Guide.
One quick way is to try and pull up something the header references in the XCode documentation, if you check the document sets the docs are looking at and un-check "MacOS" leaving the iPhone stuff, it will not find anything the iPhone cannot use.