Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bring back ios-simulator support #3278

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/common/entry/entry_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/CAEAGLLayer.h>

#if __IPHONE_8_0 && !TARGET_IPHONE_SIMULATOR // check if sdk/target supports metal
#if __IPHONE_13_0 // From iOS 13 Simulators support metal
# import <Metal/Metal.h>
# import <QuartzCore/CAMetalLayer.h>
# define HAS_METAL_SDK
Expand Down
2 changes: 1 addition & 1 deletion examples/runtime/ios-info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.company.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
10 changes: 10 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ projgen: ## Generate project files for all configurations.
$(GENIE) --with-examples --gcc=wasm2js gmake
$(GENIE) --with-combined-examples --gcc=ios-arm gmake
$(GENIE) --with-combined-examples --gcc=ios-arm64 gmake
$(GENIE) --with-combined-examples --gcc=ios-simulator gmake
$(GENIE) --with-combined-examples --gcc=tvos-simulator gmake
$(GENIE) --with-combined-examples --gcc=rpi gmake

idl: ## Generate code from IDL.
Expand Down Expand Up @@ -215,6 +217,14 @@ ios-arm64-release: .build/projects/gmake-ios-arm64 ## Build - iOS ARM64 Release
$(MAKE) -R -C .build/projects/gmake-ios-arm64 config=release
ios-arm64: ios-arm64-debug ios-arm64-release ## Build - iOS ARM64 Debug and Release

.build/projects/gmake-ios-simulator:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm reintroducing only ios-simulator (64 bit) support as 32-bit simulators were discontinued.

iOS 10, which was released in 2016, was the last version of iOS to run 32-bit apps. As of iOS 11, all 32-bit apps installed on device will not launch.

Source: https://developer.apple.com/news/upcoming-requirements/?id=06062022a

$(GENIE) --gcc=ios-simulator gmake
ios-simulator-debug: .build/projects/gmake-ios-simulator ## Build - iOS Simulator Debug
$(MAKE) -R -C .build/projects/gmake-ios-simulator config=debug
ios-simulator-release: .build/projects/gmake-ios-simulator ## Build - iOS Simulator Release
$(MAKE) -R -C .build/projects/gmake-ios-simulator config=release
ios-simulator: ios-simulator-debug ios-simulator-release ## Build - iOS Simulator Debug and Release

.build/projects/gmake-rpi:
$(GENIE) --gcc=rpi gmake
rpi-debug: .build/projects/gmake-rpi ## Build - RasberryPi Debug
Expand Down
5 changes: 5 additions & 0 deletions scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ function exampleProjectDefaults()
"-framework UIKit",
"-weak_framework Metal",
}
xcodecopyresources {
{ "shaders/metal", {
os.matchfiles(path.join(BGFX_DIR, "examples/runtime/shaders/metal/**.bin"))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes crashing examples

}}
}

configuration { "xcode*", "ios" }
kind "WindowedApp"
Expand Down
2 changes: 1 addition & 1 deletion scripts/geometryv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ project ("geometryv")
"-framework UIKit",
}

configuration { "xcode4", "ios" }
configuration { "xcode*", "ios" }
kind "WindowedApp"

configuration { "qnx*" }
Expand Down