I need to open my app from the email.
this is the email url: http://staging.imixedtape.com/accept_invite?token=be484a99b1f4554e42b7232dc2268c5e
And for this i need to integrate universal link in my app.
this is my apple-app-site-association file which opens via:
http://staging.imixedtape.com/apple-app-site-association
it returns:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "ZVDN92A33X.com.lemondeit.mixedtape",
"paths": ["*"]
}
]
}
}
Still my app is not opening up from the link provided above.
I have added the domain "staging.imixedtape.com" in the associated domain capabilities tab.
I don't know what's left. also the apple-app-site-association file is uploded onto the root of the server.
Also i have edited my scheme to Release rather Debug, and i am testing it on the real device
Related
I am trying to start my MAUI IOS App using URI, but when I clicked on URL that must open my app nothing happen. I set a breakpoint into OpenUrl and ContinueUserActivity to check if its called, but its never called.
I created apple-app-site-association :
{
"applinks": {
"apps": [],
"details": [
{
"appID": "H9375ODJ26.com.example.testapp",
"paths": [ "/video/*"]
}
]
}
}
the file is accessible on https://www.example.com/.well-known/apple-app-site-association and it has content-type = application/json.
I have added in my Entitlements.plist this code:
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:example.com</string>
</array>
In developer.apple.com Associated domains option for my app is turned on.
Can anyone tell me what I'm missing ? I expect when I click on the URI, a pop-up will appear asking how to open the uri - browser or my ios app.
In Maui you can use Launcher to open other applications through URI. Apple requires that you define the schemes you want to use. Add the LSApplicationQueriesSchemes key and schemes to the Info.plist files:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>XXX</string>
</array>
Call the ILauncher.OpenAsync method and pass in a String or Uri representing the application to open:
await Launcher.Default.OpenAsync("xxx");
For more details, refer to:Launcher | Microsoft
I've followed instructions from the apple for enabling universal links.
Following is my aasa file
{
"applinks": {
"apps": [],
"details": [
{
"appID": "app.store.app",
"paths": ["*"]
},
{
"appID": "enterprise.app",
"paths": ["*"]
}
]
}
}
I am able to use universal link for the app store app. But I've never been able to open links for the enterprise app(apps that are created for internal distribution https://developer.apple.com/programs/enterprise/)...
I have followed https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html and made sure that "The appID value is the same value that’s associated with the “application-identifier” key in your app’s entitlements after you build it". I have also check the entitlement file having the domain
Is there any document from Apple stating that enterprise apps cannot use universal link?
Thanks in advance!
YES
In order to allow such a behavior, be sure to provide the apporiate TEAMID in the json file, as described https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/enabling_universal_links
"details": [{
"appID": "D3KQX62K1A.com.example.photoapp",
"paths": ["/albums"]
Moreover if your internal apps point to another server than the public one, remind to add a new associated domain in your app capabilities
Do not forget to remove the the developer mode from the associated domain when you are going to distribute your application.
We had the issue that Universal Links didn't work for a distributed Enterprise Application.
Removing the developer mode fixed it.
Here's my setup:
I have an AWS CloudFront distribution with custom and valid SSL certificate (from ACM)
the CF distribution points to an S3 bucket
My domain example.com is a A record with alias to my CF distribution
I uploaded apple-app-site-association and .well-known/apple-app-site-association to my bucket with the following parameters: Public Read, Content-Type=application/pkcs7-mime
My apple-app-site-association is as follows:
{
"webcredentials": {
"apps": [ "TeamID.BundleId1",
"TeamID.BundleId2" ]
}
}
Of course the values are replaced with my team's ID and the bundle Ids of my 2 apps.
When I run
curl -i https://example.com/apple-app-site-association
or
curl -i https://example.com/.well-known/apple-app-site-association
I have the following result:
HTTP/2 200
content-type: application/pkcs7-mime
content-length: 156
date: Wed, 18 Dec 2019 03:08:15 GMT
last-modified: Wed, 18 Dec 2019 03:04:14 GMT
etag: "redacted"
x-amz-server-side-encryption: AES256
accept-ranges: bytes
server: AmazonS3
x-cache: Miss from cloudfront
via: 1.1 redacted.cloudfront.net (CloudFront)
x-amz-cf-pop: redacted
x-amz-cf-id: redacted
{
"webcredentials": {
"apps": [ "TeamID.BundleId1",
"TeamID.BundleId2" ]
}
}
Which tells me the file is valid and correctly hosted.
On the Xcode side, my target has the following row in Signing & Capabilities > Associated Domains:
webcredentials:example.com
So my entitlements file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:example.com</string>
</array>
</dict>
</plist>
However when I go to my Sign Up screen on the app, I have the following console log:
[AutoFill] Cannot show Automatic Strong Passwords for app bundleID:
BundleId due to error: Cannot save passwords
for this app. Make sure you have set up Associated Domains for your
app and AutoFill Passwords is enabled in Settings
I am testing on a real device on iOS 13 and AutoFill is enabled.
Note: my app is not live yet (in case I am advised to use the Apple crawler aka App Search API Validation Tool)
Thanks in advance for any help!
From the docs:
Note
If your app runs in iOS 9 or later and you use HTTPS to serve the apple-app-site-association file, you can create a plain text file that uses the application/json MIME type and you don’t need to sign it. If you support Handoff and Shared Web Credentials in iOS 8, you still need to sign the file as described in Shared Web Credentials Reference.
So the content-type: application/pkcs7-mime in your response seems wrong, try changing that to application/json.
I finally managed to get it working. I did 4 different things, I think only 2 of them are important but I'll post them all here in case it helps someone with the same issue.
1: Use my iPhone Developer ID instead of my Team ID (important)
As I was debugging the app on dev environment, the app is signed with my iPhone Developer certificate, not my team's production certificate. So I changed my apple-app-site-association file from
{
"webcredentials": {
"apps": [ "TeamID.BundleId1",
"TeamID.BundleId2" ]
}
}
to
{
"webcredentials": {
"apps": [ "TeamID.BundleId1",
"TeamID.BundleId2",
"iPhoneDeveloperID.BundleId1",
"iPhoneDeveloperID.BundleId2" ]
}
}
2: Invalidate AWS CloudFront cache before testing (important)
While testing, I eventually found out that I was sometimes getting an old version of my apple-app-site-association, depending on which device or software application I was using to fetch it.
So I logged in to the CF console, selected my distribution, selected the Invalidations tab, and created an Invalidation with Object Path /.well-known/apple-app-site-association.
3: Add App Links
I'm not sure whether that made any difference for my issue, as I only invalidated the cache after I tried this, but just in case it helps someone, I decided to add App Links to my app. I added the following object after webcredentials in my apple-app-site-association
"applinks": {
"apps": [],
"details": [
{
"appID": "iPhoneDeveloperID.BundleId1",
"paths": [ "*"]
},
{
"appID": "iPhoneDeveloperID.BundleId2",
"paths": [ "*" ]
},
{
"appID": "TeamID.BundleId1",
"paths": [ "*"]
},
{
"appID": "TeamID.BundleId2",
"paths": [ "*" ]
}
]
}
Make sure the app you're testing is at the top, as the others will get discarded (the first wildcard wins). This must obviously be changed before going to production.
And I added the following entitlement to my app
<string>applinks:example.com</string>
4: Only use .well-known
Again, I don't believe this is important, but instead of having to upload my file twice for each test, I stopped using the root directory, and only uploaded to /.well-known/apple-app-site-association
In case it helps someone else I had similar problem with the file not being valid with correct content type header. I re-uploaded the file using the following:
aws s3 cp --content-type "application/pkcs7-mime" public/.well-known/apple-app-site-association s3://mywebsite/.well-known/
I am a newbie in ios development and working on Universal deep-linking.
I have added apple-app-site-association file to my website. (I have validated the file)
Client enabled Associated Domains feature for the app and added me as a team member.
He has an individual account and sent me an invitation for the app.
I have a couple of questions:
Do I need to enable signing with my account (created by invitation) for Universal deep linking to work in the development phase?
If yes then Issue is that I am getting "Your development team, "Bhaskar Dabhi", does not support the Associated Domains capability." maybe because he couldn't enable access to certificates, identifiers and profiles. Does he need to enable "access to certificates, identifiers and profiles" for me to Universal deep linking to work?
if No then Universal deep linking is not working. not sure why.
I went through a couple of tutorials but couldn't figure out if it's because of signing in.
Universal Links
Step 1: Register your app at developer.apple.com.
Step 2: Enable ‘Associated Domains’ on your app identifier.
Step 3: Enable ‘Associated Domain’ on in your Xcode project.
Step 4: Configure your website to host the ‘apple-app-site-association’ file
AASA (apple-app-site-association) File
{
"applinks": {
"apps": [],
"details": [
{
"appID": “*****.com.*****.ios",
"paths": [
"*"
]
}
]
}
}
Step 5: Host your AASA file on your domain. After validating it using AASA validator.
Refer: https://developer.apple.com/ios/universal-links/
Even after 48 hours, as said in apple documentation, apple-app-site-association is not working in my application. I have checked with [apple validation tools] (https://search.developer.apple.com/appsearch-validation-tool/) but its showing Error no apps associated with url in the Link to Application. Here is the format of my apple-app-site-association file
{
"applinks": {
"apps": [],
"details": [{
"appID": "{team_id}.{bundle_id}",
"paths": ["*"]
}]
}
}
I have also enabled Associated Domains for the appId from developer.apple.com and in the XCode capabilities settings also.
I have already tried [this] (iOS Universal Links not working via TestFlight)
Also check the Apple Developer Forum but couldn't find a solution there also.
Little late to this thread but if you want Apple to call your app-site-association file each time the app is installed, simply do this:
applinks:[domain]?mode=developer
This way you can change the settings of the file while developing!
Make sure you are following these steps
Enabled Associated Domains in the app App services from the developer.apple.com
Set the domain name correctly in the Associated Domains in the Xcode capabilities and also enabled this.
You have correctly generated the apple-app-site-association file. The file must not have any extension. Here is the format for the file:
{
"applinks": {
"apps": [],
"details": [{
"appID": “{app_prefix}.{your_app_bundle_identifier}”,
"paths": ["*"]
}]
}
}
Make sure apps tag in the file is be empty and appID is made up of your app Prefix and bundle identifier separated by.
NOTE: I don't know why but I am using app prefix instead teamID as mentioned in most of the posts and even on the apple documentation. But it didn't work for me.
You can also try by using app prefix of the app id instead of teamID