iOS Question Binary Rejected app crash (solved)


Well-Known Member
Licensed User
Longtime User
I have the same problem like other here in the forum, ipv6 rejection..

"Your app crashes on an iPad and iPhone running iOS 10.1 connected to an IPv6 network when we:
Selected the ‘Share’ button...
This occurred when your app was used:
- Offline
- On Wi-Fi

Please revise your app and test it on a device while connected to an IPv6 network (all apps must support IPv6) to ensure that it runs as expected."

I updated my iPhone5 to iOS 10.1 and tested my app in airplane mode, also offile without internet and wifi on. I couldn't reproduce the error, it is not crashing at all.

What information do I have to copy here then that you can help me guys..
Thank you..

Case "compartir"
modShare.ShareToSocialMedia(Page1, "Capers App", "Download Capers App:")
Sub Process_Globals
    Private myPage As Page 'ignore
End Sub


//- (void)share2SocialMedia:(NSString *)subj :(NSString *)txt :(NSString *)theurl :(NSString *)theimg
- (void)share2SocialMedia:(NSString *)subj :(NSString *)txt
    NSString *subject = subj;
    NSString *text = txt;
    //NSURL *url = [NSURL URLWithString:theurl];
    //UIImage *image;

    //if([theimg hasPrefix:@"http://"] || [theimg hasPrefix:@"https://"] ) {
    //    image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:theimg]]];
    //} else {
    //    image = [UIImage imageNamed:theimg];

    UIActivityViewController *controller =
    [[UIActivityViewController alloc]
    //initWithActivityItems:@[text, url, image]
    [controller setValue:subject forKey:@"subject"];

    controller.excludedActivityTypes = @[UIActivityTypePostToWeibo,

    [controller setCompletionHandler:^(NSString*activityType, BOOL completed) {

    if (completed) {
        [ raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activityType)]];
    } else {
        NSString *activity = @"";
        [ raiseEvent:nil event:@"activity_completed::" params:@[@((BOOL)completed),(activity)]];

    [(self._mypage).object presentViewController:controller animated:YES completion:nil];

#End If

Sub activity_completed(status As Boolean, T As String)
    Log("onSharingDone: Status = " & status & " - Type: " & T)
End Sub

'Sub ShareToSocialMedia(p As Page, SubjectTxt As String, TxtForShare As String, TheURL As String, ImageFile As String)
Sub ShareToSocialMedia(p As Page, SubjectTxt As String, TxtForShare As String)

    myPage = p
    Dim NativeMe As NativeObject = Me
    NativeMe.RunMethod("share2SocialMedia::", Array(SubjectTxt, TxtForShare))
    'NativeMe.RunMethod("share2SocialMedia::::", Array(SubjectTxt, TxtForShare, TheURL, ImageFile))

End Sub



Well-Known Member
Licensed User
Longtime User
I'm using identical code in my apps, no problems so far. I have pass review 7 days ago, app contain same share code as yours.
Can't test code on IPv6, on IPv4 and airplane mode code working fine.
Upvote 0


Well-Known Member
Licensed User
Longtime User
Reject again :-(
How can I know where be the problem with this app

Nov 1, 2016 at 6:39 AM
From Apple


Thank you for your prompt actions. After further review we have found that the app is not in compliance with guideline 2.4.1.
Performance - 2.4.1

Your app crashes on iPad running iOS 10.1 when we:

- Selected the ‘Share’ button found at the top of the screen.

Next Steps

Please review your app on iPad to ensure that it runs without crashing. Also, please follow the steps to reproduce the issue when running your app on iPad configured for real world use.

For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce. For updates, install the new version as an update to the previous version, then install and follow the steps to reproduce.


If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions.

If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
- complete details of your rejection issue(s)
- screenshots
- steps to reproduce the issue(s)
- symbolicated crash logs - if your issue results in a crash log

Best regards,
App Store Review
Upvote 0


Well-Known Member
Licensed User
Longtime User
I see maybe it's because my app doesn't work on iPad, I don't have iPad to do test..

"2.4.1 To ensure people get the most out of your app, iPhone apps should run on iPad whenever
possible. We encourage you to consider building universal apps so customers can use
them on all of their devices. Learn more about Universal apps"
Last edited:
Upvote 0


B4X founder
Staff member
Licensed User
Longtime User
This is the error:

Error occurred on line: 668 (Main)
Your application has presented a UIActivityViewController (<UIActivityViewController: 0x7a908400>). In its current trait environment, the modalPresentationStyle of a UIActivityViewController with this style is UIModalPresentationPopover. You must provide location information for this popover through the view controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the view controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.
Stack Trace: (
CoreFoundation __exceptionPreprocess + 194
libobjc.A.dylib objc_exception_throw + 52
UIKit -[UIPopoverPresentationController presentationTransitionWillBegin] + 3922
UIKit __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 2843
UIKit __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 513
UIKit __40+[UIViewController _scheduleTransition:]_block_invoke + 18
UIKit _runAfterCACommitDeferredBlocks + 348
UIKit _cleanUpAfterCAFlushAndRunDeferredBlocks + 624
UIKit _afterCACommitHandler + 190
CoreFoundation __CFRunLoopDoObservers + 391
CoreFoundation __CFRunLoopRun + 1414
CoreFoundation CFRunLoopRunSpecific + 395
CoreFoundation CFRunLoopRunInMode + 123
GraphicsServices GSEventRunModal + 177
GraphicsServices GSEventRun + 80
UIKit UIApplicationMain + 148
Capers Dunedin main + 140
libdyld.dylib start + 1

You need to add this line to the share2socialmedia inline code:
controller.popoverPresentationController.sourceView = self._mypage.RootPanel.object;

Note that it requires iOS 8+.
Upvote 0