Giter VIP home page Giter VIP logo

Comments (20)

LeoNatan avatar LeoNatan commented on June 20, 2024 1

Uhh interesting. Will look to solve this at the script level soon. Thanks!

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

I see that we already cut the unwanted architectures from the frameworks:

And indeed, checking the output, I see that only arm64 is created:

➜  Testing 1 2 3.app file "Testing 1 2 3" 
Testing 1 2 3: Mach-O 64-bit executable arm64
➜  Testing 1 2 3.app file Frameworks/DTXProfiler.framework/DTXProfiler 
Frameworks/DTXProfiler.framework/DTXProfiler: Mach-O universal binary with 1 architecture: [arm64:Mach-O 64-bit dynamically linked shared library arm64]
Frameworks/DTXProfiler.framework/DTXProfiler (for architecture arm64):	Mach-O 64-bit dynamically linked shared library arm64

Perhaps there is some issue with your project's config?

from detoxinstruments.

benlaverriere avatar benlaverriere commented on June 20, 2024

Interesting, I’ll take a look. When I was looking at the framework that got included in our ipa, I’m pretty sure I was still seeing arm7s (which is OK) — I’ll try to set up a minimal repro case.

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

Can you run file on your own submitted binary as well as the framework? Let’s see how it looks like on your end.

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

Ping

from detoxinstruments.

benlaverriere avatar benlaverriere commented on June 20, 2024

Apologies for the delay. Here's what I'm seeing for a production build:

➽ file my_app
my_app: Mach-O universal binary with 2 architectures: [arm_v7:Mach-O executable arm_v7] [arm64]
my_app (for architecture armv7):	Mach-O executable arm_v7
my_app (for architecture arm64):	Mach-O 64-bit executable arm64
➽ file Frameworks/DTXProfiler.framework/DTXProfiler
Frameworks/DTXProfiler.framework/DTXProfiler: Mach-O universal binary with 2 architectures: [arm_v7:Mach-O dynamically linked shared library arm_v7] [arm64:Mach-O 64-bit dynamically linked shared library arm64]
Frameworks/DTXProfiler.framework/DTXProfiler (for architecture armv7):	Mach-O dynamically linked shared library arm_v7
Frameworks/DTXProfiler.framework/DTXProfiler (for architecture arm64):	Mach-O 64-bit dynamically linked shared library arm64

It looks like the testing app you used only supported arm64, so I'm wondering if that's a factor here. With our app supporting arm64 and arm_v7, it does seem like the DTXProfiler framework is getting bundled with both architectures (but specifies minimum iOS 12.0 in its Info.plist).

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

Wait, I don't understand. Your original error was that your app is iOS 12.0+, which Apple then requires only 64 bit. No?

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

Hmm, I see the framework is 12.0 minimum.

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

The Shim framework is set to 10.0 minimum. Something is odd. I think I will just set everything to 11.0.

from detoxinstruments.

benlaverriere avatar benlaverriere commented on June 20, 2024

Yeah, I think the warning was that the framework was claiming 12.0+ support, not the app. :)

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

I will release a new version soon with frameworks set to 11.0, but please note that support for iOS 11.0 will not last for long. It's a very old system. Consider upgrading your app to support 12.0 and above.

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

1.13.11971 is out. Please test.

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

Looking at the previous build of Detox Instruments, the shim framework was set to iOS 10.0 as minimum, while the profiler framework was set to 12.0.

I just checked and iOS 11.0 is 64-bit only. So the new version will not fix your problem. What is the minimum OS version you are supporting with your app? Unfortunately, I will not lower the supported version to 10.0 or below. It just makes no sense, as there are very few customers still using that.

I think there is another issue with your integration, where you are integrating the profiler framework in your production build, submitted to Apple. This is dangerous and very discouraged.

from detoxinstruments.

benlaverriere avatar benlaverriere commented on June 20, 2024

It's certainly not our intent to include the profiler in any production builds. My understanding, from the instructions here, is that all builds will run the "Profiler Framework Integration" script and, in non-Debug environments, this will rename the shim framework as DTXProfiler for inclusion in the app.

In our build output, I indeed see Profiler framework not integrated: current build configuration “Release” is not included in the ALLOWED_CONFIGURATIONS list., which suggests we're hitting the intended branch in that script. Does that seem right to you?

