diff --git a/App/App.xcodeproj/project.pbxproj b/App/App.xcodeproj/project.pbxproj index 2569c9160a..635dc68348 100644 --- a/App/App.xcodeproj/project.pbxproj +++ b/App/App.xcodeproj/project.pbxproj @@ -250,32 +250,6 @@ B401C9792F7F325000000000 - 1DD70E29FC2E5C0800000000 - - isa - PBXFileReference - name - EmojiFramework.framework - path - EmojiFramework.framework - sourceTree - BUILT_PRODUCTS_DIR - explicitFileType - wrapper.framework - - 1DD70E296A34811900000000 - - isa - PBXFileReference - name - MtProtoKitFramework.framework - path - MtProtoKitFramework.framework - sourceTree - BUILT_PRODUCTS_DIR - explicitFileType - wrapper.framework - 1DD70E297ADFB9F200000000 isa @@ -289,6 +263,32 @@ explicitFileType archive.ar + 1DD70E29A59C927400000000 + + isa + PBXFileReference + name + libEmoji.a + path + libEmoji.a + sourceTree + BUILT_PRODUCTS_DIR + explicitFileType + archive.ar + + 1DD70E29C4DF1A6D00000000 + + isa + PBXFileReference + name + libMtProtoKit.a + path + libMtProtoKit.a + sourceTree + BUILT_PRODUCTS_DIR + explicitFileType + archive.ar + B401C97968022A5500000000 isa @@ -299,9 +299,9 @@ ]]> children - 1DD70E29FC2E5C0800000000 - 1DD70E296A34811900000000 1DD70E297ADFB9F200000000 + 1DD70E29A59C927400000000 + 1DD70E29C4DF1A6D00000000 1DD70E2933D47CB400000000 @@ -377,20 +377,6 @@ E7A30F046ABF6A1200000000 - E7A30F04FC2E5C0800000000 - - isa - PBXBuildFile - fileRef - 1DD70E29FC2E5C0800000000 - - E7A30F046A34811900000000 - - isa - PBXBuildFile - fileRef - 1DD70E296A34811900000000 - E7A30F047ADFB9F200000000 isa @@ -398,61 +384,31 @@ fileRef 1DD70E297ADFB9F200000000 + E7A30F04A59C927400000000 + + isa + PBXBuildFile + fileRef + 1DD70E29A59C927400000000 + + E7A30F04C4DF1A6D00000000 + + isa + PBXBuildFile + fileRef + 1DD70E29C4DF1A6D00000000 + 4F426D880000000000000000 isa PBXFrameworksBuildPhase files - E7A30F04FC2E5C0800000000 - E7A30F046A34811900000000 E7A30F047ADFB9F200000000 + E7A30F04A59C927400000000 + E7A30F04C4DF1A6D00000000 - E7A30F04FC2E5C0800000001 - - isa - PBXBuildFile - fileRef - 1DD70E29FC2E5C0800000000 - settings - - ATTRIBUTES - - CodeSignOnCopy - RemoveHeadersOnCopy - - - - E7A30F046A34811900000001 - - isa - PBXBuildFile - fileRef - 1DD70E296A34811900000000 - settings - - ATTRIBUTES - - CodeSignOnCopy - RemoveHeadersOnCopy - - - - FAF5FAC90000000000000000 - - isa - PBXCopyFilesBuildPhase - files - - E7A30F04FC2E5C0800000001 - E7A30F046A34811900000001 - - dstSubfolderSpec - 10 - dstPath - - 4952437303EDA63300000000 isa @@ -521,7 +477,6 @@ 1870857F0000000000000000 4F426D880000000000000000 - FAF5FAC90000000000000000 buildConfigurationList 218C37090000000000000000 @@ -550,20 +505,20 @@ E7A30F048FA05E8C00000000 - E7A30F04FC2E5C0800000002 + E7A30F04A59C927400000001 isa PBXBuildFile fileRef - 1DD70E29FC2E5C0800000000 + 1DD70E29A59C927400000000 - FAF5FAC90000000000000001 + FAF5FAC90000000000000000 isa PBXCopyFilesBuildPhase files - E7A30F04FC2E5C0800000002 + E7A30F04A59C927400000001 name Fake Swift Dependencies (Copy Files Phase) @@ -641,7 +596,7 @@ buildPhases 1870857F0000000000000001 - FAF5FAC90000000000000001 + FAF5FAC90000000000000000 buildConfigurationList 218C37090000000000000001 diff --git a/App/App.xcworkspace/buck-project.meta.json b/App/App.xcworkspace/buck-project.meta.json index 23f3c924bc..d321a6041c 100644 --- a/App/App.xcworkspace/buck-project.meta.json +++ b/App/App.xcworkspace/buck-project.meta.json @@ -1 +1 @@ -{"required-targets":["//submodules/MtProtoKit:openssl_libs"],"xcconfig-paths":["buck-out/gen/App/App-Debug.xcconfig","buck-out/gen/App/App-Profile.xcconfig","buck-out/gen/App/App-Release.xcconfig","buck-out/gen/App/AppLibrary-Debug.xcconfig","buck-out/gen/App/AppLibrary-Profile.xcconfig","buck-out/gen/App/AppLibrary-Release.xcconfig","buck-out/gen/submodules/Emoji/EmojiFramework-Debug.xcconfig","buck-out/gen/submodules/Emoji/EmojiFramework-Profile.xcconfig","buck-out/gen/submodules/Emoji/EmojiFramework-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKitFramework-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKitFramework-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKitFramework-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Release.xcconfig"],"copy-in-xcode":[]} \ No newline at end of file +{"required-targets":["//submodules/MtProtoKit:openssl_libs"],"xcconfig-paths":["buck-out/gen/App/App-Debug.xcconfig","buck-out/gen/App/App-Profile.xcconfig","buck-out/gen/App/App-Release.xcconfig","buck-out/gen/App/AppLibrary-Debug.xcconfig","buck-out/gen/App/AppLibrary-Profile.xcconfig","buck-out/gen/App/AppLibrary-Release.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Debug.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Profile.xcconfig","buck-out/gen/submodules/Emoji/Emoji-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/MtProtoKit-Release.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Debug.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Profile.xcconfig","buck-out/gen/submodules/MtProtoKit/openssl-Release.xcconfig"],"copy-in-xcode":[]} \ No newline at end of file diff --git a/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d..0000000000 --- a/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme b/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme index 5786b82635..ca1f27f58a 100644 --- a/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme +++ b/App/App.xcworkspace/xcshareddata/xcschemes/App.xcscheme @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/App/Sources/Temp.swift b/App/Sources/Temp.swift index dd25694e8a..6b09379998 100644 --- a/App/Sources/Temp.swift +++ b/App/Sources/Temp.swift @@ -1,11 +1,22 @@ import Foundation +import UIKit import Emoji @objc(AppDelegate1) -public final class AppDelegate1: NSObject { +public final class AppDelegate: NSObject, UIApplicationDelegate { + public var window: UIWindow? + override init() { super.init() print("OK".isSingleEmoji) } + + public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + self.window = UIWindow(frame: UIScreen.main.bounds) + self.window?.rootViewController = UIViewController() + self.window?.rootViewController?.view.backgroundColor = .green + self.window?.makeKeyAndVisible() + return true + } } diff --git a/App/Sources/TempMain.m b/App/Sources/TempMain.m index 2011a35904..c20abfe6e7 100644 --- a/App/Sources/TempMain.m +++ b/App/Sources/TempMain.m @@ -1,6 +1,6 @@ #import #import -#import +//#import @interface AppDelegate : NSObject @@ -21,9 +21,9 @@ @end int main(int argc, const char **argv) { - MTProto *mtProto = [[MTProto alloc] init]; + //MTProto *mtProto = [[MTProto alloc] init]; @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + return UIApplicationMain(argc, argv, nil, @"AppDelegate1"); } } diff --git a/Config/buck_rule_macros.bzl b/Config/buck_rule_macros.bzl index 78480ff82f..0c18780fff 100644 --- a/Config/buck_rule_macros.bzl +++ b/Config/buck_rule_macros.bzl @@ -43,7 +43,7 @@ def apple_lib( name = name + "", srcs = srcs, header_namespace = name, - #module_name = name, + module_name = name, headers = headers, exported_headers = exported_headers, deps = deps, @@ -61,7 +61,6 @@ def apple_lib( ) native.apple_bundle( name = name + "Framework", - #module_name = name, visibility = visibility, binary = ":" + name + "#shared", extension = "framework", @@ -215,7 +214,7 @@ def framework_binary_dependencies(names): result = [] if native.read_config("custom", "mode") == "project": for name in names: - result.append(name + "Framework") + result.append(name + "") else: for name in names: result.append(name + "#shared") diff --git a/Makefile b/Makefile index b9e62ca30f..cffc327977 100644 --- a/Makefile +++ b/Makefile @@ -34,3 +34,7 @@ clean: kill_xcode project: clean $(BUCK) project //App:workspace --config custom.mode=project open App/App.xcworkspace + +next_project: clean + /Users/peter/build/buck-next/buck/buck-out/gen/programs/buck.pex project //App:workspace --config custom.mode=project + #open App/App.xcworkspace diff --git a/submodules/Emoji/Emoji.xcodeproj/project.pbxproj b/submodules/Emoji/Emoji.xcodeproj/project.pbxproj index eb4705230e..b9c4156b4b 100644 --- a/submodules/Emoji/Emoji.xcodeproj/project.pbxproj +++ b/submodules/Emoji/Emoji.xcodeproj/project.pbxproj @@ -11,40 +11,40 @@ 46 objects - 1DD70E29DC16ED3D00000000 + 1DD70E29CCF717CF00000000 isa PBXFileReference name - EmojiFramework-Debug.xcconfig + Emoji-Debug.xcconfig path - ../../buck-out/gen/submodules/Emoji/EmojiFramework-Debug.xcconfig + ../../buck-out/gen/submodules/Emoji/Emoji-Debug.xcconfig sourceTree SOURCE_ROOT explicitFileType text.xcconfig - 1DD70E291733296700000000 + 1DD70E2950B2F77900000000 isa PBXFileReference name - EmojiFramework-Profile.xcconfig + Emoji-Profile.xcconfig path - ../../buck-out/gen/submodules/Emoji/EmojiFramework-Profile.xcconfig + ../../buck-out/gen/submodules/Emoji/Emoji-Profile.xcconfig sourceTree SOURCE_ROOT explicitFileType text.xcconfig - 1DD70E298AC9D4C900000000 + 1DD70E29C449A2DB00000000 isa PBXFileReference name - EmojiFramework-Release.xcconfig + Emoji-Release.xcconfig path - ../../buck-out/gen/submodules/Emoji/EmojiFramework-Release.xcconfig + ../../buck-out/gen/submodules/Emoji/Emoji-Release.xcconfig sourceTree SOURCE_ROOT explicitFileType @@ -60,9 +60,9 @@ ]]> children - 1DD70E29DC16ED3D00000000 - 1DD70E291733296700000000 - 1DD70E298AC9D4C900000000 + 1DD70E29CCF717CF00000000 + 1DD70E2950B2F77900000000 + 1DD70E29C449A2DB00000000 B401C979B781F65D00000000 @@ -102,19 +102,6 @@ sourceTree SOURCE_ROOT - 1DD70E2906C06BEE00000000 - - isa - PBXFileReference - name - Info.plist - path - Info.plist - sourceTree - ]]> - explicitFileType - text.plist - B401C979EAB5339800000000 isa @@ -126,15 +113,14 @@ children 1DD70E29C4C3D69000000000 - 1DD70E2906C06BEE00000000 - B401C97935694C7800000000 + B401C97903FF902600000000 isa PBXGroup name - EmojiFramework + Emoji sourceTree ]]> children @@ -143,72 +129,18 @@ B401C979EAB5339800000000 - 1DD70E291188565800000000 + 1DD70E29A59C927400000000 isa PBXFileReference name - AVFoundation.framework + libEmoji.a path - System/Library/Frameworks/AVFoundation.framework - sourceTree - SDKROOT - explicitFileType - wrapper.framework - - 1DD70E29A179AC1C00000000 - - isa - PBXFileReference - name - CoreText.framework - path - System/Library/Frameworks/CoreText.framework - sourceTree - SDKROOT - explicitFileType - wrapper.framework - - 1DD70E29AE317AA300000000 - - isa - PBXFileReference - name - Foundation.framework - path - System/Library/Frameworks/Foundation.framework - sourceTree - SDKROOT - explicitFileType - wrapper.framework - - B401C97968022A5500000000 - - isa - PBXGroup - name - Frameworks - sourceTree - ]]> - children - - 1DD70E291188565800000000 - 1DD70E29A179AC1C00000000 - 1DD70E29AE317AA300000000 - - - 1DD70E29FC2E5C0800000000 - - isa - PBXFileReference - name - EmojiFramework.framework - path - EmojiFramework.framework + libEmoji.a sourceTree BUILT_PRODUCTS_DIR explicitFileType - wrapper.framework + archive.ar B401C979C806358400000000 @@ -220,7 +152,7 @@ ]]> children - 1DD70E29FC2E5C0800000000 + 1DD70E29A59C927400000000 B401C979EFB6AC4600000000 @@ -234,8 +166,7 @@ children B401C979B781F65D00000000 - B401C97935694C7800000000 - B401C97968022A5500000000 + B401C97903FF902600000000 B401C979C806358400000000 @@ -255,38 +186,6 @@ E7A30F04C4C3D69000000000 - E7A30F041188565800000000 - - isa - PBXBuildFile - fileRef - 1DD70E291188565800000000 - - E7A30F04A179AC1C00000000 - - isa - PBXBuildFile - fileRef - 1DD70E29A179AC1C00000000 - - E7A30F04AE317AA300000000 - - isa - PBXBuildFile - fileRef - 1DD70E29AE317AA300000000 - - 4F426D880000000000000000 - - isa - PBXFrameworksBuildPhase - files - - E7A30F041188565800000000 - E7A30F04A179AC1C00000000 - E7A30F04AE317AA300000000 - - 4952437303EDA63300000000 isa @@ -297,7 +196,7 @@ baseConfigurationReference - 1DD70E29DC16ED3D00000000 + 1DD70E29CCF717CF00000000 4952437350C7218900000000 @@ -309,7 +208,7 @@ baseConfigurationReference - 1DD70E291733296700000000 + 1DD70E2950B2F77900000000 49524373A439BFE700000000 @@ -321,7 +220,7 @@ baseConfigurationReference - 1DD70E298AC9D4C900000000 + 1DD70E29C449A2DB00000000 218C37090000000000000000 @@ -336,25 +235,24 @@ defaultConfigurationIsVisible - E66DC04E35694C7800000000 + E66DC04E03FF902600000000 isa PBXNativeTarget name - EmojiFramework + Emoji productName - EmojiFramework + Emoji productReference - 1DD70E29FC2E5C0800000000 + 1DD70E29A59C927400000000 productType - com.apple.product-type.framework + com.apple.product-type.library.static dependencies buildPhases 1870857F0000000000000000 - 4F426D880000000000000000 buildConfigurationList 218C37090000000000000000 @@ -410,7 +308,7 @@ B401C979EFB6AC4600000000 targets - E66DC04E35694C7800000000 + E66DC04E03FF902600000000 buildConfigurationList 218C37090000000000000001 diff --git a/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme b/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme index e43958deb3..c4eb6b0a83 100644 --- a/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme +++ b/submodules/Emoji/Emoji.xcodeproj/xcshareddata/xcschemes/Emoji.xcscheme @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/submodules/Emoji/Sources/EmojiUtils.swift b/submodules/Emoji/Sources/EmojiUtils.swift index 023019d5d4..a28f276a3e 100644 --- a/submodules/Emoji/Sources/EmojiUtils.swift +++ b/submodules/Emoji/Sources/EmojiUtils.swift @@ -43,6 +43,9 @@ public extension UnicodeScalar { } } +private final class FrameworkClass: NSObject { +} + public extension String { func trimmingTrailingSpaces() -> String { var t = self @@ -53,7 +56,7 @@ public extension String { } var isSingleEmoji: Bool { - let _ = try? AVFoundation.AVAudioFile(forReading: URL(string: "")!) + print(Bundle(for: FrameworkClass.self).bundlePath) return self.emojis.count == 1 && self.containsEmoji }