Xamarin Forms, IOS project, application icon does not work - xamarin.forms

I'm trying to add an icon to the Xamarin iOS app using Assets.xcassets and also I tried adding an .ico to the manifest in the iOS project settings but it doesn't work because I have the default Xamarin icon:
I don't have any particular error message referring to missing images or anything else in the build windows, debug or in the xamarin logs (Help/Xamarin/open logs).
I also tried to modify the Info.plist file:
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>UIMainStoryboardFile</key>
<string>LaunchScreen</string>
<key>CFBundleIconName</key>
<string>AppIcon</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>20.png</string>
<string>29.png</string>
<string>40.png</string>
<string>401.png</string>
<string>402.png</string>
<string>58.png</string>
<string>581.png</string>
<string>60.png</string>
<string>76.png</string>
<string>80.png</string>
<string>801.png</string>
<string>87.png</string>
<string>120.png</string>
<string>1201.png</string>
<string>152.png</string>
<string>167.png</string>
<string>180.png</string>
<string>1024.png</string>
</array>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>20.png</string>
<string>29.png</string>
<string>40.png</string>
<string>401.png</string>
<string>402.png</string>
<string>58.png</string>
<string>581.png</string>
<string>60.png</string>
<string>76.png</string>
<string>80.png</string>
<string>801.png</string>
<string>87.png</string>
<string>120.png</string>
<string>1201.png</string>
<string>152.png</string>
<string>167.png</string>
<string>180.png</string>
<string>1024.png</string>
</array>
</dict>
</dict>
And there I have no icon at all.
What am I doing wrong?
I am using Visual Studio 2022 v17.4.1 (Windows)
steps to reproduce the error :
create a mobile application project (xamarin forms)
add the images in the Assets.xcassets (they are well in the .csproj file like this :)
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\1024.png">
<Visible>false</Visible>
</ImageAsset>
add the .ico image to the ios project
start the project on an iphone ios v15.7.1
default xamarin icon !
modify the info.plist, clean, regenerate
no icon !
I expect my application icon to appear on the phone

You don't need to modify the Info.plist file, you can refer to the following steps:
Create a new Xamarin.Forms project
In your Solution Explorer directory, there is an Asset Catalogs folder in the iOS project, open the Assets file in this folder
Replace the default icons of all sizes in Applcon, and check whether the image name in the .csproj file is correct.
Build your app. If you have installed the app before, you need to uninstall it and reinstall it.
For more details, you can refer to the official documentation: Application Icons in Xamarin.iOS | Microsof
Update
According to the comments, you used Hot Restart. Hot Restart will have some restrictions, one of which is: Asset Catalogs are currently not supported. When using Hot Restart, your app will show the default icon and launch screen for Xamarin apps. When paired to a Mac, or developing on a Mac, your Asset Catalogs will work.

Related

how to implement ios & android google login in capacitor?

I am using capacitor-firebase-auth to set up my app. Already follow below guide line to setup, but the result still return
"CapacitorFirebaseAuth" plugin is not implemented on ios
URL: undefined
is anyone know what is problem?
Add custom URL schemes to your Xcode project:
Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
Click the + button, and add a URL scheme for your reversed client ID. To find this value, open the GoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page. Leave the other fields blank.
You need to add the URL that is requested in the info.plist file of your project, you will find this in the main target of your app [1]: https://i.stack.imgur.com/PLLgf.png
Btw, you will probably also need to add GoogleService-Info.plist to your project as well if you haven't already, you can find this in the project settings of your firebase panel (cog icon top left on firebase dashboard) and setup the SDK for iOS etc.
If you don't know your reversed-client ID, follow the instructions above to get the GoogleService-Info.plist, it is located in that file. Firebase will also give you instructions as to how to configure your project.

Firebase cordova signin setup

I am following the direction for adding firebase auth to my cordova project but I have an issue with step 3 and 6 of the documentation.
document -- firebase -cordova setup
I am currently using Custom URL scheme (no firebase) that looks like mycoolapp:// and it woking ok on both cordova android and ios app. This is in the docs for this plugin
Now I am trying to add firebase auth to my app and I am need some clarification.
In step 3 of the documentation it says :
To set up an iOS app, create an iOS application and add it to the Firebase console. You will need the iOS bundle ID to add later when installing the custom URL scheme plugin
then in step 6
Plugin to handle deep linking through Custom Scheme for iOS
Substitute # com.firebase.cordova with the iOS bundle ID of your app.
cordova plugin add cordova-plugin-customurlscheme --variable \
URL_SCHEME=com.firebase.cordova --save
Given that I am already using the customurlscheme plugin with the URl SCHEME = mycoolapp:// then can I continue to use it or do I have change all my code to now use the bundle id.. Also, my cordova iOS and Android have different bundle ID
Thanks
I believe you should be able to add multiple custom schemes. The Firebase Auth client SDK will detect the incoming link on its own. You don't need to handle that logic.
Based on https://github.com/EddyVerbruggen/Custom-URL-scheme#manually
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>URL_SCHEME</string>
</array>
</dict>
</array>
CFBundleURLSchemes takes an array of custom schemes.

