Tag: Indicates that NIS has a back phone signed inf ack between
PDF Version Number:Http://pan.baidu.com/s/1eQ8DVdoConclusion:
The same code. Compile using the SDK for different version numbers. Affects the value in the macho header,So that the program shows a different appearance.
Code:
-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (nsdictionary *) launchOptions{ UIScreen *mainscreen = [UIScreen mainscreen]; CGRect frm = [mainscreen bounds]; UIWindow *win = [[UIWindow alloc] initwithframe:frm]; Win.backgroundcolor = [Uicolor bluecolor]; Self.window = win; [Win release]; [Self.window makekeyandvisible]; return YES;}
Problem:The code above is easy, no matter what the function, compile using Xcode v4.6.3 and v5.0.2, respectively. and then installed on the IOS8 device, the performance is different,mainly is the difference between iOS6 and iOS7 about the State bar. For example, with:__________
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvuhjvdgvhcw==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
the code is the same. Just using a different SDK for compiling, where is the difference in detail?
Description
Xcode version number: 4.6.3 VS 5.0.2 device: IPhone 5s,ios 8.0 Executable file name: apidiff-sdk61 represents a running file that is compiled with iOS SDK 6.1 apidiff-sdk70 represents a running file that is compiled with iOS SDK 7.0 IPA file name: Apidiff-sdk61.ipa represents an IOS SDK 6.1 compiled installation package Apidiff-sdk70.ipa represents an iOS SDK 7.0 compiled installation package
Analysis:
Analysis One: Confirmation is a running program caused by
Verification Method:
with Apidiff-sdk70.ipa to replace the running program in Apidiff-sdk61.ipa To run the program in the
Then use the codesign command to sign again,
Packaged. The status bar is transparent when installed on the phone.
Note that the difference is really in a running program.
another signature method:
Codesign-f-S "certificate name"--resource-rules payload/*.app/resourcerules.plist Payload/*.app
Analysis Two: comparison of binary differences
since it is in the executable file. the first thing to think about is the use of binary comparison tools to see the difference between the two,The results are for example:
can see the difference is too big, so it makes no sense,this road is not feasible.
Analysis Three: Compare code differences
since there's no point in binary systems,then we'll compare the disassembly code,See if the compiler did anything.
can see the code of the two is almost the same,a little bit of difference in detail,is also caused by a compiler of different version numbers,the logic is the same. Therefore, it is not the code that causes the program to look different. In addition, the code does not read any global variables,The description is not due to any default values in Uikit that are compiled into the program. This causes the appearance of the status bar to be different.
Analysis Four: The effect of the Uikit version on the program
Since the code is not different,
The first thing we'll think about is whether the program looks different because of the Uikit version number.
Although the program is a dynamically linked Uikit,
And there is only one version number of the Uikit library on the device,
But we still have to verify that.
first determine the difference between the two. For example, with:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvuhjvdgvhcw==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast
You can see the difference between the two versions, But the compatible version number is 1.0. The theory is theory, we are now using the exclusion method to determine the cause of the problem,
authentication method: Change the Uikit version in apidiff-sdk61 to 2903.23.0. Change method: This value in the binary file offset is: 0x6ec, need to pay attention to the small end problem. after the change. Another signature. Packaged and installed on your phone, you find that the status bar has not changed. Therefore the reason is not the difference between the Uikit version.
Analysis five: Using Machoview to compare each item
To come here. I'm a little out of my wits.
The problem is there and we can't find the reason.
That's the most primitive tool: manual labor, using Machoview as a control.
From "__linkedit"
---> "lc_dyld_info_only"
---> "lc_load_dylinker"
---> "Lc_version_min_iphoneos"
the difference between a reserved value was found in "Lc_version_min_iphoneos":
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvuhjvdgvhcw==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
It feels possible that this is the solution to the problem. to verify: Change apidiff-sdk61. Offset address 0x69c, change the value to 00070000,sign again, pack and install to your phone,The discovery status bar becomes transparent. The problem is here.
TODO: How this difference affects the appearance of the program
How does this difference affect the appearance of the program, the possible original due to:
1. This property will be read in Uikit.
The possibilities are minimal. Uikit is just a library,
And the above differences are first obtained by the loader,
It's very far from Uikit.
2, springboard and related services.
The possibilities are great.
①:springboard several of its service itself has the duty of drawing;
②: Click on the map on the desktop , the program is started by springboard.
I'm just not going to continue with the verification. I have been able to satisfy my desire to be here, and the more powerful brothers can continue to analyze. ^_^
Explore the impact of different versions of the SDK on iOS programs