Which app does app ID in /Application folder belong to? - ios

I was able to get bundle identifiers for all apps installed on iOS simulator by going to directory
~/Library/Developer/CoreSimulator/Devices/[DeviceID]/data/Containers/Data/Application/
but how do I know which app the ID belongs to? Are there names? Why are all IDs numerical? Are they randomly generated and different on each sim?

I don't know why it is random number. Why apple use this kind of mechanism, But you can get application bundle identifier by using below step.
Step:1
Goto: ~/Library/Developer/CoreSimulator/Devices/[DeviceID]/data/Containers/Data/Application/
Step:2
Select Any application > Open .com.apple.mobile_container_manager.metadata.plist file.
Step:3
Value for MCMMetadataIdentifier is identifier for your application you can also see in below screenshot.

Short answer: just parse hidden file for bundle id ...
~/Library/Developer/CoreSimulator/Devices/< device id >/data/Containers/Data/Application/< app id >/.com.apple.mobile_container_manager.metadata.plist

Why are all IDs numerical? Are they randomly generated and different on each sim?
I believe they’re different on every device, and that the idea is to make it more difficult for malware to figure out whether and where a given app is on the device.

Related

Unable to create dedicated App ID for Watch Extention

I'm having trouble creating a dedication AppId to my watch extension.
So far my app and corresponding watch app worked perfectly. I had my App ID configured using a bundle id similar to the following format: xx.yyyyy.appName, and the watchkit app & extension were using a wildcard appId with the relevant (and suggested) bundle id of xx.yyyyy.appName.watchkitextension and xx.yyyyy.appName.watchkitapp and everything was great.
I found out I need to change the current behaviour of my apple watch app to share some data with the parent app, and in order to do it I had to enable the App Groups capabilities, where I found I'm not able to do so for the watchkitextension (apparently App Group capabilities required Explicit App ID rather then wildcard App ID).
Realising I don't have a dedicated App ID I went to the member centre and tried to make one unsuccessfully. Following Apple's guidelines I'm trying to create the App ID with the same prefix of xx.yyyyy.appName following .watchkitextension.
This results in the following error message:
An App ID with Identifier 'xx.yyyyy.appName.watchkitextension' is not available. Please enter a different string.
No matter what string I input I get the same error. I made sure I don't have other AppId with similar bundleId associated with it. I even deleted the wildcard App ID to make sure the asterisk (*) in the last digit in the Bundle ID field of it isn't confusing things. No luck -> it became even worst. I can't recreate the wildcard App ID I had before (getting the same error)
UPDATE:
I found out changing the first part of the string (the xx part) to something different allows me to create the AppID - but unfortunately it doesn't solve my problem as I need it to have an identical prefix for the bundle id of the watch extension. I thought maybe this info will be helpful to whoever try to assist.
UPDATE2
I've read the following stackoverflow posts, one, two, three and many others. No luck :(
I'm feeling a bit lost here, any help would be much appreciated!
For example you have app with identifier 'xx.yyyyy.appName'
Watch App:
Your Watch App must be prefixed with the identifier ( 'xx.yyyyy.appName.watchkit')
WKCompanionAppBundleIdentifier - 'xx.yyyyy.appName'
Watchkit Extension
Watchkit Extension must be prefixed with the identifier ('xx.yyyyy.appName.watchkit.extension')
The WKAppBundleIdentifier identifier must match with the WatchKit app bundle identifier ( 'xx.yyyyy.appName.watchkit')

Bundle Identifier: setup for new project with IOS App+Framework+Today Extension

