Hello all.
I'm wondering some questions about the iOS project.
-Why the source is divided into 2 projects (love and liblove) ?
-How can these projects communicate?
-Where the LÖVE view is initialized?
And the most important:
-Is it possible to integrate some iOS native object with LÖVE? (Not directly in the game.love, but maybe modifying the xcodeproj, adding some subViews to the initial viewController)
Thank you.
Questions about LÖVE and iOS
Re: Questions about LÖVE and iOS
Anyone?
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Questions about LÖVE and iOS
I don't know that many issues working on iOS, but I'm rather sure that slime can help. Try contacting him directly or go to the irc he is usually there and you will have faster feedback
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Questions about LÖVE and iOS
I can only give solid answer to the last one -yes you can- because I've seen someone else doing it.
The love part can be thought as a basic shell that runs the app, and liblove part as a collection of LÖVE modules and scripts. To draw an analogy, love is a thin .exe and liblove is a bulk .dll that comes with it. They "communicate" using native application binary interface, that's nothing you should worry about though.
LÖVE is built on top of SDL, which handles things like window creation and user input. So it just tells SDL to create a window and that's the whole story. The rest is up to SDL.
The love part can be thought as a basic shell that runs the app, and liblove part as a collection of LÖVE modules and scripts. To draw an analogy, love is a thin .exe and liblove is a bulk .dll that comes with it. They "communicate" using native application binary interface, that's nothing you should worry about though.
LÖVE is built on top of SDL, which handles things like window creation and user input. So it just tells SDL to create a window and that's the whole story. The rest is up to SDL.
Re: Questions about LÖVE and iOS
Great idea, thanksPositive07 wrote:I don't know that many issues working on iOS, but I'm rather sure that slime can help. Try contacting him directly or go to the irc he is usually there and you will have faster feedback
Good explanation, thank you.raidho36 wrote:I can only give solid answer to the last one -yes you can- because I've seen someone else doing it.
The love part can be thought as a basic shell that runs the app, and liblove part as a collection of LÖVE modules and scripts. To draw an analogy, love is a thin .exe and liblove is a bulk .dll that comes with it. They "communicate" using native application binary interface, that's nothing you should worry about though.
LÖVE is built on top of SDL, which handles things like window creation and user input. So it just tells SDL to create a window and that's the whole story. The rest is up to SDL.
Unfortunatly SDL does lots of things (such as the creation of the UIApplication or the creation of the initial view) that I can't find in the code, therefore adding a subView is complicated.
Another thing is that SDL uses its own classes of UIView and UIWindow and in this project there is no AppDelegate.
Today I'll try to create a new UIWindow using SDL as you said.
Thank you
-
- Citizen
- Posts: 67
- Joined: Tue Jan 14, 2014 11:03 pm
Re: Questions about LÖVE and iOS
I'm interested as well. @slime?
I had planned to start integrating an Ad service on iOS (vungle or unity ads). My knowledge is limited in this area though so any help to where to start looking in the code would be appreciated.
I had planned to start integrating an Ad service on iOS (vungle or unity ads). My knowledge is limited in this area though so any help to where to start looking in the code would be appreciated.
Re: Questions about LÖVE and iOS
Update: I have added a new view succesfully. Unfortunatly creating a new window using SDL does not work. The key is to add a subview to the SDL_Window.
- slime
- Solid Snayke
- Posts: 3172
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Questions about LÖVE and iOS
Yes, you can add a subview to the SDL window's uiwindow, by using the SDL_GetWindowWMInfo function to obtain a pointer to the UIWindow. The SDL window / UIWindow is destroyed and recreated every time love.window.setMode is called.
'love' and 'liblove' are split up like that in all operating systems – on macOS / Linux / Windows, liblove is a dynamic library which you can use as a Lua module via require if you want. love is just a tiny executable which links to liblove. liblove is statically linked on iOS.
The AppDelegate and almost all platform-specific iOS code is in SDL, although you don't need to modify SDL to modify / add to the uiwindow (see above).
'love' and 'liblove' are split up like that in all operating systems – on macOS / Linux / Windows, liblove is a dynamic library which you can use as a Lua module via require if you want. love is just a tiny executable which links to liblove. liblove is statically linked on iOS.
The AppDelegate and almost all platform-specific iOS code is in SDL, although you don't need to modify SDL to modify / add to the uiwindow (see above).
Re: Questions about LÖVE and iOS
Now it sounds more clearslime wrote:Yes, you can add a subview to the SDL window's uiwindow, by using the SDL_GetWindowWMInfo function to obtain a pointer to the UIWindow. The SDL window / UIWindow is destroyed and recreated every time love.window.setMode is called.
'love' and 'liblove' are split up like that in all operating systems – on macOS / Linux / Windows, liblove is a dynamic library which you can use as a Lua module via require if you want. love is just a tiny executable which links to liblove. liblove is statically linked on iOS.
The AppDelegate and almost all platform-specific iOS code is in SDL, although you don't need to modify SDL to modify / add to the uiwindow (see above).
Since the Window is destroyed every time love.window.setMode is called, have I to recreate my subview every time?
EDIT: how do callbacks work?
Who is online
Users browsing this forum: No registered users and 1 guest