Posts

Post not yet marked as solved
1 Replies
88 Views
I added in the Xcode project: <my App>/ Resources/ <my App>.help/ Content/ Info.plist Resources/ search.helpindex /*localized */ index.html /*localized */ Page1.html /*localized */ And, in the Project's Info.plist: <key>CFBundleHelpBookFolder</key> <string><my App>.help</string> <key>CFBundleHelpBookName</key> <string><project' bundle id>.help</string> But when I archive it, the book help has been moved: <my App>/ Content/ Resources/ Info.plist en.lproj/ search.helpindex index.html Page1.htm So the help book, as is, is missing. If I manually move the files and folders in the Package to reconstruct the help book structure, it works. What I have to do in Xcode to let it archive the Help book?
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
116 Replies
38k Views
After uploading a new App to the App Store Connect i receive an e-mail stating:ITMS-90034: Missing or invalid signature - The bundle '...' at bundle path 'Payload/...' is not signed using an Apple submission certificate.The App don't use any capability.I've used Xcode to upload, as in a previous App which now is on the App Store.All the apps use the default configuration: "Automatically manage signing", Provisioning profile "Xcode Managed Profile", Signing Certificate Apple Development: ############The requested Signing Certificate is present in the keychain in 3 versions, the last one is valid (the older 2 are revoked).What I should correct?
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
2 Replies
172 Views
On Xcode 13.3 and iOS15.4 I don't found a way to add something in the bottom bar without Xcode warning. This sample of swiftUI code: { var body: some View { Text("Hello, World!") .toolbar { ToolbarItem(placement: .bottomBar) { Text("Bottom Bar") } } } } causes: "Unable to simultaneously satisfy constraints." (a long list follows). Am I missing something?
Posted
by Luca_65.
Last updated
.
Post marked as solved
5 Replies
2.9k Views
Studing SwiftUI in Apple's HandlingUserInput, I'm blocked in this error:No ObservableObject of type UserData found. A View.environmentObject(_:) for UserData may be missing as an ancestor of this view.The code is:final class UserData: ObservableObject { @Published var showFavoritesOnly = false @Published var landmarks = landmarkData }struct LandmarkList: View { @EnvironmentObject var userData: UserData var body: some View { NavigationView { List(landmarkData) { landmark in if !self.userData.showFavoritesOnly || landmark.isFavorite { NavigationLink(destination: LandmarkDetail(landmark: landmark)) { LandmarkRow(landmark: landmark) } } } .navigationBarTitle(Text("Landmarks")) } } } struct LandmarkList_Previews: PreviewProvider { static var previews: some View { LandmarkList() .environmentObject(UserData()) } }".environmentObject(UserData())" is present in the preview."@EnvironmentObject var userData: UserData" in the View.But the use of userData (if !self.userData.showFavoritesOnly) cause the fatal error.Can someone help me in undertanding how to proceed?
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
1 Replies
234 Views
In App Store Connect Trends tab the Sales graph show one sale happened the last day of the period; all other graphs (App Units, Top Apps, Territories) have don't have the corresponding app.
Posted
by Luca_65.
Last updated
.
Post marked as solved
11 Replies
5.2k Views
In iOS 12 and 13, up to 13.4, few lines of codes:navigationController?.navigationBar.isTranslucent = falsenavigationController?.navigationBar.barTintColor = .blacknavigationController?.navigationBar.tintColor = .redallow to hide the status bar under the navigation bar.With swiftUI is perhaps even simpler.statusBar(hidden: hideStatusBar)but it requires to rewrite the whole app from storyboard to swiftUI.Hiding the status bar, or go to full screen, is still be possible without using swiftUI on legacy code?
Posted
by Luca_65.
Last updated
.
Post marked as solved
4 Replies
2.1k Views
I would add a template image at a button to change its color runtime.I used Preview to draw and save it as a pdf.But it is rendered only as a uniform square color (which color I can change runtimne).How can I obtain the template pdf image?Why the pdf saved by Preview is not working?
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
0 Replies
491 Views
I have a storyboard based project with UIPickerView and I like to port it on the Mac with "Optimised Interface for Mac". My idea was to: In the storyboard disable installation of the UIPickerView for idiom=Mac variation. In the code substitute UIPickerView with SwiftUI Picker. What I obtained is the error: "UIPickerView is not supported when running Catalyst apps in the Mac idiom". This error is caused by the SwiftUI Picker (it is present even if remove UIPickerView and all its references). If both the UIPickerView and the SwiftUI Picker cannot be used in a storyboard based project, how can a generic Picker behaviour be obtained in a storyboard based project compatible with Mac idiom?
Posted
by Luca_65.
Last updated
.
Post marked as solved
2 Replies
699 Views
Since Xcode 11 setting iPad and Mac in General / Deployment Info fo a target enable it to run in iPad as well as in iMac. When I try to run on the iMac a document app, even the very simple one created by the Xcode on its template, it fails with the error: If the app is a document app running it in a Mac fails with the error: [OpenSavePanels] ERROR: Unable to display open panel: your app is missing the User Selected File Read app sandbox entitlement. Please ensure that your app's target capabilities include the proper entitlements. What have to be added in the project to let a document app running on iPad as well as on iMac?
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
0 Replies
313 Views
I'd have a speech at a begin of a long pressure: class Cell: UITableViewCell { override func awakeFromNib() { ... let willSpeech = UILongPressGestureRecognizer(target: self, action: #selector(longPress(gesture:))) button.addGestureRecognizer(willSpeech) } @objc func longPress(gesture: UILongPressGestureRecognizer) { switch gesture.state { case .began: let utterance = AVSpeechUtterance(string: "hello") let speechSynthesizer = AVSpeechSynthesizer() speechSynthesizer.speak(utterance) ... } } } But the speech start only when the button is released. Is there a way to let the speech start immediately even during a long pressure gesture recogniser?
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
0 Replies
240 Views
DoubleColumnNavigationViewStyle, on iPad, left an unusable space at the top. It seems to be a navigation bar's title, but the navigation bar code apply to the main navigation bar. Is there a way to hide, or at least use, the inner navigation bar? The sample code below reveals part of the screen unused by the App. import UniformTypeIdentifiers @main struct RugbyTimeApp: App { @SceneBuilder var body: some Scene { DocumentGroup( newDocument: {() -> ReferenceDocument in ReferenceDocument()}, editor: {_ -> MainView in MainView()} ) } } struct MainView: View { var body: some View { NavigationView { Text("Side View") .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color.green) Text("Hello world") .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Color.red) } .navigationViewStyle(DoubleColumnNavigationViewStyle()) .navigationTitle("Nav Title") .toolbar { ToolbarItem(placement: .navigation, content: {Button("Next page", action: {})}) } } } class ReferenceDocument: ReferenceFileDocument { static var readableContentTypes = [UTType.plainText] init() {} required init(configuration: ReadConfiguration) throws {} func snapshot(contentType: UTType) throws -> Int {return 0} func fileWrapper(snapshot: Int, configuration: WriteConfiguration) throws -> FileWrapper { let data: Data = try JSONEncoder().encode(snapshot) return FileWrapper(regularFileWithContents: data) } }
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
0 Replies
192 Views
A simple storyboard picker isn't anymore correctly displayed in iOS14 (Xcode 12.0 beta 6), but it is is in iOS13. The components are aligned out to the window so that the selected component has its first character cut away. Can a constraint be added to realign the txt to be visible also in iOS14?
Posted
by Luca_65.
Last updated
.
Post marked as solved
1 Replies
1.6k Views
The struct C correctly encode UIColor ... let c = C() let j = c.json ... struct C: Encodable { var mycolor: UIColor = .red enum CodingKeys: String, CodingKey { case color } func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) let colorData = try NSKeyedArchiver.archivedData(withRootObject: mycolor, requiringSecureCoding: false) try container.encode(colorData, forKey: .color) } var json: Data? {try? JSONEncoder().encode(self)} } but it's impossible, to me, the encode Color. var mycolor: Color = Color(.systemRed) I found the class UIColor is declared conforming to NSSecureCoding, but struct Color isn't and and extension to Codable isn't allowed outside of the type declaring file. Is there a way to circumvent this limitation?
Posted
by Luca_65.
Last updated
.
Post marked as solved
1 Replies
251 Views
Sometimes it comes back. SourceKitService is never-ending reading gigabytes from the disk. There is a so much disk use that Xcode and other application suffer and are sometimes stalled. I don't think killing it is a good idea but I hope to find a solution to avoid this penalty.
Posted
by Luca_65.
Last updated
.
Post not yet marked as solved
0 Replies
254 Views
The following code works correctly on regular variation (i.e. iPhone 11 Pro Max in landscape mode), but it fails in compact variation (i.e. iPhone 11 Pro) struct ContentView: View {     var body: some View { NavigationView { Text("Detail View") .navigationBarTitle("detail") Text("Primary View") } } } Is there a, simple, way to switch between the first and the second behaviour runtime? Otherwise this code, or spilt view code, cannot be used generically on iPhones, even on landscape mode only, because currently only iPhone 11 Pro Max is regular, while the others are compact.
Posted
by Luca_65.
Last updated
.