#StackBounty: #ios #app-store #itunesconnect #game-center Game Center Leaderboard not appearing on production version of game?

Bounty: 50

My game went on the app store a few days ago and I cannot see my leaderboard at all. It just says “no data available”

However, when I build my game directly to my phone using an ad hoc profile I’m seeing my beta player’s scores..

enter image description here

My leaderboard is in the not live status. I’m not sure if that matters or how to change that. I have other games with a “not live” leaderboard that are working on production..

Should I delete and remake the leaderboard now that my game is actually up on the app store?

I cleared my test data.. no luck.

Do I just need to wait? It’s confusing.

I’ve called Apple support and theyre “working on it” but I feel like I’m stuck in a black hole now.. any way I can fix this myself?


Get this bounty!!!

#StackBounty: #ios #swift3 How do I prevent a navigationController from returning to root when dismissing MFMailComposeViewController

Bounty: 50

When I dismiss an instance of MFMailComposeViewController or MFMessageComposeViewController that is presented modally from the third viewController in a navigation stack, the navigation stack is reset, and the root VC is reloaded. How can I prevent this behavior and remain on the original presenting viewController (third VC in the stack)? I get the same behavior whether I call dismiss from the presenting VC, the presented VC, or the navigationController.

This has been asked before, but I have not seen a solution.

App Structure looks like this:

TabBarController
Tab 1 - TripsNavController
    -> Trips IntroductionVC (root VC) segue to:
    -> TripsTableViewController segue to:
    -> TripEditorContainerVC
         - TripEditorVC (child of ContainerVC)
         - HelpVC (child of ContainerVC)
Tab 2...
Tab 3...
Tab 4...

In the TripEditorVC I present the MFMailComposeViewController. The functions below are declared in an extension to UIViewController that adopts the MFMailComposeViewControllerDelegate protocol

func shareWithEmail(message: NSAttributedString) {

    guard MFMailComposeViewController.canSendMail() else {
        showServiceError(message: "Email Services are not available")
        return
    }

    let composeVC = MFMailComposeViewController()
    composeVC.setSubject("My Trip Plan")
    composeVC.setMessageBody(getHTMLforAttributedString(attrStr: message), isHTML: true)
    composeVC.mailComposeDelegate = self

    present(composeVC, animated: true, completion: nil)

}

Then in the delegate method I dismiss the MFMailComposeVC:

public func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {

    switch result {
    case .sent:
        print("Mail sent")
    case .saved:
        print("Mail saved")
    case .cancelled:
        print("Mail cancelled")
    case .failed:
        print("Send mail failed")
    }

    if error != nil {

       showServiceError(message: "Error: (error!.localizedDescription)")
    }

    dismiss(animated: true, completion: nil)
}

I have tried the following to present and dismiss and get the same behavior, i.e.: the TripsNavController clears the nav stack and reloads the TripsIntroductionVC as its root VC:

self.present(composeVC, animated: true, completion: nil)
self.parent?.present(composeVC, animated: true, completion: nil)
self.parent?.navigationController?.present(composeVC, animated: true, completion: nil)
self.navigationController?.present(composeVC, animated: true, completion: nil)


Get this bounty!!!

#StackBounty: #android #ios #react-native What are my options for storing data when using React Native? (iOS and Android)

Bounty: 100

I am still new in the React Native world, and generally in the mobile/native world as well, and I am finding the documentation a bit lacking when it comes to data persistence.

What are my options for storing data in React Native and the implications of each type? For instance, I see that there is local storage and async storage, but then I also see things like Realm, and I’m confused how all of this would work with an outside database.

I specifically want to know:

  • What are the different options for data persistence?
  • For each, what are the limits of that persistence (i.e., when is the data no longer available)? For example: when closing the application, restarting the phone, etc.
  • For each, are there differences (other than general setup) between implementing in iOS vs Android?
  • How do the options compare for accessing data offline? (or how is offline access typically handled?)
  • Are there any other considerations I should keep in mind?

Thanks for your help!


Get this bounty!!!

#StackBounty: #ios #swift #uiview #swift3 `ExpressibleByArrayLiteral` conformed to by class and its superclass => "<supercla…

Bounty: 100

I want to be able to instantiate a subclass, here named MyLabel, which is a subclass of UILabel, using array literals.

However the compiler stops me:

