[xcode12] App Clip
This is a feature released in Xcode 12.
For now, this is what is known: https://developer.apple.com/app-clips/
Is there any news weather or not App Clips will be supported by Xamarin? The use Case that makes much sense is: Develop an App clip natively with xcode/swift -> merge it into the xamarin ipa using msbuild/vs
Due to the size restrictions it would be nearly impossible to devlop an app clip beyond hello world in xamarin. But it would be great if an existing Xamarin app could be extended with an native app clip.
Same here, very interested to know. Have few great ideas for app clips for our apps.
We found a workaround:
Prerequisit -> you have a working Xamarin iOS App and you want to add a native appclip written in swift (for size)
Recipe:
- Create dummy xcode swift ios app (using certificates and appid of your existing xamarin app)
- unpack the ipa of your dummy+appclip app
- unpack the ipa of your xamarin ios app
- add appclip folder to the unpacked xamarin ios app
- repack + sign with your certificates upload to testflight using the lates xcode beta application loader
Just an update on this - While some investigations did occur this summer we did not ship support for this in our initial Xcode 12 support release.
It's on our backlog for future possible features now.
Forgive me for my noobness, but would it not be nice to create the app clips using Xamarin.iOS as well? Is the library size a showstopper? It'd be great if something could be done about it
Yes, size is the issue, appclip bundle cannot be larger than 10MB. Impossible with Xamarin linked libs.
On 21 Sep 2020, at 07:45, amirvenus [email protected] wrote:
Forgive me for my noobness, but would it not be nice to create the app clips using Xamarin.iOS as well? Is the library size a showstopper? It'd be great if something could be done about it
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-macios/issues/8932#issuecomment-695911860, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTPHDDIW2G6J34ZVCJS73SG3SATANCNFSM4OE7I2OQ.
@sichy what is the smallest xamarin.ios ipa size?
We found a workaround:
Prerequisit -> you have a working Xamarin iOS App and you want to add a native appclip written in swift (for size)
Recipe:
- Create dummy xcode swift ios app (using certificates and appid of your existing xamarin app)
- unpack the ipa of your dummy+appclip app
- unpack the ipa of your xamarin ios app
- add appclip folder to the unpacked xamarin ios app
- repack + sign with your certificates upload to testflight using the lates xcode beta application loader
Will this work for Watch apps as well?
@dhindrik I suspect it does, but since we did'nt add a watch part to our apps I can't tell for sure. But AppClip part still works great (2 month later)
still no "solution" for this topic? We would really need a better support for AppClips, even if we need to develop the AppClip itself in swift, but a more robust solution than manually copy the folder together!?
I'm interested in this. Would there be something we can use similar to the current Xamarin infrastructure for Widgets?
We found a workaround:
Prerequisit -> you have a working Xamarin iOS App and you want to add a native appclip written in swift (for size)
Recipe:
- Create dummy xcode swift ios app (using certificates and appid of your existing xamarin app)
- unpack the ipa of your dummy+appclip app
- unpack the ipa of your xamarin ios app
- add appclip folder to the unpacked xamarin ios app
- repack + sign with your certificates upload to testflight using the lates xcode beta application loader
@dhindrik @jges42 did you have to archive the dummy+appclip app before doing this or just build? Also, do you have scripts to share?
still no "solution" for this topic?
@MohamadAminSoltani Here's my solution:
- Create dummy xcode swift iOS app (using certificates and appid of your existing xamarin app)
- Add an AppClip to the dummy app per Apple's documentation.
- Create and download the AppClip provisioning profiles per Apple's documentation.
- Add the following to your Xamarin iOS project .csproj file:
<Folder Include="Resources\AppClips\**" />
<Content Include="Resources\AppClips\**" />
- Create an ExportOptions.plist per Apple's documentation. I can't recall how I did this but I may have archived a release or ad-hoc build to get it.
- Build your Xamarin.iOS app
- Archive your Xamarin.iOS app and upload to TestFlight as usual.
I do this all in CI so that process handles 7 above. Below are part of the commands I use in a build script when building in CI but you can use on your local workstation as part of the Xamarin project build commands. You can infer below where you need to adjust (project name etc.)
xcodebuild archive -scheme MyiOSProjectScheme -sdk iphoneos -allowProvisioningUpdates -archivePath ./My.archive
xcodebuild -exportArchive -archivePath My.archive.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath My.ipa
mv ./My.ipa/My.ipa ./My.ipa/My.ipa.zip
cd ./My.ipa
unzip -q ./My.ipa.zip
cd ..
ditto ./My.ipa/Payload/My.app/AppClips/ ../My.Xamarin.App.iOS/Resources/AppClips
This gives you all you need without needing to repack and sign. Once you export/archive from your Xamarin.iOS app you're ready to upload.
@MohamadAminSoltani Here's my solution:
- Create dummy xcode swift iOS app (using certificates and appid of your existing xamarin app)
- Add an AppClip to the dummy app per Apple's documentation.
- Create and download the AppClip provisioning profiles per Apple's documentation.
- Add the following to your Xamarin iOS project .csproj file:
<Folder Include="Resources\AppClips\**" /> <Content Include="Resources\AppClips\**" />
- Create an ExportOptions.plist per Apple's documentation. I can't recall how I did this but I may have archived a release or ad-hoc build to get it.
- Build your Xamarin.iOS app
- Archive your Xamarin.iOS app and upload to TestFlight as usual.
I do this all in CI so that process handles 7 above. Below are part of the commands I use in a build script when building in CI but you can use on your local workstation as part of the Xamarin project build commands. You can infer below where you need to adjust (project name etc.)
xcodebuild archive -scheme MyiOSProjectScheme -sdk iphoneos -allowProvisioningUpdates -archivePath ./My.archive xcodebuild -exportArchive -archivePath My.archive.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath My.ipa mv ./My.ipa/My.ipa ./My.ipa/My.ipa.zip cd ./My.ipa unzip -q ./My.ipa.zip cd .. ditto ./My.ipa/Payload/My.app/AppClips/ ../My.Xamarin.App.iOS/Resources/AppClipsThis gives you all you need without needing to repack and sign. Once you export/archive from your Xamarin.iOS app you're ready to upload.
Hi - sorry to revive an inactive thread, but i would like to hear some more about this @mnxamdev