dw2019rust icon indicating copy to clipboard operation
dw2019rust copied to clipboard

Updates for Xcode in 2024

Open zaddok opened this issue 8 months ago • 0 comments

Thank-you for creating this documentation. It looks like it's going to save me some time maintaining multiple copies of the same code. Surprisingly things mostly work the same as before. Just a few notes as I work through this.

  1. When creating the iOS project, the project options have different names. I chose "New Project", "iOS", "App". There might be a neater way to do this, but I updated the ContentView.swift file to have a testing() function that is called from the view code:
    // Add a testing() function to the ContentView.swift file
    func testing() -> String {
        lookup();
        let wl = wordlength("happy");
        let wc = wordcount(20);
        print("hello \(wl) \(wc)")
        return "hello";

    }

    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.tint)
            Text(testing()) // Get text from new test function
        }
        .padding()
    }
  1. The build script won't run unless you go to the "Build Settings" tab and find the "User Script Sandboxing" value and set it to "No"

zaddok avatar Jun 18 '24 15:06 zaddok