├── Alert ├── Alert │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── AlertApp.swift │ └── ContentView.swift └── Alert.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Chat ├── Chat │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── ChatApp.swift │ ├── Message.swift │ ├── SendMessageButton.swift │ ├── MessageTextField.swift │ ├── ChatMessagesList.swift │ ├── ChatView.swift │ ├── MessageCell.swift │ └── ChatViewModel.swift └── Chat.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alejandrina.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alejandrina.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Link ├── Link │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── LinkApp.swift │ └── ContentView.swift └── Link.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── App Icons ├── App Icons │ ├── Assets │ │ ├── Robot@2x.png │ │ ├── Robot@3x.png │ │ ├── Tennis@2x.png │ │ ├── Tennis@3x.png │ │ ├── Lollipop@2x.png │ │ └── Lollipop@3x.png │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── App_IconsApp.swift │ ├── AppSettings.swift │ └── ContentView.swift ├── App Icons.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ └── ale_patron.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── ale_patron.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── App-Icons-Info.plist ├── Lights ├── Lights │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── LightsApp.swift │ ├── ContentView.swift │ └── Info.plist └── Lights.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Spotify ├── Spotify │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── album_cover.imageset │ │ │ ├── album_cover.png │ │ │ └── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── SpotifyApp.swift │ ├── Info.plist │ └── ContentView.swift └── Spotify.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ ├── xcuserdata │ └── alep.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist │ └── project.pbxproj ├── BookCharts ├── BookCharts │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── BookChartsApp.swift │ ├── BookStat.swift │ ├── ContentView.swift │ └── BookDataProvider.swift └── BookCharts.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alejandrina.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alejandrina.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Directions ├── Directions │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── DirectionsApp.swift │ ├── Info.plist │ └── ContentView.swift └── Directions.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── JSON Map ├── JSON Map │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── JSON_MapApp.swift │ ├── locations.json │ ├── Info.plist │ └── ContentView.swift └── JSON Map.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Translate ├── Chat │ ├── Chat │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── AccentColor.colorset │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Preview Content │ │ │ └── Preview Assets.xcassets │ │ │ │ └── Contents.json │ │ ├── ChatApp.swift │ │ ├── Message.swift │ │ ├── SendMessageButton.swift │ │ ├── MessageTextField.swift │ │ ├── ChatMessagesList.swift │ │ ├── ChatView.swift │ │ ├── MessageCell.swift │ │ └── ChatViewModel.swift │ └── Chat.xcodeproj │ │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ ├── alepatron.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ └── alejandrina.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ ├── alepatron.xcuserdatad │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ │ └── alejandrina.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── Translate │ ├── Translate │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── TranslateApp.swift │ ├── Translate.entitlements │ └── ContentView.swift │ ├── Translate.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── alepatron.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── alepatron.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist │ ├── TranslateTests │ └── TranslateTests.swift │ └── TranslateUITests │ ├── TranslateUITestsLaunchTests.swift │ └── TranslateUITests.swift ├── Emoji Search ├── Emoji Search │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── Emoji_SearchApp.swift │ ├── ContentView.swift │ └── EmojiProvider.swift └── Emoji Search.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Gemini Chat ├── Gemini Chat │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── GeminiChat.plist │ ├── Message.swift │ ├── Gemini_ChatApp.swift │ ├── ErrorView.swift │ ├── SendMessageButton.swift │ ├── LoadingView.swift │ ├── MessageTextField.swift │ ├── ChatMessagesList.swift │ ├── ChatViewModel.swift │ ├── ChatView.swift │ ├── GeminiClient.swift │ └── MessageCell.swift └── Gemini Chat.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alejandrina.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved │ └── xcuserdata │ └── alejandrina.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Music Search ├── Music Search │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── Music_SearchApp.swift │ ├── ArtworkLoader.swift │ ├── SongListViewModel.swift │ ├── Info.plist │ ├── DataModel.swift │ └── ContentView.swift └── Music Search.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Bitcoin Price ├── Bitcoin Price │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── Bitcoin_PriceApp.swift │ ├── PriceDetails.swift │ ├── BitcoinPriceViewModel.swift │ ├── CoindeskAPIService.swift │ ├── Info.plist │ └── BitcoinPriceView.swift └── Bitcoin Price.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Progress View ├── Progress View │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── Progress_ViewApp.swift │ └── ContentView.swift └── Progress View.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── ale_patron.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── ale_patron.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Useless Facts ├── Useless Facts │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── Useless_FactsApp.swift │ ├── ContentView.swift │ └── ViewModel.swift └── Useless Facts.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── ale_patron.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── ale_patron.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── QR Code Generator ├── QR Code Generator │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── QR_Code_GeneratorApp.swift │ ├── QRCodeGenerator.swift │ ├── Info.plist │ ├── ImageSaver.swift │ └── ContentView.swift └── QR Code Generator.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── alep.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ └── alep.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist └── LICENSE /Alert/Alert/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Chat/Chat/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Link/Link/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /App Icons/App Icons/Assets/Robot@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/App Icons/App Icons/Assets/Robot@2x.png -------------------------------------------------------------------------------- /App Icons/App Icons/Assets/Robot@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/App Icons/App Icons/Assets/Robot@3x.png -------------------------------------------------------------------------------- /App Icons/App Icons/Assets/Tennis@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/App Icons/App Icons/Assets/Tennis@2x.png -------------------------------------------------------------------------------- /App Icons/App Icons/Assets/Tennis@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/App Icons/App Icons/Assets/Tennis@3x.png -------------------------------------------------------------------------------- /Lights/Lights/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Spotify/Spotify/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /App Icons/App Icons/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /App Icons/App Icons/Assets/Lollipop@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/App Icons/App Icons/Assets/Lollipop@2x.png -------------------------------------------------------------------------------- /App Icons/App Icons/Assets/Lollipop@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/App Icons/App Icons/Assets/Lollipop@3x.png -------------------------------------------------------------------------------- /BookCharts/BookCharts/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Directions/Directions/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Music Search/Music Search/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Progress View/Progress View/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Translate/Translate/Translate/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Alert/Alert/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Chat/Chat/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Link/Link/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Lights/Lights/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Spotify/Spotify/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /App Icons/App Icons/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /BookCharts/BookCharts/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Directions/Directions/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Music Search/Music Search/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Progress View/Progress View/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Translate/Translate/Translate/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Spotify/Spotify/Assets.xcassets/album_cover.imageset/album_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Spotify/Spotify/Assets.xcassets/album_cover.imageset/album_cover.png -------------------------------------------------------------------------------- /Chat/Chat.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Link/Link.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Alert/Alert.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lights/Lights.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Spotify/Spotify.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /App Icons/App Icons.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JSON Map/JSON Map.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Translate/Chat/Chat.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Alert/Alert/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BookCharts/BookCharts.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chat/Chat/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Directions/Directions.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lights/Lights/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Link/Link/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Music Search/Music Search.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Link/Link.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Link/Link.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Progress View/Progress View.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Spotify/Spotify/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Translate/Translate/Translate.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Alert/Alert.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Alert/Alert.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /App Icons/App Icons/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /BookCharts/BookCharts/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Directions/Directions/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Lights/Lights.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Lights/Lights.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Music Search/Music Search/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Progress View/Progress View/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Chat/Chat.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Chat/Chat.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Spotify/Spotify.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Spotify/Spotify.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Translate/Translate/Translate/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /JSON Map/JSON Map.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/JSON Map/JSON Map.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Directions/Directions.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Directions/Directions.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Spotify/Spotify/SpotifyApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SpotifyApp.swift 3 | // Spotify 4 | // 5 | 6 | import SwiftUI 7 | 8 | @main 9 | struct SpotifyApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | ContentView() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator.xcodeproj/xcuserdata/alep.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /Translate/Chat/Chat.xcodeproj/project.xcworkspace/xcuserdata/alepatron.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Translate/Chat/Chat.xcodeproj/project.xcworkspace/xcuserdata/alepatron.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /App Icons/App Icons.xcodeproj/project.xcworkspace/xcuserdata/ale_patron.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/App Icons/App Icons.xcodeproj/project.xcworkspace/xcuserdata/ale_patron.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /App Icons/App Icons/App_IconsApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // App_IconsApp.swift 3 | // App Icons 4 | // 5 | 6 | import SwiftUI 7 | 8 | @main 9 | struct App_IconsApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | ContentView() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Emoji Search/Emoji Search.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Music Search/Music Search.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Music Search/Music Search.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Translate/Chat/Chat.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Translate/Chat/Chat.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Bitcoin Price/Bitcoin Price.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /BookCharts/BookCharts.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/BookCharts/BookCharts.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Directions/Directions/DirectionsApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DirectionsApp.swift 3 | // Directions 4 | // 5 | 6 | import SwiftUI 7 | 8 | @main 9 | struct DirectionsApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | ContentView() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Gemini Chat/Gemini Chat.xcodeproj/project.xcworkspace/xcuserdata/alejandrina.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Progress View/Progress View.xcodeproj/project.xcworkspace/xcuserdata/ale_patron.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Progress View/Progress View.xcodeproj/project.xcworkspace/xcuserdata/ale_patron.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Translate/Translate/Translate.xcodeproj/project.xcworkspace/xcuserdata/alepatron.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Translate/Translate/Translate.xcodeproj/project.xcworkspace/xcuserdata/alepatron.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Useless Facts/Useless Facts.xcodeproj/project.xcworkspace/xcuserdata/ale_patron.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/Useless Facts/Useless Facts.xcodeproj/project.xcworkspace/xcuserdata/ale_patron.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Chat/Chat/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search/Emoji_SearchApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Emoji_SearchApp.swift 3 | // Emoji Search 4 | // 5 | 6 | import SwiftUI 7 | 8 | @main 9 | struct Emoji_SearchApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | ContentView() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apatronl/YouTube/HEAD/QR Code Generator/QR Code Generator.xcodeproj/project.xcworkspace/xcuserdata/alep.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Progress View/Progress View/Progress_ViewApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Progress_ViewApp.swift 3 | // Progress View 4 | // 5 | 6 | import SwiftUI 7 | 8 | @main 9 | struct Progress_ViewApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | ContentView() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts/Useless_FactsApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Useless_FactsApp.swift 3 | // Useless Facts 4 | // 5 | 6 | import SwiftUI 7 | 8 | @main 9 | struct Useless_FactsApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | ContentView() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /BookCharts/BookCharts/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/GeminiChat.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | API_KEY 6 | YOUR_KEY_HERE 7 | 8 | 9 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Chat/Chat/ChatApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatApp.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct ChatApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ChatView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Alert/Alert/AlertApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlertApp.swift 3 | // Alert 4 | // 5 | // Created by Ale Patrón on 10/4/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct AlertApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/ChatApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatApp.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct ChatApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ChatView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Link/Link/LinkApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LinkApp.swift 3 | // Link 4 | // 5 | // Created by Alejandrina Patrón López on 4/3/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct LinkApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Chat/Chat/Message.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Message.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import Foundation 9 | 10 | struct Message: Identifiable { 11 | let id = UUID() 12 | let role: Role 13 | let text: String 14 | } 15 | 16 | enum Role { 17 | case sender, receiver 18 | } 19 | -------------------------------------------------------------------------------- /Chat/Chat.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Lights/Lights/LightsApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LightsApp.swift 3 | // Lights 4 | // 5 | // Created by Alejandrina Patrón López on 3/17/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct LightsApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Link/Link.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/QR_Code_GeneratorApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // QR_Code_GeneratorApp.swift 3 | // QR Code Generator 4 | // 5 | 6 | import SwiftUI 7 | 8 | @main 9 | struct QR_Code_GeneratorApp: App { 10 | var body: some Scene { 11 | WindowGroup { 12 | ContentView() 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Alert/Alert.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Lights/Lights.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Spotify/Spotify.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /App Icons/App Icons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BookCharts/BookCharts/BookChartsApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BookChartsApp.swift 3 | // BookCharts 4 | // 5 | // Created by Ale Patrón on 2/25/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct BookChartsApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/Message.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Message.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import Foundation 9 | 10 | struct Message: Identifiable { 11 | let id = UUID() 12 | let role: Role 13 | let text: String 14 | } 15 | 16 | enum Role { 17 | case sender, receiver 18 | } 19 | -------------------------------------------------------------------------------- /JSON Map/JSON Map.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/JSON_MapApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JSON_MapApp.swift 3 | // JSON Map 4 | // 5 | // Created by Alejandrina Patrón López on 3/9/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct JSON_MapApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Translate/Chat/Chat.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BookCharts/BookCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Directions/Directions.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/Gemini_ChatApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Gemini_ChatApp.swift 3 | // Gemini Chat 4 | // 5 | // Created by Ale Patrón on 4/22/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct Gemini_ChatApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ChatView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Music Search/Music Search.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Progress View/Progress View.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Translate/Translate/Translate/TranslateApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TranslateApp.swift 3 | // Translate 4 | // 5 | // Created by Alejandrina Patron on 9/11/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct TranslateApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/ErrorView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ErrorView.swift 3 | // Gemini Chat 4 | // 5 | // Created by Ale Patrón on 4/22/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ErrorView: View { 11 | var body: some View { 12 | Text("Something went wrong, please try sending your message again.") 13 | .foregroundStyle(Color.red) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/Message.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Message.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import Foundation 9 | 10 | struct Message: Identifiable { 11 | let id = UUID() 12 | let role: Role 13 | let text: String 14 | var translation: String? = nil 15 | } 16 | 17 | enum Role { 18 | case sender, receiver 19 | } 20 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/Bitcoin_PriceApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Bitcoin_PriceApp.swift 3 | // Bitcoin Price 4 | // 5 | // Created by Alejandrina Patrón López on 8/10/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct Bitcoin_PriceApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | BitcoinPriceView(viewModel: BitcoinPriceViewModel()) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Music Search/Music Search/Music_SearchApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Music_SearchApp.swift 3 | // Music Search 4 | // 5 | // Created by Alejandrina Patrón López on 1/18/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct Music_SearchApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView(viewModel: SongListViewModel()) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Translate/Translate/TranslateTests/TranslateTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TranslateTests.swift 3 | // TranslateTests 4 | // 5 | // Created by Alejandrina Patron on 9/11/24. 6 | // 7 | 8 | import Testing 9 | 10 | struct TranslateTests { 11 | 12 | @Test func example() async throws { 13 | // Write your test here and use APIs like `#expect(...)` to check expected conditions. 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Translate/Translate/Translate/Translate.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Chat/Chat/SendMessageButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendMessageButton.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SendMessageButton: View { 11 | 12 | let action: () -> Void 13 | 14 | var body: some View { 15 | Button(action: action) { 16 | Image(systemName: "paperplane.circle.fill") 17 | .font(.title) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/SendMessageButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendMessageButton.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SendMessageButton: View { 11 | 12 | let action: () -> Void 13 | 14 | var body: some View { 15 | Button(action: action) { 16 | Image(systemName: "paperplane.circle.fill") 17 | .font(.title) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/SendMessageButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SendMessageButton.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SendMessageButton: View { 11 | 12 | let action: () -> Void 13 | 14 | var body: some View { 15 | Button(action: action) { 16 | Image(systemName: "paperplane.circle.fill") 17 | .font(.title) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "generative-ai-swift", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/google/generative-ai-swift", 7 | "state" : { 8 | "revision" : "584b1e9a8561716a34b16b8729ca9b85a60f0f95", 9 | "version" : "0.5.0" 10 | } 11 | } 12 | ], 13 | "version" : 2 14 | } 15 | -------------------------------------------------------------------------------- /Spotify/Spotify/Assets.xcassets/album_cover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "album_cover.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Link/Link.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Link.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Alert/Alert.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Alert.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Lights/Lights.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Lights.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Chat/Chat.xcodeproj/xcuserdata/alejandrina.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Chat.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Spotify/Spotify.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Spotify.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /JSON Map/JSON Map.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | JSON Map.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Translate/Chat/Chat.xcodeproj/xcuserdata/alepatron.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Chat.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /App Icons/App Icons.xcodeproj/xcuserdata/ale_patron.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | App Icons.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Directions/Directions.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Directions.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Translate/Chat/Chat.xcodeproj/xcuserdata/alejandrina.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Chat.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /BookCharts/BookCharts.xcodeproj/xcuserdata/alejandrina.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BookCharts.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Emoji Search.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Music Search/Music Search.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Music Search.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Bitcoin Price.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat.xcodeproj/xcuserdata/alejandrina.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Gemini Chat.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Translate/Translate/Translate.xcodeproj/xcuserdata/alepatron.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Translate.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Progress View/Progress View.xcodeproj/xcuserdata/ale_patron.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Progress View.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts.xcodeproj/xcuserdata/ale_patron.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Useless Facts.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator.xcodeproj/xcuserdata/alep.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | QR Code Generator.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/LoadingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingView.swift 3 | // Gemini Chat 4 | // 5 | // Created by Ale Patrón on 4/22/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct LoadingView: View { 11 | 12 | var body: some View { 13 | Image(systemName: "ellipsis.rectangle.fill") 14 | .symbolRenderingMode(.hierarchical) 15 | .foregroundStyle(Color.gray) 16 | .font(.largeTitle) 17 | .symbolEffect(.variableColor, options: .repeating, isActive: true) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Chat/Chat/MessageTextField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageTextField.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MessageTextField: View { 11 | 12 | @Binding var draftMessage: String 13 | 14 | var body: some View { 15 | TextField("Message...", text: $draftMessage) 16 | .textFieldStyle(.plain) 17 | .padding(8) 18 | .overlay( 19 | RoundedRectangle(cornerRadius: 18) 20 | .stroke(.blue, lineWidth: 1) 21 | ) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/MessageTextField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageTextField.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MessageTextField: View { 11 | 12 | @Binding var draftMessage: String 13 | 14 | var body: some View { 15 | TextField("Message...", text: $draftMessage) 16 | .textFieldStyle(.plain) 17 | .padding(8) 18 | .overlay( 19 | RoundedRectangle(cornerRadius: 18) 20 | .stroke(.blue, lineWidth: 1) 21 | ) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/MessageTextField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageTextField.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MessageTextField: View { 11 | 12 | @Binding var draftMessage: String 13 | 14 | var body: some View { 15 | TextField("Message...", text: $draftMessage) 16 | .textFieldStyle(.plain) 17 | .padding(8) 18 | .overlay( 19 | RoundedRectangle(cornerRadius: 18) 20 | .stroke(.blue, lineWidth: 1) 21 | ) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /BookCharts/BookCharts/BookStat.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BookStat.swift 3 | // BookCharts 4 | // 5 | // Created by Ale Patrón on 3/15/24. 6 | // 7 | 8 | import Foundation 9 | 10 | struct BookStat: Identifiable { 11 | let id = UUID() 12 | let year: Date 13 | let counts: [Genre: Int] 14 | } 15 | 16 | enum Genre: String { 17 | case business 18 | case fiction 19 | case nonFiction 20 | case biography 21 | 22 | var label: String { 23 | switch self { 24 | case .nonFiction: 25 | return "Non-Fiction" 26 | default: 27 | return self.rawValue.capitalized 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Chat/Chat/ChatMessagesList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatMessageList.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ChatMessagesList: View { 11 | 12 | @Bindable var viewModel: ChatViewModel 13 | 14 | var body: some View { 15 | ScrollView { 16 | ForEach(viewModel.messages) { message in 17 | MessageCell(message: message) 18 | .padding(message.role.padding) 19 | .id(message.id) 20 | } 21 | } 22 | .scrollPosition(id: $viewModel.scrollPosition) 23 | .defaultScrollAnchor(.bottom) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Link/Link/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Link 4 | // 5 | 6 | import SwiftUI 7 | 8 | struct ContentView: View { 9 | var body: some View { 10 | Link(destination: URL(string: "https://youtube.com/alepatron")!, label: { 11 | Label("Watch my videos on YouTube!", systemImage: "play.rectangle.fill") 12 | .font(.system(size: 18).bold()) 13 | .padding(6) 14 | .foregroundColor(.white) 15 | .background(Color.red) 16 | .cornerRadius(6) 17 | }) 18 | } 19 | } 20 | 21 | struct ContentView_Previews: PreviewProvider { 22 | static var previews: some View { 23 | ContentView() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/ChatMessagesList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatMessageList.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ChatMessagesList: View { 11 | 12 | @Bindable var viewModel: ChatViewModel 13 | 14 | var body: some View { 15 | ScrollView { 16 | ForEach(viewModel.messages) { message in 17 | MessageCell(message: message) 18 | .padding(message.role.padding) 19 | .id(message.id) 20 | } 21 | } 22 | .scrollPosition(id: $viewModel.scrollPosition) 23 | .defaultScrollAnchor(.bottom) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Useless Facts 4 | // 5 | 6 | import SwiftUI 7 | 8 | struct ContentView: View { 9 | 10 | @StateObject private var viewModel: ViewModel = ViewModel() 11 | 12 | var body: some View { 13 | VStack { 14 | Spacer() 15 | Text(viewModel.fact.text) 16 | .font(.largeTitle) 17 | .bold() 18 | .padding() 19 | Spacer() 20 | HStack { 21 | Spacer() 22 | Button(action: { 23 | Task.init { await viewModel.start() } 24 | }, label: { 25 | Image(systemName: "arrow.clockwise") 26 | .font(.largeTitle) 27 | }) 28 | .padding() 29 | } 30 | }.task { 31 | await viewModel.start() 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/locations.json: -------------------------------------------------------------------------------- 1 | { 2 | "locations": [ 3 | { 4 | "id": 0, 5 | "name": "New York City", 6 | "latitude": 40.71, 7 | "longitude": -74 8 | }, 9 | { 10 | "id": 1, 11 | "name": "Barcelona", 12 | "latitude": 41.38, 13 | "longitude": 2.17 14 | }, 15 | { 16 | "id": 2, 17 | "name": "Tokyo", 18 | "latitude": 35.68, 19 | "longitude": 139.76 20 | }, 21 | { 22 | "id": 3, 23 | "name": "Atlanta", 24 | "latitude": 33.74, 25 | "longitude": -84.38 26 | }, 27 | { 28 | "id": 4, 29 | "name": "Paris", 30 | "latitude": 48.85, 31 | "longitude": 2.35 32 | }, 33 | { 34 | "id": 5, 35 | "name": "Hong Kong", 36 | "latitude": 22.31, 37 | "longitude": 114.16 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /Chat/Chat/ChatView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatView.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @MainActor 11 | struct ChatView: View { 12 | 13 | @Bindable private var viewModel: ChatViewModel = ChatViewModel() 14 | 15 | var body: some View { 16 | NavigationStack { 17 | VStack { 18 | ChatMessagesList(viewModel: viewModel) 19 | HStack { 20 | MessageTextField(draftMessage: $viewModel.draftMessage) 21 | SendMessageButton { 22 | viewModel.sendMessage() 23 | } 24 | .disabled(!viewModel.canSendMessage) 25 | } 26 | .padding(8) 27 | } 28 | .navigationTitle("Chat") 29 | } 30 | } 31 | } 32 | 33 | #Preview { 34 | ChatView() 35 | } 36 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts/ViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewModel.swift 3 | // Useless Facts 4 | // 5 | 6 | import Foundation 7 | 8 | @MainActor 9 | public final class ViewModel: ObservableObject { 10 | 11 | @Published public private(set) var fact = Fact(text: "Loading...") 12 | 13 | public func start() async { 14 | do { 15 | fact = try await getFact() 16 | } catch { 17 | fact = Fact(text: error.localizedDescription) 18 | } 19 | } 20 | 21 | private func getFact() async throws -> Fact { 22 | guard let url = URL(string: "https://uselessfacts.jsph.pl/random.json?language=en") else { 23 | throw URLError(.unknown) 24 | } 25 | 26 | let (data, _) = try await URLSession.shared.data(from: url) 27 | let fact = try JSONDecoder().decode(Fact.self, from: data) 28 | return fact 29 | } 30 | } 31 | 32 | public struct Fact: Decodable { 33 | let text: String 34 | } 35 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/PriceDetails.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PriceDetails.swift 3 | // Bitcoin Price 4 | // 5 | // Created by Alejandrina Patrón López on 8/10/21. 6 | // 7 | 8 | import Foundation 9 | 10 | enum Currency: CaseIterable { 11 | case usd 12 | case gbp 13 | case eur 14 | 15 | var icon: String { 16 | switch self { 17 | case .usd: 18 | return "💵" 19 | case .gbp: 20 | return "💷" 21 | case .eur: 22 | return "💶" 23 | } 24 | } 25 | 26 | var code: String { 27 | switch self { 28 | case .usd: 29 | return "USD" 30 | case .gbp: 31 | return "GBP" 32 | case .eur: 33 | return "EUR" 34 | } 35 | } 36 | } 37 | 38 | struct PriceDetails { 39 | let currency: Currency 40 | let rate: String 41 | 42 | public init(currency: Currency, rate: String = "--") { 43 | self.currency = currency 44 | self.rate = rate 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Music Search/Music Search/ArtworkLoader.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArtworkLoader.swift 3 | // Music Search 4 | // 5 | // Created by Alejandrina Patrón López on 1/18/21. 6 | // 7 | 8 | import Foundation 9 | import SwiftUI 10 | 11 | class ArtworkLoader { 12 | private var dataTasks: [URLSessionDataTask] = [] 13 | 14 | func loadArtwork(forSong song: Song, completion: @escaping((Image?) -> Void)) { 15 | guard let imageUrl = URL(string: song.artworkUrl) else { 16 | completion(nil) 17 | return 18 | } 19 | 20 | let dataTask = URLSession.shared.dataTask(with: imageUrl) { data, _, _ in 21 | guard let data = data, let artwork = UIImage(data: data) else { 22 | completion(nil) 23 | return 24 | } 25 | 26 | let image = Image(uiImage: artwork) 27 | completion(image) 28 | } 29 | dataTasks.append(dataTask) 30 | dataTask.resume() 31 | } 32 | 33 | func reset() { 34 | dataTasks.forEach { $0.cancel() } 35 | dataTasks.removeAll() 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Translate/Translate/TranslateUITests/TranslateUITestsLaunchTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TranslateUITestsLaunchTests.swift 3 | // TranslateUITests 4 | // 5 | // Created by Alejandrina Patron on 9/11/24. 6 | // 7 | 8 | import XCTest 9 | 10 | final class TranslateUITestsLaunchTests: XCTestCase { 11 | 12 | override class var runsForEachTargetApplicationUIConfiguration: Bool { 13 | true 14 | } 15 | 16 | override func setUpWithError() throws { 17 | continueAfterFailure = false 18 | } 19 | 20 | @MainActor 21 | func testLaunch() throws { 22 | let app = XCUIApplication() 23 | app.launch() 24 | 25 | // Insert steps here to perform after app launch but before taking a screenshot, 26 | // such as logging into a test account or navigating somewhere in the app 27 | 28 | let attachment = XCTAttachment(screenshot: app.screenshot()) 29 | attachment.name = "Launch Screen" 30 | attachment.lifetime = .keepAlways 31 | add(attachment) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/QRCodeGenerator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // QRCodeGenerator.swift 3 | // QR Code Generator 4 | // 5 | 6 | import CoreImage.CIFilterBuiltins 7 | import UIKit 8 | 9 | struct QRCodeGenerator { 10 | 11 | private let context = CIContext() 12 | private let filter = CIFilter.qrCodeGenerator() 13 | 14 | public func generateQRCode(forUrlString urlString: String) -> QRCode? { 15 | guard !urlString.isEmpty else { return nil } 16 | 17 | let data = Data(urlString.utf8) 18 | filter.setValue(data, forKey: "inputMessage") 19 | let transform = CGAffineTransform(scaleX: 10, y: 10) 20 | 21 | if let outputImage = filter.outputImage?.transformed(by: transform) { 22 | if let cgImage = context.createCGImage(outputImage, from: outputImage.extent) { 23 | let qrCode = QRCode(urlString: urlString, uiImage: UIImage(cgImage: cgImage)) 24 | return qrCode 25 | } 26 | } 27 | return nil 28 | } 29 | } 30 | 31 | struct QRCode { 32 | let urlString: String 33 | let uiImage: UIImage 34 | } 35 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/ChatMessagesList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatMessageList.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ChatMessagesList: View { 11 | 12 | @Bindable var viewModel: ChatViewModel 13 | @State private var loadingViewId: UUID? = UUID() 14 | 15 | var body: some View { 16 | ScrollView { 17 | ForEach(viewModel.messages) { message in 18 | MessageCell(message: message) 19 | .padding(message.role.padding) 20 | .id(message.id) 21 | } 22 | 23 | if viewModel.waitingForResponse { 24 | HStack { 25 | LoadingView() 26 | Spacer() 27 | } 28 | .id(loadingViewId) 29 | .padding(.leading, 8) 30 | } 31 | } 32 | .scrollPosition(id: viewModel.waitingForResponse ? $loadingViewId : $viewModel.scrollPosition, anchor: .bottom) 33 | .defaultScrollAnchor(.bottom) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Alejandrina Patron 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Alert/Alert/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Alert 4 | // 5 | // Created by Ale Patrón on 10/4/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var showAlert: Bool = false 13 | @State private var hobby: Hobby? = nil { 14 | didSet { 15 | if hobby != nil { 16 | showAlert = true 17 | } 18 | } 19 | } 20 | 21 | var body: some View { 22 | VStack(spacing: 8) { 23 | Button("🎾") { hobby = Hobby(name: "playing tennis") } 24 | Button("🎥") { hobby = Hobby(name: "watching YouTube videos") } 25 | Button("📖") { hobby = Hobby(name: "reading books") } 26 | } 27 | .padding() 28 | .alert( 29 | "My favorite hobby is...", 30 | isPresented: $showAlert, 31 | presenting: hobby, 32 | actions: { _ in }, 33 | message: { hobby in 34 | Text(hobby.name) 35 | } 36 | ) 37 | } 38 | } 39 | 40 | struct Hobby: Identifiable { 41 | let id: UUID = UUID() 42 | let name: String 43 | } 44 | 45 | struct ContentView_Previews: PreviewProvider { 46 | static var previews: some View { 47 | ContentView() 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /App Icons/App-Icons-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIcons 6 | 7 | CFBundlePrimaryIcon 8 | 9 | CFBundleIconFiles 10 | 11 | Robot 12 | 13 | CFBundleIconName 14 | Default 15 | UIPrerenderedIcon 16 | 17 | 18 | 19 | CFBundleAlternateIcons 20 | 21 | Lollipop 22 | 23 | CFBundleIconFiles 24 | 25 | Lollipop 26 | 27 | UIPrerenderedIcon 28 | 29 | 30 | 31 | Tennis Ball 32 | 33 | CFBundleIconFiles 34 | 35 | Tennis 36 | 37 | UIPrerenderedIcon 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /BookCharts/BookCharts/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // BookCharts 4 | // 5 | // Created by Ale Patrón on 2/25/24. 6 | // 7 | 8 | import Charts 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | 13 | private let bookData = BookDataProvider.bookData 14 | 15 | var body: some View { 16 | VStack { 17 | Text("Book Tracker") 18 | .font(.system(size: 45)) 19 | .bold() 20 | Chart(bookData) { bookStat in 21 | ForEach(Array(bookStat.counts.keys), id: \.self) { genre in 22 | let count = bookStat.counts[genre] ?? 0 23 | BarMark( 24 | x: .value("Year", bookStat.year, unit: .year), 25 | y: .value("Count", count), 26 | width: 35 27 | ) 28 | .foregroundStyle(by: .value("Genre", genre.label)) 29 | } 30 | }.chartXAxis { 31 | AxisMarks(values: .automatic(desiredCount: bookData.count)) 32 | } 33 | .chartXAxisLabel("Year") 34 | .chartYAxisLabel("Count") 35 | .chartLegend(position: .top) 36 | }.padding() 37 | } 38 | } 39 | 40 | #Preview { 41 | ContentView() 42 | } 43 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/BitcoinPriceViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BitcoinPriceViewModel.swift 3 | // Bitcoin Price 4 | // 5 | // Created by Alejandrina Patrón López on 8/10/21. 6 | // 7 | 8 | import Combine 9 | import Foundation 10 | 11 | class BitcoinPriceViewModel: ObservableObject { 12 | @Published public private(set) var lastUpdated: String = "" 13 | @Published public private(set) var priceDetails: [PriceDetails] = Currency.allCases.map { 14 | PriceDetails(currency: $0) 15 | } 16 | 17 | private var subscription: AnyCancellable? 18 | 19 | public func onAppear() { 20 | subscription = CoindeskAPIService.shared 21 | .fetchBitcoinPrice() 22 | .sink(receiveCompletion: { completion in 23 | switch completion { 24 | case .failure(let error): 25 | print(error.localizedDescription) 26 | case .finished: 27 | print("success!") 28 | } 29 | }, receiveValue: { [weak self] value in 30 | guard let self = self else { return } 31 | self.lastUpdated = value.time.updated 32 | self.priceDetails = [ 33 | PriceDetails(currency: .usd, rate: value.bpi.USD.rate), 34 | PriceDetails(currency: .gbp, rate: value.bpi.GBP.rate), 35 | PriceDetails(currency: .eur, rate: value.bpi.EUR.rate), 36 | ] 37 | }) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/ChatView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatView.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | import Translation 10 | 11 | struct ChatView: View { 12 | 13 | @Bindable private var viewModel: ChatViewModel = ChatViewModel() 14 | 15 | var body: some View { 16 | NavigationStack { 17 | VStack { 18 | ChatMessagesList(viewModel: viewModel) 19 | HStack { 20 | MessageTextField(draftMessage: $viewModel.draftMessage) 21 | SendMessageButton { 22 | viewModel.sendMessage() 23 | } 24 | .disabled(!viewModel.canSendMessage) 25 | } 26 | .padding(8) 27 | } 28 | .navigationTitle("Chat") 29 | .toolbar { 30 | Button( 31 | action: { 32 | viewModel.triggerTranslation() 33 | }, 34 | label: { 35 | Image(systemName: "translate") 36 | } 37 | ) 38 | } 39 | } 40 | .translationTask(viewModel.translationConfiguration) { session in 41 | await viewModel.translateAllMessages(using: session) 42 | } 43 | } 44 | } 45 | 46 | #Preview { 47 | ChatView() 48 | } 49 | -------------------------------------------------------------------------------- /Translate/Translate/Translate/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Translate 4 | // 5 | // Created by Alejandrina Patron on 9/11/24. 6 | // 7 | 8 | import SwiftUI 9 | import Translation 10 | 11 | struct ContentView: View { 12 | 13 | @State private var showTranslation = false 14 | @State private var displayedText = quote 15 | 16 | static let quote = "Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them. About the only thing you can’t do is ignore them. Because they change things. They push the human race forward. And while some may see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do." 17 | 18 | var body: some View { 19 | VStack { 20 | Spacer() 21 | Text(displayedText) 22 | Spacer() 23 | Button("Translate") { 24 | showTranslation = true 25 | } 26 | } 27 | .padding() 28 | .translationPresentation( 29 | isPresented: $showTranslation, 30 | text: displayedText 31 | ) { translatedText in 32 | displayedText = translatedText 33 | } 34 | } 35 | } 36 | 37 | #Preview { 38 | ContentView() 39 | } 40 | -------------------------------------------------------------------------------- /BookCharts/BookCharts/BookDataProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BookDataProvider.swift 3 | // BookCharts 4 | // 5 | // Created by Ale Patrón on 3/15/24. 6 | // 7 | 8 | import Foundation 9 | 10 | struct BookDataProvider { 11 | static let bookData: [BookStat] = [ 12 | BookStat( 13 | year: Date.fromYear(2020), 14 | counts: [ 15 | .business: 6, 16 | .fiction: 2, 17 | .nonFiction: 3, 18 | ] 19 | ), 20 | BookStat( 21 | year: Date.fromYear(2021), 22 | counts: [ 23 | .business: 4, 24 | .fiction: 2, 25 | .nonFiction: 2, 26 | ] 27 | ), 28 | BookStat( 29 | year: Date.fromYear(2022), 30 | counts: [ 31 | .business: 6, 32 | .nonFiction: 6, 33 | ] 34 | ), 35 | BookStat( 36 | year: Date.fromYear(2023), 37 | counts: [ 38 | .business: 2, 39 | .fiction: 1, 40 | .nonFiction: 3, 41 | .biography: 1, 42 | ] 43 | ), 44 | BookStat( 45 | year: Date.fromYear(2024), 46 | counts: [.nonFiction: 2] 47 | ), 48 | ] 49 | } 50 | 51 | extension Date { 52 | static func fromYear(_ year: Int) -> Date { 53 | let calendar = Calendar.current 54 | var dateComponents = DateComponents() 55 | dateComponents.year = year 56 | let date = calendar.date(from: dateComponents)! 57 | return date 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/ChatViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatViewModel.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import Foundation 9 | import Observation 10 | 11 | @MainActor 12 | @Observable 13 | class ChatViewModel { 14 | 15 | // Private 16 | private let client: GeminiClient = GeminiClient() 17 | 18 | // Public 19 | var error: Error? 20 | var waitingForResponse: Bool = false 21 | var draftMessage: String = "" 22 | private(set) var messages: [Message] = [] 23 | var scrollPosition: UUID? = nil 24 | 25 | func sendMessage() async { 26 | guard canSendMessage else { return } 27 | let latestMessage = addMessage(draftMessage, role: .sender) 28 | draftMessage.removeAll() 29 | 30 | // Send message to Gemini 31 | error = nil 32 | waitingForResponse = true 33 | let result = await client.send(message: latestMessage.text) 34 | waitingForResponse = false 35 | 36 | switch result { 37 | case .success(let response): 38 | addMessage(response, role: .receiver) 39 | case .failure(let error): 40 | self.error = error 41 | } 42 | } 43 | 44 | public var canSendMessage: Bool { 45 | !draftMessage.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty 46 | } 47 | 48 | @discardableResult 49 | private func addMessage(_ text: String, role: Role) -> Message { 50 | let message = Message(role: role, text: text) 51 | messages.append(message) 52 | scrollPosition = message.id 53 | return message 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Translate/Translate/TranslateUITests/TranslateUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TranslateUITests.swift 3 | // TranslateUITests 4 | // 5 | // Created by Alejandrina Patron on 9/11/24. 6 | // 7 | 8 | import XCTest 9 | 10 | final class TranslateUITests: XCTestCase { 11 | 12 | override func setUpWithError() throws { 13 | // Put setup code here. This method is called before the invocation of each test method in the class. 14 | 15 | // In UI tests it is usually best to stop immediately when a failure occurs. 16 | continueAfterFailure = false 17 | 18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 19 | } 20 | 21 | override func tearDownWithError() throws { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | @MainActor 26 | func testExample() throws { 27 | // UI tests must launch the application that they test. 28 | let app = XCUIApplication() 29 | app.launch() 30 | 31 | // Use XCTAssert and related functions to verify your tests produce the correct results. 32 | } 33 | 34 | @MainActor 35 | func testLaunchPerformance() throws { 36 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { 37 | // This measures how long it takes to launch your application. 38 | measure(metrics: [XCTApplicationLaunchMetric()]) { 39 | XCUIApplication().launch() 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/CoindeskAPIService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoindeskAPIService.swift 3 | // Bitcoin Price 4 | // 5 | // Created by Alejandrina Patrón López on 8/10/21. 6 | // 7 | 8 | import Combine 9 | import Foundation 10 | 11 | // https://api.coindesk.com/v1/bpi/currentprice.json 12 | 13 | struct CoindeskAPIService { 14 | public static let shared = CoindeskAPIService() 15 | 16 | public func fetchBitcoinPrice() -> AnyPublisher { 17 | guard let url = URL(string: "https://api.coindesk.com/v1/bpi/currentprice.json") else { 18 | let error = URLError(.badURL) 19 | return Fail(error: error) 20 | .eraseToAnyPublisher() 21 | } 22 | 23 | return URLSession.shared.dataTaskPublisher(for: url) 24 | .tryMap({ data, response in 25 | guard let httpResponse = response as? HTTPURLResponse else { 26 | throw URLError(.unknown) 27 | } 28 | guard httpResponse.statusCode == 200 else { 29 | let code = URLError.Code(rawValue: httpResponse.statusCode) 30 | throw URLError(code) 31 | } 32 | return data 33 | }) 34 | .decode(type: APIResponse.self, decoder: JSONDecoder()) 35 | .receive(on: DispatchQueue.main) 36 | .eraseToAnyPublisher() 37 | } 38 | } 39 | 40 | struct APIResponse: Decodable { 41 | let time: APITime 42 | let bpi: APIBitcoinPriceIndex 43 | } 44 | 45 | struct APITime: Decodable { 46 | let updated: String 47 | } 48 | 49 | struct APIBitcoinPriceIndex: Decodable { 50 | let USD: APIPriceData 51 | let GBP: APIPriceData 52 | let EUR: APIPriceData 53 | } 54 | 55 | struct APIPriceData: Decodable { 56 | let rate: String 57 | } 58 | -------------------------------------------------------------------------------- /Music Search/Music Search/SongListViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SongListViewModel.swift 3 | // Music Search 4 | // 5 | // Created by Alejandrina Patrón López on 1/18/21. 6 | // 7 | 8 | import Combine 9 | import Foundation 10 | import SwiftUI 11 | 12 | class SongListViewModel: ObservableObject { 13 | @Published var searchTerm: String = "" 14 | @Published public private(set) var songs: [SongViewModel] = [] 15 | 16 | private let dataModel: DataModel = DataModel() 17 | private let artworkLoader: ArtworkLoader = ArtworkLoader() 18 | private var disposables = Set() 19 | 20 | init() { 21 | $searchTerm 22 | .sink(receiveValue: loadSongs(searchTerm:)) 23 | .store(in: &disposables) 24 | } 25 | 26 | private func loadSongs(searchTerm: String) { 27 | songs.removeAll() 28 | artworkLoader.reset() 29 | 30 | dataModel.loadSongs(searchTerm: searchTerm) { songs in 31 | songs.forEach { self.appendSong(song: $0) } 32 | } 33 | } 34 | 35 | private func appendSong(song: Song) { 36 | let songViewModel = SongViewModel(song: song) 37 | DispatchQueue.main.async { 38 | self.songs.append(songViewModel) 39 | } 40 | 41 | artworkLoader.loadArtwork(forSong: song) { image in 42 | DispatchQueue.main.async { 43 | songViewModel.artwork = image 44 | } 45 | } 46 | } 47 | } 48 | 49 | class SongViewModel: Identifiable, ObservableObject { 50 | let id: Int 51 | let trackName: String 52 | let artistName: String 53 | @Published var artwork: Image? 54 | 55 | init(song: Song) { 56 | self.id = song.id 57 | self.trackName = song.trackName 58 | self.artistName = song.artistName 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Lights/Lights/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Lights 4 | // 5 | 6 | import SwiftUI 7 | 8 | struct ContentView: View { 9 | 10 | @AppStorage("lightsOn") private var lightsOn: Bool = false 11 | 12 | private var backgroundColor: Color { 13 | lightsOn ? .white : .black 14 | } 15 | private var foregroundColor: Color { 16 | lightsOn ? .black : .white 17 | } 18 | private var imageName: String { 19 | lightsOn ? "sun.max.fill" : "moon.fill" 20 | } 21 | private var imageColor: Color { 22 | lightsOn ? .yellow : .blue 23 | } 24 | private var text: String { 25 | lightsOn ? "Turn the lights off!" : "Turn the lights on!" 26 | } 27 | 28 | @State private var rotation: Double = 0 29 | 30 | var body: some View { 31 | ZStack { 32 | backgroundColor.ignoresSafeArea(.all) 33 | 34 | VStack(alignment: .center) { 35 | Spacer() 36 | Image(systemName: imageName) 37 | .font(.system(size: 88)) 38 | .foregroundColor(imageColor) 39 | .padding() 40 | .rotationEffect(.degrees(rotation)) 41 | .animation(.easeInOut(duration: 1)) 42 | Spacer() 43 | Text(text) 44 | .font(.largeTitle) 45 | .bold() 46 | .animation(.none) 47 | Toggle("", isOn: $lightsOn.animation()) 48 | .labelsHidden() 49 | } 50 | .foregroundColor(foregroundColor) 51 | .onChange(of: lightsOn, perform: { value in 52 | if value { 53 | rotation += 360 54 | } else { 55 | rotation -= 360 56 | } 57 | }) 58 | } 59 | } 60 | } 61 | 62 | struct ContentView_Previews: PreviewProvider { 63 | static var previews: some View { 64 | ContentView() 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Lights/Lights/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Spotify/Spotify/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Directions/Directions/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Music Search/Music Search/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/ChatView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatView.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @MainActor 11 | struct ChatView: View { 12 | 13 | @Bindable private var viewModel: ChatViewModel = ChatViewModel() 14 | 15 | var body: some View { 16 | NavigationStack { 17 | VStack { 18 | ChatMessagesList(viewModel: viewModel) 19 | 20 | if viewModel.error != nil { 21 | ErrorView() 22 | } 23 | 24 | HStack { 25 | MessageTextField(draftMessage: $viewModel.draftMessage) 26 | SendMessageButton { 27 | Task { 28 | await viewModel.sendMessage() 29 | } 30 | } 31 | .disabled(!viewModel.canSendMessage) 32 | } 33 | .padding(8) 34 | } 35 | .navigationTitle("Gemini Chat") 36 | } 37 | } 38 | } 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | //struct ContentView: View { 51 | // 52 | // @Bindable private var client: GeminiClient = GeminiClient() 53 | // 54 | // var body: some View { 55 | // VStack(spacing: 8) { 56 | // Text("`let foregroundColor = Color.green`") 57 | // .foregroundStyle(Color.green) 58 | // Text("**Bold text**") 59 | // Button("Send message") { 60 | // Task { 61 | // await client.send(message: "Write SwiftUI code for a view that displays text messages in a chat") 62 | // } 63 | // } 64 | // } 65 | // .padding() 66 | // } 67 | //} 68 | #Preview { 69 | ChatView() 70 | } 71 | -------------------------------------------------------------------------------- /Translate/Translate/Translate/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | }, 8 | { 9 | "appearances" : [ 10 | { 11 | "appearance" : "luminosity", 12 | "value" : "dark" 13 | } 14 | ], 15 | "idiom" : "universal", 16 | "platform" : "ios", 17 | "size" : "1024x1024" 18 | }, 19 | { 20 | "appearances" : [ 21 | { 22 | "appearance" : "luminosity", 23 | "value" : "tinted" 24 | } 25 | ], 26 | "idiom" : "universal", 27 | "platform" : "ios", 28 | "size" : "1024x1024" 29 | }, 30 | { 31 | "idiom" : "mac", 32 | "scale" : "1x", 33 | "size" : "16x16" 34 | }, 35 | { 36 | "idiom" : "mac", 37 | "scale" : "2x", 38 | "size" : "16x16" 39 | }, 40 | { 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "32x32" 44 | }, 45 | { 46 | "idiom" : "mac", 47 | "scale" : "2x", 48 | "size" : "32x32" 49 | }, 50 | { 51 | "idiom" : "mac", 52 | "scale" : "1x", 53 | "size" : "128x128" 54 | }, 55 | { 56 | "idiom" : "mac", 57 | "scale" : "2x", 58 | "size" : "128x128" 59 | }, 60 | { 61 | "idiom" : "mac", 62 | "scale" : "1x", 63 | "size" : "256x256" 64 | }, 65 | { 66 | "idiom" : "mac", 67 | "scale" : "2x", 68 | "size" : "256x256" 69 | }, 70 | { 71 | "idiom" : "mac", 72 | "scale" : "1x", 73 | "size" : "512x512" 74 | }, 75 | { 76 | "idiom" : "mac", 77 | "scale" : "2x", 78 | "size" : "512x512" 79 | } 80 | ], 81 | "info" : { 82 | "author" : "xcode", 83 | "version" : 1 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Emoji Search 4 | // 5 | 6 | import SwiftUI 7 | 8 | struct ContentView: View { 9 | 10 | @State private var searchText: String = "" 11 | 12 | private var searchResults: [EmojiDetails] { 13 | let results = EmojiProvider.all() 14 | if searchText.isEmpty { return results } 15 | return results.filter { 16 | $0.name.lowercased().contains(searchText.lowercased()) || $0.emoji.contains(searchText) 17 | } 18 | } 19 | 20 | private var suggestedResults: [EmojiDetails] { 21 | if searchText.isEmpty { return [] } 22 | return searchResults 23 | } 24 | 25 | var body: some View { 26 | NavigationView { 27 | List(searchResults) { emojiDetails in 28 | NavigationLink(destination: { 29 | EmojiDetailsView(emojiDetails: emojiDetails) 30 | }) { 31 | Text("\(emojiDetails.emoji) \(emojiDetails.name)") 32 | .padding(6) 33 | } 34 | } 35 | .navigationTitle("Emoji Search 🔍") 36 | .searchable( 37 | text: $searchText, 38 | placement: .navigationBarDrawer(displayMode: .always), 39 | prompt: "Search for emoji" 40 | ) { 41 | ForEach(suggestedResults) { emojiDetails in 42 | Text("Looking for \(emojiDetails.emoji)?") 43 | .searchCompletion(emojiDetails.name) 44 | } 45 | } 46 | } 47 | } 48 | } 49 | 50 | struct EmojiDetailsView: View { 51 | 52 | let emojiDetails: EmojiDetails 53 | 54 | var body: some View { 55 | HStack { 56 | VStack(alignment: .leading) { 57 | Text("\(emojiDetails.emoji) \(emojiDetails.name)") 58 | .font(.largeTitle) 59 | .bold() 60 | Text(emojiDetails.description) 61 | Spacer() 62 | } 63 | Spacer() 64 | }.padding([.leading, .trailing], 24) 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // JSON Map 4 | // 5 | 6 | import MapKit 7 | import SwiftUI 8 | 9 | struct ContentView: View { 10 | 11 | @State private var locations: [Location] = [] 12 | 13 | @State private var coordinateRegion = MKCoordinateRegion( 14 | center: CLLocationCoordinate2D(latitude: 19.43, longitude: -99.13), 15 | span: MKCoordinateSpan(latitudeDelta: 50, longitudeDelta: 50) 16 | ) 17 | 18 | var body: some View { 19 | Map( 20 | coordinateRegion: $coordinateRegion, 21 | annotationItems: locations 22 | ) { location in 23 | MapAnnotation( 24 | coordinate: CLLocationCoordinate2D( 25 | latitude: location.latitude, 26 | longitude: location.longitude 27 | ) 28 | ) { 29 | VStack { 30 | Text(location.name) 31 | .font(.caption2) 32 | .bold() 33 | Image(systemName: "star.fill") 34 | .font(.title2) 35 | .foregroundColor(.red) 36 | .shadow(radius: 1) 37 | } 38 | } 39 | } 40 | .onAppear(perform: readFile) 41 | } 42 | 43 | private func readFile() { 44 | if let url = Bundle.main.url(forResource: "locations", withExtension: "json"), 45 | let data = try? Data(contentsOf: url) { 46 | let decoder = JSONDecoder() 47 | if let jsonData = try? decoder.decode(JSONData.self, from: data) { 48 | self.locations = jsonData.locations 49 | } 50 | } 51 | } 52 | } 53 | 54 | struct JSONData: Decodable { 55 | let locations: [Location] 56 | } 57 | 58 | struct Location: Decodable, Identifiable { 59 | let id: Int 60 | let name: String 61 | let latitude: Double 62 | let longitude: Double 63 | } 64 | 65 | struct ContentView_Previews: PreviewProvider { 66 | static var previews: some View { 67 | ContentView() 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Music Search/Music Search/DataModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataModel.swift 3 | // Music Search 4 | // 5 | // Created by Alejandrina Patrón López on 1/18/21. 6 | // 7 | 8 | import Foundation 9 | 10 | // https://itunes.apple.com/search?term=coldplay&entity=song 11 | 12 | class DataModel { 13 | 14 | private var dataTask: URLSessionDataTask? 15 | 16 | func loadSongs(searchTerm: String, completion: @escaping(([Song]) -> Void)) { 17 | dataTask?.cancel() 18 | guard let url = buildUrl(forTerm: searchTerm) else { 19 | completion([]) 20 | return 21 | } 22 | 23 | dataTask = URLSession.shared.dataTask(with: url) { data, _, _ in 24 | guard let data = data else { 25 | completion([]) 26 | return 27 | } 28 | 29 | if let songResponse = try? JSONDecoder().decode(SongResponse.self, from: data) { 30 | completion(songResponse.songs) 31 | } 32 | } 33 | dataTask?.resume() 34 | } 35 | 36 | private func buildUrl(forTerm searchTerm: String) -> URL? { 37 | guard !searchTerm.isEmpty else { return nil } 38 | 39 | let queryItems = [ 40 | URLQueryItem(name: "term", value: searchTerm), 41 | URLQueryItem(name: "entity", value: "song"), 42 | ] 43 | var components = URLComponents(string: "https://itunes.apple.com/search") 44 | components?.queryItems = queryItems 45 | 46 | return components?.url 47 | } 48 | } 49 | 50 | struct SongResponse: Decodable { 51 | let songs: [Song] 52 | 53 | enum CodingKeys: String, CodingKey { 54 | case songs = "results" 55 | } 56 | } 57 | 58 | struct Song: Decodable { 59 | let id: Int 60 | let trackName: String 61 | let artistName: String 62 | let artworkUrl: String 63 | 64 | enum CodingKeys: String, CodingKey { 65 | case id = "trackId" 66 | case trackName 67 | case artistName 68 | case artworkUrl = "artworkUrl60" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Progress View/Progress View/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Progress View 4 | // 5 | 6 | import SwiftUI 7 | 8 | struct ContentView: View { 9 | @State private var progress: Double = 0 10 | private let total: Double = 1 11 | 12 | @State private var dataTask: URLSessionDataTask? 13 | @State private var observation: NSKeyValueObservation? 14 | @State private var image: UIImage? 15 | 16 | var body: some View { 17 | VStack { 18 | ZStack { 19 | if image == nil { 20 | ProgressView("Downloading image...", value: progress, total: total) 21 | .progressViewStyle(LinearProgressViewStyle()) 22 | .padding() 23 | } else { 24 | Image(uiImage: image!) 25 | .resizable() 26 | } 27 | } 28 | 29 | Spacer() 30 | HStack { 31 | Spacer() 32 | Button(action: { 33 | reset() 34 | downloadPhoto() 35 | }) { 36 | Image(systemName: "arrow.clockwise") 37 | } 38 | .font(.largeTitle) 39 | } 40 | .padding() 41 | } 42 | .onAppear(perform: downloadPhoto) 43 | } 44 | 45 | private func downloadPhoto() { 46 | guard let url = URL(string: "https://source.unsplash.com/random/4000x8000") else { return } 47 | 48 | dataTask = URLSession.shared.dataTask(with: url) { data, _, _ in 49 | guard let data = data else { return } 50 | DispatchQueue.main.async { 51 | image = UIImage(data: data) 52 | } 53 | } 54 | observation = dataTask?.progress.observe(\.fractionCompleted) { observationProgress, _ in 55 | DispatchQueue.main.async { 56 | progress = observationProgress.fractionCompleted 57 | } 58 | } 59 | dataTask?.resume() 60 | } 61 | 62 | private func reset() { 63 | observation?.invalidate() 64 | dataTask?.cancel() 65 | progress = 0 66 | image = nil 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/GeminiClient.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GeminiClient.swift 3 | // Gemini Chat 4 | // 5 | // Created by Ale Patrón on 4/22/24. 6 | // 7 | 8 | import Foundation 9 | import GoogleGenerativeAI 10 | 11 | class GeminiClient { 12 | 13 | private lazy var model = GenerativeModel(name: "gemini-pro", apiKey: APIKey.default) 14 | private lazy var chat: Chat = model.startChat() 15 | 16 | func send(message: String) async -> Result { 17 | do { 18 | let response = try await chat.sendMessage(message) 19 | if let text = response.text { 20 | return .success(text) 21 | } 22 | } catch let error as GenerateContentError { 23 | return .failure(error) 24 | } catch { 25 | return .failure(GenerateContentError.internalError(underlying: GenericError())) 26 | } 27 | return .failure(GenerateContentError.internalError(underlying: GenericError())) 28 | } 29 | } 30 | 31 | struct GenericError: Error { 32 | } 33 | 34 | extension GeminiClient { 35 | enum APIKey { 36 | 37 | // Fetch the API key from `GeminiChat.plist` 38 | static var `default`: String { 39 | guard let filePath = Bundle.main.path(forResource: "GeminiChat", ofType: "plist") 40 | else { 41 | fatalError("Couldn't find file 'GeminiChat.plist'.") 42 | } 43 | let plist = NSDictionary(contentsOfFile: filePath) 44 | guard let value = plist?.object(forKey: "API_KEY") as? String else { 45 | fatalError("Couldn't find key 'API_KEY' in 'GeminiChat.plist'.") 46 | } 47 | if value.starts(with: "_") { 48 | fatalError( 49 | "Follow the instructions at https://ai.google.dev/tutorials/setup to get an API key." 50 | ) 51 | } 52 | return value 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | NSPhotoLibraryAddUsageDescription 8 | This app needs permission to save images to your library. 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIApplicationSceneManifest 26 | 27 | UIApplicationSupportsMultipleScenes 28 | 29 | 30 | UIApplicationSupportsIndirectInputEvents 31 | 32 | UILaunchScreen 33 | 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Alert/Alert/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "2x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "83.5x83.5" 82 | }, 83 | { 84 | "idiom" : "ios-marketing", 85 | "scale" : "1x", 86 | "size" : "1024x1024" 87 | } 88 | ], 89 | "info" : { 90 | "author" : "xcode", 91 | "version" : 1 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /App Icons/App Icons/AppSettings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppSettings.swift 3 | // App Icons 4 | // 5 | 6 | import Foundation 7 | import SwiftUI 8 | 9 | public final class AppSettings: ObservableObject { 10 | 11 | @Published public var iconIndex: Int = 0 12 | 13 | public private(set) var icons: [Icon] = [] 14 | public var currentIconName: String? { 15 | UIApplication.shared.alternateIconName 16 | } 17 | 18 | public init() { 19 | fetchIcons() 20 | } 21 | 22 | private func fetchIcons() { 23 | if let bundleIcons = Bundle.main.object(forInfoDictionaryKey: "CFBundleIcons") as? [String: Any] 24 | { 25 | // Default Icon 26 | if let primaryIcon = bundleIcons["CFBundlePrimaryIcon"] as? [String: Any], 27 | let iconFileName = (primaryIcon["CFBundleIconFiles"] as? [String])?.first { 28 | let displayName = (primaryIcon["CFBundleIconName"] as? String) ?? "" 29 | // To reset to the default icon, we call setAlternateIconName with nil, so we create an 30 | // icon object with nil as its icon name 31 | icons.append( 32 | Icon(displayName: displayName, iconName: nil, image: UIImage(named: iconFileName)) 33 | ) 34 | } 35 | 36 | // Alternate Icons 37 | if let alternateIcons = bundleIcons["CFBundleAlternateIcons"] as? [String: Any] { 38 | alternateIcons.forEach { iconName, iconInfo in 39 | if let iconInfo = iconInfo as? [String: Any], 40 | let iconFileName = (iconInfo["CFBundleIconFiles"] as? [String])?.first 41 | { 42 | icons.append( 43 | Icon(displayName: iconName, iconName: iconName, image: UIImage(named: iconFileName)) 44 | ) 45 | } 46 | } 47 | } 48 | } 49 | 50 | iconIndex = icons.firstIndex(where: { icon in 51 | return icon.iconName == currentIconName 52 | }) ?? 0 53 | } 54 | } 55 | 56 | public struct Icon { 57 | public let displayName: String 58 | public let iconName: String? 59 | public let image: UIImage? 60 | } 61 | -------------------------------------------------------------------------------- /Chat/Chat/MessageCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageCell.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MessageCell: View { 11 | 12 | let message: Message 13 | 14 | var body: some View { 15 | HStack { 16 | if message.role == .sender { Spacer() } 17 | MessageBubble(message: message) 18 | if message.role == .receiver { Spacer() } 19 | } 20 | } 21 | } 22 | 23 | struct MessageBubble: View { 24 | 25 | let message: Message 26 | 27 | var body: some View { 28 | Text(message.text) 29 | .foregroundStyle(message.role.textColor) 30 | .padding(8) 31 | .background { 32 | UnevenRoundedRectangle(cornerRadii: message.role.cornerRadii) 33 | .foregroundColor(message.role.bubbleColor) 34 | } 35 | } 36 | } 37 | 38 | // MARK: - Role-based UI 39 | 40 | extension Role { 41 | var bubbleColor: Color { 42 | switch self { 43 | case .sender: return .blue 44 | case .receiver: return .init(uiColor: .init(red: 240 / 255, green: 238 / 255, blue: 237 / 255, alpha: 1)) 45 | } 46 | } 47 | 48 | var textColor: Color { 49 | switch self { 50 | case .sender: return .white 51 | case .receiver: return .black 52 | } 53 | } 54 | 55 | var cornerRadii: RectangleCornerRadii { 56 | switch self { 57 | case .sender: return .init(topLeading: 10, bottomLeading: 10, topTrailing: 10) 58 | case .receiver: return .init(topLeading: 10, bottomTrailing: 10, topTrailing: 10) 59 | } 60 | } 61 | 62 | var padding: EdgeInsets { 63 | switch self { 64 | case .sender: return .init(top: 0, leading: 32, bottom: 0, trailing: 8) 65 | case .receiver: return .init(top: 0, leading: 8, bottom: 0, trailing: 32) 66 | } 67 | } 68 | } 69 | 70 | #Preview { 71 | MessageCell(message: .init(role: .sender, text: "Hey 👋🏼")) 72 | .padding() 73 | } 74 | -------------------------------------------------------------------------------- /Gemini Chat/Gemini Chat/MessageCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageCell.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MessageCell: View { 11 | 12 | let message: Message 13 | 14 | var body: some View { 15 | HStack { 16 | if message.role == .sender { Spacer() } 17 | MessageBubble(message: message) 18 | if message.role == .receiver { Spacer() } 19 | } 20 | } 21 | } 22 | 23 | struct MessageBubble: View { 24 | 25 | let message: Message 26 | 27 | var body: some View { 28 | Text(message.text) 29 | .foregroundStyle(message.role.textColor) 30 | .padding(8) 31 | .background { 32 | UnevenRoundedRectangle(cornerRadii: message.role.cornerRadii) 33 | .foregroundColor(message.role.bubbleColor) 34 | } 35 | } 36 | } 37 | 38 | // MARK: - Role-based UI 39 | 40 | extension Role { 41 | var bubbleColor: Color { 42 | switch self { 43 | case .sender: return .blue 44 | case .receiver: return .init(uiColor: .init(red: 240 / 255, green: 238 / 255, blue: 237 / 255, alpha: 1)) 45 | } 46 | } 47 | 48 | var textColor: Color { 49 | switch self { 50 | case .sender: return .white 51 | case .receiver: return .black 52 | } 53 | } 54 | 55 | var cornerRadii: RectangleCornerRadii { 56 | switch self { 57 | case .sender: return .init(topLeading: 10, bottomLeading: 10, topTrailing: 10) 58 | case .receiver: return .init(topLeading: 10, bottomTrailing: 10, topTrailing: 10) 59 | } 60 | } 61 | 62 | var padding: EdgeInsets { 63 | switch self { 64 | case .sender: return .init(top: 0, leading: 32, bottom: 0, trailing: 8) 65 | case .receiver: return .init(top: 0, leading: 8, bottom: 0, trailing: 32) 66 | } 67 | } 68 | } 69 | 70 | #Preview { 71 | MessageCell(message: .init(role: .sender, text: "Hey 👋🏼")) 72 | .padding() 73 | } 74 | -------------------------------------------------------------------------------- /Link/Link/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /JSON Map/JSON Map/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Lights/Lights/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Spotify/Spotify/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /App Icons/App Icons/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Directions/Directions/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Music Search/Music Search/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Progress View/Progress View/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Useless Facts/Useless Facts/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Chat/Chat/ChatViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatViewModel.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import Foundation 9 | import Observation 10 | 11 | @MainActor 12 | @Observable 13 | class ChatViewModel { 14 | var draftMessage: String = "" 15 | 16 | private(set) var messages: [Message] = [ 17 | Message( 18 | role: .receiver, 19 | text: "Here's to the crazy ones" 20 | ), 21 | Message( 22 | role: .receiver, 23 | text: "the misfits, the rebels, the troublemakers" 24 | ), 25 | Message( 26 | role: .sender, 27 | text: "the round pegs in the square holes" 28 | ), 29 | Message( 30 | role: .receiver, 31 | text: "The ones who see things differently" 32 | ), 33 | Message( 34 | role: .sender, 35 | text: "They're not fond of rules. And they have no respect for the status quo" 36 | ), 37 | Message( 38 | role: .sender, 39 | text: "You can quote them, disagree with them, glorify or vilify them..." 40 | ), 41 | Message( 42 | role: .receiver, 43 | text: "Because they change things. They push the human race forward." 44 | ), 45 | Message( 46 | role: .receiver, 47 | text: "And while some may see them as the crazy ones, we see genius." 48 | ), 49 | Message( 50 | role: .receiver, 51 | text: "Because the people who are crazy enough to think they can change the world, are the ones who do." 52 | ), 53 | ] 54 | 55 | var scrollPosition: UUID? = nil 56 | 57 | func sendMessage() { 58 | guard canSendMessage else { return } 59 | // In a real chat app this would make a server call to send the message 60 | let message = Message(role: .sender, text: draftMessage) 61 | messages.append(message) 62 | scrollPosition = message.id 63 | draftMessage.removeAll() 64 | } 65 | 66 | public var canSendMessage: Bool { 67 | !draftMessage.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /App Icons/App Icons/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // App Icons 4 | // 5 | 6 | import SwiftUI 7 | 8 | struct ContentView: View { 9 | 10 | @StateObject var appSettings: AppSettings = AppSettings() 11 | 12 | var body: some View { 13 | NavigationView { 14 | List(1...20, id: \.self) { i in 15 | Text("\(i)") 16 | } 17 | .toolbar { 18 | ToolbarItem { 19 | NavigationLink(destination: { 20 | IconsListView() 21 | .navigationBarTitleDisplayMode(.inline) 22 | .environmentObject(appSettings) 23 | }) { 24 | Image(systemName: "gear") 25 | } 26 | } 27 | } 28 | .navigationTitle("My App") 29 | } 30 | } 31 | } 32 | 33 | struct IconsListView: View { 34 | 35 | @EnvironmentObject var appSettings: AppSettings 36 | 37 | var body: some View { 38 | Form { 39 | Picker("App Icon", selection: $appSettings.iconIndex) { 40 | ForEach(appSettings.icons.indices, id: \.self) { index in 41 | IconRow(icon: appSettings.icons[index]) 42 | .tag(index) 43 | } 44 | } 45 | .pickerStyle(.inline) 46 | .onChange(of: appSettings.iconIndex) { newIndex in 47 | guard UIApplication.shared.supportsAlternateIcons else { 48 | print("App does not support alternate icons") 49 | return 50 | } 51 | 52 | let currentIndex = appSettings.icons.firstIndex(where: { icon in 53 | return icon.iconName == appSettings.currentIconName 54 | }) ?? 0 55 | guard newIndex != currentIndex else { return } 56 | let newIconSelection = appSettings.icons[newIndex].iconName 57 | UIApplication.shared.setAlternateIconName(newIconSelection) { error in 58 | if let error = error { 59 | print(error.localizedDescription) 60 | } 61 | } 62 | } 63 | } 64 | } 65 | } 66 | 67 | struct IconRow: View { 68 | 69 | public let icon: Icon 70 | 71 | var body: some View { 72 | HStack(alignment: .center) { 73 | Image(uiImage: icon.image ?? UIImage()) 74 | .resizable() 75 | .frame(width: 60, height: 60) 76 | .cornerRadius(10) 77 | .padding(.trailing) 78 | Text(icon.displayName) 79 | .bold() 80 | } 81 | .padding(8) 82 | } 83 | } 84 | 85 | struct ContentView_Previews: PreviewProvider { 86 | static var previews: some View { 87 | ContentView() 88 | .environmentObject(AppSettings()) 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Bitcoin Price/Bitcoin Price/BitcoinPriceView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Bitcoin Price 4 | // 5 | // Created by Alejandrina Patrón López on 8/10/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension Color { 11 | static let bitcoinGreen: Color = Color.green.opacity(0.9) 12 | } 13 | 14 | struct BitcoinPriceView: View { 15 | 16 | @ObservedObject var viewModel: BitcoinPriceViewModel 17 | 18 | @State private var selectedCurrency: Currency = .usd 19 | 20 | var body: some View { 21 | VStack(spacing: 0) { 22 | Text("Updated \(viewModel.lastUpdated)") 23 | .padding([.top, .bottom]) 24 | .foregroundColor(.bitcoinGreen) 25 | 26 | TabView(selection: $selectedCurrency) { 27 | ForEach(viewModel.priceDetails.indices, id: \.self) { index in 28 | let details = viewModel.priceDetails[index] 29 | PriceDetailsView(priceDetails: details) 30 | .tag(details.currency) 31 | } 32 | } 33 | .tabViewStyle(PageTabViewStyle()) 34 | 35 | VStack(spacing: 0) { 36 | HStack(alignment: .center) { 37 | Picker(selection: $selectedCurrency, label: Text("Currency"), content: { 38 | Text("\(Currency.usd.icon) \(Currency.usd.code)").tag(Currency.usd) 39 | Text("\(Currency.gbp.icon) \(Currency.gbp.code)").tag(Currency.gbp) 40 | Text("\(Currency.eur.icon) \(Currency.eur.code)").tag(Currency.eur) 41 | }) 42 | .padding(.leading) 43 | 44 | Spacer() 45 | 46 | Button(action: viewModel.onAppear, label: { 47 | Image(systemName: "arrow.clockwise") 48 | .font(.largeTitle) 49 | }) 50 | .padding(.trailing) 51 | } 52 | .padding(.top) 53 | 54 | Link( 55 | "Powered by CoinDesk", 56 | destination: URL(string: "https://coindesk.com/price/bitcoin")! 57 | ) 58 | .font(.caption) 59 | } 60 | .foregroundColor(.bitcoinGreen) 61 | } 62 | .onAppear(perform: viewModel.onAppear) 63 | .pickerStyle(MenuPickerStyle()) 64 | } 65 | } 66 | 67 | struct PriceDetailsView: View { 68 | 69 | let priceDetails: PriceDetails 70 | 71 | var body: some View { 72 | ZStack { 73 | Color.bitcoinGreen 74 | VStack { 75 | Text(priceDetails.currency.icon) 76 | .font(.largeTitle) 77 | Text("1 Bitcoin =") 78 | .bold() 79 | .font(.title2) 80 | Text("\(priceDetails.rate) \(priceDetails.currency.code)") 81 | .bold() 82 | .font(.largeTitle) 83 | } 84 | .foregroundColor(.white) 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Spotify/Spotify/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Spotify 4 | // 5 | 6 | import SwiftUI 7 | 8 | struct ContentView: View { 9 | var body: some View { 10 | ZStack { 11 | Color.black.ignoresSafeArea(.all) 12 | VStack { 13 | HStack { 14 | Button(action: {}, label: { 15 | Image(systemName: "chevron.down") 16 | }) 17 | .padding([.leading, .trailing]) 18 | 19 | Spacer() 20 | 21 | Text("After Hours") 22 | .font(.callout) 23 | .bold() 24 | .lineLimit(1) 25 | 26 | Spacer() 27 | 28 | Button(action: {}, label: { 29 | Image(systemName: "ellipsis") 30 | }) 31 | .padding([.leading, .trailing]) 32 | } 33 | .padding(.top) 34 | 35 | Spacer() 36 | 37 | Image("album_cover") 38 | .resizable() 39 | .frame(width: 350, height: 350) 40 | 41 | Spacer() 42 | 43 | HStack { 44 | VStack(alignment: .leading) { 45 | Text("Blinding Lights") 46 | .font(.largeTitle) 47 | .bold() 48 | .lineLimit(1) 49 | Text("The Weeknd") 50 | .lineLimit(1) 51 | } 52 | Spacer() 53 | 54 | Button(action: {}, label: { 55 | Image(systemName: "heart.fill") 56 | }) 57 | .font(.title) 58 | .padding(.trailing) 59 | } 60 | .padding([.leading, .trailing]) 61 | 62 | ProgressView(value: 0.4) 63 | .padding([.leading, .trailing]) 64 | 65 | MediaControls() 66 | .padding([.leading, .trailing, .top], 20) 67 | .padding(.bottom, 40) 68 | } 69 | .foregroundColor(.white) 70 | } 71 | } 72 | } 73 | 74 | struct MediaControls: View { 75 | var body: some View { 76 | HStack { 77 | Button(action: {}, label: { 78 | Image(systemName: "shuffle") 79 | }) 80 | .foregroundColor(.green) 81 | .padding([.leading, .trailing]) 82 | 83 | Spacer() 84 | 85 | Button(action: {}, label: { 86 | Image(systemName: "backward.end.fill") 87 | }) 88 | .font(.largeTitle) 89 | 90 | Button(action: {}, label: { 91 | Image(systemName: "play.circle.fill") 92 | }) 93 | .font(.system(size: 65)) 94 | .padding([.leading, .trailing]) 95 | 96 | Button(action: {}, label: { 97 | Image(systemName: "forward.end.fill") 98 | }) 99 | .font(.largeTitle) 100 | 101 | Spacer() 102 | 103 | Button(action: {}, label: { 104 | Image(systemName: "repeat") 105 | }) 106 | .padding([.leading, .trailing]) 107 | } 108 | } 109 | } 110 | 111 | struct ContentView_Previews: PreviewProvider { 112 | static var previews: some View { 113 | ContentView() 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /Directions/Directions/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Directions 4 | // 5 | 6 | import MapKit 7 | import SwiftUI 8 | import UIKit 9 | 10 | struct ContentView: View { 11 | 12 | @State private var directions: [String] = [] 13 | @State private var showDirections = false 14 | 15 | var body: some View { 16 | VStack { 17 | MapView(directions: $directions) 18 | 19 | Button(action: { 20 | self.showDirections.toggle() 21 | }, label: { 22 | Text("Show directions") 23 | }) 24 | .disabled(directions.isEmpty) 25 | .padding() 26 | }.sheet(isPresented: $showDirections, content: { 27 | VStack(spacing: 0) { 28 | Text("Directions") 29 | .font(.largeTitle) 30 | .bold() 31 | .padding() 32 | 33 | Divider().background(Color(UIColor.systemBlue)) 34 | 35 | List(0.. MapViewCoordinator { 50 | return MapViewCoordinator() 51 | } 52 | 53 | func makeUIView(context: Context) -> MKMapView { 54 | let mapView = MKMapView() 55 | mapView.delegate = context.coordinator 56 | 57 | let region = MKCoordinateRegion( 58 | center: CLLocationCoordinate2D(latitude: 40.71, longitude: -74), 59 | span: MKCoordinateSpan(latitudeDelta: 0.5, longitudeDelta: 0.5)) 60 | mapView.setRegion(region, animated: true) 61 | 62 | // NYC 63 | let p1 = MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: 40.71, longitude: -74)) 64 | 65 | // Boston 66 | let p2 = MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: 42.36, longitude: -71.05)) 67 | 68 | let request = MKDirections.Request() 69 | request.source = MKMapItem(placemark: p1) 70 | request.destination = MKMapItem(placemark: p2) 71 | request.transportType = .automobile 72 | 73 | let directions = MKDirections(request: request) 74 | directions.calculate { response, error in 75 | guard let route = response?.routes.first else { return } 76 | mapView.addAnnotations([p1, p2]) 77 | mapView.addOverlay(route.polyline) 78 | mapView.setVisibleMapRect( 79 | route.polyline.boundingMapRect, 80 | edgePadding: UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20), 81 | animated: true) 82 | self.directions = route.steps.map { $0.instructions }.filter { !$0.isEmpty } 83 | } 84 | return mapView 85 | } 86 | 87 | func updateUIView(_ uiView: MKMapView, context: Context) { 88 | } 89 | 90 | class MapViewCoordinator: NSObject, MKMapViewDelegate { 91 | func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer { 92 | let renderer = MKPolylineRenderer(overlay: overlay) 93 | renderer.strokeColor = .systemBlue 94 | renderer.lineWidth = 5 95 | return renderer 96 | } 97 | } 98 | } 99 | 100 | struct ContentView_Previews: PreviewProvider { 101 | static var previews: some View { 102 | ContentView() 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/MessageCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageCell.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MessageCell: View { 11 | 12 | let message: Message 13 | 14 | var body: some View { 15 | HStack { 16 | if message.role == .sender { Spacer() } 17 | MessageBubble(message: message) 18 | if message.role == .receiver { Spacer() } 19 | } 20 | } 21 | } 22 | 23 | struct MessageBubble: View { 24 | 25 | let message: Message 26 | 27 | var body: some View { 28 | VStack(alignment: message.role.alignment) { 29 | Text(message.text) 30 | if let translation = message.translation { 31 | Text(translation) 32 | .fixedSize(horizontal: false, vertical: true) 33 | .padding(8) 34 | .background { 35 | UnevenRoundedRectangle(cornerRadii: .all(radius: 10)) 36 | .foregroundStyle(Color.gray.opacity(0.8)) 37 | 38 | } 39 | .font(.caption) 40 | } 41 | } 42 | .foregroundStyle(message.role.textColor) 43 | .padding(8) 44 | .background { 45 | UnevenRoundedRectangle(cornerRadii: message.role.cornerRadii) 46 | .foregroundStyle(message.role.bubbleColor) 47 | } 48 | } 49 | } 50 | 51 | // MARK: - Role-based UI 52 | 53 | extension Role { 54 | var alignment: HorizontalAlignment { 55 | switch self { 56 | case .sender: return .trailing 57 | case .receiver: return .leading 58 | } 59 | } 60 | 61 | var bubbleColor: Color { 62 | switch self { 63 | case .sender: return .blue 64 | case .receiver: return .init(uiColor: .init(red: 240 / 255, green: 238 / 255, blue: 237 / 255, alpha: 1)) 65 | } 66 | } 67 | 68 | var textColor: Color { 69 | switch self { 70 | case .sender: return .white 71 | case .receiver: return .black 72 | } 73 | } 74 | 75 | var cornerRadii: RectangleCornerRadii { 76 | switch self { 77 | case .sender: return .init(topLeading: 10, bottomLeading: 10, topTrailing: 10) 78 | case .receiver: return .init(topLeading: 10, bottomTrailing: 10, topTrailing: 10) 79 | } 80 | } 81 | 82 | var padding: EdgeInsets { 83 | switch self { 84 | case .sender: return .init(top: 0, leading: 32, bottom: 0, trailing: 8) 85 | case .receiver: return .init(top: 0, leading: 8, bottom: 0, trailing: 32) 86 | } 87 | } 88 | } 89 | 90 | extension RectangleCornerRadii { 91 | static func all(radius: CGFloat) -> Self { 92 | return .init( 93 | topLeading: radius, 94 | bottomLeading: radius, 95 | bottomTrailing: radius, 96 | topTrailing: radius 97 | ) 98 | } 99 | } 100 | 101 | #Preview { 102 | VStack { 103 | MessageCell(message: .init(role: .sender, text: "Hey 👋🏼", translation: "Hola 👋🏼")) 104 | .padding() 105 | MessageCell(message: .init(role: .receiver, text: "Hey 👋🏼", translation: "Hola 👋🏼")) 106 | .padding() 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Music Search/Music Search/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Music Search 4 | // 5 | // Created by Alejandrina Patrón López on 1/18/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @ObservedObject var viewModel: SongListViewModel 13 | 14 | var body: some View { 15 | NavigationView { 16 | VStack { 17 | SearchBar(searchTerm: $viewModel.searchTerm) 18 | if viewModel.songs.isEmpty { 19 | EmptyStateView() 20 | } else { 21 | List(viewModel.songs) { song in 22 | SongView(song: song) 23 | } 24 | .listStyle(PlainListStyle()) 25 | } 26 | } 27 | .navigationBarTitle("Music Search") 28 | } 29 | } 30 | } 31 | 32 | struct SongView: View { 33 | @ObservedObject var song: SongViewModel 34 | 35 | var body: some View { 36 | HStack { 37 | ArtworkView(image: song.artwork) 38 | .padding(.trailing) 39 | VStack(alignment: .leading) { 40 | Text(song.trackName) 41 | Text(song.artistName) 42 | .font(.footnote) 43 | .foregroundColor(.gray) 44 | } 45 | } 46 | .padding() 47 | } 48 | } 49 | 50 | struct ArtworkView: View { 51 | let image: Image? 52 | 53 | var body: some View { 54 | ZStack { 55 | if image != nil { 56 | image 57 | } else { 58 | Color(.systemIndigo) 59 | Image(systemName: "music.note") 60 | .font(.largeTitle) 61 | .foregroundColor(.white) 62 | } 63 | } 64 | .frame(width: 50, height: 50) 65 | .shadow(radius: 5) 66 | .padding(.trailing, 5) 67 | } 68 | } 69 | 70 | struct EmptyStateView: View { 71 | var body: some View { 72 | VStack { 73 | Spacer() 74 | Image(systemName: "music.note") 75 | .font(.system(size: 85)) 76 | .padding(.bottom) 77 | Text("Start searching for music...") 78 | .font(.title) 79 | Spacer() 80 | } 81 | .padding() 82 | .foregroundColor(Color(.systemIndigo)) 83 | } 84 | } 85 | 86 | struct SearchBar: UIViewRepresentable { 87 | typealias UIViewType = UISearchBar 88 | 89 | @Binding var searchTerm: String 90 | 91 | func makeUIView(context: Context) -> UISearchBar { 92 | let searchBar = UISearchBar(frame: .zero) 93 | searchBar.delegate = context.coordinator 94 | searchBar.searchBarStyle = .minimal 95 | searchBar.placeholder = "Type a song, artist, or album name..." 96 | return searchBar 97 | } 98 | 99 | func updateUIView(_ uiView: UISearchBar, context: Context) { 100 | } 101 | 102 | func makeCoordinator() -> SearchBarCoordinator { 103 | return SearchBarCoordinator(searchTerm: $searchTerm) 104 | } 105 | 106 | class SearchBarCoordinator: NSObject, UISearchBarDelegate { 107 | @Binding var searchTerm: String 108 | 109 | init(searchTerm: Binding) { 110 | self._searchTerm = searchTerm 111 | } 112 | 113 | func searchBarSearchButtonClicked(_ searchBar: UISearchBar) { 114 | searchTerm = searchBar.text ?? "" 115 | UIApplication.shared.windows.first { $0.isKeyWindow }?.endEditing(true) 116 | } 117 | } 118 | } 119 | 120 | struct ContentView_Previews: PreviewProvider { 121 | static var previews: some View { 122 | ContentView(viewModel: SongListViewModel()) 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/ImageSaver.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageSaver.swift 3 | // QR Code Generator 4 | // 5 | 6 | import Photos 7 | import UIKit 8 | 9 | class ImageSaver: NSObject, ObservableObject { 10 | 11 | @Published public var saveResult: ImageSaveResult? 12 | 13 | public func saveImage(_ image: UIImage) { 14 | let imageLabel = "Scan my code!" 15 | let photoLibraryAuthStatus = PHPhotoLibrary.authorizationStatus() 16 | if photoLibraryAuthStatus == .authorized { 17 | saveImage(image, withLabel: imageLabel) 18 | return 19 | } 20 | 21 | PHPhotoLibrary.requestAuthorization(for: .addOnly) { status in 22 | DispatchQueue.main.async { 23 | if status == .authorized { 24 | self.saveImage(image, withLabel: imageLabel) 25 | return 26 | } 27 | self.saveResult = ImageSaveResult(saveStatus: .libraryPermissionDenied) 28 | } 29 | } 30 | } 31 | 32 | private func saveImage(_ image: UIImage, withLabel label: String) { 33 | if let imageWithLabel = addLabel(label, toImage: image) { 34 | UIImageWriteToSavedPhotosAlbum(imageWithLabel, self, #selector(saveError), nil) 35 | return 36 | } 37 | 38 | UIImageWriteToSavedPhotosAlbum(image, self, #selector(saveError), nil) 39 | } 40 | 41 | private func addLabel(_ label: String, toImage image: UIImage) -> UIImage? { 42 | let font = UIFont.boldSystemFont(ofSize: 24) 43 | let text: NSString = NSString(string: label) 44 | 45 | // Set text font and color 46 | let attr = [ 47 | NSAttributedString.Key.font: font, 48 | NSAttributedString.Key.foregroundColor: UIColor.systemBlue 49 | ] 50 | let textPadding: CGFloat = 8 51 | 52 | // Get size 53 | let sizeOfText = text.size(withAttributes: attr) 54 | let heightOffset = sizeOfText.height + textPadding * 2 55 | let width = image.size.width 56 | let height = image.size.height + heightOffset 57 | 58 | UIGraphicsBeginImageContextWithOptions(CGSize(width: width, height: height), false, 0) 59 | 60 | if let context = UIGraphicsGetCurrentContext() { 61 | UIColor.white.setFill() 62 | let rect = CGRect(x: 0, y: 0, width: width, height: height) 63 | context.fill(rect) 64 | } 65 | 66 | // Draw image 67 | image.draw(in: CGRect(x: 0, y: heightOffset, width: width, height: image.size.height)) 68 | 69 | // Draw text 70 | text.draw( 71 | in: CGRect( 72 | x: (width / 2) - (sizeOfText.width / 2), 73 | y: textPadding, 74 | width: width, 75 | height: height), 76 | withAttributes: attr 77 | ) 78 | 79 | // Get new image 80 | let newImage = UIGraphicsGetImageFromCurrentImageContext(); 81 | UIGraphicsEndImageContext() 82 | 83 | return newImage 84 | } 85 | 86 | @objc private func saveError( 87 | _ image: UIImage, 88 | didFinishSavingWithError error: Error?, 89 | contextInfo: UnsafeRawPointer 90 | ) { 91 | if error != nil { 92 | saveResult = ImageSaveResult(saveStatus: .error) 93 | } else { 94 | saveResult = ImageSaveResult(saveStatus: .success) 95 | } 96 | } 97 | } 98 | 99 | struct ImageSaveResult: Identifiable { 100 | let id = UUID() 101 | let saveStatus: ImageSaveStatus 102 | } 103 | 104 | enum ImageSaveStatus { 105 | case success 106 | case error 107 | case libraryPermissionDenied 108 | } 109 | -------------------------------------------------------------------------------- /Translate/Chat/Chat/ChatViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatViewModel.swift 3 | // Chat 4 | // 5 | // Created by Ale Patrón on 4/3/24. 6 | // 7 | 8 | import Foundation 9 | import Observation 10 | import Translation 11 | 12 | @MainActor 13 | @Observable 14 | class ChatViewModel { 15 | var translationConfiguration: TranslationSession.Configuration? = nil 16 | var draftMessage: String = "" 17 | 18 | private(set) var messages: [Message] = [ 19 | Message( 20 | role: .receiver, 21 | text: "Here's to the crazy ones" 22 | ), 23 | Message( 24 | role: .receiver, 25 | text: "the misfits, the rebels, the troublemakers" 26 | ), 27 | Message( 28 | role: .sender, 29 | text: "the round pegs in the square holes" 30 | ), 31 | Message( 32 | role: .receiver, 33 | text: "The ones who see things differently" 34 | ), 35 | Message( 36 | role: .sender, 37 | text: "They're not fond of rules. And they have no respect for the status quo" 38 | ), 39 | Message( 40 | role: .sender, 41 | text: "You can quote them, disagree with them, glorify or vilify them..." 42 | ), 43 | Message( 44 | role: .receiver, 45 | text: "Because they change things. They push the human race forward." 46 | ), 47 | Message( 48 | role: .receiver, 49 | text: "And while some may see them as the crazy ones, we see genius." 50 | ), 51 | Message( 52 | role: .receiver, 53 | text: "Because the people who are crazy enough to think they can change the world, are the ones who do." 54 | ), 55 | ] 56 | 57 | var scrollPosition: UUID? = nil 58 | 59 | func sendMessage() { 60 | guard canSendMessage else { return } 61 | // In a real chat app this would make a server call to send the message 62 | let message = Message(role: .sender, text: draftMessage) 63 | messages.append(message) 64 | scrollPosition = message.id 65 | draftMessage.removeAll() 66 | } 67 | 68 | func triggerTranslation() { 69 | if translationConfiguration == nil { 70 | translationConfiguration = TranslationSession.Configuration( 71 | source: .init(identifier: "en-US"), 72 | target: .init(identifier: "es-419") 73 | ) 74 | return 75 | } 76 | translationConfiguration?.invalidate() 77 | } 78 | 79 | func translateAllMessages(using session: TranslationSession) async { 80 | Task { //@MainActor in 81 | let requests: [TranslationSession.Request] = messages.enumerated().map { (index, message) in 82 | // Assign each request a client identifier. 83 | .init(sourceText: message.text, clientIdentifier: "\(index)") 84 | } 85 | 86 | 87 | do { 88 | for try await response in session.translate(batch: requests) { 89 | // Use the returned client identifier (the index) to map the request to the response. 90 | guard let index = Int(response.clientIdentifier ?? "") else { continue } 91 | messages[index].translation = response.targetText 92 | } 93 | } catch { 94 | // Handle any errors. 95 | } 96 | } 97 | } 98 | 99 | public var canSendMessage: Bool { 100 | !draftMessage.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /QR Code Generator/QR Code Generator/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // QR Code Generator 4 | // 5 | 6 | import SwiftUI 7 | 8 | // https://www.youtube.com/channel/UCvsJ3k3CFcRq3eJnUoU3u2w 9 | 10 | struct ContentView: View { 11 | 12 | @State private var urlInput: String = "" 13 | @State private var qrCode: QRCode? 14 | 15 | private let qrCodeGenerator = QRCodeGenerator() 16 | @StateObject private var imageSaver = ImageSaver() 17 | 18 | var body: some View { 19 | NavigationView { 20 | GeometryReader { geometry in 21 | VStack { 22 | HStack { 23 | TextField("Enter url:", text: $urlInput) 24 | .textFieldStyle(RoundedBorderTextFieldStyle()) 25 | .textContentType(.URL) 26 | .keyboardType(.URL) 27 | 28 | Button("Generate") { 29 | UIApplication.shared.windows.first { $0.isKeyWindow }?.endEditing(true) 30 | qrCode = qrCodeGenerator.generateQRCode(forUrlString: urlInput) 31 | urlInput = "" 32 | } 33 | .disabled(urlInput.isEmpty) 34 | .padding(.leading) 35 | } 36 | 37 | Spacer() 38 | 39 | if qrCode == nil { 40 | EmptyStateView(width: geometry.size.width) 41 | } else { 42 | QRCodeView(qrCode: qrCode!, width: geometry.size.width) 43 | } 44 | 45 | Spacer() 46 | } 47 | .padding() 48 | .navigationBarTitle("QR Code") 49 | .navigationBarItems(trailing: Button(action: { 50 | assert(qrCode != nil, "Cannot save nil QR code image") 51 | imageSaver.saveImage(qrCode!.uiImage) 52 | }) { 53 | Image(systemName: "square.and.arrow.down") 54 | } 55 | .disabled(qrCode == nil)) 56 | .alert(item: $imageSaver.saveResult) { saveResult in 57 | return alert(forSaveStatus: saveResult.saveStatus) 58 | } 59 | } 60 | } 61 | } 62 | 63 | private func alert(forSaveStatus saveStatus: ImageSaveStatus) -> Alert { 64 | switch saveStatus { 65 | case .success: 66 | return Alert( 67 | title: Text("Success!"), 68 | message: Text("The QR code was saved to your photo library.") 69 | ) 70 | case .error: 71 | return Alert( 72 | title: Text("Oops!"), 73 | message: Text("An error occurred while saving your QR code.") 74 | ) 75 | case .libraryPermissionDenied: 76 | return Alert( 77 | title: Text("Oops!"), 78 | message: Text("This app needs permission to add photos to your library."), 79 | primaryButton: .cancel(Text("Ok")), 80 | secondaryButton: .default(Text("Open settings")) { 81 | guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return } 82 | UIApplication.shared.open(settingsUrl) 83 | } 84 | ) 85 | } 86 | } 87 | } 88 | 89 | struct QRCodeView: View { 90 | let qrCode: QRCode 91 | let width: CGFloat 92 | 93 | var body: some View { 94 | VStack { 95 | Label("QR code for \(qrCode.urlString):", systemImage: "qrcode.viewfinder") 96 | .lineLimit(3) 97 | Image(uiImage: qrCode.uiImage) 98 | .resizable() 99 | .frame(width: width * 2 / 3, height: width * 2 / 3) 100 | } 101 | } 102 | } 103 | 104 | struct EmptyStateView: View { 105 | 106 | let width: CGFloat 107 | 108 | private var imageLength: CGFloat { 109 | width / 2.5 110 | } 111 | 112 | var body: some View { 113 | VStack { 114 | Image(systemName: "qrcode") 115 | .resizable() 116 | .frame(width: imageLength, height: imageLength) 117 | 118 | Text("Create your own QR code") 119 | .padding(.top) 120 | } 121 | .foregroundColor(Color(UIColor.systemGray)) 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /Emoji Search/Emoji Search/EmojiProvider.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public struct EmojiProvider { 4 | 5 | /// Creates a list of emoji details that includes an emoji along with its name and description. 6 | /// - Returns: The list of `EmojiDetail`s 7 | /// - Note: Emoji descriptions obtained from [Empojipedia](https://emojipedia.org/). 8 | static func all() -> [EmojiDetails] { 9 | return [ 10 | EmojiDetails( 11 | emoji: "👾", 12 | name: "Alien Monster", 13 | description: "A friendly-looking, tentacled space creature with two eyes."), 14 | EmojiDetails( 15 | emoji: "🎨", 16 | name: "Artist Palette", 17 | description: "A palette used by an artist when painting, to store and mix paint colors."), 18 | EmojiDetails( 19 | emoji: "🥑", 20 | name: "Avocado", 21 | description: "A pear-shaped avocado, sliced in half to show its yellow-green flesh and " 22 | + "large brown pit."), 23 | EmojiDetails( 24 | emoji: "🐿️", 25 | name: "Chipmunk", 26 | description: "A chipmunk, a small rodent with puffy cheeks."), 27 | EmojiDetails( 28 | emoji: "🤯", 29 | name: "Exploding Head", 30 | description: "A yellow face with an open mouth, the top of its head exploding in the shape " 31 | + "of a brain-like mushroom cloud."), 32 | EmojiDetails( 33 | emoji: "🦊", 34 | name: "Fox", 35 | description: "A friendly, cartoon-styled faced of a fox, the cunning canine, looking " 36 | + "straight ahead."), 37 | EmojiDetails( 38 | emoji: "😀", 39 | name: "Grinning Face", 40 | description: "A yellow face with simple, open eyes and a broad, open smile, showing upper " 41 | + "teeth and tongue on some platforms."), 42 | EmojiDetails( 43 | emoji: "🍟", 44 | name: "French Fries", 45 | description: "Thin-cut, golden-brown French fries, served in a red carton, as at " 46 | + "McDonald’s."), 47 | EmojiDetails( 48 | emoji: "🐣", 49 | name: "Hatching Chick", 50 | description: "A baby chicken (chick), hatching from an egg and seeing the world for the " 51 | + "first time."), 52 | EmojiDetails( 53 | emoji: "🌭", 54 | name: "Hot Dog", 55 | description: "The cooked sausage of a hot dog in a sliced bun and drizzled with yellow " 56 | + "mustard, as eaten at a baseball game."), 57 | EmojiDetails(emoji: "🪁", name: "Kite", description: "A diamond-shaped kite with a tail."), 58 | EmojiDetails( 59 | emoji: "🔍", 60 | name: "Magnifying Glass Tilted Left", 61 | description: "A classic magnifying glass, as used to view small objects, with its lens " 62 | + "pointed left."), 63 | EmojiDetails( 64 | emoji: "🏓", 65 | name: "Ping Pong", 66 | description: "A paddle and ping pong ball used in the sport of table tennis."), 67 | EmojiDetails( 68 | emoji: "🍕", 69 | name: "Pizza", 70 | description: "A slice of pepperoni pizza, topped with black olives on Google. WhatsApp " 71 | + "adds green pepper, Samsung white onion."), 72 | EmojiDetails( 73 | emoji: "🧩", 74 | name: "Puzzle Piece", 75 | description: "Puzzle Piece was approved as part of Unicode 11.0 in 2018 under the name " 76 | + "“Jigsaw Puzzle Piece” and added to Emoji 11.0 in 2018."), 77 | EmojiDetails( 78 | emoji: "🚀", 79 | name: "Rocket", 80 | description: "A rocket being propelled into space."), 81 | EmojiDetails( 82 | emoji: "📌", 83 | name: "Round Pushpin", 84 | description: "A thumbtack (drawing pin), as used to pin documents on a bulletin (notice) " 85 | + "board. Depicted at a 45° angle with its red, flat head to the upper right."), 86 | EmojiDetails( 87 | emoji: "⛩️", 88 | name: "Shinto Shrine", 89 | description: "A shrine used for the Japanese Shinto religion. This emoji generally " + 90 | "displays the torii, which is the gate to the Shinto Shrine."), 91 | EmojiDetails( 92 | emoji: "🥰", 93 | name: "Smiling Face with Hearts", 94 | description: "A yellow face with smiling eyes, a closed smile, rosy cheeks, and several " 95 | + "hearts floating around its head."), 96 | EmojiDetails( 97 | emoji: "😈", 98 | name: "Smiling Face with Horns", 99 | description: "A face, usually purple, with devil horns, a wide grin, and eyes and eyebrows " 100 | + "scrunched downward on most platforms."), 101 | EmojiDetails( 102 | emoji: "🤩", 103 | name: "Star-Struck", 104 | description: "A yellow face with a broad, open smile, showing upper teeth on most " 105 | + "platforms, with stars for eyes, as if seeing a beloved celebrity."), 106 | EmojiDetails( 107 | emoji: "🗽", 108 | name: "Statue of Liberty", 109 | description: "The Statue of Liberty, often used as a depiction of New York City."), 110 | EmojiDetails( 111 | emoji: "🌻", 112 | name: "Sunflower", 113 | description: "A sunflower, a tall, round flower with large yellow petals. Depicted as a " 114 | + "single, vertical sunflower with a large, dark-brown center on a green stem."), 115 | EmojiDetails( 116 | emoji: "🧸", 117 | name: "Teddy Bear", 118 | description: "A classic teddy bear, as snuggled by a child when going to sleep."), 119 | EmojiDetails( 120 | emoji: "🎾", 121 | name: "Tennis", 122 | description: "A tennis racket (racquet) with a tennis ball. Only a ball is shown on Apple, " 123 | + "LG, Twitter, Facebook, and Mozilla platforms."), 124 | EmojiDetails( 125 | emoji: "🗼", 126 | name: "Tokyo Tower", 127 | description: "The Tokyo Tower is the second-tallest building in Japan, located in Minato, " 128 | + "Tokyo."), 129 | EmojiDetails( 130 | emoji: "🦄", 131 | name: "Unicorn", 132 | description: "The face of a unicorn, a mythical creature in the form of a white horse with " 133 | + "a single, long horn on its forehead."), 134 | EmojiDetails( 135 | emoji: "🍉", 136 | name: "Watermelon", 137 | description: "A slice of watermelon, showing its rich pink flesh, black seeds, and green " 138 | + "rind."), 139 | EmojiDetails( 140 | emoji: "🚴🏽‍♀️", 141 | name: "Woman Biking", 142 | description: "The female version of the 🚴 Bicyclist emoji."), 143 | EmojiDetails( 144 | emoji: "👩🏽‍💻", 145 | name: "Woman Technologist", 146 | description: "A woman behind a computer screen, working in the field of technology."), 147 | EmojiDetails( 148 | emoji: "🗺", 149 | name: "World Map", 150 | description: "A rectangular map of the world. Generally depicted as a paper map creased at " 151 | + "its folds, Earth’s surface shown in green on blue ocean."), 152 | ] 153 | } 154 | } 155 | 156 | struct EmojiDetails: Identifiable { 157 | let id = UUID() 158 | let emoji: String 159 | let name: String 160 | let description: String 161 | } 162 | -------------------------------------------------------------------------------- /Spotify/Spotify.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F6327F2C260D115600D993A9 /* SpotifyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6327F2B260D115600D993A9 /* SpotifyApp.swift */; }; 11 | F6327F2E260D115600D993A9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6327F2D260D115600D993A9 /* ContentView.swift */; }; 12 | F6327F30260D115800D993A9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F6327F2F260D115800D993A9 /* Assets.xcassets */; }; 13 | F6327F33260D115800D993A9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F6327F32260D115800D993A9 /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | F6327F28260D115600D993A9 /* Spotify.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Spotify.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | F6327F2B260D115600D993A9 /* SpotifyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotifyApp.swift; sourceTree = ""; }; 19 | F6327F2D260D115600D993A9 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | F6327F2F260D115800D993A9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | F6327F32260D115800D993A9 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | F6327F34260D115800D993A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | F6327F25260D115600D993A9 /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | F6327F1F260D115600D993A9 = { 37 | isa = PBXGroup; 38 | children = ( 39 | F6327F2A260D115600D993A9 /* Spotify */, 40 | F6327F29260D115600D993A9 /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | F6327F29260D115600D993A9 /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | F6327F28260D115600D993A9 /* Spotify.app */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | F6327F2A260D115600D993A9 /* Spotify */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | F6327F2B260D115600D993A9 /* SpotifyApp.swift */, 56 | F6327F2D260D115600D993A9 /* ContentView.swift */, 57 | F6327F2F260D115800D993A9 /* Assets.xcassets */, 58 | F6327F34260D115800D993A9 /* Info.plist */, 59 | F6327F31260D115800D993A9 /* Preview Content */, 60 | ); 61 | path = Spotify; 62 | sourceTree = ""; 63 | }; 64 | F6327F31260D115800D993A9 /* Preview Content */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | F6327F32260D115800D993A9 /* Preview Assets.xcassets */, 68 | ); 69 | path = "Preview Content"; 70 | sourceTree = ""; 71 | }; 72 | /* End PBXGroup section */ 73 | 74 | /* Begin PBXNativeTarget section */ 75 | F6327F27260D115600D993A9 /* Spotify */ = { 76 | isa = PBXNativeTarget; 77 | buildConfigurationList = F6327F37260D115800D993A9 /* Build configuration list for PBXNativeTarget "Spotify" */; 78 | buildPhases = ( 79 | F6327F24260D115600D993A9 /* Sources */, 80 | F6327F25260D115600D993A9 /* Frameworks */, 81 | F6327F26260D115600D993A9 /* Resources */, 82 | ); 83 | buildRules = ( 84 | ); 85 | dependencies = ( 86 | ); 87 | name = Spotify; 88 | productName = Spotify; 89 | productReference = F6327F28260D115600D993A9 /* Spotify.app */; 90 | productType = "com.apple.product-type.application"; 91 | }; 92 | /* End PBXNativeTarget section */ 93 | 94 | /* Begin PBXProject section */ 95 | F6327F20260D115600D993A9 /* Project object */ = { 96 | isa = PBXProject; 97 | attributes = { 98 | LastSwiftUpdateCheck = 1240; 99 | LastUpgradeCheck = 1240; 100 | TargetAttributes = { 101 | F6327F27260D115600D993A9 = { 102 | CreatedOnToolsVersion = 12.4; 103 | }; 104 | }; 105 | }; 106 | buildConfigurationList = F6327F23260D115600D993A9 /* Build configuration list for PBXProject "Spotify" */; 107 | compatibilityVersion = "Xcode 9.3"; 108 | developmentRegion = en; 109 | hasScannedForEncodings = 0; 110 | knownRegions = ( 111 | en, 112 | Base, 113 | ); 114 | mainGroup = F6327F1F260D115600D993A9; 115 | productRefGroup = F6327F29260D115600D993A9 /* Products */; 116 | projectDirPath = ""; 117 | projectRoot = ""; 118 | targets = ( 119 | F6327F27260D115600D993A9 /* Spotify */, 120 | ); 121 | }; 122 | /* End PBXProject section */ 123 | 124 | /* Begin PBXResourcesBuildPhase section */ 125 | F6327F26260D115600D993A9 /* Resources */ = { 126 | isa = PBXResourcesBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | F6327F33260D115800D993A9 /* Preview Assets.xcassets in Resources */, 130 | F6327F30260D115800D993A9 /* Assets.xcassets in Resources */, 131 | ); 132 | runOnlyForDeploymentPostprocessing = 0; 133 | }; 134 | /* End PBXResourcesBuildPhase section */ 135 | 136 | /* Begin PBXSourcesBuildPhase section */ 137 | F6327F24260D115600D993A9 /* Sources */ = { 138 | isa = PBXSourcesBuildPhase; 139 | buildActionMask = 2147483647; 140 | files = ( 141 | F6327F2E260D115600D993A9 /* ContentView.swift in Sources */, 142 | F6327F2C260D115600D993A9 /* SpotifyApp.swift in Sources */, 143 | ); 144 | runOnlyForDeploymentPostprocessing = 0; 145 | }; 146 | /* End PBXSourcesBuildPhase section */ 147 | 148 | /* Begin XCBuildConfiguration section */ 149 | F6327F35260D115800D993A9 /* Debug */ = { 150 | isa = XCBuildConfiguration; 151 | buildSettings = { 152 | ALWAYS_SEARCH_USER_PATHS = NO; 153 | CLANG_ANALYZER_NONNULL = YES; 154 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 155 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 156 | CLANG_CXX_LIBRARY = "libc++"; 157 | CLANG_ENABLE_MODULES = YES; 158 | CLANG_ENABLE_OBJC_ARC = YES; 159 | CLANG_ENABLE_OBJC_WEAK = YES; 160 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 161 | CLANG_WARN_BOOL_CONVERSION = YES; 162 | CLANG_WARN_COMMA = YES; 163 | CLANG_WARN_CONSTANT_CONVERSION = YES; 164 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 165 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 166 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 167 | CLANG_WARN_EMPTY_BODY = YES; 168 | CLANG_WARN_ENUM_CONVERSION = YES; 169 | CLANG_WARN_INFINITE_RECURSION = YES; 170 | CLANG_WARN_INT_CONVERSION = YES; 171 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 172 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 173 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 174 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 175 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 176 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 177 | CLANG_WARN_STRICT_PROTOTYPES = YES; 178 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 179 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 180 | CLANG_WARN_UNREACHABLE_CODE = YES; 181 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 182 | COPY_PHASE_STRIP = NO; 183 | DEBUG_INFORMATION_FORMAT = dwarf; 184 | ENABLE_STRICT_OBJC_MSGSEND = YES; 185 | ENABLE_TESTABILITY = YES; 186 | GCC_C_LANGUAGE_STANDARD = gnu11; 187 | GCC_DYNAMIC_NO_PIC = NO; 188 | GCC_NO_COMMON_BLOCKS = YES; 189 | GCC_OPTIMIZATION_LEVEL = 0; 190 | GCC_PREPROCESSOR_DEFINITIONS = ( 191 | "DEBUG=1", 192 | "$(inherited)", 193 | ); 194 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 195 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 196 | GCC_WARN_UNDECLARED_SELECTOR = YES; 197 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 198 | GCC_WARN_UNUSED_FUNCTION = YES; 199 | GCC_WARN_UNUSED_VARIABLE = YES; 200 | IPHONEOS_DEPLOYMENT_TARGET = 14.4; 201 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 202 | MTL_FAST_MATH = YES; 203 | ONLY_ACTIVE_ARCH = YES; 204 | SDKROOT = iphoneos; 205 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 206 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 207 | }; 208 | name = Debug; 209 | }; 210 | F6327F36260D115800D993A9 /* Release */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | ALWAYS_SEARCH_USER_PATHS = NO; 214 | CLANG_ANALYZER_NONNULL = YES; 215 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 216 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 217 | CLANG_CXX_LIBRARY = "libc++"; 218 | CLANG_ENABLE_MODULES = YES; 219 | CLANG_ENABLE_OBJC_ARC = YES; 220 | CLANG_ENABLE_OBJC_WEAK = YES; 221 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 222 | CLANG_WARN_BOOL_CONVERSION = YES; 223 | CLANG_WARN_COMMA = YES; 224 | CLANG_WARN_CONSTANT_CONVERSION = YES; 225 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 226 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 227 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 228 | CLANG_WARN_EMPTY_BODY = YES; 229 | CLANG_WARN_ENUM_CONVERSION = YES; 230 | CLANG_WARN_INFINITE_RECURSION = YES; 231 | CLANG_WARN_INT_CONVERSION = YES; 232 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 233 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 234 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 235 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 236 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 237 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 238 | CLANG_WARN_STRICT_PROTOTYPES = YES; 239 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 240 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 241 | CLANG_WARN_UNREACHABLE_CODE = YES; 242 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 243 | COPY_PHASE_STRIP = NO; 244 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 245 | ENABLE_NS_ASSERTIONS = NO; 246 | ENABLE_STRICT_OBJC_MSGSEND = YES; 247 | GCC_C_LANGUAGE_STANDARD = gnu11; 248 | GCC_NO_COMMON_BLOCKS = YES; 249 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 250 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 251 | GCC_WARN_UNDECLARED_SELECTOR = YES; 252 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 253 | GCC_WARN_UNUSED_FUNCTION = YES; 254 | GCC_WARN_UNUSED_VARIABLE = YES; 255 | IPHONEOS_DEPLOYMENT_TARGET = 14.4; 256 | MTL_ENABLE_DEBUG_INFO = NO; 257 | MTL_FAST_MATH = YES; 258 | SDKROOT = iphoneos; 259 | SWIFT_COMPILATION_MODE = wholemodule; 260 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 261 | VALIDATE_PRODUCT = YES; 262 | }; 263 | name = Release; 264 | }; 265 | F6327F38260D115800D993A9 /* Debug */ = { 266 | isa = XCBuildConfiguration; 267 | buildSettings = { 268 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 269 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 270 | CODE_SIGN_STYLE = Automatic; 271 | DEVELOPMENT_ASSET_PATHS = "\"Spotify/Preview Content\""; 272 | ENABLE_PREVIEWS = YES; 273 | INFOPLIST_FILE = Spotify/Info.plist; 274 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 275 | LD_RUNPATH_SEARCH_PATHS = ( 276 | "$(inherited)", 277 | "@executable_path/Frameworks", 278 | ); 279 | PRODUCT_BUNDLE_IDENTIFIER = com.alep.apps.Spotify; 280 | PRODUCT_NAME = "$(TARGET_NAME)"; 281 | SWIFT_VERSION = 5.0; 282 | TARGETED_DEVICE_FAMILY = "1,2"; 283 | }; 284 | name = Debug; 285 | }; 286 | F6327F39260D115800D993A9 /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 290 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 291 | CODE_SIGN_STYLE = Automatic; 292 | DEVELOPMENT_ASSET_PATHS = "\"Spotify/Preview Content\""; 293 | ENABLE_PREVIEWS = YES; 294 | INFOPLIST_FILE = Spotify/Info.plist; 295 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 296 | LD_RUNPATH_SEARCH_PATHS = ( 297 | "$(inherited)", 298 | "@executable_path/Frameworks", 299 | ); 300 | PRODUCT_BUNDLE_IDENTIFIER = com.alep.apps.Spotify; 301 | PRODUCT_NAME = "$(TARGET_NAME)"; 302 | SWIFT_VERSION = 5.0; 303 | TARGETED_DEVICE_FAMILY = "1,2"; 304 | }; 305 | name = Release; 306 | }; 307 | /* End XCBuildConfiguration section */ 308 | 309 | /* Begin XCConfigurationList section */ 310 | F6327F23260D115600D993A9 /* Build configuration list for PBXProject "Spotify" */ = { 311 | isa = XCConfigurationList; 312 | buildConfigurations = ( 313 | F6327F35260D115800D993A9 /* Debug */, 314 | F6327F36260D115800D993A9 /* Release */, 315 | ); 316 | defaultConfigurationIsVisible = 0; 317 | defaultConfigurationName = Release; 318 | }; 319 | F6327F37260D115800D993A9 /* Build configuration list for PBXNativeTarget "Spotify" */ = { 320 | isa = XCConfigurationList; 321 | buildConfigurations = ( 322 | F6327F38260D115800D993A9 /* Debug */, 323 | F6327F39260D115800D993A9 /* Release */, 324 | ); 325 | defaultConfigurationIsVisible = 0; 326 | defaultConfigurationName = Release; 327 | }; 328 | /* End XCConfigurationList section */ 329 | }; 330 | rootObject = F6327F20260D115600D993A9 /* Project object */; 331 | } 332 | --------------------------------------------------------------------------------