Closed s2mr closed 4 years ago
Thanks for the issue! I'll check this out; I haven't yet tried out this package on iOS 14.0, but have had issues previously when the device name (gathered from UIDevice.current.name
) contains chars that do not conform to the allowed peerID, found here: https://developer.apple.com/documentation/multipeerconnectivity/mcpeerid/1407089-init
Summarised with: The maximum allowable length is 63 bytes in UTF-8 encoding.
Thanks for your rapidly information.
By your word, I read your library codes, found UIDevice.current.name in argument peerName
.
So I rewrite peerName instead of implicit nil, "\(Int(Date().timeIntervalSince1970))"
and run.
Before
multipeerHelp = MultipeerHelper(
serviceName: "helper-test",
sessionType: .both,
delegate: self
)
After
multipeerHelp = MultipeerHelper(
serviceName: "helper-test",
sessionType: .both,
peerName: "\(Int(Date().timeIntervalSince1970))",
delegate: self
)
The log is changed from previous it.
It's worth noting that the illegal string 㶒峍ꏝ犢」潭灰汥敫楴敬汯
I mentioned earlier has been removed。
But not working yet. 🤔
2020-06-29 23:56:12.089548+0900 MultipeerHelper+Example[12568:1844649] Metal GPU Frame Capture Enabled
2020-06-29 23:56:12.091231+0900 MultipeerHelper+Example[12568:1844649] Metal API Validation Enabled
Json Parse Error line 22: Json Deserialization; unknown member 'EnableGuidedFilterOcclusion' - skipping.
2020-06-29 23:56:14.781917+0900 MultipeerHelper+Example[12568:1844744] libMobileGestalt MobileGestalt.c:6131: Taking legacy CameraOffset_2D path
2020-06-29 23:56:14.782874+0900 MultipeerHelper+Example[12568:1844744] libMobileGestalt MobileGestalt.c:6131: Taking legacy CameraOffset_2D path
BrowserDelegate <MCPeerID: 0x28318c2b0 DisplayName = 1593442575>
new peer has joined: 1593442575
2020-06-29 23:56:16.350787+0900 MultipeerHelper+Example[12568:1844649] [Network] Mismatched protocol, received 0x5 expecting 0x6
2020-06-29 23:56:16.351009+0900 MultipeerHelper+Example[12568:1844649] [Network] Received corrupt message from 'YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGkCwwTFFUkbnVsbNMNDg8QERJUbmFtZVJpZFYkY2xhc3OAAhON4mbTcRRyRIADWjE1OTM0NDI1NzXSFRYXGFokY2xhc3NuYW1lWCRjbGFzc2VzWE1DUGVlcklEohcZWE5TT2JqZWN0CBEaJCkyN0lMUVNYXmVqbXR2f4GMkZylrrEAAAAAAAABAQAAAAAAAAAaAAAAAAAAAAAAAAAAAAAAug=='. Disconnecting.
2020-06-29 23:56:16.351066+0900 MultipeerHelper+Example[12568:1844649] [Network] Attempt to receive data from connection 'YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGkCwwTFFUkbnVsbNMNDg8QERJUbmFtZVJpZFYkY2xhc3OAAhON4mbTcRRyRIADWjE1OTM0NDI1NzXSFRYXGFokY2xhc3NuYW1lWCRjbGFzc2VzWE1DUGVlcklEohcZWE5TT2JqZWN0CBEaJCkyN0lMUVNYXmVqbXR2f4GMkZylrrEAAAAAAAABAQAAAAAAAAAaAAAAAAAAAAAAAAAAAAAAug==' that is disconnected
2020-06-29 23:56:25.963994+0900 MultipeerHelper+Example[12568:1844708] [GCKSession] Not in connected state, so giving up for participant [71147244] on channel [0].
2020-06-29 23:56:25.975565+0900 MultipeerHelper+Example[12568:1844708] [GCKSession] Not in connected state, so giving up for participant [71147244] on channel [1].
2020-06-29 23:56:25.986432+0900 MultipeerHelper+Example[12568:1844708] [GCKSession] Not in connected state, so giving up for participant [71147244] on channel [2].
2020-06-29 23:56:28.796853+0900 MultipeerHelper+Example[12568:1844699] [Graphics] Failed to find reflection for buffer clusterIndexTable
hello! from 1593442575
Sorry for the confusing example, but the other device has a different peer ID, and the other device is properly measure. 1593442572
Looks like this could be a bigger issue… I've opened a FB item about it after testing that Apple's own Collaborative Session example doesn't work anymore with iOS 14: https://developer.apple.com/documentation/arkit/creating_a_collaborative_session
Will update here if I hear anything or if anything else I try manages to fix it, thanks a lot for flagging this!
Thanks investigating. Strangely enough, Apple's example is worked with above device combination. (iOS13.5.1, iOS14 beta)
But Apple's example uses ARKit's collaborating implementation not RealityKit such as using Delegate func session(_ session: ARSession, didOutputCollaborationData data: ARSession.CollaborationData)
.
So different to this project structure.
I thought this problem is caused by iOS14 beta by your word.
So, I reverted my iPhoneX to iOS13.5.1 and tried.
But now, Apple's example and this project's example both not worked.
Run apple's example, after shows snack bar A peer wants to join the experience. Hold the phones next to each other.
, and shows A peer has left the shared experience
I don't get it.
I'm going to try different things. Thanks for everything.
It looks like that Sample I sent you has been edited on June 16th, and the local version I have is older than that!
I'll investigate the changes and hopefully it will be mystery solved 🙌
@s2mr I found a couple of additional things added to the plist for bonjour services which now allows the two devices to connect - however the scenes do not sync automatically, only messages can manually be sent between devices for now.
Created a pull request for the fix so far: https://github.com/maxxfrazer/MultipeerHelper/pull/9
Oh, thanks your rapidly support! I'll check it.
Hi! Thanks great some repository, and articles always.
I tried this project's example with two real devices. But not working. Of course, Can you work it yourselves? Specifically, Entity can not synchronization.
This is my situation.
This is log of Device2 (Receiver of red box)
Can you solve this problem?