Openinstall iOS Issues #
1.After integration, some devices suddenly experience failure in the one-click wake-up feature? #
First Scenario:
Refer to Apple documentation
1) When utilizing iOS universal link functionality, it’s necessary to configure entitlements to link the domain with an applink prefix. Upon app installation, the system will retrieve the AASA file from the associated domain to validate its legitimacy.
2) Beginning with iOS 14, the system no longer directly fetches the AASA file upon app installation. Instead, it is fetched by Apple’s CDN server, and the file is cached on the CDN server for approximately 48 hours. During this caching period, any modifications to the Team ID or Bundle Identifier will cause the universal links to fail. Additionally, if the Team ID or Bundle Identifier is not configured on the openinstall platform, running the app with the associated domain configuration will also trigger the CDN server’s cache.
3) To facilitate developers in testing universal link functionality, we recommend adding a developer mode associated domain.
Solution:
Solution 1: Wait for approximately 2 days before testing again, by then Apple CDN would have cleared the cache.
Solution 2: Add an additional developer mode, as follows:
- Step 1: In the Associated Domains section, add an additional developer mode associated domain, as shown in the figure below:
Note: The default associated domain(applinks:yourAppkey.opwakeup.com) must be filled in. The developer mode associated domain (applinks:yourAppkey.opwakeup.com?mode=developer) is used to resolve issues with universal links during the development stage. "yourAppkey" is the app’s corresponding app key, which can be obtained from the app’s backend.
Alternatively, modify the entitlements file as follows:
- Step 2: Enable "Developer Mode" on the Test Device
For iOS 14 and above, navigate to "Settings" – "Developer" – "Associated Domains Development", and toggle the switch.(For iOS 16 and later, go to "Settings" – "Privacy & Security" -"Developer Mode".)
Note: Devices running iOS 16 and below will display the "Developer" option when connected to Xcode or during real device debugging. The developer option will disappear upon device restart, requiring reconnection to Xcode.
Second Scenario:
Moreover, when users access an H5 webpage using Safari’s private browsing mode and OpenInstall JS tries to wake up the app using the universal link protocol, Safari will prompt the user to open the app. If the user dismisses the prompt, Safari will remember this action, causing subsequent wake-up attempts to be unsuccessful. This issue can be resolved by accessing the device’s settings from the home screen, navigating to Safari browser settings, and selecting "Clear History and Website Data" to restore functionality.
2.Issues to Consider During iOS SDK Integration for Obtaining Installation Parameters (App Parameter Installation Functionality) #
(1) Avoid manually storing dynamic installation parameters. Instead, utilize the getInstallParmsCompleted method to dynamically retrieve parameters as needed.
(2) Due to the iOS system’s mechanism, users need to manually allow network permissions the first time they install and open the app. Therefore, it is advisable to call the installation parameter retrieval method only when the parameters are truly needed in the business scenario (typically when the user is actively engaged in the app’s business scenario, and the network is generally accessible).
Note:The OpenInstall App SDK has a waiting mechanism. When developers call the installation parameter retrieval method, the SDK will attempt to retrieve the parameter information obtained during the initialization phase.
If initialization fails due to reasons such as poor network connectivity, the SDK will make continuous retry attempts until successful. Meanwhile, the installation parameter retrieval method will remain in a waiting state until it reaches the maximum waiting time (typically set to 10 seconds by default, but customizable), after which it will return empty parameter content.
3."Safari cannot open the page because the address is invalid" Popup in Safari Browser #
When trying to open the associated app using a scheme in Safari, if Safari finds that the app related to the scheme is not installed on the device, it will show an "Safari cannot open the page because the address is invalid" prompt.
4.Associated Domains Configured in iOS App Project, yet IPA Export Indicates Incorrect Integration #
(1)Validate the Associated Domains configuration in the Entitlements file for accuracy, ensuring there are no extra spaces and that the case sensitivity is correct.
(2)Confirm Configuration Effectiveness across both Debug and Release Versions.
(3)If configurations are accurate and issues persist, consider regenerating the entitlements file.
5.How to Verify the Contents of Associated Domains in an IPA Package? #
Using the example.ipa file as an example:
(1)$ cd example.ipa
(2)$ unzip example.ipa
(3)$ codesign -d –entitlements – Payload/example
o check if the com.apple.developer.associated-domains contains the domains associated with openinstall,Replace Payload/example with the full path to the example directory within the IPA file: If entered correctly, you should see output similar to the following:
<?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>application-identifier</key>
<string>6E65F4E7IUX.com.fs.openinstall</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:appkey.opwakeup.com</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>6E65F4E7IUX</string>
<key>get-task-allow</key>
<false/>
</dict>
</plist>
As above, applinks:ss.opwakeup.com is the associated domain for OpenInstall, indicating that the configuration is correct.
Additionally, this method can also be used to view the Team ID and bundle ID. In the example output, the Team ID is 6E65F4E7IUX, and the bundle ID is com.fs.openinstall.
6.PrivacyInfo.xcprivacy #
CocoaPods
If Error:Signing for "libOpenInstallSDK-OPPrivacy" requires a development team.
Solution:in Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGN_IDENTITY'] = ''
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end