iOS Question Main.o and iTunes Connect

fbritop

Active Member
Licensed User
Longtime User
I have tried 3 times to upload the Archive.zip to iTunes. It keeps "processing" forever on iTunes, while I receive an email with every upload with the following info:

Dear developer,
We have discovered one or more issues with your recent delivery for "XXXXXX.COM". Your delivery was successful, but you may wish to correct the following issues in your next delivery:
Invalid Bundle Structure- The binary file 'LlaveMovil.app/main.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to theBundle Programming Guidefor information on the iOS app bundle structure.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
Regards,
The App Store team

Any ideas on how to correct this?
Thanks
FBP
 

schimanski

Well-Known Member
Licensed User
Longtime User
I now have tested it with the default main file and without the fetch download feature, but the same problem. This are the two mails from apple:

First Mail:
Dear developer,

We have discovered one or more issues with your recent delivery for "EIS". To process your delivery, the following issues must be corrected:

Invalid Segment Alignment - The app binary at '/Payload/EIS.app/main.o' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.

Missing load commands - The executable at '/Payload/EIS.app/main.o' does not have the necessary load commands. Try rebuilding the app with the latest Xcode version. If you are using third party development tools, contact the provider.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

Second Mail:
Dear developer,

We have discovered one or more issues with your recent delivery for "EIS". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

Invalid Bundle Structure - The binary file 'EIS.app/main.o' is not permitted. Your app can't contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide for information on the iOS app bundle structure.

After you've corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.

Regards,

The App Store team
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Hello Erel! I have send you the rc.dat with the main-file of silent push and fetch download!
I have now tested more and deleted then

#PlistExtra:<key>UIBackgroundModes</key><array><string>remote-notification</string></array>

and the main-file out of the project. Now, the build is accepted by apple!:)
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
I load the build up to TestFlight, internal testers. Than, the Build will be checked from Apple in less than 10 minutes.
 
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
Later today I will have app loader 3.0 installed. I had an old os on my mac. Will let you see how it goes
 
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
Erel,
I installed APP LOADER 3.0 and upload the binary.

Now my APP is rejected. I received two emails. THe first one, only a warning (Invalid Bundle Structure)

The second one, is the rejection:
We have discovered one or more issues with your recent delivery for "llavemovil.com". To process your delivery, the following issues must be corrected:

Invalid Segment Alignment - The app binary at '/Payload/LlaveMovil.app/main.o' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.

Missing load commands - The executable at '/Payload/LlaveMovil.app/main.o' does not have the necessary load commands. Try rebuilding the app with the latest Xcode version. If you are using third party development tools, contact the provider.

Once these issues have been corrected, you can then redeliver the corrected binary.



I cannot seem to find where to correct this issues, as they are generated when xCode is compiled in your side. I know that is been rejected, as in iTunes Connect is does no even lists as "Processing".

My main.h file in the Files/Special folder is:

B4X:
#import <UIKit/UIKit.h>

#import "iCore.h"

@interface B4IMyDelegate : B4IAppDelegate
   
@end

@implementation B4IMyDelegate {
void (^complete)(UIBackgroundFetchResult);
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
    NSLog(@"didReceiveRemoteNotification fetchCompletionHandler");
    self->complete = completionHandler;
    [super application:application didReceiveRemoteNotification:userInfo];

}
- (void)complete:(int)result {
    self->complete((UIBackgroundFetchResult) result);
}
@end


int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([B4IMyDelegate class]));
    }

}
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I found the problem. It is seems to be related to a change in the way Xcode 7 builds the project.

Instead of adding the modified main.m file to the "special folder", you need to replace the internal main.m file.

It is located under:
Program Files\Anywhere Software\B4i\Project

You may need to do it as an administrator.

This means that it will affect all applications.
This issue will be fixed in the next update of B4i.
 
Upvote 0

schimanski

Well-Known Member
Licensed User
Longtime User
Very good news, Erel! Thank you very much!

I have tested it! Runs perfect with the combined main-file!!!
 
Last edited:
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
OK one question. main.m that is inside the Special Folder, needs to be removed before we compile & upload?
 
Upvote 0
Top