stride icon indicating copy to clipboard operation
stride copied to clipboard

iOS Projects Fail to Build

Open MeharDT opened this issue 10 months ago • 6 comments

Release Type: Official Release

Version: 4.2.0.2122, 4.1.x

Platform(s): iOS

Describe the bug iOS projects in Stride 4.1 and 4.2 will show the following errors in the AppDelegate class when attempting to build.

Error	CS0234	The type or namespace name 'Starter' does not exist in the namespace 'Stride' (are you missing an assembly reference?)
Error	CS0246	The type or namespace name 'StrideApplicationDelegate' could not be found (are you missing a using directive or an assembly reference?)

To Reproduce Steps to reproduce the behavior:

  1. Start Stride 4.2.0.2122
  2. Create a New Game project for iOS
  3. Once Stride Game Studio has loaded, open the Visual Studio solution and build the iOS project

Expected behavior The errors should not be thrown and the iOS platform should build successfully.

Additional context Does not occur in Stride 4.0 projects.

MeharDT avatar Apr 07 '24 02:04 MeharDT

I encountered the same issue. Do you find a solution to solve it?

Arktische avatar Jun 11 '24 15:06 Arktische

Hi, I haven't had a chance to properly debug this at a source level yet and I don't know if anyone else has either.

If you need Stride and iOS support the only solution at the moment seems to be to use version 4.0 and upgrade once fixed.

MeharDT avatar Jun 11 '24 20:06 MeharDT

Hello @Arktische, are you sure you were getting the same errors originally in your Stride iOS project? Specifically regarding the missing namespaces?

MeharDT avatar Jun 15 '24 04:06 MeharDT

I don't have an iOS machine so can't help with anything beyond this single post. StrideApplicationDelegate.cs (which is the file the error is wanting) got deleted in this commit https://github.com/stride3d/stride/commit/95638682f3c2b12c29960ee756cb43a573ab1c30 I think this needs a Silk replacement, however no replacement had been implemented on Stride's side of things and it appears Silk's last note on iOS was it only had experimental support for iOS.

Also be aware in that same commit the EditText control for iOS throws a bunch of NotImplementedException so that also appears incomplete.

Basewq avatar Jun 15 '24 04:06 Basewq

Thanks for your reply, so is iOS build not available for stride4.2 or there's any way to replace this StrideApplicationDelegate?

Arktische avatar Jun 15 '24 07:06 Arktische

我没有 iOS 机器,所以除了这篇文章之外,我无能为力。 (这是错误想要的文件)在此提交中删除9563868 我认为这需要 Silk 替换,但是 Stride 方面没有实现任何替换,似乎 Silk 在 iOS 上的最后一条说明是它只对 iOS 提供实验性支持。StrideApplicationDelegate.cs 还要注意,在同一提交中,iOS 的 EditText 控件会抛出一堆,因此看起来也不完整。NotImplementedException

Thanks for your reply, so is iOS build not available for stride4.2 or there's any way to replace this StrideApplicationDelegate?

I don't know. When the Android version was changed, xen2 simplified the code in this commit 3ce7fac07921638b7ffe4c286a33222687a8a394 See the change from AndroidStrideActivity.cs to StrideActivity.cs

I think if you want to replace StrideApplicationDelegate.cs, the important code is create a new GameContextiOS and Game, then call Game.Run(GameContext);. I think you can ignore the CreateView & CreateViewController code. Sorry, I cannot test this so I do not actually know if this will work.

Basewq avatar Jun 15 '24 08:06 Basewq