How do iOS processes get their name? - iphone

Is there a default way iOS names
Them? I'm trying to find some sort of pattern to link them to an app name/bundleID so I can retrieve that apps information from the App Store search API. From what I've seen many apps process names are simply their name (eg Dropbox, Skype) but I figure someone has a better idea

In the Info.plist of the App, the relevant key-pair name is CFBundleExecutable.
The default value is set to the Xcode project name (naturally, eg "Dropbox", "Skype", etc). Look at any app's Info.plist via Xcode or by opening up a packaged app.
Documentation for ${EXECUTABLE_NAME}: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW71
Source: I built iHasApp, an app-detection framework, so I spent a lot of time looking into what you're interesting in doing.

Related

Get name of iOS app from path

I'm developing an app for jailbroken iOS devices that collects statistics about installed apps (ideally stats about both App Store and Cydia apps). Given the path of an app, is there an easy and reliable way to get the name of the App (as it appears in the Springboard)? Or is there a better way, not using the path at all (ie, is the info centralized somewhere)?
Here is a link to a StackOverflow that shows how to get a bundle info plist value (In this case the version).
How can my iphone app detect its own version number?
I beleive the attribute you are looking for is CFBundleDisplayName.
Here is apples list of attributes you can obtain.
http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
Every app has an info plist that contains its name and icon. Just look inside the .app bundle.

Is a Dynamically Linked Framework possible on iOS?

The keyword here is possible. I know of a few resources that talk about this and how to create static frameworks - here: https://github.com/kstenerud/iOS-Universal-Framework and here: http://db-in.com/blog/2011/07/universal-framework-iphone-ios-2-0/
I'm interested to see if it's possible to create a dynamically linked framework in an app that will not be submitted to the app store. I know it's impossible to write to the application bundle on a device without jailbreaking it. Is it possible to say, download a compiled framework file, put it in the documents directory and then access it via the application (think plug-in architecture). I know that if it is, you would be turned away from the app store for submitting it, but let's say this was an enterprise app, or an ad-hoc distributed app where Apple would not have to approve.
In my initial research I haven't found anything supporting that it is possible, but I feel like this may be such a fringe case that no one has published anything about it. Looking for a guru to give me a definite "no" before I give up.
not sure if this is what you are after but according to Apple there dynamically linked libraries even usable in iOS - for example the system libraries... XCode contains copies of them and references them via symbolic links...
see near the end of this http://developer.apple.com/library/ios/#documentation/Miscellaneous/Conceptual/iPhoneOSTechOverview/iPhoneOSFrameworks/iPhoneOSFrameworks.html#//apple_ref/doc/uid/TP40007898-CH6-SW3
just an idea:
put the .dylib + include files you want to use into the respective folders where XCode expects the system libraries... use themn and then put symlinks into your bundle on deployment... let the symlinks point where ou copy the .dylib
I believe the answer is no. Apps on the iPhone are sandboxed. That is, aside from Apple supplied frameworks, an app cannot access anything outside of its own build.
This is possible now with IOS 8 Xcode 6.

Iphone app sharing file with iTunes problem

Somebody please help me out. This problem is killing me.
I went through tones of documents and posts. All seems to suggest that simply add a UIFileSharing key into info.plist and set boolean value to YES, files in App's Documents folder (not sub-folder, I know) will show up in iTunes.
However my problem is that I don't have an iPhone, so I really have no clue about what exactly the behaviors of both iPhone or iTunes will be when try to verify this file sharing thing. And what is the right way to verify this.
So when my client try to verify this off my watch (we are on different sides of earth), he keeps reporting back that file sharing feature not work. It is certain that file is properly stored under Documents folder.
In the last attempt, he claimed that he can see the app but not files.
I would like to know the following things, so I can guide him through this and end this pain:
Is it really plain and simple like add one key, no changes to code needed? Or did I miss something?
Are there any special requirements for building (like, only work for release build?), deploying?
What will really happen when plug the iPhone into the computer and sync with iTunes? Will the app show up in the Apps tab anyway, or only show up if file sharing feature are enabled correctly?
Thank you all.
Is it really plain and simple like add one key, no changes to code needed? Or did I miss something?
Yes
Are there any special requirements for building (like, only work for release build?), deploying?
No
What will really happen when plug the iPhone into the computer and sync with iTunes? Will the app show up in the Apps tab anyway, or only show up if file sharing feature are enabled correctly?
It will show up in the app view (on top) all the times. But you will only see them in the file sharing area if you have an app with enabled filesharing.
File sharing is only available on iPhone OS 4 onwards and iPad 3.2
Make sure your client has iOS4 or later.

Unable to have two versions of the same app on the one iphone

I have two versions of my app. I'm trying to keep a copy of each on my iPhone for testing purposes.
In my build settings, my bundle display name is ${PRODUCT_NAME} and I've given each version of my app a different product name (eg "v92" and "v10"). When I install each version to my iPhone, they both appear side by side with different names, however one will work normally, and the other will immediately close the moment it's opened. If I delete the version that works normally, the other will start working.
Does anyone know what's going on?
I think the apps are distinguished on the device by the App Id and not the product name. I dont know how you were able to install two apps only by changing the product name. When i mistakenly installed a different app with same app id but different product name the original app was overwritten.
Try creating a separate app id for the new version only for testing. That might solve your problem but make sure you use the correct app id when you submit your app.
EDIT: It might not be the right solution if you are doing some app id specific stuff (like APNS) in you app.
I ran into this one too and eventually solved it. I know the solution had to do with changing something in the information property list, but I'm not sure exactly what. I would suggest making sure that all of the following are different for your two versions:
bundle display name
executable file
bundle identifier
bundle name
At least you can create two app id's and two provisioning profiles in your developers account. Then you'll be able to install your 2 versions like a two different apps. It's an ugly solution, but it definitely works.

How do I make iPhone SpringBoard show two or more icons for one application bundle?

It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role.
For instance, iPhone shows MobileSlideShow.app as 2 different programs: Photos and Camera.
Unfortunately, there is no official Apple documentation about the subject at the moment. Would anybody advise how to organize the same behavior in a custom app?
This feature is going to be used in the Enterprise product for ad hoc distribution.
This isn't a supported feature, so if you do this you might have a hard time getting your app through the approval process. I wouldn't recommend using it.
Have you tried it to see if it works? If it doesn't work, you could create a second app that does nothing but launch the first one, with a custom URL scheme. The first app can recognize when it is being launched with that URL. This is not ideal as you will see the second app launch & quit (though it should be really fast).