troybowman / ios_instruments_client

MIT License
181 stars 36 forks source link

windows support for ios_instrument_client #7

Closed Dantee296 closed 2 years ago

Dantee296 commented 3 years ago

Hey @troybowman

ll you please guide me how i can convert this method to work without #include <Foundation/Foundation.h>

because Foundation framework is not available on windows..

void archive(bytevec_t *buf, CFTypeRef ref)
{
  @autoreleasepool
  {
    id object = (__bridge id)ref;
    NSData *data = [NSKeyedArchiver archivedDataWithRootObject:object];
    const void *bytes = [data bytes];
    int length = [data length];
    append_v(*buf, bytes, length);
  }
}
troybowman commented 3 years ago

This will be difficult to do without the Foundation framework. I don't know exactly how NSKeyedArchiver implements the serialization, but you would have to do it yourself somehow.

Note that Windows actually does have the required frameworks. They are available if you install iTunes for Windows. iTunes will install the following dlls somewhere on your filesystem:

Technically this is all you need in order to run ios_instruments_client on Windows, you will just have to figure out how to build the app and link against these dlls. It will be tricky but it is technically possible.

Dantee296 commented 3 years ago

@troybowman thanks for update , i ll try to figure it out