Bootstrap
Bootstrap copied to clipboard
Icon versioning doesn't work on iOS 11
I tried with the Example project too and it shows the default app icon.
It looks like it's a permission issue, but I don't know how to debug it. Doesn't anyone have any idea or clue to fix this?
@revolter You can take a look at this PR: https://github.com/wordpress-mobile/WordPress-iOS/pull/8108/files to see how our final implementation on the WordPress iOS app looks like
@elibud would be nice to get PR if you guys have time, shouldn't you also reference original source of this script ? it feels like you are ignoring the MIT license requirement
@krzysztofzablocki at this point we've diverged quite a bit from the original implementation that's the reason we didn't submit a PR.
Here's the results from our investigation about the problems on iOS 11:
- XCode manages app icons through asset catalogs
- XCode also includes the icon files in the app and Info.plist, possibly for backwards compatibility
- The script replaces the files in the app root directory but not the asset catalog
- iOS 11 uses the asset catalog and not the files in the app root directory
So what we did was add a new run script phase to our project to do the following:
- For each icon in AppIcon.appiconset. Add the blur, info version and commit data. Copy it over to AppIcon-Internal.appiconset.
- Update the Release-Internal scheme to use AppIcon-Internal.
- Remove the existing Generate Build Icons phase as is no longer needed.
- We also moved the script out of the project file.
Regarding retribution, would something like this be appropriate as a comment on the script:
Based on Eric Krzysztof Zablocki Boostrap library - https://github.com/krzysztofzablocki/Bootstrap
Thanks
@elibud yeah just mentioning me & linking to repo is fine with me, also thanks for info :)
@elibud, Just curious, how did you find out that it uses asset catalogs in iOS 11?
@krzysztofzablocki here's the PR that adds the attribution https://github.com/wordpress-mobile/WordPress-iOS/pull/8197 Apologies about that, it was never our intention to omit it.
@revolter honestly, just trial and error.
@elibud, It doesn't work for me. The script throws this error:
mkdir: /Users/iulian/Library/Developer/Xcode/DerivedData/AppName-flfsycpcooxferchcgqiawomflkh/Build/Intermediates.noindex/AppName.build/Debug-iphonesimulator/SchemeName.build/ModifiedIcons: File exists
@revolter can you try cleaning and deleting derived data and then try again? (I don't clean derived data myself but I generally clean before making the new build)
No error from the script but the overlay still doesn't show up :(
@revolter we've recently moved that script one phase down and we are seeing the same problem. Someone from my team will be working on that and once a PR is up I will post it here.
Great, thank you!
Ok @revolter here's the new PR and it works perfectly: https://github.com/wordpress-mobile/WordPress-iOS/pull/8214 Hope it helps.
I want to use your project iconVersioning.sh file,what should i do? (on Xcode9 iOS11)
@elibud, I didn't have time to test it, and neither do I know, but I'll let you know when I test it.
@Luis-X, #33 might help you.
@krzysztofzablocki, What do you think about my idea from Twitter? Is it ok if we discuss it here? Or in another issue? Do you have time to maintain the icon versioning part of this project (I only use that, and it looks like I'm not the only one) or you need some help?
@revolter how about you create a subspec for just icon versioning in CocoaPods as I did for other parts? I'm swamped with other projects atm
I was thinking about creating a fastlane plugin instead, I wonder how other people would vote between these 2 solutions.
@revolter Thank you very much! @krzysztofzablocki I watch this Blog and Use it, But on Xcode9 iOS11 not work, I'm sure, I only use iconVersioning.sh on my Project, can you and try fix it?
If @krzysztofzablocki, gives me permission to use the icon versioning script in a fastlane plugin, while obviously referencing the original source, and if I find myself some time, I'll do it as I need it too.
@revolter sure, go ahead
@revolter @krzysztofzablocki I commit my code on this Demo include icon_version.sh file, Run it on Xcode 9, Please look this img.png
@Luis-X Try with the version from here.
I finally finished an initial version of a fastlane plugin to version icons: https://github.com/revolter/fastlane-plugin-icon_versioning 🎉
@krzysztofzablocki, Let me know if the mentions are ok and complete or if I should update them 😃
For the rest of the interested people, I successfully integrated it in my project and it works like a charm. Let me know if it works for you too, if you have any issues or feedback, and as always, PRs are welcome ❤️
@elibud Your script is working, thank you very much! 🎉