Code Monkey home page Code Monkey logo

mtprotokit's People

Contributors

laktyushin avatar overtake avatar peter-iakovlev avatar petertechstories avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mtprotokit's Issues

obsolete methods - classes / methods incompatible with ios 13 min target

Background
TelegramMessenger/Telegram-iOS#829

MTAtomic
MTContext
MTMetaDisposable
MTMessageTransaction
MTSignalQueueState
MTSubscriber
MTRequestInternalId

Screen Shot 2022-09-01 at 9 07 29 am

Screen Shot 2022-09-01 at 9 10 21 am

also - switching this flag - "-std=gnu99", doesn't seem to make the Expected ';' at end of declaration list compiler error go away.

objc_library(
    name = "MtProtoKit",
    enable_modules = True,
    module_name = "MtProtoKit",
    srcs = glob([
        "Sources/**/*.m",
        "Sources/**/*.h",
    ]),
    copts = [
        "-Werror",
     "-std=gnu99",
    ],
    hdrs = glob([
        "PublicHeaders/**/*.h",
    ]),
    includes = [
        "PublicHeaders",
    ],
    deps = [
        "//submodules/EncryptionProvider:EncryptionProvider",
    ],
    sdk_frameworks = [
        "Foundation",
        "Security",
        "SystemConfiguration",
        "CFNetwork",
    ],
    sdk_dylibs = [
        "libz",
    ],
    visibility = [
        "//visibility:public",
    ],

)

UPDATE - actually just using

   copts = [
         "-std=gnu99",
    ],

made some errors go away.
UPDATE - new errors
#include <stdatomic.h>

Screen Shot 2022-09-01 at 9 41 12 am

UPDATE - the expected ';' at end of declaration list error is persisting even though I'm specifying -std=gnu99 in the MTProto copts bazel
https://gist.github.com/wweevv-johndpope/703cf760bcc68c9c8918269596d7fb7b

UPDATE -
I just use os_unfair_lock _lock; and it gets past error.


@interface MTDisposableSet ()
{
    os_unfair_lock _lock;
...
}

if (OSAtomicCompareAndSwapPtr(block, 0, &_block))

->

if (atomic_compare_exchange_strong_explicit(block, 0, &_block, memory_order_acq_rel, memory_order_acquire))

latest error
Screen Shot 2022-09-01 at 10 34 18 am

Errors spilling over from
Screen Shot 2022-09-01 at 10 36 59 am

UPDATE

@interface SSignalMulticastSubscribers : NSObject
{
volatile os_unfair_lock _lock;
...
}

changing
volatile os_unfair_lock _lock; -> os_unfair_lock _lock;
makes above some of the problems go away.

UPDATE
Finally compiling - but crashing due to problem below. how to rewrite

// if (atomic_compare_exchange_strong_explicit(block, 0, &_block))

wweevv-johndpope/Telegram-iOS@305829a

Screen Shot 2022-09-01 at 10 26 27 pm

Hello, found that there is a mistake, lead to can't compile

use xcode 6.2 compile the results are as follows:

UFW (M iphonesimulator): ERROR: Build failed
Traceback (most recent call last):
File "/Users/admin/Library/Developer/Xcode/DerivedData/MtProtoKit-gzkxssspyozwjjbgmyuwkbgwnpjo/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 812, in
run_build()
File "/Users/admin/Library/Developer/Xcode/DerivedData/MtProtoKit-gzkxssspyozwjjbgmyuwkbgwnpjo/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 787, in run_build
add_symlinks_to_framework(project)
File "/Users/admin/Library/Developer/Xcode/DerivedData/MtProtoKit-gzkxssspyozwjjbgmyuwkbgwnpjo/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 675, in add_symlinks_to_framework
attempt_symlink(os.path.join(base_dir, "Versions", "Current"), os.environ['FRAMEWORK_VERSION'])
File "/Users/admin/Library/Developer/Xcode/DerivedData/MtProtoKit-gzkxssspyozwjjbgmyuwkbgwnpjo/Build/Intermediates/MtProtoKit.build/Debug-iphonesimulator/MtProtoKit iOS.build/Script-D05A831218AFB3F9007F1076.sh", line 493, in attempt_symlink
os.stat(os.path.abspath(os.path.join(link_path, "..", link_to)))
OSError: [Errno 2] No such file or directory: '/Users/admin/Library/Developer/Xcode/DerivedData/MtProtoKit-gzkxssspyozwjjbgmyuwkbgwnpjo/Build/Products/Debug-iphonesimulator/MtProtoKit iOS.framework/Versions/A'
Showing first 200 notices only
Command /bin/sh failed with exit code 1

Please help me,Thank you!

Shell script invocation error

Does this work? is there a fix for this script error that occurs in the Telegram open source and in this version as well. Trying to figure out why Telegram would release and opensource code that does not build and has many errors. Thanks

Tutorial/Examples

Any chance there is a more comprehensive README, tutorial or examples I can refer to?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.