I think the simplest solution for now will be for us to make the entire "Profiler Framework Integration" phase conditional on the environment. (And yes, also to move, as we're able, away from supporting older iOS versions.) Thanks for your willingness to troubleshoot this with me.

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

If you see that message, then indeed the system has chose then shim framework. But that is very odd. You can verify it on your end: open the Info.plist file of the DTXProfiler.framework inside your App Store failing build, and see what the minimum iOS version is (MinimumOSVersion). It should be 10.0 on older builds, and 11.0 on the new version I just released. If you see 12.0 in there, I am afraid it's not the shim framework.

You can also run nm -U Frameworks/DTXProfiler.framework/DTXProfiler and paste the output here. I will be able to tell you which one it is.

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

In theory, the shim framework is only necessary if you call the public C/Objective C API inside your app. For example, if you call DTXProfilerMarkEventIntervalBegin()/DTXProfilerMarkEventIntervalEnd() APIs. I didn't want users to wrap each such call with #if DEBUG, so the shim framework was created to provide no-op versions of these APIs, so you can leave them in production, and they take no resources.

from detoxinstruments.

benlaverriere avatar benlaverriere commented on June 20, 2024

I do see 12.0 in the bundled framework. But isn't that because this line copies the "real" framework's Info.plist into the shim for signing? Maybe I'm misunderstanding something.

And:

nm -U Frameworks/DTXProfiler.framework/DTXProfiler output
Frameworks/DTXProfiler.framework/DTXProfiler (for architecture armv7):
00007188 s  stub helpers
00006b4a t +[DTXMutableProfilingConfiguration defaultProfilingConfigurationForRemoteProfiling]
00006ad4 t +[DTXMutableProfilingConfiguration defaultProfilingConfiguration]
00006870 t +[DTXProfilingConfiguration defaultProfilingConfigurationForRemoteProfiling]
000067fa t +[DTXProfilingConfiguration defaultProfilingConfiguration]
00006bc2 t -[DTXMutableProfilingConfiguration __setSomething:]
00006bc0 t -[DTXMutableProfilingConfiguration __something]
00006c52 t -[DTXMutableProfilingConfiguration forwardInvocation:]
00006bc4 t -[DTXMutableProfilingConfiguration methodSignatureForSelector:]
00006e18 t -[DTXProfiler .cxx_destruct]
00006cee t -[DTXProfiler __setSomething:]
00006cec t -[DTXProfiler __something]
00006d7e t -[DTXProfiler forwardInvocation:]
00006e20 t -[DTXProfiler isRecording]
00006cf0 t -[DTXProfiler methodSignatureForSelector:]
00006e26 t -[DTXProfiler profilingConfiguration]
00006a46 t -[DTXProfilingConfiguration .cxx_destruct]
0000691c t -[DTXProfilingConfiguration __setSomething:]
0000691a t -[DTXProfilingConfiguration __something]
00006a88 t -[DTXProfilingConfiguration collectOpenFileNames]
00006a7c t -[DTXProfilingConfiguration collectStackTraces]
00006a9a t -[DTXProfilingConfiguration disableNetworkCache]
000069ac t -[DTXProfilingConfiguration forwardInvocation:]
00006aa6 t -[DTXProfilingConfiguration ignoredEventCategories]
0000691e t -[DTXProfilingConfiguration methodSignatureForSelector:]
00006a62 t -[DTXProfilingConfiguration numberOfSamplesBeforeFlushToDisk]
00006ab4 t -[DTXProfilingConfiguration profileReactNative]
00006aa0 t -[DTXProfilingConfiguration recordEvents]
00006ac6 t -[DTXProfilingConfiguration recordInternalReactNativeEvents]
00006a94 t -[DTXProfilingConfiguration recordLocalhostNetwork]
00006aae t -[DTXProfilingConfiguration recordLogOutput]
00006a8e t -[DTXProfilingConfiguration recordNetwork]
00006a66 t -[DTXProfilingConfiguration recordPerformance]
00006aba t -[DTXProfilingConfiguration recordReactNativeBridgeData]
00006ac0 t -[DTXProfilingConfiguration recordReactNativeTimersAsEvents]
00006a76 t -[DTXProfilingConfiguration recordThreadInformation]
00006acc t -[DTXProfilingConfiguration recordingFileURL]
00006a6c t -[DTXProfilingConfiguration samplingInterval]
00006a82 t -[DTXProfilingConfiguration symbolicateStackTraces]
00006e8a T _DTXProfilerAddLogLine
00006ee6 T _DTXProfilerAddLogLineWithObjects
00006e2e T _DTXProfilerAddTag
0000700c T _DTXProfilerMarkEvent
00006f42 T _DTXProfilerMarkEventIntervalBegin
00006fb0 T _DTXProfilerMarkEventIntervalEnd
00007298 S _DTXProfilerShimVersionNumber
00007260 S _DTXProfilerShimVersionString
0000c844 S _OBJC_CLASS_$_DTXMutableProfilingConfiguration
0000c86c S _OBJC_CLASS_$_DTXProfiler
0000c81c S _OBJC_CLASS_$_DTXProfilingConfiguration
0000c804 s _OBJC_IVAR_$_DTXProfiler._profilingConfiguration
0000c800 s _OBJC_IVAR_$_DTXProfiler._recording
0000c7c8 s _OBJC_IVAR_$_DTXProfilingConfiguration._collectOpenFileNames
0000c7c0 s _OBJC_IVAR_$_DTXProfilingConfiguration._collectStackTraces
0000c7d4 s _OBJC_IVAR_$_DTXProfilingConfiguration._disableNetworkCache
0000c7f4 s _OBJC_IVAR_$_DTXProfilingConfiguration._ignoredEventCategories
0000c7f0 s _OBJC_IVAR_$_DTXProfilingConfiguration._numberOfSamplesBeforeFlushToDisk
0000c7e0 s _OBJC_IVAR_$_DTXProfilingConfiguration._profileReactNative
0000c7d8 s _OBJC_IVAR_$_DTXProfilingConfiguration._recordEvents
0000c7ec s _OBJC_IVAR_$_DTXProfilingConfiguration._recordInternalReactNativeEvents
0000c7d0 s _OBJC_IVAR_$_DTXProfilingConfiguration._recordLocalhostNetwork
0000c7dc s _OBJC_IVAR_$_DTXProfilingConfiguration._recordLogOutput
0000c7cc s _OBJC_IVAR_$_DTXProfilingConfiguration._recordNetwork
0000c7b8 s _OBJC_IVAR_$_DTXProfilingConfiguration._recordPerformance
0000c7e4 s _OBJC_IVAR_$_DTXProfilingConfiguration._recordReactNativeBridgeData
0000c7e8 s _OBJC_IVAR_$_DTXProfilingConfiguration._recordReactNativeTimersAsEvents
0000c7bc s _OBJC_IVAR_$_DTXProfilingConfiguration._recordThreadInformation
0000c7f8 s _OBJC_IVAR_$_DTXProfilingConfiguration._recordingFileURL
0000c7fc s _OBJC_IVAR_$_DTXProfilingConfiguration._samplingInterval
0000c7c4 s _OBJC_IVAR_$_DTXProfilingConfiguration._symbolicateStackTraces
0000c830 S _OBJC_METACLASS_$_DTXMutableProfilingConfiguration
0000c858 S _OBJC_METACLASS_$_DTXProfiler
0000c808 S _OBJC_METACLASS_$_DTXProfilingConfiguration
0000c0d0 s __OBJC_LABEL_PROTOCOL_$_NSCoding
0000c0c8 s __OBJC_LABEL_PROTOCOL_$_NSCopying
0000c0cc s __OBJC_LABEL_PROTOCOL_$_NSMutableCopying
0000c0d4 s __OBJC_LABEL_PROTOCOL_$_NSSecureCoding
0000c8ec d __OBJC_PROTOCOL_$_NSCoding
0000c884 d __OBJC_PROTOCOL_$_NSCopying
0000c8b8 d __OBJC_PROTOCOL_$_NSMutableCopying
0000c920 d __OBJC_PROTOCOL_$_NSSecureCoding
000068e6 t _____prepare_and_return_file_log_block_invoke
0000c05c s ___block_descriptor_20_e5_v4�?0l
0000c048 s ___block_literal_global
0000c958 b ___current_file_log
000066a0 t ___dtx_log
0000c954 b ___prepare_and_return_file_log.__current_file_log_once_token
0000c880 d __dyld_private
00007068 t _objc_autoreleaseReturnValue$shim
0000708c t _objc_getProperty$shim
00007074 t _objc_release$shim
00007080 t _objc_storeStrong$shim

Frameworks/DTXProfiler.framework/DTXProfiler (for architecture arm64):
0000000000006a50 t +[DTXMutableProfilingConfiguration defaultProfilingConfigurationForRemoteProfiling]
00000000000069d0 t +[DTXMutableProfilingConfiguration defaultProfilingConfiguration]
00000000000066e4 t +[DTXProfilingConfiguration defaultProfilingConfigurationForRemoteProfiling]
0000000000006664 t +[DTXProfilingConfiguration defaultProfilingConfiguration]
0000000000006ad4 t -[DTXMutableProfilingConfiguration __setSomething:]
0000000000006ad0 t -[DTXMutableProfilingConfiguration __something]
0000000000006b7c t -[DTXMutableProfilingConfiguration forwardInvocation:]
0000000000006ad8 t -[DTXMutableProfilingConfiguration methodSignatureForSelector:]
0000000000006db0 t -[DTXProfiler .cxx_destruct]
0000000000006c44 t -[DTXProfiler __setSomething:]
0000000000006c40 t -[DTXProfiler __something]
0000000000006cec t -[DTXProfiler forwardInvocation:]
0000000000006dbc t -[DTXProfiler isRecording]
0000000000006c48 t -[DTXProfiler methodSignatureForSelector:]
0000000000006dc8 t -[DTXProfiler profilingConfiguration]
0000000000006908 t -[DTXProfilingConfiguration .cxx_destruct]
000000000000679c t -[DTXProfilingConfiguration __setSomething:]
0000000000006798 t -[DTXProfilingConfiguration __something]
0000000000006968 t -[DTXProfilingConfiguration collectOpenFileNames]
0000000000006958 t -[DTXProfilingConfiguration collectStackTraces]
0000000000006980 t -[DTXProfilingConfiguration disableNetworkCache]
0000000000006844 t -[DTXProfilingConfiguration forwardInvocation:]
0000000000006990 t -[DTXProfilingConfiguration ignoredEventCategories]
00000000000067a0 t -[DTXProfilingConfiguration methodSignatureForSelector:]
0000000000006938 t -[DTXProfilingConfiguration numberOfSamplesBeforeFlushToDisk]
00000000000069a4 t -[DTXProfilingConfiguration profileReactNative]
0000000000006988 t -[DTXProfilingConfiguration recordEvents]
00000000000069bc t -[DTXProfilingConfiguration recordInternalReactNativeEvents]
0000000000006978 t -[DTXProfilingConfiguration recordLocalhostNetwork]
000000000000699c t -[DTXProfilingConfiguration recordLogOutput]
0000000000006970 t -[DTXProfilingConfiguration recordNetwork]
0000000000006940 t -[DTXProfilingConfiguration recordPerformance]
00000000000069ac t -[DTXProfilingConfiguration recordReactNativeBridgeData]
00000000000069b4 t -[DTXProfilingConfiguration recordReactNativeTimersAsEvents]
0000000000006950 t -[DTXProfilingConfiguration recordThreadInformation]
00000000000069c4 t -[DTXProfilingConfiguration recordingFileURL]
0000000000006948 t -[DTXProfilingConfiguration samplingInterval]
0000000000006960 t -[DTXProfilingConfiguration symbolicateStackTraces]
0000000000006e38 T _DTXProfilerAddLogLine
0000000000006e9c T _DTXProfilerAddLogLineWithObjects
0000000000006dd4 T _DTXProfilerAddTag
0000000000006fe4 T _DTXProfilerMarkEvent
0000000000006f00 T _DTXProfilerMarkEventIntervalBegin
0000000000006f80 T _DTXProfilerMarkEventIntervalEnd
0000000000007200 S _DTXProfilerShimVersionNumber
00000000000071c8 S _DTXProfilerShimVersionString
000000000000cec0 S OBJC_CLASS$_DTXMutableProfilingConfiguration
000000000000cf10 S OBJC_CLASS$_DTXProfiler
000000000000ce70 S OBJC_CLASS$_DTXProfilingConfiguration
000000000000ce44 s OBJC_IVAR$_DTXProfiler._profilingConfiguration
000000000000ce40 s OBJC_IVAR$_DTXProfiler._recording
000000000000ce08 s OBJC_IVAR$_DTXProfilingConfiguration._collectOpenFileNames
000000000000ce00 s OBJC_IVAR$_DTXProfilingConfiguration._collectStackTraces
000000000000ce14 s OBJC_IVAR$_DTXProfilingConfiguration._disableNetworkCache
000000000000ce38 s OBJC_IVAR$_DTXProfilingConfiguration._ignoredEventCategories
000000000000ce30 s OBJC_IVAR$_DTXProfilingConfiguration._numberOfSamplesBeforeFlushToDisk
000000000000ce20 s OBJC_IVAR$_DTXProfilingConfiguration._profileReactNative
000000000000ce18 s OBJC_IVAR$_DTXProfilingConfiguration._recordEvents
000000000000ce2c s OBJC_IVAR$_DTXProfilingConfiguration._recordInternalReactNativeEvents
000000000000ce10 s OBJC_IVAR$_DTXProfilingConfiguration._recordLocalhostNetwork
000000000000ce1c s OBJC_IVAR$_DTXProfilingConfiguration._recordLogOutput
000000000000ce0c s OBJC_IVAR$_DTXProfilingConfiguration._recordNetwork
000000000000cdf8 s OBJC_IVAR$_DTXProfilingConfiguration._recordPerformance
000000000000ce24 s OBJC_IVAR$_DTXProfilingConfiguration._recordReactNativeBridgeData
000000000000ce28 s OBJC_IVAR$_DTXProfilingConfiguration._recordReactNativeTimersAsEvents
000000000000cdfc s OBJC_IVAR$_DTXProfilingConfiguration._recordThreadInformation
000000000000ce3c s OBJC_IVAR$_DTXProfilingConfiguration._recordingFileURL
000000000000ce34 s OBJC_IVAR$_DTXProfilingConfiguration._samplingInterval
000000000000ce04 s OBJC_IVAR$_DTXProfilingConfiguration._symbolicateStackTraces
000000000000ce98 S OBJC_METACLASS$_DTXMutableProfilingConfiguration
000000000000cee8 S OBJC_METACLASS$_DTXProfiler
000000000000ce48 S OBJC_METACLASS$_DTXProfilingConfiguration
000000000000c190 s _OBJC_LABEL_PROTOCOL$_NSCoding
000000000000c180 s _OBJC_LABEL_PROTOCOL$_NSCopying
000000000000c188 s _OBJC_LABEL_PROTOCOL$_NSMutableCopying
000000000000c198 s _OBJC_LABEL_PROTOCOL$_NSSecureCoding
000000000000d000 d _OBJC_PROTOCOL$_NSCoding
000000000000cf40 d _OBJC_PROTOCOL$_NSCopying
000000000000cfa0 d _OBJC_PROTOCOL$_NSMutableCopying
000000000000d060 d _OBJC_PROTOCOL$_NSSecureCoding
0000000000006764 t _____prepare_and_return_file_log_block_invoke
000000000000c0a8 s ___block_descriptor_32_e5_v8�?0l
000000000000c088 s ___block_literal_global
000000000000d0c8 b ___current_file_log
00000000000064d4 t ___dtx_log
000000000000d0c0 b ___prepare_and_return_file_log.__current_file_log_once_token
000000000000cf38 d __dyld_private

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

🤦‍♂️

Right you are, and indeed this is the shim framework. It's been a while since I worked on that mechanism.

Sadly, the change I made today will not help in your case, as iOS 11.0 is 64-bit only as well.

I understand now how it happened. :)

from detoxinstruments.

benlaverriere avatar benlaverriere commented on June 20, 2024

😅 No problem! I'm just glad we're not shipping the real thing to production.

We'll try adding our own wrapping, since I totally understand not wanting to support older than 11.0 with the framework. (It should be straightforward since we're not using the API in application code.) Thank you again for your help!

from detoxinstruments.

LeoNatan avatar LeoNatan commented on June 20, 2024

Thank you for persisting with it. I will close the issue for now. Let me know if you find more issues.

from detoxinstruments.

Related Issues (20)

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.