How to show related city name according to the incoming call on iPhone? - iphone

I want to add something (eg. the related city name) into the UI view when I make a phone call or received a phone call on iPhone. However, I can't figure out a good solution for this idea. Could anyone who has experience on this subject gives me some suggestions?
My currently solution is, try to write an extension based on mobile substrate and hook functions in SpringBoard. So many difficulties existed and following are my current big questions,
How to develop such a extension? I downloaded some examples from google, unfortunately they cann't even be compiled on my toolchain.
I can't figure out which ui view for the related screen I should use to insert my own component. I get header files of SpringBoard via class-dump, but no docs and no comments about its usage. Could someone share his discoveries with me?
How to build a trusted cross-compiling enviroment on leopard? All kinds of confusing errors pop up when I try to build others's codes. I've tried Zdziarski's instrunctions in his book, it works with iPhone OS 1 and can compile common projects with open sdk, but how should I do to make it works when comipiling ms plugins?
Also, is there any other solution to translate my ideas to codes? I start iPhone development one month ago, no experience with cocoa/Obj-C before. So your suggestions are very appriciated.
~ Link Bian (卞林扣)
Email/MSN: linkou.bian#gmail.com

I think you are asking for too much. It wont be possible to manipulate incoming/outgoing call screens. Ethically, that is.
Zdziarski is a hacker and from his book, you will get many undocumented API calls which will make Apple reject your app. Same goes for Erica Sadun's iPhone Developer's Cookbook.

Something that really helped me get dylibs compiled was using SkylarEC's Xcode template and just appended an extension of '.dylib' onto the binary and sshing it into /Library/MobileSubstrate/DynamicLibraries. I suggest hooking SBCallAlert or SBCallAlertDisplay to get the id of the caller which is usually just an NSString. Play around with it a little bit, those are all the visualizing methods of a call. If you put in an nslog in your custom override method, you can view the output in iPhoneConfgurationUtilitie (windows) or the console in Xcode. From there you would most likley need an index of area codes to comare the callers to. I don't believe you can add subviews to the call, on I intercept and reissue the strings for the views already there.
But you know, apple doesn't like this :P
lemme know if this helps

Related

Website Forms to iphone app

I've been researching for ages and still cannot find an easy solution that perfectly. So i stopped and figured i was going about this project the wrong way. All i need is an easy solution.
My project requires me to make a website that has forms (fields include images, text, urls, colors). When the user submits this form, somehow (THIS IS THE KEY QUESTION), gets sent to Xcode so that it can be used in and iPhone app.
My questions: What is an easy to use program to make a website that can do what i said? How does my website connect to Xcode (supply it with the data)? Is it possible for my app to check for newly submitted info?
Keep in mind that i don't have much coding knowledge as far as websites and i only a little about making iPhone apps (Yes, i have made some but not as advanced as this)
Thank you in advance!
It sounds like you want to build an IOS app that can retrieve user submitted data from the server.
Your form will have to post the data to the server where it is stored in your database. Images will have to be uploaded to the server as well.
You can then build a server-side api that returns data to the IOS device upon request. You can have your IOS app regularly request data from the server, receive the response and store what you need on the device.
There is a lot more to it of course, but from what I can gather from your post, this is what you're looking to do.
The workflow you describe doesn't make any sense.
It starts out easily enough: you have a website that has a form with a submit button. No problem there. Hitting submit likely does a POST to a server somewhere. Again, no problem.
Then you say the form data has to ultimately end up in Xcode. This is where things are really muddled. Xcode is a programming IDE for Mac OS X. I'm not sure how or what it has to do with handling data from a Web form. The two things are, for all intents and purposes, completely independent technologies.
Please describe in much more detail exactly why you think you need to "send data to Xcode". Otherwise, your question, as written, is unanswerable.

Logging into and communicating with a server from an iOS app...help!

