Search results for

“translate scheme”

6,671 results found

Post

Replies

Boosts

Views

Activity

Reply to WorldTrackingProvider's queryDeviceAnchor is not giving correct deviceAnchor
Hello gchiste, Thanks for the reply! Please create a new visionOS app from xcode, replace the code in ImmersiveView with the following code, and change the preferred Default Scene Session Role to Immersive Space Application Session Role. // // ImmersiveView.swift // deviceAnchorSample // import SwiftUI import RealityKit import ARKit struct ImmersiveView: View { var body: some View { RealityView { content in Task { do { try await arkitSession.run([worldTrackingProvider]) var deviceAnchor : DeviceAnchor? while (deviceAnchor == nil || !checkDeviceAnchorValid(Transform(matrix: deviceAnchor!.originFromAnchorTransform).translation)) { deviceAnchor = worldTrackingProvider.queryDeviceAnchor(atTimestamp: CACurrentMediaTime()) } let cameraTransform = Transform(matrix: deviceAnchor!.originFromAnchorTransform) // attachmentEntity.transform.translation = cameraTransform.translation + [0, 0.05, -1] } catch { print(Error: (error)) } } } } private func checkDeviceAnchorValid(_ translation: SIMD3) -> Bool
Topic: Spatial Computing SubTopic: ARKit Tags:
Jan ’24
OpenURLIntent to custom url scheme
Has anyone figured out how to use the new OpenURLIntent intent to open their own app using a custom URL scheme? I have the following code: @available(iOS 18, *) struct BarcodeScannerControlWidget: ControlWidget { var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: scannerIntent) { ControlWidgetButton(action: OpenBarcodeScannerIntent()) { Label(Scan Barcode, systemImage: barcode.viewfinder) } } .displayName(Scan Barcode) } } @available(iOS 18, *) struct OpenBarcodeScannerIntent: AppIntent { static var title: LocalizedStringResource = Scan Barcode func perform() async throws -> some IntentResult & OpensIntent { let url = myscheme:///barcodeScanner let openURLIntent = OpenURLIntent(url) return .result(opensIntent: openURLIntent) } } Running this intent doesn't seem to do anything. If I replace the URL with say https://www.apple.com, the intent opens up safari with that URL.
4
0
2.1k
Aug ’24
Reply to How to detect an Apple Silicon system from an x86_64 process?
https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment?language=objc#3616845 Determine Whether Your App Is Running as a Translated Binary On Apple silicon, a universal binary may run either natively or as a translated binary. The system runs the native version whenever possible, but the user might opt to run the code using Rosetta to support older plug-ins. To programmatically determine when a process is running under Rosetta translation, call the sysctlbyname function with the sysctl.proc_translated flag, as shown in the following example. The example function returns the value 0 for a native process, 1 for a translated process, and -1 when an error occurs. int processIsTranslated() { t int ret = 0; t size_t size = sizeof(ret); t if (sysctlbyname(sysctl.proc_translated, &ret, &size, NULL, 0) == -1) t { tttif (errno == ENOENT) tttt return 0; tttreturn -1; t } t return ret; }
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’20
Open ApplePay P2P from URL scheme
Hi,I was wondering if there was an URL scheme or other mechanism which could allow me to deep link into iMessage's Apple Pay P2P capabilities?My use case is to single click in my app and jump to an iMessage for a given address with the ApplePay iMessage extension already showing.Thanks,Glen
0
0
658
Jul ’17
Reply to xib localization
Hello. We are experiencing this as well. The translations are working fine on the preview (assistant editor) but they are not on the simulator or device. It's a project that began pre-storyboard as well. However, XIB translations work correctly on the main project. We are experiencing this only on our own internal dynamic framework. We currently use Xcode 9.2 are have iOS9 as deployment target. Were you able to solve the problem?
May ’18
location.href = <relative path> uses custom scheme/domain
Hi,We have an application that uses Safari/Apple webkit ( Mac OS 10.8 and later - Netscape - browser: safari - version: 5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Safari/536.30.1 - userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Safari/536.30.1 ) to show web content. Our application loads a custom scheme URI say cec://engine/load.init.htmlOur application registered the custome scheme protocol with the webkit cec:// so that appropriate handler is triggered in our code to handle the loading of load.init.html.Within the load.init.html, code, we redirect to a dynamic page from web:<html>...<body><script type=text/javascript>location.href = https://api.cec.com;</script></body></html>Upon loading the above page it redirects to https://api.cec.com:The api.cec.com executes some javascript which sets a relative URL backlocation.href = Authenticate/opi/.....;Now it tries to redir
0
0
569
Sep ’16
Reply to Issue with Copy Functionality in WKWebView Using Mac Catalyst
@Engineer The content I am trying to copy is text. For example, when using Google Translate (https://translate.google.com) within WKWebView, I translate a piece of text and then click the web page’s copy button. Although the webpage indicates that the copying was successful, there is actually no content copied to the clipboard. This functionality works as expected on both iPhone and iPad; however, it fails when running through Mac Catalyst.
Topic: Safari & Web SubTopic: General Tags:
Aug ’24
Reply to WorldTrackingProvider's queryDeviceAnchor is not giving correct deviceAnchor
Hello gchiste, Thanks for the reply! Please create a new visionOS app from xcode, replace the code in ImmersiveView with the following code, and change the preferred Default Scene Session Role to Immersive Space Application Session Role. // // ImmersiveView.swift // deviceAnchorSample // import SwiftUI import RealityKit import ARKit struct ImmersiveView: View { var body: some View { RealityView { content in Task { do { try await arkitSession.run([worldTrackingProvider]) var deviceAnchor : DeviceAnchor? while (deviceAnchor == nil || !checkDeviceAnchorValid(Transform(matrix: deviceAnchor!.originFromAnchorTransform).translation)) { deviceAnchor = worldTrackingProvider.queryDeviceAnchor(atTimestamp: CACurrentMediaTime()) } let cameraTransform = Transform(matrix: deviceAnchor!.originFromAnchorTransform) // attachmentEntity.transform.translation = cameraTransform.translation + [0, 0.05, -1] } catch { print(Error: (error)) } } } } private func checkDeviceAnchorValid(_ translation: SIMD3) -> Bool
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Jan ’24
OpenURLIntent to custom url scheme
Has anyone figured out how to use the new OpenURLIntent intent to open their own app using a custom URL scheme? I have the following code: @available(iOS 18, *) struct BarcodeScannerControlWidget: ControlWidget { var body: some ControlWidgetConfiguration { StaticControlConfiguration(kind: scannerIntent) { ControlWidgetButton(action: OpenBarcodeScannerIntent()) { Label(Scan Barcode, systemImage: barcode.viewfinder) } } .displayName(Scan Barcode) } } @available(iOS 18, *) struct OpenBarcodeScannerIntent: AppIntent { static var title: LocalizedStringResource = Scan Barcode func perform() async throws -> some IntentResult & OpensIntent { let url = myscheme:///barcodeScanner let openURLIntent = OpenURLIntent(url) return .result(opensIntent: openURLIntent) } } Running this intent doesn't seem to do anything. If I replace the URL with say https://www.apple.com, the intent opens up safari with that URL.
Replies
4
Boosts
0
Views
2.1k
Activity
Aug ’24
Reply to NSPanGestureRecognizer.LocationInView not accounting for Transform
Instead of center, you can use (midX, midY).You should probably use:func translateOrigin(to translation: NSPoint)
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Dec ’17
Reply to Unable to localized dynamic 3dTouch Shortcut (UIApplicationShortcutItem)
Try placing the translations in the InfoPlist.strings file, your image links are dead so I can’t check them.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to Tab bar item localization
I haven't created a Main.strings. Is there anyway to translate those tab bar title without Main.strings?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’21
Reply to XCode 13.2 Freezes When opening Large Swift File
It is the swift file with more than 10k Line of code all of them are string properties for translations.
Replies
Boosts
Views
Activity
Jan ’22
Reply to Make the new Translation API available beyond SwiftUI
And there's no way to just simply translate some text outside the view. So strange.
Replies
Boosts
Views
Activity
Nov ’24
Reply to 打开显示HUD图形后,应用崩溃
Hello, Please resubmit your question in English. Feel free to use translation software.
Topic: Graphics & Games SubTopic: Metal Tags:
Replies
Boosts
Views
Activity
Jul ’25
Reply to partial localizations
I would prefer to use the english description, instead of a possibly horribly wrong automated translation.
Replies
Boosts
Views
Activity
Jul ’15
Reply to How to detect an Apple Silicon system from an x86_64 process?
https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment?language=objc#3616845 Determine Whether Your App Is Running as a Translated Binary On Apple silicon, a universal binary may run either natively or as a translated binary. The system runs the native version whenever possible, but the user might opt to run the code using Rosetta to support older plug-ins. To programmatically determine when a process is running under Rosetta translation, call the sysctlbyname function with the sysctl.proc_translated flag, as shown in the following example. The example function returns the value 0 for a native process, 1 for a translated process, and -1 when an error occurs. int processIsTranslated() { t int ret = 0; t size_t size = sizeof(ret); t if (sysctlbyname(sysctl.proc_translated, &ret, &size, NULL, 0) == -1) t { tttif (errno == ENOENT) tttt return 0; tttreturn -1; t } t return ret; }
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Sep ’20
Open ApplePay P2P from URL scheme
Hi,I was wondering if there was an URL scheme or other mechanism which could allow me to deep link into iMessage's Apple Pay P2P capabilities?My use case is to single click in my app and jump to an iMessage for a given address with the ApplePay iMessage extension already showing.Thanks,Glen
Replies
0
Boosts
0
Views
658
Activity
Jul ’17
Reply to xib localization
Hello. We are experiencing this as well. The translations are working fine on the preview (assistant editor) but they are not on the simulator or device. It's a project that began pre-storyboard as well. However, XIB translations work correctly on the main project. We are experiencing this only on our own internal dynamic framework. We currently use Xcode 9.2 are have iOS9 as deployment target. Were you able to solve the problem?
Replies
Boosts
Views
Activity
May ’18
location.href = <relative path> uses custom scheme/domain
Hi,We have an application that uses Safari/Apple webkit ( Mac OS 10.8 and later - Netscape - browser: safari - version: 5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Safari/536.30.1 - userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/536.30.1 (KHTML, like Gecko) Safari/536.30.1 ) to show web content. Our application loads a custom scheme URI say cec://engine/load.init.htmlOur application registered the custome scheme protocol with the webkit cec:// so that appropriate handler is triggered in our code to handle the loading of load.init.html.Within the load.init.html, code, we redirect to a dynamic page from web:<html>...<body><script type=text/javascript>location.href = https://api.cec.com;</script></body></html>Upon loading the above page it redirects to https://api.cec.com:The api.cec.com executes some javascript which sets a relative URL backlocation.href = Authenticate/opi/.....;Now it tries to redir
Replies
0
Boosts
0
Views
569
Activity
Sep ’16
Reply to Issue with Copy Functionality in WKWebView Using Mac Catalyst
@Engineer The content I am trying to copy is text. For example, when using Google Translate (https://translate.google.com) within WKWebView, I translate a piece of text and then click the web page’s copy button. Although the webpage indicates that the copying was successful, there is actually no content copied to the clipboard. This functionality works as expected on both iPhone and iPad; however, it fails when running through Mac Catalyst.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’24
This app is not allowed to query for scheme...
Hi!WIth iOS 9 Beta 1 I always get This app is not allowed to query for scheme... message when trying to use UIApplication's canOpenURL: or openURL: methods. I didn't find any hint on how to grant permission for that query. Can anyone enlighten me?Thanks!Ingo.
Replies
5
Boosts
0
Views
34k
Activity
Jun ’15