Open dingjingpisces2015 opened 3 years ago
Sure! @dingjingpisces2015. Sorry for not publish a documentation about it yet. Soon I'll open a PR updating the documentation.
For now you can:
Create a normal application that will be the app clips and add it as dependency of the main app bundle.
You only need to set the AppleBundle's is_app_clip
property to true and xcode_product_type
to com.apple.product-type.application.on-demand-install-capable
, this one just for Xcode project compatibility.
apple_bundle(
name = "AppClip",
visibility = ["PUBLIC"],
extension = "app",
binary = ":ClipBinary",
product_name = "Clip",
info_plist = "Info.plist",
is_app_clip = True,
xcode_product_type = "com.apple.product-type.application.on-demand-install-capable"
)
also you need to create a entitlements file for your app clip
apple_binary(
name = "ClipBinary",
visibility = ["PUBLIC"],
...
entitlements_file = "Clip.entitlements"
)
With following content:
<?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>com.apple.developer.parent-application-identifiers</key>
<array>
<string>$(AppIdentifierPrefix)com.buck.test.appclipapp</string>
</array>
</dict>
</plist>
And that's it.
If you have any problem, specially if there's something wrong with the code sign phase, please let me know.
I see that you was guided by the integration test. Can you say what exactly didn’t worked properly? So, if theres a problem with the implementation knowing what’s going on will help me to submit a fix for that.
Found this PR. But when try write BUCK as test file did, it can not work properly. @Lcsmarcal Could you help to provide some usage document? Thanks! 🙏