diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc5ca7702..33e8e6b3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,9 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: ./get_frameworks.sh + - name: copy xcconfig + run: cp template_setup.xcconfig developer_setup.xcconfig + - name: actual build run: set -o pipefail && xcodebuild archive -project Blink.xcodeproj -scheme Blink -sdk iphoneos -configuration Debug clean build IPHONEOS_DEPLOYMENT_TARGET='14.2' CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO ONLY_ACTIVE_ARCH=NO | tee build.log | xcpretty diff --git a/.gitignore b/.gitignore index cfb2bdb10..0fe08c011 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ Frameworks/openssl.framework ## Other *.moved-aside *.xcuserstate +developer_setup.xcconfig ## Obj-C/Swift specific *.hmap diff --git a/Blink.xcodeproj/project.pbxproj b/Blink.xcodeproj/project.pbxproj index 53aa4e0f8..c9883fd7e 100644 --- a/Blink.xcodeproj/project.pbxproj +++ b/Blink.xcodeproj/project.pbxproj @@ -222,6 +222,7 @@ D27AD9BC222FDD3D00379872 /* xcall.m in Sources */ = {isa = PBXBuildFile; fileRef = D27AD9BB222FDD3D00379872 /* xcall.m */; }; D27BBA1C20529FFF00AEA303 /* TermStream.m in Sources */ = {isa = PBXBuildFile; fileRef = D27BBA1B20529FFF00AEA303 /* TermStream.m */; }; D27D0118261202A400128C23 /* KeyUIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27D0117261202A400128C23 /* KeyUIError.swift */; }; + D27D01272615F1BD00128C23 /* developer_setup.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = D27D01232615F1BD00128C23 /* developer_setup.xcconfig */; }; D2887A5622DC676F00701BD5 /* SpaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2887A5522DC676F00701BD5 /* SpaceController.swift */; }; D2887A5E22DCA6D500701BD5 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2887A5D22DCA6D500701BD5 /* SceneDelegate.swift */; }; D28B0337243EF5F2008F38F6 /* Set+UIScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28B0336243EF5F2008F38F6 /* Set+UIScene.swift */; }; @@ -685,6 +686,7 @@ D27BBA1A20529FFF00AEA303 /* TermStream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TermStream.h; sourceTree = ""; }; D27BBA1B20529FFF00AEA303 /* TermStream.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TermStream.m; sourceTree = ""; }; D27D0117261202A400128C23 /* KeyUIError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyUIError.swift; sourceTree = ""; }; + D27D01232615F1BD00128C23 /* developer_setup.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = developer_setup.xcconfig; sourceTree = ""; }; D2887A5522DC676F00701BD5 /* SpaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpaceController.swift; sourceTree = ""; }; D2887A5D22DCA6D500701BD5 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; D28B0336243EF5F2008F38F6 /* Set+UIScene.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Set+UIScene.swift"; sourceTree = ""; }; @@ -1497,6 +1499,7 @@ EA0BA1821C0CC57B00719C1A = { isa = PBXGroup; children = ( + D27D01232615F1BD00128C23 /* developer_setup.xcconfig */, D2C243F7238E44960082C69C /* KB */, C9B2E0031D6B612300B89F69 /* Settings */, D265FBBB2317DD3C0017EAC4 /* BlinkTests */, @@ -1719,13 +1722,13 @@ }; D265FBB92317DD3C0017EAC4 = { CreatedOnToolsVersion = 11.0; - DevelopmentTeam = HV2S48975V; + DevelopmentTeam = "$(TEAM_ID)"; ProvisioningStyle = Automatic; TestTargetID = EA0BA18A1C0CC57B00719C1A; }; EA0BA18A1C0CC57B00719C1A = { CreatedOnToolsVersion = 7.1.1; - DevelopmentTeam = HV2S48975V; + DevelopmentTeam = "$(TEAM_ID)"; LastSwiftMigration = 0830; ProvisioningStyle = Automatic; SystemCapabilities = { @@ -1876,6 +1879,7 @@ buildActionMask = 2147483647; files = ( D21A3FE321943BE200269705 /* dark-notification-ipad-20pt@2x.png in Resources */, + D27D01272615F1BD00128C23 /* developer_setup.xcconfig in Resources */, 07E3AED31D919272007BC086 /* css in Resources */, D21A3FDD21943BE200269705 /* dark-settings-iphone-29pt@2x.png in Resources */, D21A3FDF21943BE200269705 /* dark-app-ipad-pro-83.5pt@2x.png in Resources */, @@ -2261,7 +2265,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2310,7 +2314,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2348,7 +2352,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -2386,7 +2390,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = SSHTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.4; @@ -2421,7 +2425,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2470,7 +2474,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2508,7 +2512,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -2546,7 +2550,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = BlinkFilesTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.4; @@ -2577,7 +2581,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -2610,7 +2614,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = AppKitBridge/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; @@ -2637,7 +2641,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -2673,7 +2677,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = BlinkTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -2691,6 +2695,7 @@ }; EA0BA1AB1C0CC57C00719C1A /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D27D01232615F1BD00128C23 /* developer_setup.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -2743,6 +2748,7 @@ }; EA0BA1AC1C0CC57C00719C1A /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D27D01232615F1BD00128C23 /* developer_setup.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -2806,7 +2812,7 @@ DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -2820,7 +2826,7 @@ ); MARKETING_VERSION = 13.90.3; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = Com.CarlosCabanero.BlinkShell; + PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID)"; PRODUCT_NAME = Blink; PROVISIONING_PROFILE_SPECIFIER = ""; RUN_CLANG_STATIC_ANALYZER = YES; @@ -2844,7 +2850,7 @@ CURRENT_PROJECT_VERSION = 273; DEAD_CODE_STRIPPING = NO; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = HV2S48975V; + DEVELOPMENT_TEAM = "$(TEAM_ID)"; ENABLE_BITCODE = NO; GCC_PREPROCESSOR_DEFINITIONS = ""; INFOPLIST_FILE = Blink/Info.plist; @@ -2854,7 +2860,7 @@ ); MARKETING_VERSION = 13.90.3; OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = Com.CarlosCabanero.BlinkShell; + PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_ID)"; PRODUCT_NAME = Blink; PROVISIONING_PROFILE_SPECIFIER = ""; STRIP_STYLE = "non-global"; diff --git a/Blink/Blink.entitlements b/Blink/Blink.entitlements index 89f3c1126..c7d869a38 100644 --- a/Blink/Blink.entitlements +++ b/Blink/Blink.entitlements @@ -8,7 +8,7 @@ NSFileProtectionComplete com.apple.developer.icloud-container-identifiers - iCloud.com.carloscabanero.blinkshell + iCloud.$(CLOUD_ID) com.apple.developer.icloud-services @@ -17,7 +17,7 @@ com.apple.developer.ubiquity-container-identifiers - iCloud.com.carloscabanero.blinkshell + iCloud.$(CLOUD_ID) com.apple.developer.ubiquity-kvstore-identifier $(TeamIdentifierPrefix)$(CFBundleIdentifier) @@ -35,8 +35,8 @@ keychain-access-groups - $(AppIdentifierPrefix)Com.CarlosCabanero.Blink - $(AppIdentifierPrefix)Com.CarlosCabanero.BlinkShell + $(AppIdentifierPrefix)$(KEYCHAIN_ID1) + $(AppIdentifierPrefix)$(KEYCHAIN_ID2) diff --git a/README.md b/README.md index fac1d87dd..c50a5c35f 100644 --- a/README.md +++ b/README.md @@ -81,13 +81,18 @@ We made a ton easier to build and install Blink yourself on your iOS devices thr git clone --recursive https://github.com/blinksh/blink.git && \ cd blink && ./get_frameworks.sh && \ rm -rf Blink.xcodeproj/project.xcworkspace/xcshareddata/ -``` -2. Open the project in XCode -3. Before doing anything else, go into the capabilities for the project and turn off Push Notifications, iCloud, and Keychain Sharing -4. Go to the General tab and change the bundle identifier to something that will work for your team -5. Stay in the general tab and select your team under the "Signing" section -6. Connect the device you want to build for and select it in Product -> Destination -7. Build and run on the device + +2. Do the following +cd blink +cp template_setup.xcconfig developer_setup.xcconfig +edit developer_setup.xcconfig (change apple developer id etc). + +3. Open the project in XCode + +3a. If you want to build without iCloud, Push Notificationa and/or Keychain sharing, Before doing anything else, go into the capabilities for the project and turn off Push Notifications, iCloud, and Keychain Sharing + +4. Connect the device you want to build for and select it in Product -> Destination +5. Build and run on the device This will download Blink and the associated frameworks: `libssh2`, `OpenSSL`, `libmoshios`, `protobuf` and `ios_system`. diff --git a/template_setup.xcconfig b/template_setup.xcconfig new file mode 100644 index 000000000..2eebbb372 --- /dev/null +++ b/template_setup.xcconfig @@ -0,0 +1,24 @@ +// +// template_setup.xcconfig +// --> copied to developer_setup.xcconfig +// +// Created by Jan Iversen on 20/03/2021. +// + +// Configuration settings file format documentation can be found at: +// https://help.apple.com/xcode/#/dev745c5c974 + +// update TEAM_ID with your apple developer id +TEAM_ID = HV2S48975V + +// BUNDLE_ID is used as name for BUNDLE_IDENTIFIER +BUNDLE_ID = Com.CarlosCabanero.BlinkShell + +// CLOUD_ID is used as name for iCloud (prefix icloud. is added) +CLOUD_ID = com.carloscabanero.blinkshell +// if you want to build without iCloud, please remove the section in xCode + +// KEYCHAIN_ID is used as name for keychain +KEYCHAIN_ID1 = Com.carloscabanero.blink +KEYCHAIN_ID2 = Com.carloscabanero.blinkshell +// if you want to build without keychain, please remove the section in xCode