Search results for

“translate scheme”

6,670 results found

Post

Replies

Boosts

Views

Activity

Why does the execution of vDSP operations sometimes take longer in M1 native code than through Rosetta translation?
Hi I am porting some applications to M1 that make extensive use of vDSP. I found in many cases there to be a minimal speed-up, which I put down to Rosetta doing a good job translating SSE instructions into equivalent Neon instructions in the vDSP library. To try and understand this more I started profiling various areas of code and have found situations where the performance of translated code runs faster than natively. Often native code speed is similar or faster as expected, but there are a notable numbers of cases where it is not. This is not what I expected. I include a sample below to show a somewhat contrived and trivial routine exhibiting the effect. I have built it using XCode 12.5.1 in Release with an 11.3 deployment target. The Mac is running macOS 11.6. On my M1 Mac mini the Rosetta build takes around 900-1000 µs to run to completion, switching to native code it takes around 1500-1600 µs. I can make various adjustments to the data size or types of vDSP operations used to find scen
1
0
1.1k
Sep ’21
AppShortcuts.xcstrings does not translate each invocation phrase option separately, just the first
Due to our min iOS version, this is my first time using .xcstrings instead of .strings for AppShortcuts. When using the migrate .strings to .xcstrings Xcode context menu option, an .xcstrings catalog is produced that, as expected, has each invocation phrase as a separate string key. However, after compilation, the catalog changes to group all invocation phrases under the first phrase listed for each intent (see attached screenshot). It is possible to hover in blank space on the right and add more translations, but there is no 1:1 key matching requirement to the phrases on the left nor a requirement that there are the same number of keys in one language vs. another. (The lines just happen to align due to my window size.) What does that mean, practically? Do all sub-phrases in each language in AppShortcuts.xcstrings get processed during compilation, even if there isn't an equivalent phrase key declared in the AppShortcut (e.g., the ja translation has more phrases than the English)? (That makes
0
0
325
Aug ’25
Why the names of the actions “Mail to Self” and “Save to Files” on the screen “Share” may not be translated into Russian language?
Good afternoon! Please, tell me, why the names of the actions Mail to Self and Save to Files on the screen Share may not be translated into Russian language? The language on the device is Russian, the buttons Copy and Edit actions are translated. Added to info.plist Localized resources can be mixed = YES (without this setting the buttons “Copy” and “Edit action” were not translated), but for “Mail to Self” and “Save to Files” this does not work.
13
0
1.4k
Nov ’20
How to do network address translation
In KEXT, I changed the target connection information using the socketFilter. ex) run program > connect network > check destination ip and port > if need to change then change destination ip and portWhich features can be used to change destination access information in MacOS Catalina's Network Extensions?I need your help.
4
0
1.6k
Jun ’20
How translate C++ To Swift
I have little knowledge of C ++, I tried to declare the operator as follows:struct Simple2D { var x: Double! , y: Double! func setS(x0:Double , y0:Double)->Simple2D { return Simple2D(x: x0, y: y0) } func lenght(v: Simple2D)->Double { return pythagorous2(v.x, b:v.y) } }var tx = Simple2D(x: 2.0, y: 2.0)prefix operator * {}prefix func * (v: Simple2D)-> Double { return tx.x*v.x + tx.y*v.y}this does not work, how do I call the functions from another file?This original file in c++ :ile Simple2D.htemplate <typename T>struct Simple2D{ T x, y; / Simple2D <T>() { x = y = 0; } / Simple2D <T>(const T x0, const T y0) : x(x0), y(y0) { } / void operator ()(const T x0, const T y0) { x= x0; y= y0; } / bool operator ==(const Simple2D<T> &v) const;/ Simple2D <T> operator -(const Simple2D <T> &v) const;/ Simple2D <T> operator -(void) const;}file Simple2D.cpptemplate <typename T>bool Simple2D <T>::operator ==(const Simple2D <T> &v) const{ return (is_
5
0
5.1k
Aug ’15
Figuring out the shape of a Transformer Model To translate it to a coreML model.
Hi, I am trying to translate a Transformer Model (from hugging face) to a coreml model and the only piece I have left is to figure out the shape of the input. #Here is the code from transformers import BertModel, BertTokenizer, BertConfig import torch import coremltools as ct import torch import torchvision enc = BertTokenizer.from_pretrained(bert-base-uncased) # Tokenizing input text text = [CLS] Who was Jim Henson ? [SEP] Jim Henson was a puppeteer [SEP] tokenized_text = enc.tokenize(text) # Masking one of the input tokens masked_index = 8 tokenized_text[masked_index] = '[MASK]' indexed_tokens = enc.convert_tokens_to_ids(tokenized_text) segments_ids = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1] # Creating a dummy input tokens_tensor = torch.tensor([indexed_tokens]) segments_tensors = torch.tensor([segments_ids]) dummy_input = [tokens_tensor, segments_tensors] # Initializing the model with the torchscript flag # Flag set to True even though it is not necessary as this model does not have an LM Head.
1
0
1.8k
Jun ’21
How can I optimize multilingual string translations in SwiftUI for App Store apps using Localization APIs?
Hi team, I’m developing an iOS app that helps manage and translate multilingual content . The app uses SwiftUI with Localizable.strings and Bundle.localizedString(forKey:). I’m trying to optimize for dynamic language switching inside the app without restarting. I’ve tested various methods like: Text(NSLocalizedString(welcome_text, comment: )) and some approaches using @Environment(.locale), but the system doesn’t always update views instantly when language changes. Question: What’s the recommended approach (or WWDC reference) for real-time language change handling in SwiftUI apps targeting iOS 18+?
1
0
273
Oct ’25
Seeking advice on why Dog Translator Game for Dogs violates guideline 1.1.6 Safety: Objectionable Content
Hi everyone, I’m reaching out for advice on how to address a rejection under guideline 1.1.6 for my app, Dog Translator Game for Dogs. The app is meant to be a fun, interactive experience for dog owners. It offers playful features such as: Playing pre-recorded dog sounds to see how dogs react. Converting a user's voice into dog-like barks for entertaining interactions. Recording a dog’s vocalizations and matching them to a library of sounds, giving users an idea of what their dog might be saying based on the tone and pitch. To avoid any confusion, I’ve clearly presented the app as a game and for entertainment purposes only. I’ve even included “Game” in the app name and categorized it under Entertainment and Games in the App Store. The description explicitly states that the app isn’t scientifically accurate or designed to translate dog speech—it’s just a lighthearted way to interact with pets. Despite all this, the app was rejected because it was deemed to have misleading or deceptive content
2
0
572
Dec ’24
The elements in the attachment cannot add translation.
UI: Attachment(id: tooptip) { if isRecording { TooltipView { HStack(spacing: 8) { Image(systemName: waveform) .font(.title) .frame(minWidth: 100) } } .transition(.opacity.combined(with: .scale)) } } Trigger: Button(Toggle) { withAnimation{ isRecording.toggle() } } The above code did not show the animation effect when running. When I use isRecording to drive an element in a common SwiftUI view, there is an animation effect.
0
0
599
Aug ’24
How to translate TVJS IKDOMElement to Swift UIView?
Using info from https://forums.developer.apple.com/message/59669#59669, I've set up a function in Swift to be called from TVJS. I would like to apply some animations to a on-screen UIView instance from the Swift side in response to the user long selecting it via TVJS/TVML. I have verified my Swift function is being called by the TVJS longselect event handler. If I pass the longselect event's target property as a parameter to my Swift function, I see an instance of IKDOMElement on the Swift side.What is the easiest way (or is it possible) to access the UIView instance for a given IKDOMElement instance?Thanks in advance for any help,Tommy
0
0
326
Oct ’15
Could you translate this line of code to plain English?
protocol Container { associatedtype Item mutating func append(_ item: Item) var count: Int { get } subscript(i: Int) -> Item { get } associatedtype Iterator: IteratorProtocol where Iterator.Element == Item func makeIterator() -> Iterator}protocol ComparableContainer: Container where Item: Comparable { }I'm having trouble understanding the last line of code. Does it mean create ComparableContainer and make it conform to Container whose Item adopts Comparable ?
2
0
498
Feb ’18
Reply to Verifying Search APIs are working?
Thank you for this bug report. I certainly agree that we should provide some better feedback here (even if only at compile time). To be clear, though, the documentation does clarify that what you're doing by specifying a CLLocation value in the userInfo is unsupported:Each key and value must be of the following types: NSArray, NSData, NSDate, NSDictionary, NSNull, NSNumber, NSSet, NSString, or NSURL. The system may translate file scheme URLs that refer to iCloud documents to valid file URLs on a continuing device.Doesn't mean we can't be more helpful, but you need to change your code regardless.
Topic: App & System Services SubTopic: General Tags:
Sep ’15
Swift 2/Xcode 7, NSInternalInconsistencyException', reason: 'Must translate autoResizing mask into constraints to have _setHostsLayoutEngin
Hi Apple,I am Using Swift 2 and Version 7.0.1.When i am navigating to TableView i am facing below error.**Error Below**ContactPLUS[1851:47611] *** Assertion failure in -[ContactPLUS.ResultCell _setHostsLayoutEngine:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3505.16/NSLayoutConstraint_UIKitAdditions.m:28962015-10-07 20:06:55.321 ContactPLUS[1851:47611] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.'--------------------------Code below--------------------------var resultCell: ResultCell!resultCell = tableView.dequeueReusableCellWithIdentifier(ResultCell, forIndexPath: indexPath) as! ResultCell I have upgraded to Xcode 7.0.1 and getting this error.Some of the solutions are suggesting to untick auto layout option but it is not good solution.i am attaching the image for the references.Can someone please siggest some solutions which works in Xcode 7.0.1 an
0
0
1.1k
Oct ’15
Why does the execution of vDSP operations sometimes take longer in M1 native code than through Rosetta translation?
Hi I am porting some applications to M1 that make extensive use of vDSP. I found in many cases there to be a minimal speed-up, which I put down to Rosetta doing a good job translating SSE instructions into equivalent Neon instructions in the vDSP library. To try and understand this more I started profiling various areas of code and have found situations where the performance of translated code runs faster than natively. Often native code speed is similar or faster as expected, but there are a notable numbers of cases where it is not. This is not what I expected. I include a sample below to show a somewhat contrived and trivial routine exhibiting the effect. I have built it using XCode 12.5.1 in Release with an 11.3 deployment target. The Mac is running macOS 11.6. On my M1 Mac mini the Rosetta build takes around 900-1000 µs to run to completion, switching to native code it takes around 1500-1600 µs. I can make various adjustments to the data size or types of vDSP operations used to find scen
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’21
AppShortcuts.xcstrings does not translate each invocation phrase option separately, just the first
Due to our min iOS version, this is my first time using .xcstrings instead of .strings for AppShortcuts. When using the migrate .strings to .xcstrings Xcode context menu option, an .xcstrings catalog is produced that, as expected, has each invocation phrase as a separate string key. However, after compilation, the catalog changes to group all invocation phrases under the first phrase listed for each intent (see attached screenshot). It is possible to hover in blank space on the right and add more translations, but there is no 1:1 key matching requirement to the phrases on the left nor a requirement that there are the same number of keys in one language vs. another. (The lines just happen to align due to my window size.) What does that mean, practically? Do all sub-phrases in each language in AppShortcuts.xcstrings get processed during compilation, even if there isn't an equivalent phrase key declared in the AppShortcut (e.g., the ja translation has more phrases than the English)? (That makes
Replies
0
Boosts
0
Views
325
Activity
Aug ’25
Why the names of the actions “Mail to Self” and “Save to Files” on the screen “Share” may not be translated into Russian language?
Good afternoon! Please, tell me, why the names of the actions Mail to Self and Save to Files on the screen Share may not be translated into Russian language? The language on the device is Russian, the buttons Copy and Edit actions are translated. Added to info.plist Localized resources can be mixed = YES (without this setting the buttons “Copy” and “Edit action” were not translated), but for “Mail to Self” and “Save to Files” this does not work.
Replies
13
Boosts
0
Views
1.4k
Activity
Nov ’20
How to do network address translation
In KEXT, I changed the target connection information using the socketFilter. ex) run program > connect network > check destination ip and port > if need to change then change destination ip and portWhich features can be used to change destination access information in MacOS Catalina's Network Extensions?I need your help.
Replies
4
Boosts
0
Views
1.6k
Activity
Jun ’20
How translate C++ To Swift
I have little knowledge of C ++, I tried to declare the operator as follows:struct Simple2D { var x: Double! , y: Double! func setS(x0:Double , y0:Double)->Simple2D { return Simple2D(x: x0, y: y0) } func lenght(v: Simple2D)->Double { return pythagorous2(v.x, b:v.y) } }var tx = Simple2D(x: 2.0, y: 2.0)prefix operator * {}prefix func * (v: Simple2D)-> Double { return tx.x*v.x + tx.y*v.y}this does not work, how do I call the functions from another file?This original file in c++ :ile Simple2D.htemplate <typename T>struct Simple2D{ T x, y; / Simple2D <T>() { x = y = 0; } / Simple2D <T>(const T x0, const T y0) : x(x0), y(y0) { } / void operator ()(const T x0, const T y0) { x= x0; y= y0; } / bool operator ==(const Simple2D<T> &v) const;/ Simple2D <T> operator -(const Simple2D <T> &v) const;/ Simple2D <T> operator -(void) const;}file Simple2D.cpptemplate <typename T>bool Simple2D <T>::operator ==(const Simple2D <T> &v) const{ return (is_
Replies
5
Boosts
0
Views
5.1k
Activity
Aug ’15
Concurrency warning in Translation API
I encountered a concurrency compilation warning when calling the TranslationSession.translations(from: [TranslationSession.Request]) API, and I'm don't know how to resolve it. I reviewed the official demo, but it appears identical.
Replies
1
Boosts
0
Views
257
Activity
Nov ’25
Figuring out the shape of a Transformer Model To translate it to a coreML model.
Hi, I am trying to translate a Transformer Model (from hugging face) to a coreml model and the only piece I have left is to figure out the shape of the input. #Here is the code from transformers import BertModel, BertTokenizer, BertConfig import torch import coremltools as ct import torch import torchvision enc = BertTokenizer.from_pretrained(bert-base-uncased) # Tokenizing input text text = [CLS] Who was Jim Henson ? [SEP] Jim Henson was a puppeteer [SEP] tokenized_text = enc.tokenize(text) # Masking one of the input tokens masked_index = 8 tokenized_text[masked_index] = '[MASK]' indexed_tokens = enc.convert_tokens_to_ids(tokenized_text) segments_ids = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1] # Creating a dummy input tokens_tensor = torch.tensor([indexed_tokens]) segments_tensors = torch.tensor([segments_ids]) dummy_input = [tokens_tensor, segments_tensors] # Initializing the model with the torchscript flag # Flag set to True even though it is not necessary as this model does not have an LM Head.
Replies
1
Boosts
0
Views
1.8k
Activity
Jun ’21
How can I optimize multilingual string translations in SwiftUI for App Store apps using Localization APIs?
Hi team, I’m developing an iOS app that helps manage and translate multilingual content . The app uses SwiftUI with Localizable.strings and Bundle.localizedString(forKey:). I’m trying to optimize for dynamic language switching inside the app without restarting. I’ve tested various methods like: Text(NSLocalizedString(welcome_text, comment: )) and some approaches using @Environment(.locale), but the system doesn’t always update views instantly when language changes. Question: What’s the recommended approach (or WWDC reference) for real-time language change handling in SwiftUI apps targeting iOS 18+?
Replies
1
Boosts
0
Views
273
Activity
Oct ’25
Seeking advice on why Dog Translator Game for Dogs violates guideline 1.1.6 Safety: Objectionable Content
Hi everyone, I’m reaching out for advice on how to address a rejection under guideline 1.1.6 for my app, Dog Translator Game for Dogs. The app is meant to be a fun, interactive experience for dog owners. It offers playful features such as: Playing pre-recorded dog sounds to see how dogs react. Converting a user's voice into dog-like barks for entertaining interactions. Recording a dog’s vocalizations and matching them to a library of sounds, giving users an idea of what their dog might be saying based on the tone and pitch. To avoid any confusion, I’ve clearly presented the app as a game and for entertainment purposes only. I’ve even included “Game” in the app name and categorized it under Entertainment and Games in the App Store. The description explicitly states that the app isn’t scientifically accurate or designed to translate dog speech—it’s just a lighthearted way to interact with pets. Despite all this, the app was rejected because it was deemed to have misleading or deceptive content
Replies
2
Boosts
0
Views
572
Activity
Dec ’24
The elements in the attachment cannot add translation.
UI: Attachment(id: tooptip) { if isRecording { TooltipView { HStack(spacing: 8) { Image(systemName: waveform) .font(.title) .frame(minWidth: 100) } } .transition(.opacity.combined(with: .scale)) } } Trigger: Button(Toggle) { withAnimation{ isRecording.toggle() } } The above code did not show the animation effect when running. When I use isRecording to drive an element in a common SwiftUI view, there is an animation effect.
Replies
0
Boosts
0
Views
599
Activity
Aug ’24
How to translate TVJS IKDOMElement to Swift UIView?
Using info from https://forums.developer.apple.com/message/59669#59669, I've set up a function in Swift to be called from TVJS. I would like to apply some animations to a on-screen UIView instance from the Swift side in response to the user long selecting it via TVJS/TVML. I have verified my Swift function is being called by the TVJS longselect event handler. If I pass the longselect event's target property as a parameter to my Swift function, I see an instance of IKDOMElement on the Swift side.What is the easiest way (or is it possible) to access the UIView instance for a given IKDOMElement instance?Thanks in advance for any help,Tommy
Replies
0
Boosts
0
Views
326
Activity
Oct ’15
Could you translate this line of code to plain English?
protocol Container { associatedtype Item mutating func append(_ item: Item) var count: Int { get } subscript(i: Int) -> Item { get } associatedtype Iterator: IteratorProtocol where Iterator.Element == Item func makeIterator() -> Iterator}protocol ComparableContainer: Container where Item: Comparable { }I'm having trouble understanding the last line of code. Does it mean create ComparableContainer and make it conform to Container whose Item adopts Comparable ?
Replies
2
Boosts
0
Views
498
Activity
Feb ’18
Reply to Verifying Search APIs are working?
Thank you for this bug report. I certainly agree that we should provide some better feedback here (even if only at compile time). To be clear, though, the documentation does clarify that what you're doing by specifying a CLLocation value in the userInfo is unsupported:Each key and value must be of the following types: NSArray, NSData, NSDate, NSDictionary, NSNull, NSNumber, NSSet, NSString, or NSURL. The system may translate file scheme URLs that refer to iCloud documents to valid file URLs on a continuing device.Doesn't mean we can't be more helpful, but you need to change your code regardless.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’15
I deleted translate and I tried reinstalling it but all it did was this…
it just said “try again later” and I couldn’t reinstall it
Replies
0
Boosts
0
Views
580
Activity
Jul ’21
Swift 2/Xcode 7, NSInternalInconsistencyException', reason: 'Must translate autoResizing mask into constraints to have _setHostsLayoutEngin
Hi Apple,I am Using Swift 2 and Version 7.0.1.When i am navigating to TableView i am facing below error.**Error Below**ContactPLUS[1851:47611] *** Assertion failure in -[ContactPLUS.ResultCell _setHostsLayoutEngine:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3505.16/NSLayoutConstraint_UIKitAdditions.m:28962015-10-07 20:06:55.321 ContactPLUS[1851:47611] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.'--------------------------Code below--------------------------var resultCell: ResultCell!resultCell = tableView.dequeueReusableCellWithIdentifier(ResultCell, forIndexPath: indexPath) as! ResultCell I have upgraded to Xcode 7.0.1 and getting this error.Some of the solutions are suggesting to untick auto layout option but it is not good solution.i am attaching the image for the references.Can someone please siggest some solutions which works in Xcode 7.0.1 an
Replies
0
Boosts
0
Views
1.1k
Activity
Oct ’15