'Dynamic Links Working on Everything Except iOS Messenger on Physical Device (Flutter)
I am having an odd issue. I have spent quite some time getting dynamic links working on my flutter app and everything seems to be working great. I am able to create a link programmatically, pass in parameters, and handle the incoming links as necessary. They work great on an iOS and Android simulator, and even a physical iOS device EXCEPT for Apple's text messages. On the physical device, the links works fine for sharing to social media accounts, and if I copy/paste to a text message, it works. However, if you try to share directly to the messages, it only passes on the main url (https://example.com) and not the uriPrefix (https://example.page.link/params).
Link Generation:
class DynamicLinkService {
Future<Uri> createDynamicLink(String navPage, String id) async {
final DynamicLinkParameters parameters = DynamicLinkParameters(
uriPrefix: 'https://example.page.link',
link: Uri.parse('https://example.com/?navPage=$navPage&id=$id'),
androidParameters: AndroidParameters(
packageName: 'com.example.example',
minimumVersion: 1,
),
iosParameters: IosParameters(
bundleId: 'com.example.example',
minimumVersion: '1',
appStoreId: '12345678',
),
);
var dynamicUrl = await parameters.buildShortLink();
final Uri shortUrl = dynamicUrl.shortUrl;
return shortUrl;
}
On press link generation:
class _FeedPageWidgetState extends State<FeedPageWidget>
final DynamicLinkService _dynamicLinkService = DynamicLinkService();
Align(
alignment: AlignmentDirectional(0, 0),
child: FlutterFlowIconButton(
icon: Icon(),
onPressed: () async {
var uri = await _dynamicLinkService
.createDynamicLink('param 1', 'param 2');
await Share.share(uri.toString());
print(uri.toString());
},
),
),
The correct uri is printing the deeplink with the correct parameters, however, it is not sending it to the messages app but will for everything else. I am getting the error below on press.
[default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
[default] Attempt to map database failed: permission was denied. This attempt will not be retried.
[db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
[default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.)
[default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
[default] Attempt to map database failed: permission was denied. This attempt will not be retried.
[db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=264, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}
[default] -imageForImageDescriptor: can do IO please adopt -imageForDescriptor: for IO free drawing or -prepareImageForDescriptor: if IO is allowed. (This will become a fault soon.)
[LayoutConstraints] Changing the translatesAutoresizingMaskIntoConstraints property of a UICollectionReusableView that is managed by a UICollectionView is not supported, and will result in incorrect self-sizing. View: <_UIActivityContentFooterView: 0x15eba3f70; baseClass = UICollectionReusableView; frame = (16 430.333; 343 52); layer = <CALayer: 0x283a61d80>>
<CATransformLayer: 0x283a1d580> - changing property backgroundColor in transform-only layer, will have no effect
[Process] 0x14b018618 - [pageProxyID=333, webPageID=334, PID=473] WebPageProxy::didFailProvisionalLoadForFrame: frameID=6, domain=WebKitErrorDomain, code=102
[Process] 0x14b03d818 - [pageProxyID=336, webPageID=337, PID=473] WebPageProxy::didFailProvisionalLoadForFrame: frameID=9, domain=WebKitErrorDomain, code=102
[assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
[ProcessSuspension] 0x1041fb540 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=495, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
[assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
[ProcessSuspension] 0x1041fb5a0 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=496, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x1041fb600 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=497, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x1041fb660 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=473, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
[ProcessSuspension] 0x1041fb6c0 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=497, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
[assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
[ProcessSuspension] 0x1041fb720 - ProcessAssertion: Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=497, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
Any help is greatly appreciated! I am curious if this has anything to do with the build not being 'production' or coming from the App Store?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
