I am creating a watchOS app using SwiftUI and I wish to add a splash screen, but I am not sure whether it's possible. I have added the following to the Info.plist file, but doesn't seem to show a splash screen.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UILaunchScreen</key>
<dict>
<key>UIImageName</key>
<string>Rupee</string>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Sample</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CLKComplicationPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).ComplicationController</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>google.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>Sample</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>Sample</string>
</dict>
<key>WKWatchOnly</key>
<true/>
</dict>
</plist>
Unfortunately (as of September 2021), WatchOS does not support a Launch Screen yet. I don't know if you noticed yet, but when an app launches on the watch, the app icon shows up with a progress view around it which is the default WatchOS launch screen for the apps and cannot be changed.
For more info: Could we set Launch screen in apple watch?
For a fake launch screen, you can do something like this:
#State var shouldShowLaunchImage = true
var body: some View {
ContentView()
.overlay(
Image("launch-image")
.opacity(shouldShowLaunchImage ? 1 : 0)
)
.onAppear {
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
self.shouldShowLaunchImage = false
}
}
}
Related
I have written a syntax highlighter for Fortran, which properly highlights comments. The problem is that the ctrl+/ shortcut does not toggle comments on or off.
Is there something settings specific I need to add to enable this?
For reference, I used the standard *.sublime-syntax file structure that Sublime provides to build the highlighter. So, it looks something like:
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions: [f]
scope: source.fortran
contexts:
main:
# Comments begin with a '!' and finish at the end of the line
- match: '!'
scope: punctuation.definition.comment.fortran
push: line_comment
line_comment:
- meta_scope: comment.line.fortran
- match: $
pop: true
Also, I'm using it on RedHat 7.
You need to create a file called Comments.tmPreferences in the same folder as your Fortran.sublime-syntax file, with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.fortran</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>! </string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>65507EAD-D547-44E4-84F7-7D421DD078B0</string>
</dict>
</plist>
I don't think the UUID is needed in Sublime (these files were originally developed for use in the Mac editor TextMate), so feel free to get rid of it if you want. Other than that, this should do what you want it to do - insert ! at the beginning of any selected line when you hit Ctrl/.
I am trying to build an application to deal with smart card on mac but when I try to use the defaultManager of TKSmartCardSlotManager to read the smart card it returns as nil because the com.apple.secuirty.smartcard entitlement is not set to true that what I read in the mac TKSmartCard.h file in the comments but I am so new in dealing with mac and don't know how to set it to true through the calling application.
Any help would be greatly appreciated.
Edit:
what I tried so far is creating a property list file and adding it to the project then building it with the project but still it seems it doesn't add the required entitlement. this is the file I add :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.smartcard</key>
<true/>
</dict>
</plist>
The answer was simply writing a .entitlements file contains the following :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.smartcard</key>
<true/>
</dict>
</plist>
Then add my project.entitlements to code signing entitlements in Xcode build settings.
i've just learned some xslt langauge and i have a problem. I'm trying to remove this namespace without success.
Original xml:
<?xml version="1.0" encoding="UTF-8"?>
<file_information xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.chellodmc.com/files/dmc_media_delivery.xsd" xsi:schemaLocation="http://www.chellodmc.com/file0073/dmc_media_delivery.xsd http://www.chellodmc.com/files/dmc_media_delivery.xsd">
<asset_data soa:23946923649236489>
<upn>TEST_Sintec_HD</upn>
<title>NLD_NGC_C_Man United - Chelsea - Sunday #17.00</title>
<version>High Definition</version>
<duration>00:30</duration>
<tc_in>23:00:00:00</tc_in>
<tc_out>23:00:30:00</tc_out>
<aspect_ratio>16X9</aspect_ratio>
<segment>
<sequence>1</sequence>
<tc_in>23:00:00:00</tc_in>
<tc_out>23:00:30:00</tc_out>
<comment></comment>
</segment>
</asset_data>
</file_information>
Expected output xml:
<?xml version="1.0" encoding="UTF-8"?>
<file_information>
<asset_data>
<upn>TEST_Sintec_HD</upn>
<title>NLD_NGC_C_Man United - Chelsea - Sunday #17.00</title>
<version>High Definition</version>
<duration>00:30</duration>
<tc_in>23:00:00:00</tc_in>
<tc_out>23:00:30:00</tc_out>
<aspect_ratio>16X9</aspect_ratio>
<segment>
<sequence>1</sequence>
<tc_in>23:00:00:00</tc_in>
<tc_out>23:00:30:00</tc_out>
<comment></comment>
</segment>
</asset_data>
</file_information>
what would be your suggestion?
Many thanks!
My jetty context xml looks like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
**<Set name="contextPath">/</Set>**
<Set name="war"><SystemProperty name="jetty.home" default="."/>/../core.war</Set>
</Configure>
My rail server talks to jetty. However, the I get some "server errors"
But when I change the contextPath as follows, then it works:
**<Set name="contextPath">/foo</Set>**
Could you please tell me why root context is not working?
try naming it root.xml and your war file root.war
I'm following step-by-step (basically copying and pasting stuff) this spring-ws tutorial and I just hit a wall when configuring the spring-ws-servlet.xml as below:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:sws="http://www.springframework.org/schema/web-services"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services
http://www.springframework.org/schema/web-services/web-services-2.0.xsd">
<context:component-scan base-package="com.mycompany.hr"/>
<sws:annotation-driven/>
</beans>
Adding the following line:
<context:component-scan base-package="com.mycompany.hr"/>
make STS starts yelling at me that:
cvc-complex-type.2.4.c: The matching wildcard is strict,
but no declarationcan be found for element 'context:component-scan'.
I don't know how to proceed..
You need to add:
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
to the schemaLocation.