Is is possible to program a website with XCode ?
Post
Replies
Boosts
Views
Activity
Can anyone explain how the collaboration works as a compilation process with Xcode in present ?
Sincerelly Yours
I'm reading https://docs.swift.org/swift-book/ReferenceManual/Declarations.html the swift reference manual at declarations to learn how to program a scope and still can't find the correct answer to solve these issue.
//
// ContentView.swift
// MyMacCamera
//
// Created by Besleaga Alexandru Marian on 14.06.2021.
//
import SwiftUI
struct ContentView: View {
var body: some View {
Text("Hello, world!")
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
class AVCaptureDevice : NSObject {
func lockForConfiguration() throws {
}
func unlockForConfiguration(){
}
}
class AVCaptureSession : NSObject {
func startRunning(){
}
func stopRunning(){
}
}
class func authorizationStatus(for mediaType: AVMediaType) -> AVAuthorizationStatus {}
Cannot find type 'AVAuthorizationStatus' in scope
How should I proceed or should I do handle these error ?
I start learning Objective-C and the Xcode is returning errors of identification for the code that I'm developing.
- (void)mouseDown:(NSEvent *)event;
Use of undeclared identifier 'mouseDown'
NSLog("mouseDown")
How to identify 'mouseDown" Event and receive a event in the output ?
initializer 'init(value:total:)' requires that 'Int' conform to 'BinaryFloatingPoint'
CompileDylibError: Failed to build MeetingView.swift
Compiling failed: initializer 'init(value:total:)' requires that 'Int' conform to 'BinaryFloatingPoint'
/Users/besleagaalexandrumarian/Documents/Scrumdinger/Scrumdinger/MeetingView.swift:13:13: error: initializer 'init(value:total:)' requires that 'Int' conform to 'BinaryFloatingPoint'
ProgressView(value: __designTimeInteger("#9345.[1].[0].property.[0].[0].arg[0].value.[0].arg[0].value", fallback: 5), total: __designTimeInteger("#9345.[1].[0].property.[0].[0].arg[0].value.[0].arg[1].value", fallback: 15))
^
SwiftUI.ProgressView:3:12: note: where 'V' = 'Int'
public initV(value: V?, total: V = 1.0) where Label == EmptyView, CurrentValueLabel == EmptyView, V : BinaryFloatingPoint
^
==================================
| BuildInvocationError
|
| /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -F /Applications/Xcode.app/Contents/SharedFrameworks-iphonesimulator -enforce-exclusivity=checked -DDEBUG -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -target x86_64-apple-ios14.0-simulator -module-cache-path /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -enable-testing -swift-version 5 -I /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Products/Debug-iphonesimulator -F /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Products/Debug-iphonesimulator -c -j4 -serialize-diagnostics -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-generated-files.hmap -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-own-target-headers.hmap -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-all-target-headers.hmap -Xcc -iquote -Xcc /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Scrumdinger-project-headers.hmap -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Products/Debug-iphonesimulator/include -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/DerivedSources-normal/x86_64 -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/DerivedSources/x86_64 -Xcc -I/Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/DerivedSources -Xcc -DDEBUG=1 -working-directory /Users/besleagaalexandrumarian/Documents/Scrumdinger /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Objects-normal/x86_64/MeetingView.2.preview-thunk.swift -o /Users/besleagaalexandrumarian/Library/Developer/Xcode/DerivedData/Scrumdinger-ezuqtqwebpjpzeeplhmsovhoewgh/Build/Intermediates.noindex/Previews/Scrumdinger/Intermediates.noindex/Scrumdinger.build/Debug-iphonesimulator/Scrumdinger.build/Objects-normal/x86_64/MeetingView.2.preview-thunk.o -module-name Scrumdinger_PreviewReplacement_MeetingView_2 -Onone -Xfrontend -disable-modules-validate-system-headers
I do not have any preview after Refactoring names lines of code ?
I have a Swift File and and a Swift UI File.
The Swift UI File displays the Canvas Live Preview.
The Swift File that I'm coding dose not display the Canvas Live Preview.
I'm learning after a Apple iOS App Tutorial and the compiler sends back a lot of errors. How should I start learning how to handle these errors in Swift programming language only ?
//
// TowerAppApp.swift
// TowerApp
//
// Created by Besleaga Alexandru Marian on 5/17/21.
//
import SwiftUI
@main
struct TowerApp: App {
var body: some Scene {
WindowGroup {
Text("5/17/21")
Text(greeting + otherGreeting + name)
}
}
}
let greeting = "Welcome!"
let otherGreeting = " Have a nice time!"
let name = " Marie Curie"
Button("Sign In", action: signIn)
struct ButtonLabel where Label : View{
Button(action: signIn) {
Text("Sign In")
}
}
Cannot find 'signIn' in scope
Cannot find type 'signIn'' in scope
How to declare the UI Button ?
//
// GegeApp.swift
// Gege
//
// Created by Besleaga Alexandru Marian on 5/15/21.
import SwiftUI
@main
struct GegeApp: App {
var body: some Scene {
WindowGroup {
Text("Hello, world!")
}
}
}
How do I declare protocol App in context ?
//
// GegeApp.swift
// Gege
//
// Created by Besleaga Alexandru Marian on 5/15/21.
//
import SwiftUI
@main
struct GegeApp: App {
var body: some Scene {
WindowGroup {
Text("Besleaga Alexandru Marian")
}
#if os(macOS)
Settings {
SettingsView()
}
#endif
}
}
struct GeneralSettingsView: View {
@AppStorage("showPreview") private var showPreview = true
@AppStorage("fontSize") private var fontSize = 12.0
var body: some View {
Form {
Toggle("Show Previews", isOn: $showPreview)
Slider(value: $fontSize, in: 9...96) {
Text("Font Size (\(fontSize, specifier: "%.0f") pts)")
}
}
.padding(20)
.frame(width: 350, height: 100)
}
}
struct SettingsView: View {
private enum Tabs: Hashable {
case general, advanced
}
var body: some View {
TabView {
GeneralSettingsView()
.tabItem {
Label("General", systemImage: "gear")
}
.tag(Tabs.general)
`AdvancedSettingsView()`
.tabItem {
Label("Advanced", systemImage: "star")
}
.tag(Tabs.advanced)
}
.padding(20)
.frame(width: 375, height: 150)
}
}
Cannot find AdvancedSettingsView in scope ?
Select a scheme that builds a target which contains the current file, or add this file to a target that is built by the current scheme.
I'm new to searching in the Apple Developer Documentation and want to ask were can I find the system "sleep/restart/shutdown" functions of the operating system in the Apple Developer Documentation ?
//
// main.m
// TowergraphOS
//
// Created by Besleaga Alexandru Marian on 5/12/21.
//
#import Foundation/Foundation.h
int main(int argc, const char * argv[]) {
@autoreleasepool {
// insert code here...
NSLog(@"Hello, World!");
}
return 1;
}
I want to declare class NSObject for class initializing.
I'm learning how to program a button for my iOS App Development and I'm receiving these issue("error") that specifies the next text "Cannot find 'signIn' in scope".
How to enable alternate pointer control with keyboard key combination or facial expressions ?