Hey everyone. I have a fair amount of experience developing iOS apps, but nothing much with web/server interacting apps. For a project at work, I am making an app that will let you login, and get pictures off from a server that will then be downloaded for display and review on the local device.
I need to get some pointers on the correct approach to take. Are there built-in classes that make doing something like this easy? Once the cogent is downloaded from the server, it will be viewed locally, so all I need is to get a point in the right direction for logging in and communicating with a server…from an iPhone.
Can anybody point me in the right direction?
Me, I'm using ASIHTTPRequest Librayry to communicate / download with Internet.
For example, for an news app I download latest news in JSON (with a PHP script on a web server) and store datas with SQLite. If you need a little explanation of JSON with iPhone, check here (in french, but source codes are in english ^^)
When I need to download an image, I use ASIHTTPRequest and a queue to avoid downloading to much files at the same time.
If you want more information about a step, just say it.
Good Luck !
NURLConnection is your friend, along with its delegate methods.
Don't be lured by the temptation to use the -sendSynchronous method (which, now that I think about it, if you require authentication, you probably can't use anyway).

How would I add code that would update an online "counter" so I know how many times an iPhone app is being opened?

So I have searched for this but not finding anything about it and if I missed it sorry about that. What I am trying to do is see how to go about adding some code to my iphone app that will connect to a php script (if connection available) and update a counter so that I can let my clients know that their app is constantly being used? Also, would apple allow that? Or would my app be denied for doing such a thing? Any help would be great! Thanks in advance.
There's a bit of network plumbing to implement this. It's not hard, but a much easier route would be to integrate something like Flurry analytics into your app. They you can make one function call, and have it track and upload the information to Flurry's servers. You can view those stats and get an idea of how people are using your app.
Note: I don't work for Flurry, but I use (and like) their service.

reading a file saved by another app in iphone

Is there a way to have an app write a into a file and then have another app read from that file?
I mean writting into the file system of the iPhone.
I want to do this without using an internet connection. So uploading the file and then downloading from the other app is not what i mean.
Thanks!
It appears that there are ways you can, but it won't get approved by Apple if you do.
See http://blogs.oreilly.com/iphone/2008/09/sandbox-think-like-apple.html for more information.
The current sand boxing of applications does not allow this, however it appears that this may be available in future iPhone OS versions. Reference
I'm not sure exactly what circumstances you're in here, but you could register app B as a handler for a particular protocol, and have app A try to open such a link (e.g. appB://yourinfohere). It depends on how much data you want to transfer and many other things, but it might work.

What's the best way to do a mapping application for the iPhone

So I'm looking at writing an iPhone application that shows things on a map. What frameworks/methodologies are out there for doing this?
Searching around on Google, I could only find this one:
http://code.google.com/p/iphone-google-maps-component/
Which according to the issues list is slow, and stops working after a while. Does anyone know of something better, or have any experience with the library above?
I'm pretty sure your only options for now are:
Call openURL: to switch to the Maps app
Use the Google Maps component you linked to
Roll your own thing
Wait for Apple to expose a "MapKit" framework
WARNING: Embedding Google Maps inside an application may violate the Google Maps terms of service.
I have written a full mapping UIView on the iPhone (the application is on the AppStore) and it is not easy (this would be option #3 "Roll your own thing"). Getting good performance is really difficult. I would like to OpenSource my map component but right now the F-NDA is preventing that.
I have been chasing this for a while now, and here's the best solution I've found out there:
http://code.google.com/p/touchcode/
There is a component in there called TouchMap and it comes with a demo that shows it off. It's tiles are loaded directly from Microsoft Virtual Earth.
Edit: #schwa, I just a look at your profile to find your email address, and then realised that you actually released this software. Nice work
I've just found route-me which looks like a large(30+) active community of ppl developing an open source mapping app for the iPhone. It can take tiles from OpenStreetMap, Virtual Earth(Bing) or Cloudmade.
just use mapkit framework.really good
alternatively: [[uiapplication sharedapplication]openurl:#"www.maps.google.com];
that will open the google map,but one problem with this is that it will navigate you to safari and your application will be exited and if you want to move back to your application from this web page,then it won't be possible .you again need to run the app.