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

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.

Related

How to get any App's Bundle ID or App ID in iOS

Is there a way to know any App's bundle ID or App ID which is running in the foreground? I have seen this feature in this App called Backbone, which asks user to open any App, press a button on their hardware (Which is a game controller, connected to iPhone via lightning connector) and then a link/shortcut to that App gets added in their App. It seems like they are able to establish a link between their App and other Apps, based on what I know so far it is not possible without knowing the Custom URL scheme of the App.
Anyone knows if there is another way it can be done?
Thanks in advance!
URL Schemes are the only way to communicate between apps. So, no, it's not possible to launch any other apps.
But it is possible to launch any app that registers a URL Scheme, whether it's Apple's, yours, or another developer's.
For more info, check this question discussions.

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

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.

How to get apps names list Swift 4

I'm new to IOS developing and I've been looking for a way to get list of apps names installed on a device but from what I have found is that Apple removed this from Swift 4. Is it true and if so is there an alternative way to get them?
There is no way to get list of installed apps on IOS device , but if you have the url Scheme you can check with UIApplication.shared.canOpenURL method whether an app is installed or not
This was never a feature on iOS because it would seriously hurt a user's privacy if it was. The solution using canOpenUrl works is you know the url scheme for a certain app but in theory any app can subscribe to any scheme so there are no guarantees there either.

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"

How to get a list of your iphone apps

How can i get a list of all my iphone apps (even pointers for each app will be helpful)?
I'm developing an app which contain some screen that should have a list of all my installed apps (with their icon) and the option to select one to launch it in the future depends in other function of mine.
Thanks alot!
There's no way to accomplish this, because each app is sandboxed.
You would be able to determine if select apps are installed if they have custom URL schemes. For example, the Facebook app can be launched with the custom url scheme "fb://", but these aren't guaranteed to be unique, so a different app could use a scheme that's well known to belong to another app. Also not all apps have a custom URL scheme, and you would need some master list (that would need to be constantly updated to be accurate) to check for the presence of each. So you could maybe detect a select list of well-known apps with custom URL schemes, but never get a list of all of them.
If you just wanted to detect your own apps, you could have custom URL schemes that are almost certainly going to be unique set for each app, and check for those.
You could also jailbreak your device, but I'm assuming you want this functionality in an app that is distributed on the app store, so you wouldn't be able to add functionality that requires a jailbreak to work.
EDIT:
Here's an example showing detection of the Facebook app being installed:
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"fb://"]])
{
// Handle the Facebook app being installed
}
Note however, this won't give you any information about the app. Any app developer could add the "fb://" custom url scheme to their app, which would make this falsely detect it.
If you want to find lists of custom url schemes for iOS apps, just search in Google.
another way to look at this is to present the user with all of your app in the appstore. If they have any apps installed on their device then in iOS 7 they will see a button called "Open" next to each of them.
For example you can have a UITableViewCell or a UIButton that says "Checkout Our Apps". In the code you would add this.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms://itunes.com/apps/sixaxisllc"]];
Replace SixAxis LLC with your iTunes developer name and when users click on it, it will launch AppStore app with only your apps are shown. (With Open or price amount next to each of them)
NOTE: test this on actual device and not in simulator
Because of the Sandboxed environment, all you can do is test if it you can open a custom URL.
Akosma Software maintains a list of popular Url on his wiki: IPhone URL Schemes.

Resources