Should add that I'm using Xcode Version 12.0 beta (12A6159).
Post
Replies
Boosts
Views
Activity
Don't forget to add one or more of the following as needed:
#import <AppClip/APBase.h>
#import <AppClip/AppClip.h>
#import <AppClip/APActivationPayload.h>
#import <AppClip/NSUserActivity+AppClip.h>
For anyone else who has this problem in Objective C, I found I needed to do two things: Add "#import <AppClip/NSUserActivity+AppClip.h> to your header file.
Add "AppClip.framework" under your App Clip target's General / Frameworks, Libraries, and Embedded Content.
#1 will allow it compile, but the appClipActivationPayload attribute won't be there in runtime.
#2 will prevent the crash when you try to access the appClipActivationPayload attribute.
I also put my app only in Test Flight, then tried to create an Advance App Clip Experience. When I specified the App Clip Experience URL, I got the following message:
This URL is not contained in your app’s associated domains. Update associated domains or use a different URL.
I verified that the URL matches what's in my associated domains for my App Clip's target.
Could my 'apple-app-site-association' file also cause this error? I think it's ok. Jsonlint.com verified it, but the Apple tool (https://search.developer.apple.com/appsearch-validation-tool/) returns "Error cannot parse app site association" even though I ensured that Content-Type = application/json in the response.
Thanks for any help!
Hi @edorphy,
I'm excited you got your app clip working in Advanced App Clip Experiences. Mine always displays "This URL is not contained in your app’s associated domains. Update associated domains or use a different URL." when I enter an https address even though it appears in my associated domains.
My app clip target's one associated domain is "appclips:mydomain.com" and my app target's association domains are "appclips:mydomain.com" and "applinks:ww.mydomain.com". (It actually has "www" but I can't submit this post with that.) The applinks domain seems to be working since it opens the app when I point my camera at a QR code with this domain.
Even though my app clip works when I launch it from Xcode using _XCAppClipURL, when I launch it from Test Flight, it seems to open with a white background that immediately disappears. Crashes? What should happen?
I'm also not sure what adding App Clip Invocations to Test Flight is supposed to do. What happens after I add one?
Did you check the box next to _XCAppClipURL? :)
I figured out my problem...
If you the message "This URL is not contained in your app’s associated domains. Update associated domains or use a different URL." when trying to create an Advanced App Clip Experience in App Store Connect, it may have nothing to do with the associated domain entitlement in your app, but have everything to do with a bad apple-app-site-association file on your server.
My apple-app-site-association file did not have the correct app id. Once I fixed that, it took a few minutes, but then I was able to see that it was valid in the App Store Connect / Build / DOMAIN STATUS by clicking "View Status" and then clicking "Load Debug Status." Note: the apple tool to validate apple-app-site-association files DOES NOT WORK and will likely give you a JSON error. Apple needs to fix it.
Also note that the "CACHE STATUS" must be green before you can create an Advanced App Clip Experience. If you don't want to wait for the cache to expire (over an hour), just upload a new version of your app.
I can also confirm that I can't get the Card to appear after using iOS Beta 6.
And my Advanced App Clip Experiences in App Store Connect also show a green "Received" status, not "Published."
When you click on the build number in the App Store "Activity" tab, does it show the same app clip App ID? Generally, they look like this:
"123456789.com.mycompanyname.myapp.Clip"
If so, is the apple-app-site-association file in the .well-known subdirectory and served with Content-Type = application/json? You can use Postman to GET that file and check for that plus any other abnormalities with the way it's served.
My App Clip experience urls will: iOS 14+ Be a deep link into my app if installed or present my App Clip Card if not.
iOS 13- Be a deep link into my app if installed or will open the url in Safari if not. Then, if the user agent is iOS, my web server will redirect the user to my app in the App Store. You might want the user to see your website that includes an App Store button, but in any case the urls should “work” and not return a 404!
i had the same issue, and I’m pretty sure the problem was a bad apple-app-site-association file and corresponding associated domains in my App Clip target and Test Flight. The only reliable way to check the file I’ve found is in App Store Connect under the Build section / Domain Status. It must be all green. Apple’s validator tool does not work correctly.
After waiting for a while for Apple's cache to expire (under App Store Connect "Cache Status"), we just uploaded a new build and it immediately refreshed.
Just tried again in iOS beta 8, and they still don't work. Are Apple engineers looking at these threads?
@jordi, it looks like your AASA file is not valid JSON.
Postman should return the file as content type application/json when you GET the url to the AASA file. (Not sure it's still actually required, but doesn't hurt.)
The app clip ID should match what you see when you click on the build number in the App Store Connect under "entitlements."
Thanks , Apple Staff!
However, it would be great to be able to see App Clip cards appear with apps installed via Test Flight at some point in the future.