XCode14 WatchOS Storyboard - watchos

In Xcode14, when creating a new watchOS app - SwiftUI is the only option. Is there a simply way to create a "New Project" template with storyboard/interface controller + delegate as before?

Related

Navigation Bar is not transforming in RTL mode xamarin forms

I was using a masterdetailpage in my app which was working fine in RTL mode once i added
FlowDirection="{x:Static Device.FlowDirection}"
and i set flow direction dynamically in App.cs
but i have to change it to flyoutpage which is working well in RTL but the navigation bar is not transferring to RTL.
hamburger icon is fine
I've a problem with the navigation bar
//Start of the app in App.cs
MainPage = new NavigationPage(new Login() );
//After Successful Login
Application.Current.MainPage.Navigation.PushAsync(new FlyoutMainPage());
// in FlyoutMainPage()
NavigationPage.SetHasNavigationBar(this, false);
There are some limitations about RTL localization in xamarin forms. You could refer to Right-To-Left localizations limitations.
NavigationPage button location, toolbar item location, and transition animation is controlled by the device locale, rather than the FlowDirection property.
That means you could change the language and region to make it.
And then you have to tell your application that it’s allowed to recognize a right-to-left layout. For iOS, add the right-to-left language in the CFBundleLocalizations section of your Info.plist. Such like the following:
<key>CFBundleDevelopmentRegion</key>
<string>ar</string>
<key>CFBundleLocalizations</key>
<array>
<string>ar</string>
</array>
For Android, you could add android:supportsRtl="true" to your application tag in your AndroidManifest.xml
For more info, you could refer to Right-To-Left Localization in Xamarin.Forms
Hope it works for you.

When I tap with Detox, the button is not tapped. However it can be tapped if I just click at it

The problem is when I tap with Detox, the button is not tapped. However it can be tapped if I just click at it.
version of Detox: 16.8.2,
version of React Native: 0.57.1
Solved.
This happened because I used device.openURL({url: 'https://...' }) previously to open the app from a deep link.
Instead, it worked after opening a new instance of the app with a deep link in argument: device.launchApp({newInstance: true, url: 'https://...' });
After this, the interaction can be performed.
It looks like a bug with the method device.openURL()

How to enable Safari App Extension programmatically?

I'm developing a Safari App Extension inside a macOS app. When a user installs this app, the extension is added to Safari, but it's disabled by default. We can detect the state of extension by using SFSafariExtensionManager class via its getStateOfSafariExtension method.
Now I want to enable the extension state programmatically if it is disabled. How can I achieve that?
Or do anyone have any idea where the preferences / app extensions settings are stored in macOS?
You can create a button such as "Open extension preferences" to show Safari preferences directly for your extension then the user could enable it.
The code for your app:
import SafariServices
func enableExtension () {
SFSafariApplication.showPreferencesForExtension(withIdentifier: YOUR_EXTENSION_IDENTIFIER) { (error) in
NSLog("Error \(String(describing: error))")
}
}
SFSafariApplication could be used in Cocoa app only (not extension).

Firebase Root View Controller Not Found Warning

I got a strange warning from Firebase Analytics today. It is:
<Warning> [Firebase/Analytics][I-ACS031011] Root view controller not found
The methods I am using is basically deleting a post and then displaying a status bar notification to the user that the post is deleted. This is the method that is called when we want to delete a post.
HomeViewNetwork.deletePost(postBlock: self.postDataBlock, handler: {
AlertManager.showStatusRed(title: "Post deleted!")
})
And my displaying status function is:
class func showStatusRed(title: String) {
let statusMessage = MessageView.viewFromNib(layout: .StatusLine)
var config = SwiftMessages.defaultConfig
config.presentationContext = .window(windowLevel: UIWindowLevelStatusBar)
statusMessage.configureContent(body: title)
statusMessage.backgroundView.backgroundColor = UIColor(red:0.98, green:0.11, blue:0.35, alpha:1.00)
setUpStatusView(messageView: statusMessage)
statusSwiftMessages.show(config: config, view: statusMessage)
}
The warning goes away if I comment the AlertManager.showStatusRed method. Also I am using SwiftMessages as my library for displaying the status bar notification.
I am not sure why Firebase is giving me this warning when Xcode is not giving any issues about root view controller. Any help is appreciated.
Related question for objective-C only project complied with Xcode 9 GM using FirebaseCore 4.0.4 (podfile.lock): Xcode 9 <Warning> [Firebase/Analytics][I-ACS031011] Root view controller not found
Updating the firebase and other related dependencies to latest version fixed the issue on my project.
- Firebase/Core (4.2.0):
- FirebaseAnalytics (= 4.0.3)
- FirebaseCore (= 4.0.7)
Answer on other thread: https://stackoverflow.com/a/46333312/342794

How to Add Image/icon In dialog of titanium alloy?

var dialog = Ti.UI.createAlertDialog({
title: 'Enter text',
style: Ti.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT,
buttonNames: ['OK']
});
How I can add image/icon inside dialog in titanium alloy? Is there any property that I can add?
unfortunately, you can't add an image to a alertDialog with Titanium.
Maybe it's possible with native : UIAlertView addSubview in iOS7, but you should create a module to use it with Titanium.
Last solution is to create a custom view so you can customize everything you want.