x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

OnlineSessionIOS initialization crash and Find/Join issues

Our team is attempting to implement networked multiplayer for IOS, when we encountered an issue that seemed unresolved since 4.9:

https://answers.unrealengine.com/questions/331257/crash-when-use-onlinesubsystemios.html

Using a stock version of unreal 4.22.3, you cannot create a session for IOS without it crashing. After showing external login UI, logging into game center, and firing off the Create Session node, it will crash because of line 120 of OnlineSessionInterfaceIOS.cpp:

 self.PeerID = [[[MCPeerID alloc] initWithDisplayName:@""] autorelease];

Apple's Developer documentation on that method outright states that the display name cannot be an empty string, so it fails to create the PeerID and eventually crashes. See https://developer.apple.com/documentation/multipeerconnectivity/mcpeerid/1407089-initwithdisplayname?language=objc

In our locally compiled version of the Engine, we did attempt to use the fix in the Answer Hub thread I linked, however we ran into additional issues. Find Sessions will look through the list of sessions stored in GKSessions, but it never adds any sessions discovered on the network, only the one created locally in Create Session. When checking if sessions are available it is hardcoded to return NO, and Join Session seems completely unimplemented. (See OnlineSessionInterfaceIOS.cpp lines 140-166)

After encountering all these issues, we would like to know if there's anything we did wrong or things we are missing, or if there are ways to resolve these issues.

Product Version: UE 4.22
Tags:
more ▼

asked Jul 30 '19 at 11:06 PM in Bug Reports

avatar image

phosph_jcrockett
41 1

avatar image Jeff A ♦♦ STAFF Jul 31 '19 at 01:32 PM

Hello,

We've recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

avatar image Hezkezl 21 minutes ago

It looks like the iOS OSS implementation has atrophied, and isn't functional in its current state. We are seeing similar issues here with our own sample apps. We have someone working on repairing the OSS in the short term, but I don't have an ETA on when that work will be completed.

if "__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0" it looks to be using MCSession instead of GKSession, but it doesn't appear that the MCSession work is completed.

It may be worthwhile to (for the meantime) to modify the OnlineSessionInterfaceIOS files to set the instances where it says "#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0" to "#if 1"

and where it says "#ifdef __IPHONE_7_0" to "#if 0"

That will cause it to fall back to the GKSession API, which, although deprecated, looks to be functionally complete.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello, we’re currently investigating this issue and we hope to have a solution for it relatively soon. I’ll update here as soon as I have a tested fix.

more ▼

answered Aug 05 '19 at 06:46 PM

avatar image

COsmin.Traian.Su STAFF
1 1

avatar image Anna.Milner 6 days ago

Additional question from the initial post: "I was also wondering, since one of the API’s that’s currently used is GKSession which is deprecated:

https://developer.apple.com/documentation/gamekit/gksession

(And the list of other deprecated APIs is here:) https://developer.apple.com/documentation/gamekit/deprecated_symbols

Are y’all going to update the ios networking/matchmaking/etc API to the latest and greatest apple api or will the updates still use the old API?"

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question