let custom: MyLabel = [1, 2, 3, 4] // Compilation error: "Could not cast value of type 'UILabel' to 'MyLabel'"

However, using array literal instantiation of UILabel works, thanks to conformance to custom protocol Makeable below.

let vanilla: UILabel = [1, 2, 3, 4] // works!

Is it somehow possible to make the compiler understand that I am referring to the array literal initializer of the subclass MyLabel and not its superclass UILabel?

The following code might not make any logical sense, but it is a minimal example, hiding away what I really want:

// This protocol has been REALLY simplified, in fact it has another name and important code.
public protocol ExpressibleByNumberArrayLiteral: ExpressibleByArrayLiteral {
    associatedtype Element
}

public protocol Makeable: ExpressibleByNumberArrayLiteral {
    // we want `init()` but we are unable to satisfy such a protocol from `UILabel`, thus we need this work around
    associatedtype SelfType
    static func make(values: [Element]) -> SelfType
}

public protocol Instantiatable: ExpressibleByNumberArrayLiteral {
    init(values: [Element])
}

// My code might have worked if it would be possible to check for _NON-conformance_ in where clause
// like this: `extension Makeable where !(Self: Instantiatable)`
extension Makeable {
    public init(arrayLiteral elements: Self.Element...) {
        self = Self.make(values: elements) as! Self
    }
}

extension Instantiatable {
    init(arrayLiteral elements: Self.Element...) {
        self.init(values: elements)
    }
}

extension UILabel: Makeable {
    public typealias SelfType = UILabel
    public typealias Element = Int

    public static func make(values: [Element]) -> SelfType {
        let label = UILabel()
        label.text = "Sum: (values.reduce(0,+))"
        return label
    }
}

public class MyLabel: UILabel, Instantiatable {
    public typealias Element = Int
    required public init(values: [Element]) {
        super.init(frame: .zero)
        text = "Sum: (values.reduce(0,+))"
    }

    public required init?(coder: NSCoder) { fatalError() }
}

let vanilla: UILabel = [1, 2, 3, 4]
print(vanilla.text!) // prints: "Sum: 10"

let custom: MyLabel = [1, 2, 3, 4] // Compilation error: "Could not cast value of type 'UILabel' to 'MyLabel'"

I have also tried conforming to ExpressibleByArrayLiteral protocol by extending ExpressibleByNumberArrayLiteral instead (I suspect the two solutions might be equivalent, and compile to the same code..), like this:

extension ExpressibleByNumberArrayLiteral where Self: Makeable {
    public init(arrayLiteral elements: Self.Element...) {
        self = Self.make(values: elements) as! Self
    }
}

extension ExpressibleByNumberArrayLiteral where Self: Instantiatable {
    init(arrayLiteral elements: Self.Element...) {
        self.init(values: elements)
    }
}

But that did not work either. The same compilation error occurs.

I’ve written a comment in the big code block above, the compiler might have been able to determine which array literal initializer I was referring to if I would have been able to use negation in the where clause:
extension Makeable where !(Self: Instantiatable)

But AFAIK that is not possible, that code does not compile at least. Nor does extension Makeable where Self != Instantiatable.

Is what I want to do possible?

I would be okay with having to make MyLabel a final class. But that makes no difference.

Please please please say that this is possible.


Get this bounty!!!

#StackBounty: #android #ios #xmpp #ejabberd #xmppframework ejabberd How to use MUC/SUB with xmppframework

Bounty: 50

We are using ejabberd 17.01 for an iOS and Android application.

We need to create a persistent room where user shall be able to receive messages while they are not connected/ joined in the room.

We think ejabberd has the solution for that.

How to configure that in XMPPFramework in iOS and smack in Android SMACK library .


Get this bounty!!!

#StackBounty: #ios #objective-c #iphone #uiview #uinavigationbar UIBarButton Item on screen edge in iOS 8 when used in standalone view

Bounty: 350

In my UINavigation bar added to a XIB with a number of UIViews the positioning of the left and right bar button item is way off:

Navigation bar in additiona UIView in XIB

The view in the XIB simply has an outlet to a view controller, but is not the main view. It’s shown via:

[UIView transitionFromView:self.view toView:self.settingsView duration:0.2 options:UIViewAnimationOptionTransitionFlipFromLeft completion:NULL];

