outline-apps icon indicating copy to clipboard operation
outline-apps copied to clipboard

How to change app icon and name to my custom on maccatalyst

Open suki-neithnet opened this issue 1 year ago • 9 comments

Snipaste_2024-01-31_14-38-26

As title and the above screenshot shows, I want to change the icon and name underlined but it doesn't work, I've replaced all icons under ./resource/icons/ios & ./resource/icons/osx, it works when running on iphone or ipad, but not working on maccatalyst.

suki-neithnet avatar Jan 31 '24 07:01 suki-neithnet

Thanks for the question! Where are you running maccatalyst?

Try editing the config.xml, like this: https://github.com/Jigsaw-Code/outline-client/commit/d378ced2f5b40e875c72d28cf22529f3d2562e98

daniellacosse avatar Feb 12 '24 16:02 daniellacosse

We don't currently set the name on the manager, which is why it defaults back to the app's name. You can set it by configuring the localizedDescription on the NETunnelProviderManager:

https://github.com/Jigsaw-Code/outline-client/blob/6356371797cf882a9472f8be4aa9f8c7bbfb3d21/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift#L196

To change the server address, update serverAddress:

https://github.com/Jigsaw-Code/outline-client/blob/6356371797cf882a9472f8be4aa9f8c7bbfb3d21/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift#L194

sbruens avatar Feb 12 '24 17:02 sbruens

For the icons Cordova takes the source images and turns them into an asset catalog and we rsync some files in that Cordova doesn't yet support (yes, it's not great 👎). You can see the output of that under ./platforms/ios/Outline/Assets.xcassets/AppIcon.appiconset in your local folder. if you updated the icons after running the project, try re-running the Cordova setup again as per the README to see if they get updated properly.

You can double-check what they look like in the asset viewer:

AppIcon.

Note that a Catalyst app is a macos app, so uses the macos icons. Do those look like your new icons or are they missing, in which case it might be defaulting to another icon?

sbruens avatar Feb 12 '24 17:02 sbruens

We don't currently set the name on the manager, which is why it defaults back to the app's name. You can set it by configuring the localizedDescription on the NETunnelProviderManager:

https://github.com/Jigsaw-Code/outline-client/blob/6356371797cf882a9472f8be4aa9f8c7bbfb3d21/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift#L196

To change the server address, update serverAddress:

https://github.com/Jigsaw-Code/outline-client/blob/6356371797cf882a9472f8be4aa9f8c7bbfb3d21/src/cordova/apple/OutlineAppleLib/Sources/OutlineTunnel/OutlineVpn.swift#L194

Set localizedDescription on the NETunnelProviderManager seems not work here.

outline-permisson-ask

settings

suki-neithnet avatar Feb 15 '24 06:02 suki-neithnet

For the icons Cordova takes the source images and turns them into an asset catalog and we rsync some files in that Cordova doesn't yet support (yes, it's not great 👎). You can see the output of that under ./platforms/ios/Outline/Assets.xcassets/AppIcon.appiconset in your local folder. if you updated the icons after running the project, try re-running the Cordova setup again as per the README to see if they get updated properly.

You can double-check what they look like in the asset viewer:

AppIcon.

Note that a Catalyst app is a macos app, so uses the macos icons. Do those look like your new icons or are they missing, in which case it might be defaulting to another icon?

Here's my config.xml config-icon-settings-screenshot

And under ./platforms/ios/Outline/Assets.xcassets/AppIcon.appiconset, except some watchOS icon remain empty, other icons all changed to my custom icon, but it still not change the icon in Settings > Network > VPN and info. assests-screenshot

settings

suki-neithnet avatar Feb 15 '24 06:02 suki-neithnet

I wonder if you previously created the profile with the Outline config. Try removing it in the VPN settings. It will then create a new one on the first attempt to connect and will likely use your new config to do so. I think that is probably the issue for both the icon and the name.

sbruens avatar Feb 15 '24 14:02 sbruens

I wonder if you previously created the profile with the Outline config. Try removing it in the VPN settings. It will then create a new one on the first attempt to connect and will likely use your new config to do so. I think that is probably the issue for both the icon and the name.

I think this is not the problem here, because I remove the VPN settings every time before I rebuild, and it still not working. But the name in vpn permision ask changed correctly after I clean all build folder under ~/Library/Developer/Xcode/DerivedData/. But the icon and name in VPN settings still not changed.

suki-neithnet avatar Feb 16 '24 02:02 suki-neithnet

@suki-neithnet Hey, did you figure this out?

daniellacosse avatar Feb 26 '24 16:02 daniellacosse

@suki-neithnet Hey, did you figure this out?

Uh ... not yet, I've filled all icon fields in assets folder, but even if I remove then rebuild it again and again. It still not working.

suki-neithnet avatar Feb 27 '24 01:02 suki-neithnet

We just reverted the change that creates all the catalyst icons FYI, it turns out it was disrupting our ability to upload the iOS app. Currently white-labeling the app isn't really supported, but hopefully it should be easier temporarily.

daniellacosse avatar Apr 01 '24 15:04 daniellacosse