I'm in the process of starting to develop an IOS/Swift App with a Framework to share common logic with a Today Widget and I have some questions about the Bundle Identifier:
If I choose something as org.whateverIwant.TestBundleID for the App, should whateverIwant.org really exist or is it simply a unique identifier?
If I later add an a Cocoa Touch custom Framework to the project, it asks me for a Product Name (TestBundleIDFramework) and then it appends by default the product name to org.whateverIwant without TestBundleID. Instead, if I add a Target for a Today Extension it appends the Product Name (TestBundleIDExtension) to org.whateverIwant.TestBundleID. Given the fact that all the three parts (App, Today Extension and Framework) are part of the same app that I'll upload to the store, is this way of using BundleIDs correct? Should also the Framework be under org.whateverIwant.TestBundleID, such as org.whateverIwant.TestBundleID.TestBundleIDFramework as for the Today Extension?
Is it extremely important to chose the right Bundle ID at the beginning of the project (consider that I still have no developer account, I'll pay for it as soon as I see that I'm able to build the app I'd like to) or can it be changed without hassle later on?
An brief OT question: there is a Version field for each target, what is the one that Apple looks at when determining if the uploaded bundle (App+Extension+Framework) has been updated to a new version?
No. It is simply an unique indentifier.
You mentioned three: "App+Extension+Framework" I think only the App's bundle ID matters because you are going to submit the App. The Extension and Framework are just part of the App, theirs bundle IDs are internal which means nothing to App store.
You can change the bundle ID as long as you haven't submitted your App to App Store.
OT Question: App Store only cares about your App's bundle ID and version number.

Can I set same Apple ID for iOS & Mac app?

I have the same app for iOS and Mac. To making things more easy I want to point the iOS & Mac app with same link etc.
Is there any way to do that? I couldn't even set same Bundle ID. Is there any way around that?
No, you can't. Bundle ID and App ID are identifiers. Different Bundles/Apps have different IDs. Otherwise they aren't identifiers anymore.
If you want have one url for both, you could write a script (e.g. php), wich checks the OS running on the device and redirects to the corresponding iTunes link.

How deploy two different apps in ios without having them overwritten

I want to have two version of the same IOS app to stay in the same time in the same device, one for testing and the other for production.
The app is built using phonegap build, so what I have done is
using two different bundle id specified in build.xml (edit: config.xml), so that one is dk.xxxDev.mobile, and the other one is dk.xxx.mobile
having two different apps in the apple developer page, so now I still have the previous one for dk.xxx.mobile and the new one dk.xxxDev.mobile
building using two different provisioning file, one for each app (one is using a developer profile, while the other is using an ad hoc certificate, but i guess we don't care about it)
Still, every time I deploy using itunes or testflightapp, one app overwrites the other one! What am I doing wrong?
edit: I Also changed
- the tag "name" in the build.xml (so that testflightapp can distinguish them )
- I'm using different filnames when I add the app to iTunes
Can you check if the 2 versions of the app generate are using the same IPA file name?
The file naming convention for the Mpbile Apps is as follows:
app_name.version.IPA file
iTunes in the Mac or in the PC store the mobile apps in IPA format and if they are using the same name, installing one will override the other. This is a valid question for Apple Support and this is something that a future version of iTunes may fix.
I was doing something different from what I wrote, I was probably using the same certificate for both versions.
So doing exactly what I wrote, it is supposed to work.
You need to change bundle identifier of one of the apps
Select Project in Xcode, then select target and in general tab you will see bundle identifier string.
e.g. com.YourCompane.AppName change "AppName"

iOS: Running different apps on device

I'm a novice iOS developer and got my iOS developer program account, I setup the iOS certificate and Provisioning Profile and I can run my test app on my device(iPad). My question is if I want to run different test apps(imagine couple Apple sample codes) on my device without replacing the last tested app on my device(I mean keep all of them on my device at the end of test) what would be the trick here? I know each app has it's own bundle identifier, but how to manage this scenario for running all of them on the device with the same iOS Certificate/Provisioning Profile?
Just change the Name of the project and it should refactor. Change the name on the root of files & folders in xcode. You can click on it and it'll let you change the name. In Build Settings Properties change the name under there as well. Click at the very top of your list of files where it says the name of your project and it'll bring up the build properties.
If I understood you correctly, there are two parts of your questions:
Yes, you can run many (distinct) apps on your device.
To have multiple version of the same app running on your device, all you need is change app's product name to a different name, app1, app2, etc. It is a relatively easy process to do it. This SO Q/Aenter link description here has the instructions. You do not need to rename your project or any thing else. Just make a copy of the project and follow the instructions to make a new product name.

Resources