Post

Replies

Boosts

Views

Activity

Reply to Xcode 12+ , add to info.plist
When I select the Info.plist file from the project navigator, select an item in the property list, and right click, I can choose Add Row. When I move the cursor over an item in the property, Add (+) and Remove (-) buttons appear next to the item. Clicking the Add button adds a new item. If neither of these things work for you, you will have to provide more detailed information, such as the steps you are taking to add an item to the property list.
Feb ’21
Reply to Can't Figure Out How to Use Function
Are you sure the Text statement is correct? Does the code compile if you provide a static string, such as the following: Text("Today") If the Text statement is correct and you still get a compiler error, you are going to have to supply more code for anyone to help you. Show the code for the SwiftUI view.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to Can't Figure Out How to Use Function
The isDateInToday function is part of the Foundation framework. You should be calling that function (like in your last code snippet) and not writing your own version of the function. If you are getting a compiler error about a missing isDateInToday function, import the Foundation framework in your Swift code. import Foundation
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to SwiftUI document app with UIViewRepresentable
Your SwiftUI document struct holds the data and handles the saving to a file and loading the data from the file. Your SwiftUI content view has a property for the document. Usually this property uses the @Binding property wrapper. The content view will have the UIView (using UIViewRepresentable) as part of its body. The UIView needs a property to access to whatever data it needs to do the PencilKit drawing. This data is part of the document. Without more information about your document and data model, no one is going to be able to give you a more detailed answer to this question.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to Single page App
In Xcode 12 Apple consolidated several iOS application project templates into an App template. Choose the App template for your project. If you really want the old template, you will have to install Xcode 11. The Xcode Releases site (xcodereleases.com) has download links for every Xcode version Apple has ever released.
Feb ’21
Reply to XCode 12 - Can't login to Github without Access Token???
To create the personal access token, Go to GitHub and log in. In the upper right corner you will see your avatar with a button to open a menu. Click and choose Settings. Choose Developer Settings from the list of settings. Choose Personal Access Tokens from the list of developer settings. Click the Generate a personal access token link. Enter Xcode in the Note text field to let you know the token is for Xcode. Select the scopes for the access token. Click the Generate token button. Copy the token so you can paste it in Xcode. Now to use the token in Xcode, Choose Xcode Preferences. Click the Accounts button at the the top of the preferences window. Click the Add button. Choose GitHub from the list of accounts. Click the Continue button. Enter your GitHub username and personal access token in the text fields. Click the Sign In button.
Feb ’21
Reply to Using CoreData entity in SwiftUI view
If you removed the meetings property, that error message is stale. You may need to supply a Meeting object to the preview. One of the following two methods should work: First, supply an empty Meeting object. MeetingRow(meeting: Meeting()) Second, use the .constant modifier when supplying the Meeting object. MeetingRow(meeting: .constant(Meeting())) You may need to supply a meeting name, URL, and date to the initializer. You can also temporarily comment out the preview code to get the app to build.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to Using CoreData entity in SwiftUI view
You created the MeetingRow view to display one meeting, but instead of having a property for the one meeting to display, you have a @FetchRequest property that contains a set of meetings. A meeting has a meetingName property, but a set of meetings does not. The set contains meetings so you get a compiler error. To fix the error, get rid of the meetings property and add a meeting property of type Meeting. Your Text item will look like the following: Text(meeting.meetingName ?? "nil")
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to Devices
Do I have to program the app for each Iphone separately No you don't. how could I make it so that the labels and texts (no matter how big the Iphone is) are in one uniform place? If you are using UIKit for the app's user interface, do some research on auto layout. Apple provides an Auto Layout Guide - https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html#//apple_ref/doc/uid/TP40010853-CH7-SW1 on their developer website. If you are using SwiftUI, you declare how you want the interface to look, and SwiftUI takes care of the details.
Jan ’21
Reply to Persistent data with Core Data
If you want an answer, you need to be more specific about the following statement: all the data is gone Is the saved data in your app gone when you restart Xcode? Or are you losing data in your app's Xcode project when you restart Xcode? Are you running your app on a device or the iOS Simulator?
Dec ’20