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
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 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
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 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
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 Using Swift UI Canvas
One thing I have noticed is the Canvas code doesn't run until there's a gesture, and I'm not sure why that is because the documentation has an example that displays a drawing upon loading the Canvas. struct Line { var points: [CGPoint] var color: Color } var body: some View { @State var lines: [Line] = [] Canvas { ctx, size in for line in lines { let color = line.colorName == nil ? getColor(colorName: nil, rgb: line.rgb) : getColor(colorName: line.colorName, rgb: nil) var path = Path() print(line.points) // this is how I noticed this code doesn't run until the gesture runs. This print statement doesn't run upon loading the Canvas path.addLines(line.points) ctx.stroke(path, with: .color(color), style: StrokeStyle(lineWidth: 5, lineCap: .round, lineJoin: .round)) } } .gesture(DragGesture(minimumDistance: 0, coordinateSpace: .local) .onChanged({ value in draw(position: value.location, translation: value.translation) } }) ) .onAppear { lines = parseLinesString() for line in lines { for point in line.poin
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’24
How do you configure multiple iOS URL Schemes
Is it possible to register multiple URL schemes that are associated with different app ids for the same app. For example I have separate apps per environment of my application each with their own unique bundle id. E.Gcom.test.app-dev (testapp-dev://) com.test.app-qa (testapp-qa://) com.test.app (testapp://)If I want to launch the dev app from a url, I would use want to use testapp-dev://
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
883
Jan ’20
Reply to items NSArray Objective-C
items is a property of MPMediaQuery, so this code translates (roughly) as: let everything = MPMediaQuery() let itemsFromGenericQuery = everything.items! for song in itemsFromGenericQuery { // … }In Objective-C the type of itemsFromGenericQuery is NSArray; in Swift that’s translated an [MPMediaItem]. Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’16
Reply to Time Machine not functioning with High Sierra
The error that i get is the following: There are no discs to be backed up. This can occur if all available discs are listed on the Do not backup list. Click Options to edit the list. And my external hard drive is formated to HFS+J. That was the stock formating from when i bought the external hard drive. I used Google Translate for translating the text because my Mac is on swedish 😀
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’17
Reply to NSLocalizedString in base language where key != value
I don't know if this works for Swift, but I assume so: put a bunch of calls to NSLocalizedString in comments to generate the strings to be translated. Basically, you would list all of the possible keywords and the English translation like that. The actual code would use the variable key that you receive from the server. As you've observed, that line would not generate any strings in the strings file, because its key is not a string literal.
Jul ’16
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
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
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 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
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 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
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
Reply to XLIFF makes no sense
Which version of xCode are you using? It is supposed to ask if you want to preserve existing translations.
Replies
Boosts
Views
Activity
Jan ’16
Reply to Using Swift UI Canvas
One thing I have noticed is the Canvas code doesn't run until there's a gesture, and I'm not sure why that is because the documentation has an example that displays a drawing upon loading the Canvas. struct Line { var points: [CGPoint] var color: Color } var body: some View { @State var lines: [Line] = [] Canvas { ctx, size in for line in lines { let color = line.colorName == nil ? getColor(colorName: nil, rgb: line.rgb) : getColor(colorName: line.colorName, rgb: nil) var path = Path() print(line.points) // this is how I noticed this code doesn't run until the gesture runs. This print statement doesn't run upon loading the Canvas path.addLines(line.points) ctx.stroke(path, with: .color(color), style: StrokeStyle(lineWidth: 5, lineCap: .round, lineJoin: .round)) } } .gesture(DragGesture(minimumDistance: 0, coordinateSpace: .local) .onChanged({ value in draw(position: value.location, translation: value.translation) } }) ) .onAppear { lines = parseLinesString() for line in lines { for point in line.poin
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’24
How do you configure multiple iOS URL Schemes
Is it possible to register multiple URL schemes that are associated with different app ids for the same app. For example I have separate apps per environment of my application each with their own unique bundle id. E.Gcom.test.app-dev (testapp-dev://) com.test.app-qa (testapp-qa://) com.test.app (testapp://)If I want to launch the dev app from a url, I would use want to use testapp-dev://
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
0
Boosts
0
Views
883
Activity
Jan ’20
Reply to items NSArray Objective-C
items is a property of MPMediaQuery, so this code translates (roughly) as: let everything = MPMediaQuery() let itemsFromGenericQuery = everything.items! for song in itemsFromGenericQuery { // … }In Objective-C the type of itemsFromGenericQuery is NSArray; in Swift that’s translated an [MPMediaItem]. Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’16
Reply to Time Machine not functioning with High Sierra
The error that i get is the following: There are no discs to be backed up. This can occur if all available discs are listed on the Do not backup list. Click Options to edit the list. And my external hard drive is formated to HFS+J. That was the stock formating from when i bought the external hard drive. I used Google Translate for translating the text because my Mac is on swedish 😀
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’17
Reply to NSLocalizedString in base language where key != value
I don't know if this works for Swift, but I assume so: put a bunch of calls to NSLocalizedString in comments to generate the strings to be translated. Basically, you would list all of the possible keywords and the English translation like that. The actual code would use the variable key that you receive from the server. As you've observed, that line would not generate any strings in the strings file, because its key is not a string literal.
Replies
Boosts
Views
Activity
Jul ’16
Reply to Wrong colours when rendering SKTexture
Too bright ? How does this translate in color rob and alpha ? Use Digital color meter to compare both.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’20