Codepush for splash screen?

Can code-push changes files like splash screen of the app?
For example images in the folder Images.xcassets can be overridden ?
Using code-push for the React Native plugin will sync your JS bundle file and any image assets.
For Cordova Platform : plugin will sync any files which live in the platform-specific www folder (including images, etc.)

Swift 2, Xcode 7 .plist issue for NSURLSession HTTP support and URL schemes

After new cutting-edge and state-of-the art Apple Xcode and iOS update and 3-hours to Swift 2.0 migrating, i stuck at the following issue. Here is my .plist code :
<key>LSApplicationQueriesSchemes</key>
<array>
<string>okauth</string>
<string>fbauth</string>
<string>vkauthorize</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Well, LSApplicationQueriesSchemes enables handling canOpenURL: procedure and NSAppTransportSecurity allows calling non-encrypted HTTP URL's.
As you can see, my plist syntax equals this answer
Unfortunately, non of these settings work - i still cannot connect my server via HTTP and open other apps with custom URL schemes. Did anyone face these problems? Thanks in advance!
Well, i finally found the problem. Thanks to breathtaking technologies, Xcode doesn't refresh .plist files in .lproj folders, so when i edit .plist from Xcode it's not guranteed, that those files would be changed. Thanks everyone!
EDIT :
and finally i found the issue - all these settings are located here :
While i was editing Info.plist from project navigator!!!((

Blackberry Playbook App Debug Installation Error

I am trying to install a Blackberry Webworks App from my MAC onto a playbook using a usb cable and terminal line commands blackberry-deploy -installApp...
I am getting an error referring to an author mismatch between application and debug token
result::failure 881 application author does not match debug token author
has anyone had the same issue?
thanks
Paul
Try to set the following properties in your bar-descriptor.xml file
<!-- Name of author which is used for signing.
Must match the developer name of your development certificate -->
<author>**</author>
<!-- Unique author ID assigned by signing authority. Required if using debug tokens -->
<authorId>**</authorId>
"I had similar issue. Check that in blackbery-tablet.xml and fields are correct.
To get the right values for those fields just rename your packed .bar file to .zip, then unarchieve it. There will be manifest.mf file in META-INF folder. Open it with notepad. Grab and values from there and rebuild your app.
If that does not help, then rebuild debug token and make sure you install it on the device. Debug token needs to have correct device pin.
Please click the Thumbs Up icon if this comment has helped you! If your issue is resolved, please click the solution button on the resolution!" - source : http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Failure-881-Application-Author-does-not-match-debug-token-author/m-p/2055935#M32567
I had similar issue. and it was not an "author" problem : I was trying to deploy in debug mode and the debugToken was just not installed on the device.
The debugToken must be on the device so that the deploy can work. You can upload the debugToken with :
blackberry-deploy -installDebugToken debugtoken.bar -device 169.254.0.1 -password
hope this helps :)
Open the bar file with WinRar BUT DO NOT EXTRACT. Doing so will corrupt the META file. Within the WinRar Application locate the META.INF file and double click to open. (if the file type is not set to open with Notepad automatically choose it as the preferred application to do so.)
In the open Notepad with the META info, change the author name and author ID to that of your existing debugtoken. (This can be accessed from the debugtoken via the same process to locate the desired application's META.INF).
Close Notepad and choose to save upon exit. WinRar SHOULD ask if you would like to save it to the archive. Simply choose yes, then exit and attempt the installation again with the newly edited application bar file.
I observed that using this method, there is no change in the size of the originally packed file and supposedly no damage to its original contents.
Open with a text editor the file blackberry-tablet.xml, the file is inside your <BlackBerry WebWorks SDK Tablet install folder>\bbwp\AirAppTemplates\src\.
You should see a section with something like:
<publisher>Sample Inc.</publisher>
<category>core.internet</category>
after this section you have to add
<author>*replace with your author name info*</author>
<authorId>*replace with your author id info*</authorId>
You'll have to get your author and your author id info from the debug token that you uploaded on your PlayBook. You should have your debug token on your computer, rename .bar to .zip and extract. With a text editor look in the META-INF folder at the MANIFEST.MF file for values for Package-Author: and Package-Author-Id: folowed by the actual string values.
Hope this helps.

Resources