From c352542331e0901c08d2f6afa6acc3c0ddfc1817 Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 9 Jul 2025 16:08:37 +0200 Subject: [PATCH] Fix macOS build error and iPhone 16 display issues - Split multi-platform target into separate iOS and macOS targets to prevent iOS share extension from being embedded in macOS build - Add launch screen configuration and full screen support for proper iPhone 16 display - Configure iOS-specific Info.plist entries for background modes and interface orientations --- bitchat.xcodeproj/project.pbxproj | 44 +++-------------- bitchat/Info.plist | 20 ++++---- project.yml | 82 +++++++++++++++++++++++++++++-- 3 files changed, 94 insertions(+), 52 deletions(-) diff --git a/bitchat.xcodeproj/project.pbxproj b/bitchat.xcodeproj/project.pbxproj index a61b46e1..f2ef0172 100644 --- a/bitchat.xcodeproj/project.pbxproj +++ b/bitchat.xcodeproj/project.pbxproj @@ -37,7 +37,6 @@ 923027D6F2F417AFA2488127 /* BitchatProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 229F17B68CFF7AB1BC91C847 /* BitchatProtocol.swift */; }; 9269B4230187A9EA969BEDB7 /* PasswordProtectedChannelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036A1A705AAF9EC21F4354BE /* PasswordProtectedChannelTests.swift */; }; 92D34E7A07C990C8A815B0CE /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A08E03AA0C63E97C91749AEC /* ContentView.swift */; }; - 97BC7E9FAB24FFE643DB5EB2 /* bitchatShareExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 61F92EBA29C47C0FCC482F1F /* bitchatShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 9C7D287C8E67AAE576A5ECB7 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B378C16594575FCC7F9C75 /* ShareViewController.swift */; }; ABAF130D88561F4A646F0430 /* AppInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 763E0DBA9492A654FC0CDCB9 /* AppInfoView.swift */; }; AD11E46940D742AEAF547EB2 /* AppInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 763E0DBA9492A654FC0CDCB9 /* AppInfoView.swift */; }; @@ -66,13 +65,6 @@ remoteGlobalIDString = AF077EA0474EDEDE2C72716C; remoteInfo = bitchat_iOS; }; - DCB3AD9121A64769FAD7BAD0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 475D96681D0EA0AE57A4E06E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 57CA17A36A2532A6CFF367BB; - remoteInfo = bitchatShareExtension; - }; E35E7AF9854A2E72452DD34F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 475D96681D0EA0AE57A4E06E /* Project object */; @@ -90,17 +82,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 1AE5E5D867B14EFDBE2C8889 /* Embed Foundation Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 97BC7E9FAB24FFE643DB5EB2 /* bitchatShareExtension.appex in Embed Foundation Extensions */, - ); - name = "Embed Foundation Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; B6C356449BAE4E0F650565D1 /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -133,9 +114,9 @@ 67A85BFDDE65B4CD8BDF6DDB /* MessageRetentionService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageRetentionService.swift; sourceTree = ""; }; 6DC1563390A15C042D059CF9 /* EncryptionService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptionService.swift; sourceTree = ""; }; 763E0DBA9492A654FC0CDCB9 /* AppInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppInfoView.swift; sourceTree = ""; }; - 7EEBDA723E1CFD88758DA4AC /* bitchat.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bitchat.app; sourceTree = BUILT_PRODUCTS_DIR; }; 8DE9CDF66D4E52D268851048 /* MessagePaddingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagePaddingTests.swift; sourceTree = ""; }; - 997D512074C64904D75DDD40 /* bitchat.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = bitchat.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8F3A7C058C2C8E1A06C8CF8B /* bitchat_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bitchat_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 96D0D41CA19EE5A772AA8434 /* bitchat_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = bitchat_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9AC141774F6671FCDC347DC7 /* LinkPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkPreviewView.swift; sourceTree = ""; }; A08E03AA0C63E97C91749AEC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; A2136C3E22D02D4A8DBE7EAB /* BinaryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BinaryProtocol.swift; sourceTree = ""; }; @@ -199,8 +180,8 @@ 9F37F9F2C353B58AC809E93B /* Products */ = { isa = PBXGroup; children = ( - 997D512074C64904D75DDD40 /* bitchat.app */, - 7EEBDA723E1CFD88758DA4AC /* bitchat.app */, + 96D0D41CA19EE5A772AA8434 /* bitchat_iOS.app */, + 8F3A7C058C2C8E1A06C8CF8B /* bitchat_macOS.app */, 61F92EBA29C47C0FCC482F1F /* bitchatShareExtension.appex */, C0DB1DE27F0AAB5092663E8E /* bitchatTests_iOS.xctest */, 03C57F452B55FD0FD8F51421 /* bitchatTests_macOS.xctest */, @@ -273,18 +254,16 @@ buildPhases = ( 137ABE739BF20ACDDF8CC605 /* Sources */, 0214973A876129753D39EB47 /* Resources */, - 1AE5E5D867B14EFDBE2C8889 /* Embed Foundation Extensions */, ); buildRules = ( ); dependencies = ( - D8120CFFA88B852C3D106FA6 /* PBXTargetDependency */, ); name = bitchat_macOS; packageProductDependencies = ( ); productName = bitchat_macOS; - productReference = 7EEBDA723E1CFD88758DA4AC /* bitchat.app */; + productReference = 8F3A7C058C2C8E1A06C8CF8B /* bitchat_macOS.app */; productType = "com.apple.product-type.application"; }; 47FF23248747DD7CB666CB91 /* bitchatTests_macOS */ = { @@ -357,7 +336,7 @@ packageProductDependencies = ( ); productName = bitchat_iOS; - productReference = 997D512074C64904D75DDD40 /* bitchat.app */; + productReference = 96D0D41CA19EE5A772AA8434 /* bitchat_iOS.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -519,11 +498,6 @@ target = 57CA17A36A2532A6CFF367BB /* bitchatShareExtension */; targetProxy = E35E7AF9854A2E72452DD34F /* PBXContainerItemProxy */; }; - D8120CFFA88B852C3D106FA6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 57CA17A36A2532A6CFF367BB /* bitchatShareExtension */; - targetProxy = DCB3AD9121A64769FAD7BAD0 /* PBXContainerItemProxy */; - }; D8C09F21DB7DC06E8E672C21 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = AF077EA0474EDEDE2C72716C /* bitchat_iOS */; @@ -630,7 +604,6 @@ "$(inherited)", "@executable_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.0; PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat; PRODUCT_NAME = bitchat; SDKROOT = iphoneos; @@ -677,7 +650,6 @@ "$(inherited)", "@executable_path/Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 13.0; PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat; PRODUCT_NAME = bitchat; SDKROOT = iphoneos; @@ -700,7 +672,6 @@ DEVELOPMENT_TEAM = L3N5LHJD5Y; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = bitchat/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -709,7 +680,6 @@ PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat; PRODUCT_NAME = bitchat; SDKROOT = macosx; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; SWIFT_VERSION = 5.0; }; name = Release; @@ -785,7 +755,6 @@ DEVELOPMENT_TEAM = L3N5LHJD5Y; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = bitchat/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/../Frameworks", @@ -794,7 +763,6 @@ PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat; PRODUCT_NAME = bitchat; SDKROOT = macosx; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; SWIFT_VERSION = 5.0; }; name = Debug; diff --git a/bitchat/Info.plist b/bitchat/Info.plist index a056533c..a4729f6c 100644 --- a/bitchat/Info.plist +++ b/bitchat/Info.plist @@ -18,6 +18,15 @@ APPL CFBundleShortVersionString $(MARKETING_VERSION) + CFBundleURLTypes + + + CFBundleURLSchemes + + bitchat + + + CFBundleVersion $(CURRENT_PROJECT_VERSION) LSMinimumSystemVersion @@ -40,14 +49,7 @@ UIInterfaceOrientationPortrait - CFBundleURLTypes - - - CFBundleURLSchemes - - bitchat - - - + UIRequiresFullScreen + diff --git a/project.yml b/project.yml index 2451d97c..b01b749c 100644 --- a/project.yml +++ b/project.yml @@ -11,9 +11,9 @@ settings: CURRENT_PROJECT_VERSION: 1 targets: - bitchat: + bitchat_iOS: type: application - platform: [iOS, macOS] + platform: iOS sources: - bitchat resources: @@ -24,7 +24,6 @@ targets: CFBundleDisplayName: bitchat CFBundleShortVersionString: $(MARKETING_VERSION) CFBundleVersion: $(CURRENT_PROJECT_VERSION) - LSMinimumSystemVersion: $(MACOSX_DEPLOYMENT_TARGET) NSBluetoothAlwaysUsageDescription: bitchat uses Bluetooth to create a secure mesh network for chatting with nearby users. NSBluetoothPeripheralUsageDescription: bitchat uses Bluetooth to discover and connect with other bitchat users nearby. UIBackgroundModes: @@ -39,11 +38,11 @@ targets: - bitchat settings: PRODUCT_BUNDLE_IDENTIFIER: chat.bitchat + PRODUCT_NAME: bitchat INFOPLIST_FILE: bitchat/Info.plist ENABLE_PREVIEWS: YES SWIFT_VERSION: 5.0 IPHONEOS_DEPLOYMENT_TARGET: 16.0 - MACOSX_DEPLOYMENT_TARGET: 13.0 SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: YES CODE_SIGN_STYLE: Automatic CODE_SIGNING_REQUIRED: YES @@ -54,9 +53,42 @@ targets: DEVELOPMENT_TEAM: L3N5LHJD5Y dependencies: - target: bitchatShareExtension - platformFilter: ios embed: true + bitchat_macOS: + type: application + platform: macOS + sources: + - bitchat + resources: + - bitchat/Assets.xcassets + info: + path: bitchat/Info.plist + properties: + CFBundleDisplayName: bitchat + CFBundleShortVersionString: $(MARKETING_VERSION) + CFBundleVersion: $(CURRENT_PROJECT_VERSION) + LSMinimumSystemVersion: $(MACOSX_DEPLOYMENT_TARGET) + NSBluetoothAlwaysUsageDescription: bitchat uses Bluetooth to create a secure mesh network for chatting with nearby users. + NSBluetoothPeripheralUsageDescription: bitchat uses Bluetooth to discover and connect with other bitchat users nearby. + CFBundleURLTypes: + - CFBundleURLSchemes: + - bitchat + settings: + PRODUCT_BUNDLE_IDENTIFIER: chat.bitchat + PRODUCT_NAME: bitchat + INFOPLIST_FILE: bitchat/Info.plist + ENABLE_PREVIEWS: YES + SWIFT_VERSION: 5.0 + MACOSX_DEPLOYMENT_TARGET: 13.0 + CODE_SIGN_STYLE: Automatic + CODE_SIGNING_REQUIRED: YES + CODE_SIGNING_ALLOWED: YES + ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon + ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS: YES + CODE_SIGN_ENTITLEMENTS: bitchat/bitchat.entitlements + DEVELOPMENT_TEAM: L3N5LHJD5Y + bitchatShareExtension: type: app-extension platform: iOS @@ -117,3 +149,43 @@ targets: MACOSX_DEPLOYMENT_TARGET: 13.0 TEST_HOST: $(BUILT_PRODUCTS_DIR)/bitchat.app/Contents/MacOS/bitchat BUNDLE_LOADER: $(TEST_HOST) + +schemes: + bitchat (iOS): + build: + targets: + bitchat_iOS: all + bitchatShareExtension: all + run: + config: Debug + executable: bitchat_iOS + test: + config: Debug + targets: + - bitchatTests_iOS + profile: + config: Release + executable: bitchat_iOS + analyze: + config: Debug + archive: + config: Release + + bitchat (macOS): + build: + targets: + bitchat_macOS: all + run: + config: Debug + executable: bitchat_macOS + test: + config: Debug + targets: + - bitchatTests_macOS + profile: + config: Release + executable: bitchat_macOS + analyze: + config: Debug + archive: + config: Release