I have another simpler view which is directly bound to the view property of a view controller which – as expected – looks just normal.

Normal navigation bar

All the views have auto layout. The constraints are fine. I tried a number of different things, but couldn’t come up with a fix (or a reason, for that matter). The navigation bar and items are just plain vanilla bar button items without anything like appearance proxies etc…

In the 7.1 sim everything looks just normal.

Anyone seen this before?

Thanks

[EDIT]

I found a solution but not the reason:

If I instead of

[UIView transitionFromView:self.view toView:self.settingsView duration:0.2 options:UIViewAnimationOptionTransitionFlipFromLeft completion:NULL];

which adds the new view as a subview of the UIWindow,

use this:

[UIView transitionWithView:self.view duration:0.2 options:UIViewAnimationOptionTransitionFlipFromLeft animations:^{
    [self.view addSubview:self.settingsView];
} completion:nil];

which adds the new view as a subview of the existing UIViewControllers view, everything is fine.

I wonder if this a bug and UINavigationBars render in a strange way if contained in a view that is dynamically added to the window…


Get this bounty!!!

#StackBounty: #ios #ruby-on-rails #pusher Can a private channel communication happen between two Pusher Apps

Bounty: 50

I have two iOS apps, lets call it Agent app and Customer App.
I have a chat feature between these two apps, but the chats need to be recorded on the server.

I have created two Pusher Apps, one for each of the iOS apps. They both subscribe to their respective private-{id}-channel.

Now every time a message is generated from say Agent app (via HTTP request to server), I want server to create a pusher event with Agent’s message on Customer’s private channel.

Is it possible to achieve the above using Pusher Private channels?


Get this bounty!!!

#StackBounty: #ios #objective-c #annotations #mkmapview #mapkit All Annotation is not visible to user in MKMapView

Bounty: 50

I am using MKMapView and have added a number of annotation pins to the map. All annotation belong to different country, so i do not able to set all annotation visible to user.

Please do try using below latitude and longitude for annotation.

First annotation Latitude:23.029690

First annotation Longitude: 72.527359

Second annotation Latitude:34.210855

Second annotation Longitude: -118.622636

I was try below solution but it is not working.

1) Using MKMapRectUnion

 MKMapRect zoomRect = MKMapRectNull;
    for (id <MKAnnotation> annotation in mapViewPledgeList.annotations)
    {
        MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate);
        MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0.1, 0.1);
        zoomRect = MKMapRectUnion(zoomRect, pointRect);
    }
    [mapViewPledgeList setVisibleMapRect:zoomRect animated:YES];

2) Using showAnnotations

 [mapViewPledgeList showAnnotations:mapViewPledgeList.annotations animated:YES];

Issue:- suggest any solution so all annotation keep visible to user.


Get this bounty!!!

#StackBounty: #android #ios #framework Mobile web apps IDEs or frameworks focused on design?

Bounty: 50

I’m a bit lost on what kind of framework I should use to develop Android / iOS applications, I don’t need the application to look native, I’m really focused on design, and the current frameworks focus on a “native look”, for example there are these frameworks that I considered useful:

Also I checked that many frameworks in turn can uses another, like PhoneGap (and so many others) uses Cordova,
but I’m not sure if some of those will really help for this purposes.
What my application actually have to do is display a design structure like a mind map;
a great example of what I need is this app called Mindly,
it has a very good example of functionality and fluid design effects.

Mindly screenshot

It’s almost impossible to develop an app natively like that,
so, if someone could give a good recommendation to achieve this kind of designs would be useful for everyone.


Get this bounty!!!

#StackBounty: #android #ios #framework Mobile web apps frameworks focused on design?

Bounty: 50

I’m a bit lost on what kind of framework I should use to develop Android / iOS applications, I don’t need the application to look native, I’m really focused on design, and the current frameworks focus on a “native look”, for example there are these frameworks that I considered useful:

Also I checked that many frameworks in turn uses another, like a lot uses Cordova,
but I’m not sure if some of those will really help for this purposes.
What my application actually have to do is display a design structure like a mind map;
a great example of what I need is this app called Mindly,
it has a very good example of functionality and fluid design effects.

Mindly screenshot

It’s almost impossible to develop an app natively like that,
so, if someone could give a good recommendation based on the tools that in turn uses to achieve this kind of designs would be useful for everyone.


Get this bounty!!!